compatibility.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717
  1. /**
  2. * @licstart The following is the entire license notice for the
  3. * Javascript code in this page
  4. *
  5. * Copyright 2017 Mozilla Foundation
  6. *
  7. * Licensed under the Apache License, Version 2.0 (the "License");
  8. * you may not use this file except in compliance with the License.
  9. * You may obtain a copy of the License at
  10. *
  11. * http://www.apache.org/licenses/LICENSE-2.0
  12. *
  13. * Unless required by applicable law or agreed to in writing, software
  14. * distributed under the License is distributed on an "AS IS" BASIS,
  15. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. * See the License for the specific language governing permissions and
  17. * limitations under the License.
  18. *
  19. * @licend The above is the entire license notice for the
  20. * Javascript code in this page
  21. */
  22. 'use strict';
  23. var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
  24. if (typeof PDFJS === 'undefined' || !PDFJS.compatibilityChecked) {
  25. var globalScope = require('./global_scope');
  26. var isNodeJS = require('./is_node');
  27. var userAgent = typeof navigator !== 'undefined' && navigator.userAgent || '';
  28. var isAndroid = /Android/.test(userAgent);
  29. var isIOSChrome = userAgent.indexOf('CriOS') >= 0;
  30. var isIE = userAgent.indexOf('Trident') >= 0;
  31. var isIOS = /\b(iPad|iPhone|iPod)(?=;)/.test(userAgent);
  32. var isSafari = /Safari\//.test(userAgent) && !/(Chrome\/|Android\s)/.test(userAgent);
  33. var hasDOM = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && (typeof document === 'undefined' ? 'undefined' : _typeof(document)) === 'object';
  34. if (typeof PDFJS === 'undefined') {
  35. globalScope.PDFJS = {};
  36. }
  37. PDFJS.compatibilityChecked = true;
  38. (function checkNodeBtoa() {
  39. if (globalScope.btoa || !isNodeJS()) {
  40. return;
  41. }
  42. globalScope.btoa = function (chars) {
  43. return Buffer.from(chars, 'binary').toString('base64');
  44. };
  45. })();
  46. (function checkNodeAtob() {
  47. if (globalScope.atob || !isNodeJS()) {
  48. return;
  49. }
  50. globalScope.atob = function (input) {
  51. return Buffer.from(input, 'base64').toString('binary');
  52. };
  53. })();
  54. (function checkOnBlobSupport() {
  55. if (isIE || isIOSChrome) {
  56. PDFJS.disableCreateObjectURL = true;
  57. }
  58. })();
  59. (function checkNavigatorLanguage() {
  60. if (typeof navigator === 'undefined') {
  61. return;
  62. }
  63. if ('language' in navigator) {
  64. return;
  65. }
  66. PDFJS.locale = navigator.userLanguage || 'en-US';
  67. })();
  68. (function checkRangeRequests() {
  69. if (isSafari || isIOS) {
  70. PDFJS.disableRange = true;
  71. PDFJS.disableStream = true;
  72. }
  73. })();
  74. (function checkCanvasSizeLimitation() {
  75. if (isIOS || isAndroid) {
  76. PDFJS.maxCanvasPixels = 5242880;
  77. }
  78. })();
  79. (function checkFullscreenSupport() {
  80. if (!hasDOM) {
  81. return;
  82. }
  83. if (isIE && window.parent !== window) {
  84. PDFJS.disableFullscreen = true;
  85. }
  86. })();
  87. (function checkCurrentScript() {
  88. if (!hasDOM) {
  89. return;
  90. }
  91. if ('currentScript' in document) {
  92. return;
  93. }
  94. Object.defineProperty(document, 'currentScript', {
  95. get: function get() {
  96. var scripts = document.getElementsByTagName('script');
  97. return scripts[scripts.length - 1];
  98. },
  99. enumerable: true,
  100. configurable: true
  101. });
  102. })();
  103. (function checkChildNodeRemove() {
  104. if (!hasDOM) {
  105. return;
  106. }
  107. if (typeof Element.prototype.remove !== 'undefined') {
  108. return;
  109. }
  110. Element.prototype.remove = function () {
  111. if (this.parentNode) {
  112. this.parentNode.removeChild(this);
  113. }
  114. };
  115. })();
  116. (function checkStringIncludes() {
  117. if (String.prototype.includes) {
  118. return;
  119. }
  120. String.prototype.includes = require('core-js/fn/string/includes');
  121. })();
  122. (function checkArrayIncludes() {
  123. if (Array.prototype.includes) {
  124. return;
  125. }
  126. Array.prototype.includes = require('core-js/fn/array/includes');
  127. })();
  128. (function checkMathLog2() {
  129. if (Math.log2) {
  130. return;
  131. }
  132. Math.log2 = require('core-js/fn/math/log2');
  133. })();
  134. (function checkNumberIsNaN() {
  135. if (Number.isNaN) {
  136. return;
  137. }
  138. Number.isNaN = require('core-js/fn/number/is-nan');
  139. })();
  140. (function checkNumberIsInteger() {
  141. if (Number.isInteger) {
  142. return;
  143. }
  144. Number.isInteger = require('core-js/fn/number/is-integer');
  145. })();
  146. (function checkPromise() {
  147. if (globalScope.Promise) {
  148. return;
  149. }
  150. globalScope.Promise = require('core-js/fn/promise');
  151. })();
  152. (function checkWeakMap() {
  153. if (globalScope.WeakMap) {
  154. return;
  155. }
  156. globalScope.WeakMap = require('core-js/fn/weak-map');
  157. })();
  158. (function checkURLConstructor() {
  159. var hasWorkingUrl = false;
  160. try {
  161. if (typeof URL === 'function' && _typeof(URL.prototype) === 'object' && 'origin' in URL.prototype) {
  162. var u = new URL('b', 'http://a');
  163. u.pathname = 'c%20d';
  164. hasWorkingUrl = u.href === 'http://a/c%20d';
  165. }
  166. } catch (e) {}
  167. if (hasWorkingUrl) {
  168. return;
  169. }
  170. var relative = Object.create(null);
  171. relative['ftp'] = 21;
  172. relative['file'] = 0;
  173. relative['gopher'] = 70;
  174. relative['http'] = 80;
  175. relative['https'] = 443;
  176. relative['ws'] = 80;
  177. relative['wss'] = 443;
  178. var relativePathDotMapping = Object.create(null);
  179. relativePathDotMapping['%2e'] = '.';
  180. relativePathDotMapping['.%2e'] = '..';
  181. relativePathDotMapping['%2e.'] = '..';
  182. relativePathDotMapping['%2e%2e'] = '..';
  183. function isRelativeScheme(scheme) {
  184. return relative[scheme] !== undefined;
  185. }
  186. function invalid() {
  187. clear.call(this);
  188. this._isInvalid = true;
  189. }
  190. function IDNAToASCII(h) {
  191. if (h === '') {
  192. invalid.call(this);
  193. }
  194. return h.toLowerCase();
  195. }
  196. function percentEscape(c) {
  197. var unicode = c.charCodeAt(0);
  198. if (unicode > 0x20 && unicode < 0x7F && [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) === -1) {
  199. return c;
  200. }
  201. return encodeURIComponent(c);
  202. }
  203. function percentEscapeQuery(c) {
  204. var unicode = c.charCodeAt(0);
  205. if (unicode > 0x20 && unicode < 0x7F && [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) === -1) {
  206. return c;
  207. }
  208. return encodeURIComponent(c);
  209. }
  210. var EOF,
  211. ALPHA = /[a-zA-Z]/,
  212. ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/;
  213. function parse(input, stateOverride, base) {
  214. function err(message) {
  215. errors.push(message);
  216. }
  217. var state = stateOverride || 'scheme start',
  218. cursor = 0,
  219. buffer = '',
  220. seenAt = false,
  221. seenBracket = false,
  222. errors = [];
  223. loop: while ((input[cursor - 1] !== EOF || cursor === 0) && !this._isInvalid) {
  224. var c = input[cursor];
  225. switch (state) {
  226. case 'scheme start':
  227. if (c && ALPHA.test(c)) {
  228. buffer += c.toLowerCase();
  229. state = 'scheme';
  230. } else if (!stateOverride) {
  231. buffer = '';
  232. state = 'no scheme';
  233. continue;
  234. } else {
  235. err('Invalid scheme.');
  236. break loop;
  237. }
  238. break;
  239. case 'scheme':
  240. if (c && ALPHANUMERIC.test(c)) {
  241. buffer += c.toLowerCase();
  242. } else if (c === ':') {
  243. this._scheme = buffer;
  244. buffer = '';
  245. if (stateOverride) {
  246. break loop;
  247. }
  248. if (isRelativeScheme(this._scheme)) {
  249. this._isRelative = true;
  250. }
  251. if (this._scheme === 'file') {
  252. state = 'relative';
  253. } else if (this._isRelative && base && base._scheme === this._scheme) {
  254. state = 'relative or authority';
  255. } else if (this._isRelative) {
  256. state = 'authority first slash';
  257. } else {
  258. state = 'scheme data';
  259. }
  260. } else if (!stateOverride) {
  261. buffer = '';
  262. cursor = 0;
  263. state = 'no scheme';
  264. continue;
  265. } else if (c === EOF) {
  266. break loop;
  267. } else {
  268. err('Code point not allowed in scheme: ' + c);
  269. break loop;
  270. }
  271. break;
  272. case 'scheme data':
  273. if (c === '?') {
  274. this._query = '?';
  275. state = 'query';
  276. } else if (c === '#') {
  277. this._fragment = '#';
  278. state = 'fragment';
  279. } else {
  280. if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
  281. this._schemeData += percentEscape(c);
  282. }
  283. }
  284. break;
  285. case 'no scheme':
  286. if (!base || !isRelativeScheme(base._scheme)) {
  287. err('Missing scheme.');
  288. invalid.call(this);
  289. } else {
  290. state = 'relative';
  291. continue;
  292. }
  293. break;
  294. case 'relative or authority':
  295. if (c === '/' && input[cursor + 1] === '/') {
  296. state = 'authority ignore slashes';
  297. } else {
  298. err('Expected /, got: ' + c);
  299. state = 'relative';
  300. continue;
  301. }
  302. break;
  303. case 'relative':
  304. this._isRelative = true;
  305. if (this._scheme !== 'file') {
  306. this._scheme = base._scheme;
  307. }
  308. if (c === EOF) {
  309. this._host = base._host;
  310. this._port = base._port;
  311. this._path = base._path.slice();
  312. this._query = base._query;
  313. this._username = base._username;
  314. this._password = base._password;
  315. break loop;
  316. } else if (c === '/' || c === '\\') {
  317. if (c === '\\') {
  318. err('\\ is an invalid code point.');
  319. }
  320. state = 'relative slash';
  321. } else if (c === '?') {
  322. this._host = base._host;
  323. this._port = base._port;
  324. this._path = base._path.slice();
  325. this._query = '?';
  326. this._username = base._username;
  327. this._password = base._password;
  328. state = 'query';
  329. } else if (c === '#') {
  330. this._host = base._host;
  331. this._port = base._port;
  332. this._path = base._path.slice();
  333. this._query = base._query;
  334. this._fragment = '#';
  335. this._username = base._username;
  336. this._password = base._password;
  337. state = 'fragment';
  338. } else {
  339. var nextC = input[cursor + 1];
  340. var nextNextC = input[cursor + 2];
  341. if (this._scheme !== 'file' || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || nextNextC !== EOF && nextNextC !== '/' && nextNextC !== '\\' && nextNextC !== '?' && nextNextC !== '#') {
  342. this._host = base._host;
  343. this._port = base._port;
  344. this._username = base._username;
  345. this._password = base._password;
  346. this._path = base._path.slice();
  347. this._path.pop();
  348. }
  349. state = 'relative path';
  350. continue;
  351. }
  352. break;
  353. case 'relative slash':
  354. if (c === '/' || c === '\\') {
  355. if (c === '\\') {
  356. err('\\ is an invalid code point.');
  357. }
  358. if (this._scheme === 'file') {
  359. state = 'file host';
  360. } else {
  361. state = 'authority ignore slashes';
  362. }
  363. } else {
  364. if (this._scheme !== 'file') {
  365. this._host = base._host;
  366. this._port = base._port;
  367. this._username = base._username;
  368. this._password = base._password;
  369. }
  370. state = 'relative path';
  371. continue;
  372. }
  373. break;
  374. case 'authority first slash':
  375. if (c === '/') {
  376. state = 'authority second slash';
  377. } else {
  378. err('Expected \'/\', got: ' + c);
  379. state = 'authority ignore slashes';
  380. continue;
  381. }
  382. break;
  383. case 'authority second slash':
  384. state = 'authority ignore slashes';
  385. if (c !== '/') {
  386. err('Expected \'/\', got: ' + c);
  387. continue;
  388. }
  389. break;
  390. case 'authority ignore slashes':
  391. if (c !== '/' && c !== '\\') {
  392. state = 'authority';
  393. continue;
  394. } else {
  395. err('Expected authority, got: ' + c);
  396. }
  397. break;
  398. case 'authority':
  399. if (c === '@') {
  400. if (seenAt) {
  401. err('@ already seen.');
  402. buffer += '%40';
  403. }
  404. seenAt = true;
  405. for (var i = 0; i < buffer.length; i++) {
  406. var cp = buffer[i];
  407. if (cp === '\t' || cp === '\n' || cp === '\r') {
  408. err('Invalid whitespace in authority.');
  409. continue;
  410. }
  411. if (cp === ':' && this._password === null) {
  412. this._password = '';
  413. continue;
  414. }
  415. var tempC = percentEscape(cp);
  416. if (this._password !== null) {
  417. this._password += tempC;
  418. } else {
  419. this._username += tempC;
  420. }
  421. }
  422. buffer = '';
  423. } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') {
  424. cursor -= buffer.length;
  425. buffer = '';
  426. state = 'host';
  427. continue;
  428. } else {
  429. buffer += c;
  430. }
  431. break;
  432. case 'file host':
  433. if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') {
  434. if (buffer.length === 2 && ALPHA.test(buffer[0]) && (buffer[1] === ':' || buffer[1] === '|')) {
  435. state = 'relative path';
  436. } else if (buffer.length === 0) {
  437. state = 'relative path start';
  438. } else {
  439. this._host = IDNAToASCII.call(this, buffer);
  440. buffer = '';
  441. state = 'relative path start';
  442. }
  443. continue;
  444. } else if (c === '\t' || c === '\n' || c === '\r') {
  445. err('Invalid whitespace in file host.');
  446. } else {
  447. buffer += c;
  448. }
  449. break;
  450. case 'host':
  451. case 'hostname':
  452. if (c === ':' && !seenBracket) {
  453. this._host = IDNAToASCII.call(this, buffer);
  454. buffer = '';
  455. state = 'port';
  456. if (stateOverride === 'hostname') {
  457. break loop;
  458. }
  459. } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') {
  460. this._host = IDNAToASCII.call(this, buffer);
  461. buffer = '';
  462. state = 'relative path start';
  463. if (stateOverride) {
  464. break loop;
  465. }
  466. continue;
  467. } else if (c !== '\t' && c !== '\n' && c !== '\r') {
  468. if (c === '[') {
  469. seenBracket = true;
  470. } else if (c === ']') {
  471. seenBracket = false;
  472. }
  473. buffer += c;
  474. } else {
  475. err('Invalid code point in host/hostname: ' + c);
  476. }
  477. break;
  478. case 'port':
  479. if (/[0-9]/.test(c)) {
  480. buffer += c;
  481. } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#' || stateOverride) {
  482. if (buffer !== '') {
  483. var temp = parseInt(buffer, 10);
  484. if (temp !== relative[this._scheme]) {
  485. this._port = temp + '';
  486. }
  487. buffer = '';
  488. }
  489. if (stateOverride) {
  490. break loop;
  491. }
  492. state = 'relative path start';
  493. continue;
  494. } else if (c === '\t' || c === '\n' || c === '\r') {
  495. err('Invalid code point in port: ' + c);
  496. } else {
  497. invalid.call(this);
  498. }
  499. break;
  500. case 'relative path start':
  501. if (c === '\\') {
  502. err('\'\\\' not allowed in path.');
  503. }
  504. state = 'relative path';
  505. if (c !== '/' && c !== '\\') {
  506. continue;
  507. }
  508. break;
  509. case 'relative path':
  510. if (c === EOF || c === '/' || c === '\\' || !stateOverride && (c === '?' || c === '#')) {
  511. if (c === '\\') {
  512. err('\\ not allowed in relative path.');
  513. }
  514. var tmp;
  515. if (tmp = relativePathDotMapping[buffer.toLowerCase()]) {
  516. buffer = tmp;
  517. }
  518. if (buffer === '..') {
  519. this._path.pop();
  520. if (c !== '/' && c !== '\\') {
  521. this._path.push('');
  522. }
  523. } else if (buffer === '.' && c !== '/' && c !== '\\') {
  524. this._path.push('');
  525. } else if (buffer !== '.') {
  526. if (this._scheme === 'file' && this._path.length === 0 && buffer.length === 2 && ALPHA.test(buffer[0]) && buffer[1] === '|') {
  527. buffer = buffer[0] + ':';
  528. }
  529. this._path.push(buffer);
  530. }
  531. buffer = '';
  532. if (c === '?') {
  533. this._query = '?';
  534. state = 'query';
  535. } else if (c === '#') {
  536. this._fragment = '#';
  537. state = 'fragment';
  538. }
  539. } else if (c !== '\t' && c !== '\n' && c !== '\r') {
  540. buffer += percentEscape(c);
  541. }
  542. break;
  543. case 'query':
  544. if (!stateOverride && c === '#') {
  545. this._fragment = '#';
  546. state = 'fragment';
  547. } else if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
  548. this._query += percentEscapeQuery(c);
  549. }
  550. break;
  551. case 'fragment':
  552. if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') {
  553. this._fragment += c;
  554. }
  555. break;
  556. }
  557. cursor++;
  558. }
  559. }
  560. function clear() {
  561. this._scheme = '';
  562. this._schemeData = '';
  563. this._username = '';
  564. this._password = null;
  565. this._host = '';
  566. this._port = '';
  567. this._path = [];
  568. this._query = '';
  569. this._fragment = '';
  570. this._isInvalid = false;
  571. this._isRelative = false;
  572. }
  573. function JURL(url, base) {
  574. if (base !== undefined && !(base instanceof JURL)) {
  575. base = new JURL(String(base));
  576. }
  577. this._url = url;
  578. clear.call(this);
  579. var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, '');
  580. parse.call(this, input, null, base);
  581. }
  582. JURL.prototype = {
  583. toString: function toString() {
  584. return this.href;
  585. },
  586. get href() {
  587. if (this._isInvalid) {
  588. return this._url;
  589. }
  590. var authority = '';
  591. if (this._username !== '' || this._password !== null) {
  592. authority = this._username + (this._password !== null ? ':' + this._password : '') + '@';
  593. }
  594. return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment;
  595. },
  596. set href(value) {
  597. clear.call(this);
  598. parse.call(this, value);
  599. },
  600. get protocol() {
  601. return this._scheme + ':';
  602. },
  603. set protocol(value) {
  604. if (this._isInvalid) {
  605. return;
  606. }
  607. parse.call(this, value + ':', 'scheme start');
  608. },
  609. get host() {
  610. return this._isInvalid ? '' : this._port ? this._host + ':' + this._port : this._host;
  611. },
  612. set host(value) {
  613. if (this._isInvalid || !this._isRelative) {
  614. return;
  615. }
  616. parse.call(this, value, 'host');
  617. },
  618. get hostname() {
  619. return this._host;
  620. },
  621. set hostname(value) {
  622. if (this._isInvalid || !this._isRelative) {
  623. return;
  624. }
  625. parse.call(this, value, 'hostname');
  626. },
  627. get port() {
  628. return this._port;
  629. },
  630. set port(value) {
  631. if (this._isInvalid || !this._isRelative) {
  632. return;
  633. }
  634. parse.call(this, value, 'port');
  635. },
  636. get pathname() {
  637. return this._isInvalid ? '' : this._isRelative ? '/' + this._path.join('/') : this._schemeData;
  638. },
  639. set pathname(value) {
  640. if (this._isInvalid || !this._isRelative) {
  641. return;
  642. }
  643. this._path = [];
  644. parse.call(this, value, 'relative path start');
  645. },
  646. get search() {
  647. return this._isInvalid || !this._query || this._query === '?' ? '' : this._query;
  648. },
  649. set search(value) {
  650. if (this._isInvalid || !this._isRelative) {
  651. return;
  652. }
  653. this._query = '?';
  654. if (value[0] === '?') {
  655. value = value.slice(1);
  656. }
  657. parse.call(this, value, 'query');
  658. },
  659. get hash() {
  660. return this._isInvalid || !this._fragment || this._fragment === '#' ? '' : this._fragment;
  661. },
  662. set hash(value) {
  663. if (this._isInvalid) {
  664. return;
  665. }
  666. this._fragment = '#';
  667. if (value[0] === '#') {
  668. value = value.slice(1);
  669. }
  670. parse.call(this, value, 'fragment');
  671. },
  672. get origin() {
  673. var host;
  674. if (this._isInvalid || !this._scheme) {
  675. return '';
  676. }
  677. switch (this._scheme) {
  678. case 'data':
  679. case 'file':
  680. case 'javascript':
  681. case 'mailto':
  682. return 'null';
  683. case 'blob':
  684. try {
  685. return new JURL(this._schemeData).origin || 'null';
  686. } catch (_) {}
  687. return 'null';
  688. }
  689. host = this.host;
  690. if (!host) {
  691. return '';
  692. }
  693. return this._scheme + '://' + host;
  694. }
  695. };
  696. var OriginalURL = globalScope.URL;
  697. if (OriginalURL) {
  698. JURL.createObjectURL = function (blob) {
  699. return OriginalURL.createObjectURL.apply(OriginalURL, arguments);
  700. };
  701. JURL.revokeObjectURL = function (url) {
  702. OriginalURL.revokeObjectURL(url);
  703. };
  704. }
  705. globalScope.URL = JURL;
  706. })();
  707. (function checkObjectValues() {
  708. if (Object.values) {
  709. return;
  710. }
  711. Object.values = require('core-js/fn/object/values');
  712. })();
  713. }