Version Description
- 2018-05-15 =
- Added: list of emails a subscriber viewed to GDPR data export;
- Added: list of links a subscriber clicked to GDPR data export;
- Added: a tool to forget subscriber's information for GDPR related data erasure;
- Added: Privacy policy which can be used by WordPress's privacy tool in compliance with GDPR;
- Improved: performance for sites using many post notification emails. Thanks Jose!
- Fixed: Javascript warnings on segments page are removed.
- Fixed: custom field values longer than 255 characters can be stored. Thanks Scott!
Download this release
Release Info
Developer | wysija |
Plugin | MailPoet Newsletters (New) |
Version | 3.7.2 |
Comparing to | |
See all releases |
Code changes from version 3.7.1 to 3.7.2
- assets/js/{admin.916c7ef2.js → admin.c5e75f6d.js} +7012 -4297
- assets/js/{admin_vendor.6cfde572.js → admin_vendor.e4568802.js} +2 -3
- assets/js/lib/mailpoet_shortcodes/plugin.js +21 -20
- assets/js/{mailpoet.77838a7f.js → mailpoet.5d4557f5.js} +0 -0
- assets/js/manifest.json +5 -5
- assets/js/{newsletter_editor.47a32ce9.js → newsletter_editor.637e880e.js} +7009 -4294
- assets/js/{vendor.98a3aa8c.js → vendor.e6d02f27.js} +1 -1
- lang/mailpoet-en_GB.mo +0 -0
- lang/mailpoet-fr_CA.mo +0 -0
- lang/mailpoet.pot +133 -64
- lib/API/JSON/v1/AutomatedLatestContent.php +1 -2
- lib/API/JSON/v1/Subscribers.php +6 -0
- lib/API/MP/v1/API.php +2 -0
- lib/Config/Hooks.php +2 -2
- lib/Config/Initializer.php +12 -0
- lib/Config/Migrator.php +2 -1
- lib/Config/PersonalDataErasers.php +22 -0
- lib/Config/PersonalDataExporters.php +13 -3
- lib/Config/PrivacyPolicy.php +41 -0
- lib/Models/StatisticsClicks.php +20 -0
- lib/Models/StatisticsNewsletters.php +6 -0
- lib/Models/Subscriber.php +5 -0
- lib/Newsletter/Scheduler/Scheduler.php +8 -0
assets/js/{admin.916c7ef2.js → admin.c5e75f6d.js}
RENAMED
@@ -12251,4541 +12251,7256 @@ webpackJsonp([0],{
|
|
12251 |
/***/ 537:
|
12252 |
/***/ function(module, exports, __webpack_require__) {
|
12253 |
|
12254 |
-
var require;var require;/* WEBPACK VAR INJECTION */(function(global) {/*
|
12255 |
-
html2canvas 0.5.0-alpha2 <http://html2canvas.hertzen.com>
|
12256 |
-
Copyright (c) 2015 Niklas von Hertzen
|
12257 |
-
|
12258 |
-
Released under MIT License
|
12259 |
-
*/
|
12260 |
-
|
12261 |
-
!function(e){if(true)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.html2canvas=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
12262 |
-
(function (process,global){
|
12263 |
/*!
|
12264 |
-
*
|
12265 |
-
*
|
12266 |
-
*
|
12267 |
-
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
|
12268 |
-
* @version 2.0.1
|
12269 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12270 |
|
12271 |
-
|
12272 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12273 |
|
12274 |
-
|
12275 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12276 |
}
|
|
|
|
|
12277 |
|
12278 |
-
|
12279 |
-
|
|
|
|
|
|
|
12280 |
}
|
|
|
|
|
12281 |
|
12282 |
-
|
12283 |
-
|
|
|
|
|
|
|
12284 |
}
|
|
|
|
|
12285 |
|
12286 |
-
|
|
|
|
|
12287 |
|
12288 |
-
|
12289 |
-
|
12290 |
-
|
12291 |
-
|
12292 |
-
|
12293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12294 |
}
|
12295 |
|
12296 |
-
|
12297 |
-
|
12298 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12299 |
|
12300 |
-
|
12301 |
-
if (arguments.length > 1) {
|
12302 |
-
throw new Error('Second argument not supported');
|
12303 |
-
}
|
12304 |
-
if (typeof o !== 'object') {
|
12305 |
-
throw new TypeError('Argument must be an object');
|
12306 |
-
}
|
12307 |
-
$$utils$$F.prototype = o;
|
12308 |
-
return new $$utils$$F();
|
12309 |
-
});
|
12310 |
|
12311 |
-
|
12312 |
-
|
12313 |
-
|
12314 |
-
$$asap$$queue[$$asap$$len] = callback;
|
12315 |
-
$$asap$$queue[$$asap$$len + 1] = arg;
|
12316 |
-
$$asap$$len += 2;
|
12317 |
-
if ($$asap$$len === 2) {
|
12318 |
-
// If len is 1, that means that we need to schedule an async flush.
|
12319 |
-
// If additional callbacks are queued before the queue is flushed, they
|
12320 |
-
// will be processed by this flush that we are scheduling.
|
12321 |
-
$$asap$$scheduleFlush();
|
12322 |
-
}
|
12323 |
-
};
|
12324 |
|
12325 |
-
|
12326 |
-
var $$asap$$BrowserMutationObserver = $$asap$$browserGlobal.MutationObserver || $$asap$$browserGlobal.WebKitMutationObserver;
|
12327 |
|
12328 |
-
// test for web worker but not in IE10
|
12329 |
-
var $$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' &&
|
12330 |
-
typeof importScripts !== 'undefined' &&
|
12331 |
-
typeof MessageChannel !== 'undefined';
|
12332 |
|
12333 |
-
|
12334 |
-
|
12335 |
-
|
12336 |
-
|
12337 |
-
};
|
12338 |
-
}
|
12339 |
|
12340 |
-
|
12341 |
-
var iterations = 0;
|
12342 |
-
var observer = new $$asap$$BrowserMutationObserver($$asap$$flush);
|
12343 |
-
var node = document.createTextNode('');
|
12344 |
-
observer.observe(node, { characterData: true });
|
12345 |
|
12346 |
-
|
12347 |
-
node.data = (iterations = ++iterations % 2);
|
12348 |
-
};
|
12349 |
-
}
|
12350 |
|
12351 |
-
|
12352 |
-
function $$asap$$useMessageChannel() {
|
12353 |
-
var channel = new MessageChannel();
|
12354 |
-
channel.port1.onmessage = $$asap$$flush;
|
12355 |
-
return function () {
|
12356 |
-
channel.port2.postMessage(0);
|
12357 |
-
};
|
12358 |
-
}
|
12359 |
|
12360 |
-
|
12361 |
-
return function() {
|
12362 |
-
setTimeout($$asap$$flush, 1);
|
12363 |
-
};
|
12364 |
-
}
|
12365 |
|
12366 |
-
|
12367 |
|
12368 |
-
|
12369 |
-
for (var i = 0; i < $$asap$$len; i+=2) {
|
12370 |
-
var callback = $$asap$$queue[i];
|
12371 |
-
var arg = $$asap$$queue[i+1];
|
12372 |
|
12373 |
-
|
12374 |
|
12375 |
-
|
12376 |
-
|
12377 |
-
|
|
|
12378 |
|
12379 |
-
|
12380 |
-
|
12381 |
|
12382 |
-
|
|
|
|
|
12383 |
|
12384 |
-
|
12385 |
-
|
12386 |
-
|
12387 |
-
|
12388 |
-
$$asap$$scheduleFlush = $$asap$$useMutationObserver();
|
12389 |
-
} else if ($$asap$$isWorker) {
|
12390 |
-
$$asap$$scheduleFlush = $$asap$$useMessageChannel();
|
12391 |
-
} else {
|
12392 |
-
$$asap$$scheduleFlush = $$asap$$useSetTimeout();
|
12393 |
}
|
12394 |
|
12395 |
-
|
12396 |
-
|
12397 |
-
|
12398 |
-
|
12399 |
-
|
|
|
12400 |
|
12401 |
-
|
12402 |
-
|
12403 |
-
}
|
12404 |
|
12405 |
-
|
12406 |
-
|
12407 |
-
|
12408 |
|
12409 |
-
|
12410 |
-
|
12411 |
-
|
12412 |
-
} catch(error) {
|
12413 |
-
$$$internal$$GET_THEN_ERROR.error = error;
|
12414 |
-
return $$$internal$$GET_THEN_ERROR;
|
12415 |
-
}
|
12416 |
-
}
|
12417 |
|
12418 |
-
|
12419 |
-
|
12420 |
-
|
12421 |
-
|
12422 |
-
|
12423 |
-
|
12424 |
-
}
|
12425 |
|
12426 |
-
|
12427 |
-
|
12428 |
-
var sealed = false;
|
12429 |
-
var error = $$$internal$$tryThen(then, thenable, function(value) {
|
12430 |
-
if (sealed) { return; }
|
12431 |
-
sealed = true;
|
12432 |
-
if (thenable !== value) {
|
12433 |
-
$$$internal$$resolve(promise, value);
|
12434 |
-
} else {
|
12435 |
-
$$$internal$$fulfill(promise, value);
|
12436 |
-
}
|
12437 |
-
}, function(reason) {
|
12438 |
-
if (sealed) { return; }
|
12439 |
-
sealed = true;
|
12440 |
|
12441 |
-
|
12442 |
-
|
|
|
12443 |
|
12444 |
-
|
12445 |
-
|
12446 |
-
$$$internal$$reject(promise, error);
|
12447 |
-
}
|
12448 |
-
}, promise);
|
12449 |
}
|
|
|
12450 |
|
12451 |
-
|
12452 |
-
if (thenable._state === $$$internal$$FULFILLED) {
|
12453 |
-
$$$internal$$fulfill(promise, thenable._result);
|
12454 |
-
} else if (promise._state === $$$internal$$REJECTED) {
|
12455 |
-
$$$internal$$reject(promise, thenable._result);
|
12456 |
-
} else {
|
12457 |
-
$$$internal$$subscribe(thenable, undefined, function(value) {
|
12458 |
-
$$$internal$$resolve(promise, value);
|
12459 |
-
}, function(reason) {
|
12460 |
-
$$$internal$$reject(promise, reason);
|
12461 |
-
});
|
12462 |
-
}
|
12463 |
-
}
|
12464 |
|
12465 |
-
|
12466 |
-
|
12467 |
-
|
12468 |
-
|
12469 |
-
|
12470 |
-
|
12471 |
-
|
12472 |
-
|
12473 |
-
|
12474 |
-
|
12475 |
-
|
12476 |
-
|
12477 |
-
|
12478 |
-
|
12479 |
-
}
|
12480 |
-
}
|
12481 |
}
|
|
|
12482 |
|
12483 |
-
|
12484 |
-
|
12485 |
-
|
12486 |
-
|
12487 |
-
|
12488 |
-
|
12489 |
-
$$$internal$$fulfill(promise, value);
|
12490 |
-
}
|
12491 |
}
|
12492 |
|
12493 |
-
|
12494 |
-
|
12495 |
-
|
12496 |
-
|
|
|
12497 |
|
12498 |
-
|
|
|
|
|
|
|
12499 |
}
|
12500 |
|
12501 |
-
|
12502 |
-
|
|
|
|
|
|
|
12503 |
|
12504 |
-
|
12505 |
-
|
12506 |
|
12507 |
-
|
12508 |
-
|
12509 |
-
|
12510 |
-
}
|
12511 |
-
}
|
12512 |
|
12513 |
-
|
12514 |
-
|
12515 |
-
|
12516 |
-
promise._result = reason;
|
12517 |
|
12518 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12519 |
}
|
12520 |
|
12521 |
-
|
12522 |
-
|
12523 |
-
|
|
|
12524 |
|
12525 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12526 |
|
12527 |
-
|
12528 |
-
|
12529 |
-
|
|
|
|
|
|
|
12530 |
|
12531 |
-
|
12532 |
-
|
12533 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12534 |
}
|
|
|
12535 |
|
12536 |
-
|
12537 |
-
|
12538 |
-
|
12539 |
|
12540 |
-
|
12541 |
|
12542 |
-
var child, callback, detail = promise._result;
|
12543 |
|
12544 |
-
|
12545 |
-
|
12546 |
-
|
|
|
12547 |
|
12548 |
-
|
12549 |
-
$$$internal$$invokeCallback(settled, child, callback, detail);
|
12550 |
-
} else {
|
12551 |
-
callback(detail);
|
12552 |
-
}
|
12553 |
-
}
|
12554 |
|
12555 |
-
|
12556 |
-
}
|
12557 |
|
12558 |
-
|
12559 |
-
this.error = null;
|
12560 |
-
}
|
12561 |
|
12562 |
-
|
12563 |
|
12564 |
-
|
12565 |
-
try {
|
12566 |
-
return callback(detail);
|
12567 |
-
} catch(e) {
|
12568 |
-
$$$internal$$TRY_CATCH_ERROR.error = e;
|
12569 |
-
return $$$internal$$TRY_CATCH_ERROR;
|
12570 |
-
}
|
12571 |
-
}
|
12572 |
|
12573 |
-
|
12574 |
-
var hasCallback = $$utils$$isFunction(callback),
|
12575 |
-
value, error, succeeded, failed;
|
12576 |
|
12577 |
-
|
12578 |
-
|
|
|
|
|
12579 |
|
12580 |
-
|
12581 |
-
|
12582 |
-
|
12583 |
-
value = null;
|
12584 |
-
} else {
|
12585 |
-
succeeded = true;
|
12586 |
-
}
|
12587 |
|
12588 |
-
|
12589 |
-
|
12590 |
-
|
|
|
12591 |
}
|
12592 |
-
|
12593 |
-
} else {
|
12594 |
-
value = detail;
|
12595 |
-
succeeded = true;
|
12596 |
-
}
|
12597 |
-
|
12598 |
-
if (promise._state !== $$$internal$$PENDING) {
|
12599 |
-
// noop
|
12600 |
-
} else if (hasCallback && succeeded) {
|
12601 |
-
$$$internal$$resolve(promise, value);
|
12602 |
-
} else if (failed) {
|
12603 |
-
$$$internal$$reject(promise, error);
|
12604 |
-
} else if (settled === $$$internal$$FULFILLED) {
|
12605 |
-
$$$internal$$fulfill(promise, value);
|
12606 |
-
} else if (settled === $$$internal$$REJECTED) {
|
12607 |
-
$$$internal$$reject(promise, value);
|
12608 |
-
}
|
12609 |
}
|
12610 |
|
12611 |
-
|
12612 |
-
|
12613 |
-
|
12614 |
-
|
12615 |
-
}
|
12616 |
-
|
12617 |
-
|
12618 |
-
|
12619 |
-
|
12620 |
-
|
12621 |
-
}
|
|
|
|
|
|
|
|
|
|
|
12622 |
|
12623 |
-
|
12624 |
-
|
12625 |
-
return {
|
12626 |
-
state: 'fulfilled',
|
12627 |
-
value: value
|
12628 |
-
};
|
12629 |
-
} else {
|
12630 |
-
return {
|
12631 |
-
state: 'rejected',
|
12632 |
-
reason: value
|
12633 |
-
};
|
12634 |
-
}
|
12635 |
-
}
|
12636 |
|
12637 |
-
|
12638 |
-
this._instanceConstructor = Constructor;
|
12639 |
-
this.promise = new Constructor($$$internal$$noop, label);
|
12640 |
-
this._abortOnReject = abortOnReject;
|
12641 |
|
12642 |
-
if (this._validateInput(input)) {
|
12643 |
-
this._input = input;
|
12644 |
-
this.length = input.length;
|
12645 |
-
this._remaining = input.length;
|
12646 |
|
12647 |
-
|
|
|
|
|
|
|
12648 |
|
12649 |
-
|
12650 |
-
|
12651 |
-
|
12652 |
-
|
12653 |
-
|
12654 |
-
|
12655 |
-
|
12656 |
-
|
12657 |
-
|
12658 |
-
|
12659 |
-
|
12660 |
-
|
|
|
12661 |
}
|
|
|
12662 |
|
12663 |
-
|
12664 |
-
|
12665 |
-
|
12666 |
|
12667 |
-
|
12668 |
-
return new Error('Array Methods must be provided an Array');
|
12669 |
-
};
|
12670 |
|
12671 |
-
$$$enumerator$$Enumerator.prototype._init = function() {
|
12672 |
-
this._result = new Array(this.length);
|
12673 |
-
};
|
12674 |
|
12675 |
-
|
|
|
|
|
12676 |
|
12677 |
-
|
12678 |
-
var length = this.length;
|
12679 |
-
var promise = this.promise;
|
12680 |
-
var input = this._input;
|
12681 |
|
12682 |
-
|
12683 |
-
this._eachEntry(input[i], i);
|
12684 |
-
}
|
12685 |
-
};
|
12686 |
|
12687 |
-
|
12688 |
-
var c = this._instanceConstructor;
|
12689 |
-
if ($$utils$$isMaybeThenable(entry)) {
|
12690 |
-
if (entry.constructor === c && entry._state !== $$$internal$$PENDING) {
|
12691 |
-
entry._onerror = null;
|
12692 |
-
this._settledAt(entry._state, i, entry._result);
|
12693 |
-
} else {
|
12694 |
-
this._willSettleAt(c.resolve(entry), i);
|
12695 |
-
}
|
12696 |
-
} else {
|
12697 |
-
this._remaining--;
|
12698 |
-
this._result[i] = this._makeResult($$$internal$$FULFILLED, i, entry);
|
12699 |
-
}
|
12700 |
-
};
|
12701 |
|
12702 |
-
|
12703 |
-
var promise = this.promise;
|
12704 |
|
12705 |
-
|
12706 |
-
this._remaining--;
|
12707 |
|
12708 |
-
|
12709 |
-
$$$internal$$reject(promise, value);
|
12710 |
-
} else {
|
12711 |
-
this._result[i] = this._makeResult(state, i, value);
|
12712 |
-
}
|
12713 |
-
}
|
12714 |
|
12715 |
-
|
12716 |
-
$$$internal$$fulfill(promise, this._result);
|
12717 |
-
}
|
12718 |
-
};
|
12719 |
|
12720 |
-
|
12721 |
-
return value;
|
12722 |
-
};
|
12723 |
|
12724 |
-
|
12725 |
-
var enumerator = this;
|
12726 |
|
12727 |
-
|
12728 |
-
enumerator._settledAt($$$internal$$FULFILLED, i, value);
|
12729 |
-
}, function(reason) {
|
12730 |
-
enumerator._settledAt($$$internal$$REJECTED, i, reason);
|
12731 |
-
});
|
12732 |
-
};
|
12733 |
|
12734 |
-
|
12735 |
-
return new $$$enumerator$$default(this, entries, true /* abort on reject */, label).promise;
|
12736 |
-
};
|
12737 |
|
12738 |
-
|
12739 |
-
/*jshint validthis:true */
|
12740 |
-
var Constructor = this;
|
12741 |
|
12742 |
-
|
12743 |
|
12744 |
-
|
12745 |
-
$$$internal$$reject(promise, new TypeError('You must pass an array to race.'));
|
12746 |
-
return promise;
|
12747 |
-
}
|
12748 |
|
12749 |
-
|
12750 |
|
12751 |
-
|
12752 |
-
$$$internal$$resolve(promise, value);
|
12753 |
-
}
|
12754 |
|
12755 |
-
|
12756 |
-
$$$internal$$reject(promise, reason);
|
12757 |
-
}
|
12758 |
|
12759 |
-
|
12760 |
-
$$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection);
|
12761 |
-
}
|
12762 |
|
12763 |
-
|
12764 |
-
};
|
12765 |
|
12766 |
-
|
12767 |
-
/*jshint validthis:true */
|
12768 |
-
var Constructor = this;
|
12769 |
|
12770 |
-
|
12771 |
-
return object;
|
12772 |
-
}
|
12773 |
|
12774 |
-
|
12775 |
-
$$$internal$$resolve(promise, object);
|
12776 |
-
return promise;
|
12777 |
-
};
|
12778 |
|
12779 |
-
|
12780 |
-
/*jshint validthis:true */
|
12781 |
-
var Constructor = this;
|
12782 |
-
var promise = new Constructor($$$internal$$noop, label);
|
12783 |
-
$$$internal$$reject(promise, reason);
|
12784 |
-
return promise;
|
12785 |
-
};
|
12786 |
|
12787 |
-
|
12788 |
|
12789 |
-
|
12790 |
-
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
|
12791 |
-
}
|
12792 |
|
12793 |
-
|
12794 |
-
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
|
12795 |
-
}
|
12796 |
|
12797 |
-
|
12798 |
|
12799 |
-
|
12800 |
-
Promise objects represent the eventual result of an asynchronous operation. The
|
12801 |
-
primary way of interacting with a promise is through its `then` method, which
|
12802 |
-
registers callbacks to receive either a promise’s eventual value or the reason
|
12803 |
-
why the promise cannot be fulfilled.
|
12804 |
|
12805 |
-
|
12806 |
-
-----------
|
12807 |
|
12808 |
-
|
12809 |
-
- `thenable` is an object or function that defines a `then` method.
|
12810 |
-
- `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
|
12811 |
-
- `exception` is a value that is thrown using the throw statement.
|
12812 |
-
- `reason` is a value that indicates why a promise was rejected.
|
12813 |
-
- `settled` the final resting state of a promise, fulfilled or rejected.
|
12814 |
|
12815 |
-
|
12816 |
|
12817 |
-
|
12818 |
-
|
12819 |
-
|
12820 |
|
12821 |
-
|
12822 |
-
promise, then the original promise's settled state will match the value's
|
12823 |
-
settled state. So a promise that *resolves* a promise that rejects will
|
12824 |
-
itself reject, and a promise that *resolves* a promise that fulfills will
|
12825 |
-
itself fulfill.
|
12826 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12827 |
|
12828 |
-
|
12829 |
-
|
|
|
|
|
12830 |
|
12831 |
-
|
12832 |
-
|
12833 |
-
|
12834 |
-
|
|
|
|
|
|
|
|
|
12835 |
|
12836 |
-
//
|
12837 |
-
|
12838 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12839 |
|
12840 |
-
|
12841 |
-
|
12842 |
-
|
12843 |
-
|
12844 |
-
|
12845 |
-
```
|
12846 |
|
12847 |
-
|
12848 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12849 |
|
12850 |
-
|
12851 |
-
|
12852 |
|
12853 |
-
|
12854 |
-
function getJSON(url) {
|
12855 |
-
return new Promise(function(resolve, reject){
|
12856 |
-
var xhr = new XMLHttpRequest();
|
12857 |
|
12858 |
-
xhr.open('GET', url);
|
12859 |
-
xhr.onreadystatechange = handler;
|
12860 |
-
xhr.responseType = 'json';
|
12861 |
-
xhr.setRequestHeader('Accept', 'application/json');
|
12862 |
-
xhr.send();
|
12863 |
|
12864 |
-
|
12865 |
-
|
12866 |
-
|
12867 |
-
|
12868 |
-
|
12869 |
-
|
12870 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12871 |
}
|
12872 |
-
|
12873 |
-
|
12874 |
-
}
|
12875 |
-
|
12876 |
-
getJSON('/posts.json').then(function(json) {
|
12877 |
-
// on fulfillment
|
12878 |
-
}, function(reason) {
|
12879 |
-
// on rejection
|
12880 |
-
});
|
12881 |
-
```
|
12882 |
|
12883 |
-
|
|
|
12884 |
|
12885 |
-
|
12886 |
-
|
12887 |
-
|
12888 |
-
getJSON('/comments')
|
12889 |
-
]).then(function(values){
|
12890 |
-
values[0] // => postsJSON
|
12891 |
-
values[1] // => commentsJSON
|
12892 |
|
12893 |
-
|
12894 |
-
});
|
12895 |
-
```
|
12896 |
-
|
12897 |
-
@class Promise
|
12898 |
-
@param {function} resolver
|
12899 |
-
Useful for tooling.
|
12900 |
-
@constructor
|
12901 |
-
*/
|
12902 |
-
function $$es6$promise$promise$$Promise(resolver) {
|
12903 |
-
this._id = $$es6$promise$promise$$counter++;
|
12904 |
-
this._state = undefined;
|
12905 |
-
this._result = undefined;
|
12906 |
-
this._subscribers = [];
|
12907 |
-
|
12908 |
-
if ($$$internal$$noop !== resolver) {
|
12909 |
-
if (!$$utils$$isFunction(resolver)) {
|
12910 |
-
$$es6$promise$promise$$needsResolver();
|
12911 |
-
}
|
12912 |
|
12913 |
-
if (!(this instanceof $$es6$promise$promise$$Promise)) {
|
12914 |
-
$$es6$promise$promise$$needsNew();
|
12915 |
-
}
|
12916 |
|
12917 |
-
|
12918 |
-
|
12919 |
-
|
|
|
|
|
|
|
12920 |
|
12921 |
-
|
12922 |
-
|
12923 |
-
|
12924 |
-
$$es6$promise$promise$$Promise.reject = $$promise$reject$$default;
|
12925 |
|
12926 |
-
|
12927 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12928 |
|
12929 |
-
|
12930 |
-
The primary way of interacting with a promise is through its `then` method,
|
12931 |
-
which registers callbacks to receive either a promise's eventual value or the
|
12932 |
-
reason why the promise cannot be fulfilled.
|
12933 |
-
|
12934 |
-
```js
|
12935 |
-
findUser().then(function(user){
|
12936 |
-
// user is available
|
12937 |
-
}, function(reason){
|
12938 |
-
// user is unavailable, and you are given the reason why
|
12939 |
-
});
|
12940 |
-
```
|
12941 |
-
|
12942 |
-
Chaining
|
12943 |
-
--------
|
12944 |
-
|
12945 |
-
The return value of `then` is itself a promise. This second, 'downstream'
|
12946 |
-
promise is resolved with the return value of the first promise's fulfillment
|
12947 |
-
or rejection handler, or rejected if the handler throws an exception.
|
12948 |
-
|
12949 |
-
```js
|
12950 |
-
findUser().then(function (user) {
|
12951 |
-
return user.name;
|
12952 |
-
}, function (reason) {
|
12953 |
-
return 'default name';
|
12954 |
-
}).then(function (userName) {
|
12955 |
-
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
|
12956 |
-
// will be `'default name'`
|
12957 |
-
});
|
12958 |
|
12959 |
-
|
12960 |
-
|
12961 |
-
|
12962 |
-
throw new Error('`findUser` rejected and we're unhappy');
|
12963 |
-
}).then(function (value) {
|
12964 |
-
// never reached
|
12965 |
-
}, function (reason) {
|
12966 |
-
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
|
12967 |
-
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
|
12968 |
-
});
|
12969 |
-
```
|
12970 |
-
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
|
12971 |
-
|
12972 |
-
```js
|
12973 |
-
findUser().then(function (user) {
|
12974 |
-
throw new PedagogicalException('Upstream error');
|
12975 |
-
}).then(function (value) {
|
12976 |
-
// never reached
|
12977 |
-
}).then(function (value) {
|
12978 |
-
// never reached
|
12979 |
-
}, function (reason) {
|
12980 |
-
// The `PedgagocialException` is propagated all the way down to here
|
12981 |
-
});
|
12982 |
-
```
|
12983 |
|
12984 |
-
|
12985 |
-
------------
|
12986 |
|
12987 |
-
Sometimes the value you want to propagate to a downstream promise can only be
|
12988 |
-
retrieved asynchronously. This can be achieved by returning a promise in the
|
12989 |
-
fulfillment or rejection handler. The downstream promise will then be pending
|
12990 |
-
until the returned promise is settled. This is called *assimilation*.
|
12991 |
|
12992 |
-
|
12993 |
-
|
12994 |
-
|
12995 |
-
|
12996 |
-
// The user's comments are now available
|
12997 |
-
});
|
12998 |
-
```
|
12999 |
|
13000 |
-
|
13001 |
|
13002 |
-
|
13003 |
-
findUser().then(function (user) {
|
13004 |
-
return findCommentsByAuthor(user);
|
13005 |
-
}).then(function (comments) {
|
13006 |
-
// If `findCommentsByAuthor` fulfills, we'll have the value here
|
13007 |
-
}, function (reason) {
|
13008 |
-
// If `findCommentsByAuthor` rejects, we'll have the reason here
|
13009 |
-
});
|
13010 |
-
```
|
13011 |
|
13012 |
-
|
13013 |
-
--------------
|
13014 |
|
13015 |
-
|
13016 |
|
13017 |
-
|
13018 |
-
var result;
|
13019 |
|
13020 |
-
|
13021 |
-
result = findResult();
|
13022 |
-
// success
|
13023 |
-
} catch(reason) {
|
13024 |
-
// failure
|
13025 |
-
}
|
13026 |
-
```
|
13027 |
|
13028 |
-
|
13029 |
|
13030 |
-
|
13031 |
-
findResult(function(result, err){
|
13032 |
-
if (err) {
|
13033 |
-
// failure
|
13034 |
-
} else {
|
13035 |
-
// success
|
13036 |
-
}
|
13037 |
-
});
|
13038 |
-
```
|
13039 |
|
13040 |
-
|
13041 |
|
13042 |
-
|
13043 |
-
findResult().then(function(result){
|
13044 |
-
// success
|
13045 |
-
}, function(reason){
|
13046 |
-
// failure
|
13047 |
-
});
|
13048 |
-
```
|
13049 |
|
13050 |
-
|
13051 |
-
--------------
|
13052 |
|
13053 |
-
|
13054 |
|
13055 |
-
|
13056 |
-
|
|
|
|
|
|
|
|
|
13057 |
|
13058 |
-
|
13059 |
-
|
13060 |
-
|
13061 |
-
|
13062 |
-
|
13063 |
-
|
13064 |
-
}
|
13065 |
-
```
|
13066 |
|
13067 |
-
|
|
|
|
|
|
|
|
|
13068 |
|
13069 |
-
|
13070 |
|
13071 |
-
|
13072 |
|
13073 |
-
|
|
|
13074 |
|
13075 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13076 |
|
13077 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13078 |
|
13079 |
-
|
13080 |
-
|
13081 |
-
|
13082 |
-
|
13083 |
-
|
13084 |
-
|
13085 |
-
|
13086 |
-
|
13087 |
-
|
13088 |
-
|
13089 |
-
|
13090 |
-
|
13091 |
-
|
13092 |
-
|
13093 |
-
|
13094 |
-
|
13095 |
-
|
13096 |
-
|
13097 |
-
|
13098 |
-
|
13099 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13100 |
}
|
13101 |
-
|
13102 |
-
|
|
|
|
|
|
|
13103 |
|
13104 |
-
|
|
|
|
|
13105 |
|
13106 |
-
|
13107 |
-
|
13108 |
-
|
13109 |
-
|
13110 |
-
|
13111 |
-
|
13112 |
-
|
13113 |
-
|
13114 |
-
|
13115 |
-
|
13116 |
-
|
13117 |
-
|
13118 |
-
|
13119 |
-
|
13120 |
-
|
13121 |
-
|
13122 |
-
|
13123 |
-
|
13124 |
-
|
13125 |
-
|
13126 |
-
|
13127 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13128 |
}
|
|
|
|
|
|
|
13129 |
|
13130 |
-
|
13131 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13132 |
|
13133 |
-
if (
|
13134 |
-
|
13135 |
-
$$asap$$default(function(){
|
13136 |
-
$$$internal$$invokeCallback(state, child, callback, result);
|
13137 |
-
});
|
13138 |
} else {
|
13139 |
-
|
13140 |
}
|
|
|
13141 |
|
13142 |
-
|
13143 |
-
|
|
|
13144 |
|
13145 |
-
|
13146 |
-
|
13147 |
-
|
13148 |
|
13149 |
-
|
13150 |
-
function findAuthor(){
|
13151 |
-
throw new Error('couldn't find that author');
|
13152 |
-
}
|
13153 |
|
13154 |
-
// synchronous
|
13155 |
-
try {
|
13156 |
-
findAuthor();
|
13157 |
-
} catch(reason) {
|
13158 |
-
// something went wrong
|
13159 |
-
}
|
13160 |
|
13161 |
-
|
13162 |
-
|
13163 |
-
|
13164 |
-
|
13165 |
-
|
13166 |
-
|
13167 |
-
|
13168 |
-
|
13169 |
-
Useful for tooling.
|
13170 |
-
@return {Promise}
|
13171 |
-
*/
|
13172 |
-
'catch': function(onRejection) {
|
13173 |
-
return this.then(null, onRejection);
|
13174 |
-
}
|
13175 |
-
};
|
13176 |
|
13177 |
-
|
13178 |
-
|
|
|
13179 |
|
13180 |
-
|
13181 |
-
local = global;
|
13182 |
-
} else if (typeof window !== 'undefined' && window.document) {
|
13183 |
-
local = window;
|
13184 |
-
} else {
|
13185 |
-
local = self;
|
13186 |
-
}
|
13187 |
|
13188 |
-
var es6PromiseSupport =
|
13189 |
-
"Promise" in local &&
|
13190 |
-
// Some of these methods are missing from
|
13191 |
-
// Firefox/Chrome experimental implementations
|
13192 |
-
"resolve" in local.Promise &&
|
13193 |
-
"reject" in local.Promise &&
|
13194 |
-
"all" in local.Promise &&
|
13195 |
-
"race" in local.Promise &&
|
13196 |
-
// Older version of the spec had a resolver object
|
13197 |
-
// as the arg rather than a function
|
13198 |
-
(function() {
|
13199 |
-
var resolve;
|
13200 |
-
new local.Promise(function(r) { resolve = r; });
|
13201 |
-
return $$utils$$isFunction(resolve);
|
13202 |
-
}());
|
13203 |
-
|
13204 |
-
if (!es6PromiseSupport) {
|
13205 |
-
local.Promise = $$es6$promise$promise$$default;
|
13206 |
-
}
|
13207 |
-
};
|
13208 |
|
13209 |
-
|
13210 |
-
|
13211 |
-
|
13212 |
-
};
|
13213 |
|
13214 |
-
|
13215 |
-
|
13216 |
-
|
13217 |
-
|
13218 |
-
|
13219 |
-
|
13220 |
-
|
13221 |
-
|
13222 |
-
|
13223 |
-
|
13224 |
-
|
13225 |
-
|
13226 |
-
|
13227 |
-
|
13228 |
-
|
13229 |
-
|
13230 |
-
|
13231 |
-
function drainQueue() {
|
13232 |
-
if (draining) {
|
13233 |
-
return;
|
13234 |
-
}
|
13235 |
-
draining = true;
|
13236 |
-
var currentQueue;
|
13237 |
-
var len = queue.length;
|
13238 |
-
while(len) {
|
13239 |
-
currentQueue = queue;
|
13240 |
-
queue = [];
|
13241 |
-
var i = -1;
|
13242 |
-
while (++i < len) {
|
13243 |
-
currentQueue[i]();
|
13244 |
}
|
13245 |
-
len = queue.length;
|
13246 |
-
}
|
13247 |
-
draining = false;
|
13248 |
-
}
|
13249 |
-
process.nextTick = function (fun) {
|
13250 |
-
queue.push(fun);
|
13251 |
-
if (!draining) {
|
13252 |
-
setTimeout(drainQueue, 0);
|
13253 |
}
|
13254 |
};
|
13255 |
|
13256 |
-
|
13257 |
-
|
13258 |
-
|
13259 |
-
|
13260 |
-
|
13261 |
|
13262 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13263 |
|
13264 |
-
|
13265 |
-
|
13266 |
-
|
13267 |
-
|
13268 |
-
process.removeListener = noop;
|
13269 |
-
process.removeAllListeners = noop;
|
13270 |
-
process.emit = noop;
|
13271 |
|
13272 |
-
|
13273 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13274 |
};
|
13275 |
|
13276 |
-
|
13277 |
-
|
13278 |
-
|
13279 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13280 |
};
|
13281 |
-
process.umask = function() { return 0; };
|
13282 |
|
13283 |
-
|
13284 |
-
|
13285 |
-
|
13286 |
-
|
|
|
|
|
|
|
|
|
13287 |
|
13288 |
-
|
13289 |
-
|
13290 |
-
|
13291 |
-
|
13292 |
-
|
13293 |
-
|
13294 |
-
|
13295 |
-
|
|
|
13296 |
|
13297 |
-
|
13298 |
-
|
13299 |
-
|
13300 |
-
* @type Object
|
13301 |
-
*/
|
13302 |
-
var punycode,
|
13303 |
-
|
13304 |
-
/** Highest positive signed 32-bit float value */
|
13305 |
-
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
|
13306 |
-
|
13307 |
-
/** Bootstring parameters */
|
13308 |
-
base = 36,
|
13309 |
-
tMin = 1,
|
13310 |
-
tMax = 26,
|
13311 |
-
skew = 38,
|
13312 |
-
damp = 700,
|
13313 |
-
initialBias = 72,
|
13314 |
-
initialN = 128, // 0x80
|
13315 |
-
delimiter = '-', // '\x2D'
|
13316 |
-
|
13317 |
-
/** Regular expressions */
|
13318 |
-
regexPunycode = /^xn--/,
|
13319 |
-
regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
|
13320 |
-
regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators
|
13321 |
-
|
13322 |
-
/** Error messages */
|
13323 |
-
errors = {
|
13324 |
-
'overflow': 'Overflow: input needs wider integers to process',
|
13325 |
-
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
|
13326 |
-
'invalid-input': 'Invalid input'
|
13327 |
-
},
|
13328 |
|
13329 |
-
|
13330 |
-
baseMinusTMin = base - tMin,
|
13331 |
-
floor = Math.floor,
|
13332 |
-
stringFromCharCode = String.fromCharCode,
|
13333 |
|
13334 |
-
/** Temporary variable */
|
13335 |
-
key;
|
13336 |
|
13337 |
-
|
|
|
|
|
13338 |
|
13339 |
-
|
13340 |
-
* A generic error utility function.
|
13341 |
-
* @private
|
13342 |
-
* @param {String} type The error type.
|
13343 |
-
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
13344 |
-
*/
|
13345 |
-
function error(type) {
|
13346 |
-
throw RangeError(errors[type]);
|
13347 |
-
}
|
13348 |
|
13349 |
-
|
13350 |
-
* A generic `Array#map` utility function.
|
13351 |
-
* @private
|
13352 |
-
* @param {Array} array The array to iterate over.
|
13353 |
-
* @param {Function} callback The function that gets called for every array
|
13354 |
-
* item.
|
13355 |
-
* @returns {Array} A new array of values returned by the callback function.
|
13356 |
-
*/
|
13357 |
-
function map(array, fn) {
|
13358 |
-
var length = array.length;
|
13359 |
-
while (length--) {
|
13360 |
-
array[length] = fn(array[length]);
|
13361 |
-
}
|
13362 |
-
return array;
|
13363 |
-
}
|
13364 |
|
13365 |
-
|
13366 |
-
* A simple `Array#map`-like wrapper to work with domain name strings.
|
13367 |
-
* @private
|
13368 |
-
* @param {String} domain The domain name.
|
13369 |
-
* @param {Function} callback The function that gets called for every
|
13370 |
-
* character.
|
13371 |
-
* @returns {Array} A new string of characters returned by the callback
|
13372 |
-
* function.
|
13373 |
-
*/
|
13374 |
-
function mapDomain(string, fn) {
|
13375 |
-
return map(string.split(regexSeparators), fn).join('.');
|
13376 |
-
}
|
13377 |
|
13378 |
-
|
13379 |
-
* Creates an array containing the numeric code points of each Unicode
|
13380 |
-
* character in the string. While JavaScript uses UCS-2 internally,
|
13381 |
-
* this function will convert a pair of surrogate halves (each of which
|
13382 |
-
* UCS-2 exposes as separate characters) into a single code point,
|
13383 |
-
* matching UTF-16.
|
13384 |
-
* @see `punycode.ucs2.encode`
|
13385 |
-
* @see <http://mathiasbynens.be/notes/javascript-encoding>
|
13386 |
-
* @memberOf punycode.ucs2
|
13387 |
-
* @name decode
|
13388 |
-
* @param {String} string The Unicode input string (UCS-2).
|
13389 |
-
* @returns {Array} The new array of code points.
|
13390 |
-
*/
|
13391 |
-
function ucs2decode(string) {
|
13392 |
-
var output = [],
|
13393 |
-
counter = 0,
|
13394 |
-
length = string.length,
|
13395 |
-
value,
|
13396 |
-
extra;
|
13397 |
-
while (counter < length) {
|
13398 |
-
value = string.charCodeAt(counter++);
|
13399 |
-
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
13400 |
-
// high surrogate, and there is a next character
|
13401 |
-
extra = string.charCodeAt(counter++);
|
13402 |
-
if ((extra & 0xFC00) == 0xDC00) { // low surrogate
|
13403 |
-
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
13404 |
-
} else {
|
13405 |
-
// unmatched surrogate; only append this code unit, in case the next
|
13406 |
-
// code unit is the high surrogate of a surrogate pair
|
13407 |
-
output.push(value);
|
13408 |
-
counter--;
|
13409 |
-
}
|
13410 |
-
} else {
|
13411 |
-
output.push(value);
|
13412 |
-
}
|
13413 |
-
}
|
13414 |
-
return output;
|
13415 |
-
}
|
13416 |
|
13417 |
-
|
13418 |
-
|
13419 |
-
|
13420 |
-
* @memberOf punycode.ucs2
|
13421 |
-
* @name encode
|
13422 |
-
* @param {Array} codePoints The array of numeric code points.
|
13423 |
-
* @returns {String} The new Unicode string (UCS-2).
|
13424 |
-
*/
|
13425 |
-
function ucs2encode(array) {
|
13426 |
-
return map(array, function(value) {
|
13427 |
-
var output = '';
|
13428 |
-
if (value > 0xFFFF) {
|
13429 |
-
value -= 0x10000;
|
13430 |
-
output += stringFromCharCode(value >>> 10 & 0x3FF | 0xD800);
|
13431 |
-
value = 0xDC00 | value & 0x3FF;
|
13432 |
-
}
|
13433 |
-
output += stringFromCharCode(value);
|
13434 |
-
return output;
|
13435 |
-
}).join('');
|
13436 |
-
}
|
13437 |
|
13438 |
-
|
13439 |
-
|
13440 |
-
|
13441 |
-
|
13442 |
-
* @param {Number} codePoint The basic numeric code point value.
|
13443 |
-
* @returns {Number} The numeric value of a basic code point (for use in
|
13444 |
-
* representing integers) in the range `0` to `base - 1`, or `base` if
|
13445 |
-
* the code point does not represent a value.
|
13446 |
-
*/
|
13447 |
-
function basicToDigit(codePoint) {
|
13448 |
-
if (codePoint - 48 < 10) {
|
13449 |
-
return codePoint - 22;
|
13450 |
-
}
|
13451 |
-
if (codePoint - 65 < 26) {
|
13452 |
-
return codePoint - 65;
|
13453 |
-
}
|
13454 |
-
if (codePoint - 97 < 26) {
|
13455 |
-
return codePoint - 97;
|
13456 |
-
}
|
13457 |
-
return base;
|
13458 |
-
}
|
13459 |
|
13460 |
-
|
13461 |
-
|
13462 |
-
|
13463 |
-
|
13464 |
-
|
13465 |
-
|
13466 |
-
|
13467 |
-
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
|
13468 |
-
* used; else, the lowercase form is used. The behavior is undefined
|
13469 |
-
* if `flag` is non-zero and `digit` has no uppercase form.
|
13470 |
-
*/
|
13471 |
-
function digitToBasic(digit, flag) {
|
13472 |
-
// 0..25 map to ASCII a..z or A..Z
|
13473 |
-
// 26..35 map to ASCII 0..9
|
13474 |
-
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
13475 |
-
}
|
13476 |
|
13477 |
-
|
13478 |
-
|
13479 |
-
* http://tools.ietf.org/html/rfc3492#section-3.4
|
13480 |
-
* @private
|
13481 |
-
*/
|
13482 |
-
function adapt(delta, numPoints, firstTime) {
|
13483 |
-
var k = 0;
|
13484 |
-
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
13485 |
-
delta += floor(delta / numPoints);
|
13486 |
-
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
|
13487 |
-
delta = floor(delta / baseMinusTMin);
|
13488 |
-
}
|
13489 |
-
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
13490 |
-
}
|
13491 |
|
13492 |
-
|
13493 |
-
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
|
13494 |
-
* symbols.
|
13495 |
-
* @memberOf punycode
|
13496 |
-
* @param {String} input The Punycode string of ASCII-only symbols.
|
13497 |
-
* @returns {String} The resulting string of Unicode symbols.
|
13498 |
-
*/
|
13499 |
-
function decode(input) {
|
13500 |
-
// Don't use UCS-2
|
13501 |
-
var output = [],
|
13502 |
-
inputLength = input.length,
|
13503 |
-
out,
|
13504 |
-
i = 0,
|
13505 |
-
n = initialN,
|
13506 |
-
bias = initialBias,
|
13507 |
-
basic,
|
13508 |
-
j,
|
13509 |
-
index,
|
13510 |
-
oldi,
|
13511 |
-
w,
|
13512 |
-
k,
|
13513 |
-
digit,
|
13514 |
-
t,
|
13515 |
-
/** Cached calculation results */
|
13516 |
-
baseMinusT;
|
13517 |
-
|
13518 |
-
// Handle the basic code points: let `basic` be the number of input code
|
13519 |
-
// points before the last delimiter, or `0` if there is none, then copy
|
13520 |
-
// the first basic code points to the output.
|
13521 |
-
|
13522 |
-
basic = input.lastIndexOf(delimiter);
|
13523 |
-
if (basic < 0) {
|
13524 |
-
basic = 0;
|
13525 |
-
}
|
13526 |
|
13527 |
-
for (j = 0; j < basic; ++j) {
|
13528 |
-
// if it's not a basic code point
|
13529 |
-
if (input.charCodeAt(j) >= 0x80) {
|
13530 |
-
error('not-basic');
|
13531 |
-
}
|
13532 |
-
output.push(input.charCodeAt(j));
|
13533 |
-
}
|
13534 |
|
13535 |
-
|
13536 |
-
// points were copied; start at the beginning otherwise.
|
13537 |
|
13538 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13539 |
|
13540 |
-
|
13541 |
-
|
13542 |
-
|
13543 |
-
|
13544 |
-
// value at the end to obtain `delta`.
|
13545 |
-
for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
|
13546 |
|
13547 |
-
|
13548 |
-
|
13549 |
-
}
|
13550 |
|
13551 |
-
|
|
|
|
|
13552 |
|
13553 |
-
|
13554 |
-
error('overflow');
|
13555 |
-
}
|
13556 |
|
13557 |
-
i += digit * w;
|
13558 |
-
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
13559 |
|
13560 |
-
|
13561 |
-
|
13562 |
-
|
13563 |
|
13564 |
-
|
13565 |
-
|
13566 |
-
|
13567 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13568 |
|
13569 |
-
|
|
|
13570 |
|
13571 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13572 |
|
13573 |
-
|
13574 |
-
|
13575 |
|
13576 |
-
|
13577 |
-
|
13578 |
-
|
13579 |
-
|
13580 |
-
}
|
13581 |
|
13582 |
-
|
13583 |
-
|
|
|
|
|
|
|
|
|
|
|
13584 |
|
13585 |
-
|
13586 |
-
|
|
|
13587 |
|
13588 |
-
|
|
|
|
|
13589 |
|
13590 |
-
|
13591 |
-
|
|
|
|
|
|
|
13592 |
|
13593 |
-
|
13594 |
-
|
13595 |
-
|
13596 |
-
|
13597 |
-
|
13598 |
-
|
13599 |
-
|
13600 |
-
|
13601 |
-
var n,
|
13602 |
-
delta,
|
13603 |
-
handledCPCount,
|
13604 |
-
basicLength,
|
13605 |
-
bias,
|
13606 |
-
j,
|
13607 |
-
m,
|
13608 |
-
q,
|
13609 |
-
k,
|
13610 |
-
t,
|
13611 |
-
currentValue,
|
13612 |
-
output = [],
|
13613 |
-
/** `inputLength` will hold the number of code points in `input`. */
|
13614 |
-
inputLength,
|
13615 |
-
/** Cached calculation results */
|
13616 |
-
handledCPCountPlusOne,
|
13617 |
-
baseMinusT,
|
13618 |
-
qMinusT;
|
13619 |
-
|
13620 |
-
// Convert the input in UCS-2 to Unicode
|
13621 |
-
input = ucs2decode(input);
|
13622 |
-
|
13623 |
-
// Cache the length
|
13624 |
-
inputLength = input.length;
|
13625 |
-
|
13626 |
-
// Initialize the state
|
13627 |
-
n = initialN;
|
13628 |
-
delta = 0;
|
13629 |
-
bias = initialBias;
|
13630 |
-
|
13631 |
-
// Handle the basic code points
|
13632 |
-
for (j = 0; j < inputLength; ++j) {
|
13633 |
-
currentValue = input[j];
|
13634 |
-
if (currentValue < 0x80) {
|
13635 |
-
output.push(stringFromCharCode(currentValue));
|
13636 |
-
}
|
13637 |
-
}
|
13638 |
|
13639 |
-
|
|
|
|
|
13640 |
|
13641 |
-
|
13642 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13643 |
|
13644 |
-
|
13645 |
-
|
13646 |
-
|
13647 |
-
|
13648 |
|
13649 |
-
|
13650 |
-
|
|
|
|
|
|
|
|
|
|
|
13651 |
|
13652 |
-
|
13653 |
-
|
13654 |
-
|
13655 |
-
|
13656 |
-
|
13657 |
-
|
13658 |
-
|
13659 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13660 |
|
13661 |
-
|
13662 |
-
|
13663 |
-
|
13664 |
-
|
13665 |
-
|
13666 |
-
|
|
|
13667 |
|
13668 |
-
|
13669 |
-
|
13670 |
-
|
13671 |
-
|
13672 |
-
|
13673 |
-
|
13674 |
-
|
13675 |
-
error('overflow');
|
13676 |
-
}
|
13677 |
-
|
13678 |
-
if (currentValue == n) {
|
13679 |
-
// Represent delta as a generalized variable-length integer
|
13680 |
-
for (q = delta, k = base; /* no condition */; k += base) {
|
13681 |
-
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
13682 |
-
if (q < t) {
|
13683 |
-
break;
|
13684 |
-
}
|
13685 |
-
qMinusT = q - t;
|
13686 |
-
baseMinusT = base - t;
|
13687 |
-
output.push(
|
13688 |
-
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
|
13689 |
-
);
|
13690 |
-
q = floor(qMinusT / baseMinusT);
|
13691 |
-
}
|
13692 |
-
|
13693 |
-
output.push(stringFromCharCode(digitToBasic(q, 0)));
|
13694 |
-
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
|
13695 |
-
delta = 0;
|
13696 |
-
++handledCPCount;
|
13697 |
-
}
|
13698 |
-
}
|
13699 |
|
13700 |
-
|
13701 |
-
|
|
|
|
|
|
|
|
|
|
|
13702 |
|
13703 |
-
|
13704 |
-
|
13705 |
-
|
|
|
|
|
13706 |
|
13707 |
-
|
13708 |
-
* Converts a Punycode string representing a domain name to Unicode. Only the
|
13709 |
-
* Punycoded parts of the domain name will be converted, i.e. it doesn't
|
13710 |
-
* matter if you call it on a string that has already been converted to
|
13711 |
-
* Unicode.
|
13712 |
-
* @memberOf punycode
|
13713 |
-
* @param {String} domain The Punycode domain name to convert to Unicode.
|
13714 |
-
* @returns {String} The Unicode representation of the given Punycode
|
13715 |
-
* string.
|
13716 |
-
*/
|
13717 |
-
function toUnicode(domain) {
|
13718 |
-
return mapDomain(domain, function(string) {
|
13719 |
-
return regexPunycode.test(string)
|
13720 |
-
? decode(string.slice(4).toLowerCase())
|
13721 |
-
: string;
|
13722 |
-
});
|
13723 |
-
}
|
13724 |
|
13725 |
-
|
13726 |
-
|
13727 |
-
|
13728 |
-
* matter if you call it with a domain that's already in ASCII.
|
13729 |
-
* @memberOf punycode
|
13730 |
-
* @param {String} domain The domain name to convert, as a Unicode string.
|
13731 |
-
* @returns {String} The Punycode representation of the given domain name.
|
13732 |
-
*/
|
13733 |
-
function toASCII(domain) {
|
13734 |
-
return mapDomain(domain, function(string) {
|
13735 |
-
return regexNonASCII.test(string)
|
13736 |
-
? 'xn--' + encode(string)
|
13737 |
-
: string;
|
13738 |
-
});
|
13739 |
-
}
|
13740 |
|
13741 |
-
|
13742 |
-
|
13743 |
-
/** Define the public API */
|
13744 |
-
punycode = {
|
13745 |
-
/**
|
13746 |
-
* A string representing the current Punycode.js version number.
|
13747 |
-
* @memberOf punycode
|
13748 |
-
* @type String
|
13749 |
-
*/
|
13750 |
-
'version': '1.2.4',
|
13751 |
-
/**
|
13752 |
-
* An object of methods to convert from JavaScript's internal character
|
13753 |
-
* representation (UCS-2) to Unicode code points, and back.
|
13754 |
-
* @see <http://mathiasbynens.be/notes/javascript-encoding>
|
13755 |
-
* @memberOf punycode
|
13756 |
-
* @type Object
|
13757 |
-
*/
|
13758 |
-
'ucs2': {
|
13759 |
-
'decode': ucs2decode,
|
13760 |
-
'encode': ucs2encode
|
13761 |
-
},
|
13762 |
-
'decode': decode,
|
13763 |
-
'encode': encode,
|
13764 |
-
'toASCII': toASCII,
|
13765 |
-
'toUnicode': toUnicode
|
13766 |
-
};
|
13767 |
|
13768 |
-
/** Expose `punycode` */
|
13769 |
-
// Some AMD build optimizers, like r.js, check for specific condition patterns
|
13770 |
-
// like the following:
|
13771 |
-
if (
|
13772 |
-
typeof define == 'function' &&
|
13773 |
-
typeof define.amd == 'object' &&
|
13774 |
-
define.amd
|
13775 |
-
) {
|
13776 |
-
define('punycode', function() {
|
13777 |
-
return punycode;
|
13778 |
-
});
|
13779 |
-
} else if (freeExports && !freeExports.nodeType) {
|
13780 |
-
if (freeModule) { // in Node.js or RingoJS v0.8.0+
|
13781 |
-
freeModule.exports = punycode;
|
13782 |
-
} else { // in Narwhal or RingoJS v0.7.0-
|
13783 |
-
for (key in punycode) {
|
13784 |
-
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
|
13785 |
-
}
|
13786 |
-
}
|
13787 |
-
} else { // in Rhino or a web browser
|
13788 |
-
root.punycode = punycode;
|
13789 |
-
}
|
13790 |
|
13791 |
-
|
13792 |
-
|
13793 |
-
})
|
13794 |
-
|
13795 |
-
|
13796 |
-
var
|
13797 |
-
|
13798 |
-
var
|
13799 |
-
|
13800 |
-
|
13801 |
-
|
13802 |
-
|
13803 |
-
|
13804 |
-
|
13805 |
-
|
13806 |
-
|
13807 |
-
|
13808 |
-
}
|
13809 |
-
|
13810 |
-
|
13811 |
-
|
13812 |
-
|
13813 |
-
|
13814 |
-
|
13815 |
-
|
13816 |
-
|
13817 |
-
|
13818 |
-
|
13819 |
-
|
13820 |
-
|
13821 |
-
|
13822 |
-
|
13823 |
-
|
13824 |
-
|
13825 |
-
|
13826 |
-
|
13827 |
-
|
13828 |
-
|
13829 |
-
|
13830 |
-
|
13831 |
-
|
13832 |
-
|
13833 |
-
|
13834 |
-
|
13835 |
-
|
13836 |
-
|
13837 |
-
|
13838 |
-
|
13839 |
-
|
13840 |
-
|
13841 |
-
|
13842 |
-
|
13843 |
-
|
13844 |
-
|
13845 |
-
|
13846 |
-
|
13847 |
-
|
13848 |
-
|
13849 |
-
|
13850 |
-
|
13851 |
-
|
13852 |
-
|
13853 |
-
|
13854 |
-
|
13855 |
-
|
13856 |
-
|
13857 |
-
|
13858 |
-
|
13859 |
-
|
13860 |
-
|
13861 |
-
|
13862 |
-
|
13863 |
-
|
13864 |
-
|
13865 |
-
|
13866 |
-
|
13867 |
-
|
13868 |
-
|
13869 |
-
|
13870 |
-
|
13871 |
-
|
13872 |
-
|
13873 |
-
|
13874 |
-
|
13875 |
-
|
13876 |
-
|
13877 |
-
|
13878 |
-
|
13879 |
-
|
13880 |
-
|
13881 |
-
|
13882 |
-
|
13883 |
-
|
13884 |
-
|
13885 |
-
|
13886 |
-
|
13887 |
-
|
13888 |
-
|
13889 |
-
|
13890 |
-
|
13891 |
-
|
13892 |
-
|
13893 |
-
|
13894 |
-
|
13895 |
-
|
13896 |
-
|
13897 |
-
|
13898 |
-
|
13899 |
-
|
13900 |
-
|
13901 |
-
|
13902 |
-
|
13903 |
-
|
13904 |
-
|
13905 |
-
|
13906 |
-
|
13907 |
-
|
13908 |
-
|
13909 |
-
|
13910 |
-
|
13911 |
-
|
13912 |
-
|
13913 |
-
|
13914 |
-
|
13915 |
-
|
13916 |
-
|
13917 |
-
|
13918 |
-
|
13919 |
-
|
13920 |
-
|
13921 |
-
|
13922 |
-
|
13923 |
-
|
13924 |
-
|
13925 |
-
|
13926 |
-
|
13927 |
-
|
13928 |
-
|
13929 |
-
|
13930 |
-
|
13931 |
-
|
13932 |
-
|
13933 |
-
|
13934 |
-
|
13935 |
-
}
|
13936 |
-
|
13937 |
-
|
13938 |
-
var
|
13939 |
-
|
13940 |
-
|
13941 |
-
|
13942 |
-
|
13943 |
-
|
13944 |
-
|
13945 |
-
|
13946 |
-
|
13947 |
-
|
13948 |
-
|
13949 |
-
|
13950 |
-
|
13951 |
-
|
13952 |
-
|
13953 |
-
|
13954 |
-
|
13955 |
-
|
13956 |
-
|
13957 |
-
|
13958 |
-
|
13959 |
-
|
13960 |
-
|
13961 |
-
|
13962 |
-
|
13963 |
-
|
13964 |
-
|
13965 |
-
|
13966 |
-
|
13967 |
-
|
13968 |
-
|
13969 |
-
|
13970 |
-
|
13971 |
-
|
13972 |
-
|
13973 |
-
|
13974 |
-
|
13975 |
-
|
13976 |
-
|
13977 |
-
|
13978 |
-
|
13979 |
-
|
13980 |
-
|
13981 |
-
|
13982 |
-
|
13983 |
-
|
13984 |
-
|
13985 |
-
|
13986 |
-
|
13987 |
-
|
13988 |
-
|
13989 |
-
|
13990 |
-
|
13991 |
-
|
13992 |
-
|
13993 |
-
|
13994 |
-
|
13995 |
-
|
13996 |
-
var
|
13997 |
-
|
13998 |
-
|
13999 |
-
|
14000 |
-
|
14001 |
-
|
14002 |
-
|
14003 |
-
|
14004 |
-
|
14005 |
-
|
14006 |
-
|
14007 |
-
|
14008 |
-
|
14009 |
-
|
14010 |
-
|
14011 |
-
|
14012 |
-
|
14013 |
-
|
14014 |
-
|
14015 |
-
|
14016 |
-
|
14017 |
-
|
14018 |
-
|
14019 |
-
|
14020 |
-
|
14021 |
-
|
14022 |
-
|
14023 |
-
|
14024 |
-
|
14025 |
-
|
14026 |
-
|
14027 |
-
|
14028 |
-
|
14029 |
-
|
14030 |
-
|
14031 |
-
|
14032 |
-
|
14033 |
-
|
14034 |
-
|
14035 |
-
return
|
14036 |
-
};
|
14037 |
-
|
14038 |
-
|
14039 |
-
|
14040 |
-
|
14041 |
-
|
14042 |
-
|
14043 |
-
|
14044 |
-
|
14045 |
-
|
14046 |
-
|
14047 |
-
|
14048 |
-
|
14049 |
-
|
14050 |
-
|
14051 |
-
|
14052 |
-
|
14053 |
-
|
14054 |
-
|
14055 |
-
|
14056 |
-
|
14057 |
-
|
14058 |
-
|
14059 |
-
|
14060 |
-
|
14061 |
-
|
14062 |
-
|
14063 |
-
|
14064 |
-
|
14065 |
-
|
14066 |
-
|
14067 |
-
|
14068 |
-
|
14069 |
-
|
14070 |
-
|
14071 |
-
|
14072 |
-
|
14073 |
-
|
14074 |
-
|
14075 |
-
|
14076 |
-
|
14077 |
-
|
14078 |
-
|
14079 |
-
|
14080 |
-
|
14081 |
-
|
14082 |
-
|
14083 |
-
|
14084 |
-
|
14085 |
-
|
14086 |
-
|
14087 |
-
|
14088 |
-
|
14089 |
-
|
14090 |
-
|
14091 |
-
|
14092 |
-
|
14093 |
-
|
14094 |
-
|
14095 |
-
|
14096 |
-
|
14097 |
-
|
14098 |
-
|
14099 |
-
|
14100 |
-
|
14101 |
-
|
14102 |
-
|
14103 |
-
|
14104 |
-
|
14105 |
-
|
14106 |
-
|
14107 |
-
|
14108 |
-
|
14109 |
-
|
14110 |
-
|
14111 |
-
|
14112 |
-
|
14113 |
-
|
14114 |
-
|
14115 |
-
|
14116 |
-
|
14117 |
-
|
14118 |
-
|
14119 |
-
|
14120 |
-
|
14121 |
-
|
14122 |
-
|
14123 |
-
|
14124 |
-
|
14125 |
-
|
14126 |
-
|
14127 |
-
|
14128 |
-
|
14129 |
-
|
14130 |
-
|
14131 |
-
|
14132 |
-
|
14133 |
-
|
14134 |
-
|
14135 |
-
|
14136 |
-
|
14137 |
-
|
14138 |
-
|
14139 |
-
|
14140 |
-
|
14141 |
-
|
14142 |
-
|
14143 |
-
|
14144 |
-
|
14145 |
-
|
14146 |
-
|
14147 |
-
|
14148 |
-
|
14149 |
-
|
14150 |
-
|
14151 |
-
|
14152 |
-
|
14153 |
-
|
14154 |
-
|
14155 |
-
|
14156 |
-
|
14157 |
-
|
14158 |
-
|
14159 |
-
|
14160 |
-
|
14161 |
-
|
14162 |
-
|
14163 |
-
|
14164 |
-
|
14165 |
-
|
14166 |
-
|
14167 |
-
|
14168 |
-
|
14169 |
-
|
14170 |
-
|
14171 |
-
|
14172 |
-
|
14173 |
-
|
14174 |
-
|
14175 |
-
|
14176 |
-
|
14177 |
-
|
14178 |
-
|
14179 |
-
|
14180 |
-
|
14181 |
-
|
14182 |
-
|
14183 |
-
|
14184 |
-
|
14185 |
-
|
14186 |
-
|
14187 |
-
|
14188 |
-
|
14189 |
-
|
14190 |
-
|
14191 |
-
|
14192 |
-
|
14193 |
-
|
14194 |
-
|
14195 |
-
|
14196 |
-
|
14197 |
-
var
|
14198 |
-
|
14199 |
-
|
14200 |
-
|
14201 |
-
|
14202 |
-
|
14203 |
-
|
14204 |
-
|
14205 |
-
|
14206 |
-
|
14207 |
-
|
14208 |
-
|
14209 |
-
|
14210 |
-
|
14211 |
-
|
14212 |
-
|
14213 |
-
|
14214 |
-
|
14215 |
-
|
14216 |
-
}
|
14217 |
-
|
14218 |
-
|
14219 |
-
|
14220 |
-
|
14221 |
-
|
14222 |
-
|
14223 |
-
|
14224 |
-
|
14225 |
-
|
14226 |
-
|
14227 |
-
|
14228 |
-
|
14229 |
-
|
14230 |
-
|
14231 |
-
|
14232 |
-
|
14233 |
-
|
14234 |
-
|
14235 |
-
|
14236 |
-
|
14237 |
-
var
|
14238 |
-
|
14239 |
-
|
14240 |
-
|
14241 |
-
|
14242 |
-
|
14243 |
-
|
14244 |
-
|
14245 |
-
|
14246 |
-
|
14247 |
-
|
14248 |
-
|
14249 |
-
|
14250 |
-
|
14251 |
-
|
14252 |
-
|
14253 |
-
|
14254 |
-
|
14255 |
-
|
14256 |
-
|
14257 |
-
|
14258 |
-
|
14259 |
-
|
14260 |
-
|
14261 |
-
|
14262 |
-
|
14263 |
-
|
14264 |
-
|
14265 |
-
|
14266 |
-
|
14267 |
-
|
14268 |
-
|
14269 |
-
|
14270 |
-
|
14271 |
-
|
14272 |
-
|
14273 |
-
|
14274 |
-
|
14275 |
-
|
14276 |
-
|
14277 |
-
|
14278 |
-
|
14279 |
-
|
14280 |
-
|
14281 |
-
|
14282 |
-
|
14283 |
-
|
14284 |
-
|
14285 |
-
|
14286 |
-
|
14287 |
-
|
14288 |
-
|
14289 |
-
|
14290 |
-
|
14291 |
-
|
14292 |
-
|
14293 |
-
|
14294 |
-
|
14295 |
-
|
14296 |
-
|
14297 |
-
|
14298 |
-
|
14299 |
-
|
14300 |
-
|
14301 |
-
|
14302 |
-
|
14303 |
-
|
14304 |
-
|
14305 |
-
|
14306 |
-
|
14307 |
-
|
14308 |
-
|
14309 |
-
|
14310 |
-
|
14311 |
-
|
14312 |
-
|
14313 |
-
|
14314 |
-
|
14315 |
-
|
14316 |
-
|
14317 |
-
|
14318 |
-
|
14319 |
-
|
14320 |
-
|
14321 |
-
|
14322 |
-
|
14323 |
-
|
14324 |
-
|
14325 |
-
|
14326 |
-
|
14327 |
-
|
14328 |
-
|
14329 |
-
|
14330 |
-
|
14331 |
-
|
14332 |
-
|
14333 |
-
|
14334 |
-
|
14335 |
-
|
14336 |
-
|
14337 |
-
|
14338 |
-
|
14339 |
-
|
14340 |
-
|
14341 |
-
|
14342 |
-
|
14343 |
-
|
14344 |
-
|
14345 |
-
|
14346 |
-
|
14347 |
-
|
14348 |
-
|
14349 |
-
|
14350 |
-
|
14351 |
-
|
14352 |
-
|
14353 |
-
|
14354 |
-
|
14355 |
-
|
14356 |
-
|
14357 |
-
|
14358 |
-
|
14359 |
-
|
14360 |
-
|
14361 |
-
|
14362 |
-
|
14363 |
-
|
14364 |
-
|
14365 |
-
|
14366 |
-
|
14367 |
-
|
14368 |
-
}
|
14369 |
-
|
14370 |
-
|
14371 |
-
|
14372 |
-
|
14373 |
-
|
14374 |
-
|
14375 |
-
|
14376 |
-
|
14377 |
-
|
14378 |
-
|
14379 |
-
|
14380 |
-
|
14381 |
-
|
14382 |
-
|
14383 |
-
|
14384 |
-
|
14385 |
-
|
14386 |
-
|
14387 |
-
|
14388 |
-
|
14389 |
-
|
14390 |
-
|
14391 |
-
|
14392 |
-
|
14393 |
-
|
14394 |
-
|
14395 |
-
|
14396 |
-
|
14397 |
-
|
14398 |
-
|
14399 |
-
|
14400 |
-
|
14401 |
-
|
14402 |
-
|
14403 |
-
|
14404 |
-
|
14405 |
-
|
14406 |
-
|
14407 |
-
|
14408 |
-
|
14409 |
-
|
14410 |
-
|
14411 |
-
|
14412 |
-
|
14413 |
-
|
14414 |
-
|
14415 |
-
|
14416 |
-
|
14417 |
-
|
14418 |
-
|
14419 |
-
|
14420 |
-
|
14421 |
-
|
14422 |
-
|
14423 |
-
|
14424 |
-
|
14425 |
-
|
14426 |
-
|
14427 |
-
|
14428 |
-
|
14429 |
-
|
14430 |
-
|
14431 |
-
|
14432 |
-
|
14433 |
-
|
14434 |
-
|
14435 |
-
|
14436 |
-
|
14437 |
-
|
14438 |
-
|
14439 |
-
|
14440 |
-
|
14441 |
-
|
14442 |
-
|
14443 |
-
|
14444 |
-
|
14445 |
-
|
14446 |
-
|
14447 |
-
|
14448 |
-
|
14449 |
-
|
14450 |
-
|
14451 |
-
|
14452 |
-
|
14453 |
-
|
14454 |
-
|
14455 |
-
|
14456 |
-
|
14457 |
-
|
14458 |
-
|
14459 |
-
|
14460 |
-
|
14461 |
-
|
14462 |
-
|
14463 |
-
|
14464 |
-
|
14465 |
-
|
14466 |
-
|
14467 |
-
|
14468 |
-
|
14469 |
-
|
14470 |
-
|
14471 |
-
|
14472 |
-
|
14473 |
-
|
14474 |
-
|
14475 |
-
|
14476 |
-
|
14477 |
-
|
14478 |
-
|
14479 |
-
|
14480 |
-
|
14481 |
-
|
14482 |
-
|
14483 |
-
|
14484 |
-
|
14485 |
-
|
14486 |
-
|
14487 |
-
|
14488 |
-
|
14489 |
-
|
14490 |
-
|
14491 |
-
|
14492 |
-
|
14493 |
-
|
14494 |
-
|
14495 |
-
|
14496 |
-
|
14497 |
-
|
14498 |
-
|
14499 |
-
|
14500 |
-
|
14501 |
-
|
14502 |
-
|
14503 |
-
|
14504 |
-
|
14505 |
-
|
14506 |
-
|
14507 |
-
|
14508 |
-
|
14509 |
-
|
14510 |
-
|
14511 |
-
|
14512 |
-
|
14513 |
-
|
14514 |
-
|
14515 |
-
|
14516 |
-
|
14517 |
-
|
14518 |
-
|
14519 |
-
|
14520 |
-
|
14521 |
-
|
14522 |
-
|
14523 |
-
|
14524 |
-
|
14525 |
-
|
14526 |
-
|
14527 |
-
|
14528 |
-
|
14529 |
-
|
14530 |
-
|
14531 |
-
|
14532 |
-
|
14533 |
-
|
14534 |
-
|
14535 |
-
|
14536 |
-
|
14537 |
-
|
14538 |
-
|
14539 |
-
|
14540 |
-
|
14541 |
-
|
14542 |
-
|
14543 |
-
|
14544 |
-
|
14545 |
-
|
14546 |
-
|
14547 |
-
|
14548 |
-
|
14549 |
-
|
14550 |
-
|
14551 |
-
|
14552 |
-
|
14553 |
-
|
14554 |
-
|
14555 |
-
|
14556 |
-
|
14557 |
-
|
14558 |
-
|
14559 |
-
|
14560 |
-
|
14561 |
-
|
14562 |
-
|
14563 |
-
|
14564 |
-
|
14565 |
-
|
14566 |
-
|
14567 |
-
|
14568 |
-
|
14569 |
-
|
14570 |
-
|
14571 |
-
|
14572 |
-
|
14573 |
-
|
14574 |
-
|
14575 |
-
|
14576 |
-
|
14577 |
-
|
14578 |
-
|
14579 |
-
|
14580 |
-
|
14581 |
-
|
14582 |
-
|
14583 |
-
|
14584 |
-
|
14585 |
-
|
14586 |
-
|
14587 |
-
|
14588 |
-
|
14589 |
-
|
14590 |
-
|
14591 |
-
|
14592 |
-
|
14593 |
-
|
14594 |
-
|
14595 |
-
|
14596 |
-
|
14597 |
-
|
14598 |
-
|
14599 |
-
|
14600 |
-
|
14601 |
-
|
14602 |
-
|
14603 |
-
|
14604 |
-
|
14605 |
-
|
14606 |
-
|
14607 |
-
|
14608 |
-
|
14609 |
-
|
14610 |
-
|
14611 |
-
|
14612 |
-
|
14613 |
-
|
14614 |
-
|
14615 |
-
|
14616 |
-
|
14617 |
-
|
14618 |
-
|
14619 |
-
|
14620 |
-
|
14621 |
-
|
14622 |
-
|
14623 |
-
|
14624 |
-
|
14625 |
-
|
14626 |
-
|
14627 |
-
|
14628 |
-
|
14629 |
-
|
14630 |
-
|
14631 |
-
|
14632 |
-
|
14633 |
-
|
14634 |
-
|
14635 |
-
|
14636 |
-
|
14637 |
-
|
14638 |
-
|
14639 |
-
|
14640 |
-
|
14641 |
-
};
|
14642 |
-
|
14643 |
-
|
14644 |
-
|
14645 |
-
|
14646 |
-
|
14647 |
-
|
14648 |
-
|
14649 |
-
|
14650 |
-
|
14651 |
-
|
14652 |
-
|
14653 |
-
|
14654 |
-
|
14655 |
-
|
14656 |
-
|
14657 |
-
|
14658 |
-
|
14659 |
-
|
14660 |
-
|
14661 |
-
|
14662 |
-
|
14663 |
-
|
14664 |
-
|
14665 |
-
|
14666 |
-
|
14667 |
-
|
14668 |
-
|
14669 |
-
|
14670 |
-
|
14671 |
-
|
14672 |
-
|
14673 |
-
|
14674 |
-
|
14675 |
-
|
14676 |
-
|
14677 |
-
|
14678 |
-
|
14679 |
-
|
14680 |
-
|
14681 |
-
|
14682 |
-
|
14683 |
-
|
14684 |
-
|
14685 |
-
|
14686 |
-
|
14687 |
-
|
14688 |
-
|
14689 |
-
|
14690 |
-
|
14691 |
-
|
14692 |
-
|
14693 |
-
|
14694 |
-
|
14695 |
-
|
14696 |
-
|
14697 |
-
|
14698 |
-
|
14699 |
-
|
14700 |
-
|
14701 |
-
|
14702 |
-
|
14703 |
-
|
14704 |
-
|
14705 |
-
|
14706 |
-
|
14707 |
-
|
14708 |
-
|
14709 |
-
|
14710 |
-
|
14711 |
-
|
14712 |
-
|
14713 |
-
|
14714 |
-
|
14715 |
-
|
14716 |
-
|
14717 |
-
|
14718 |
-
|
14719 |
-
|
14720 |
-
|
14721 |
-
|
14722 |
-
|
14723 |
-
|
14724 |
-
|
14725 |
-
|
14726 |
-
|
14727 |
-
|
14728 |
-
|
14729 |
-
|
14730 |
-
|
14731 |
-
|
14732 |
-
|
14733 |
-
|
14734 |
-
|
14735 |
-
|
14736 |
-
|
14737 |
-
|
14738 |
-
|
14739 |
-
|
14740 |
-
|
14741 |
-
|
14742 |
-
|
14743 |
-
|
14744 |
-
|
14745 |
-
|
14746 |
-
|
14747 |
-
|
14748 |
-
|
14749 |
-
|
14750 |
-
|
14751 |
-
|
14752 |
-
|
14753 |
-
|
14754 |
-
module
|
14755 |
-
|
14756 |
-
|
14757 |
-
|
14758 |
-
|
14759 |
-
|
14760 |
-
|
14761 |
-
};
|
14762 |
-
|
14763 |
-
|
14764 |
-
|
14765 |
-
|
14766 |
-
|
14767 |
-
|
14768 |
-
|
14769 |
-
|
14770 |
-
function
|
14771 |
-
|
14772 |
-
|
14773 |
-
|
14774 |
-
|
14775 |
-
|
14776 |
-
|
14777 |
-
|
14778 |
-
|
14779 |
-
|
14780 |
-
|
14781 |
-
|
14782 |
-
|
14783 |
-
|
14784 |
-
|
14785 |
-
|
14786 |
-
|
14787 |
-
|
14788 |
-
|
14789 |
-
|
14790 |
-
|
14791 |
-
|
14792 |
-
|
14793 |
-
|
14794 |
-
|
14795 |
-
|
14796 |
-
|
14797 |
-
|
14798 |
-
|
14799 |
-
|
14800 |
-
};
|
14801 |
-
|
14802 |
-
|
14803 |
-
|
14804 |
-
|
14805 |
-
|
14806 |
-
|
14807 |
-
|
14808 |
-
|
14809 |
-
|
14810 |
-
|
14811 |
-
|
14812 |
-
return
|
14813 |
-
|
14814 |
-
|
14815 |
-
|
14816 |
-
|
14817 |
-
|
14818 |
-
|
14819 |
-
|
14820 |
-
|
14821 |
-
|
14822 |
-
|
14823 |
-
|
14824 |
-
|
14825 |
-
|
14826 |
-
|
14827 |
-
|
14828 |
-
|
14829 |
-
|
14830 |
-
|
14831 |
-
|
14832 |
-
|
14833 |
-
|
14834 |
-
|
14835 |
-
|
14836 |
-
|
14837 |
-
|
14838 |
-
|
14839 |
-
|
14840 |
-
|
14841 |
-
|
14842 |
-
|
14843 |
-
|
14844 |
-
|
14845 |
-
|
14846 |
-
|
14847 |
-
|
14848 |
-
|
14849 |
-
|
14850 |
-
|
14851 |
-
|
14852 |
-
|
14853 |
-
|
14854 |
-
|
14855 |
-
|
14856 |
-
|
14857 |
-
|
14858 |
-
|
14859 |
-
|
14860 |
-
|
14861 |
-
|
14862 |
-
|
14863 |
-
|
14864 |
-
|
14865 |
-
|
14866 |
-
|
14867 |
-
|
14868 |
-
|
14869 |
-
|
14870 |
-
|
14871 |
-
|
14872 |
-
|
14873 |
-
|
14874 |
-
|
14875 |
-
|
14876 |
-
|
14877 |
-
|
14878 |
-
|
14879 |
-
|
14880 |
-
|
14881 |
-
|
14882 |
-
|
14883 |
-
|
14884 |
-
|
14885 |
-
|
14886 |
-
|
14887 |
-
|
14888 |
-
|
14889 |
-
|
14890 |
-
|
14891 |
-
|
14892 |
-
|
14893 |
-
|
14894 |
-
|
14895 |
-
|
14896 |
-
};
|
14897 |
-
|
14898 |
-
|
14899 |
-
|
14900 |
-
|
14901 |
-
|
14902 |
-
|
14903 |
-
|
14904 |
-
|
14905 |
-
|
14906 |
-
|
14907 |
-
|
14908 |
-
|
14909 |
-
|
14910 |
-
|
14911 |
-
if (
|
14912 |
-
height
|
14913 |
-
|
14914 |
-
|
14915 |
-
|
14916 |
-
|
14917 |
-
|
14918 |
-
|
14919 |
-
|
14920 |
-
|
14921 |
-
|
14922 |
-
|
14923 |
-
|
14924 |
-
|
14925 |
-
|
14926 |
-
|
14927 |
-
|
14928 |
-
|
14929 |
-
|
14930 |
-
|
14931 |
-
|
14932 |
-
|
14933 |
-
|
14934 |
-
}
|
14935 |
-
|
14936 |
-
|
14937 |
-
|
14938 |
-
|
14939 |
-
|
14940 |
-
|
14941 |
-
|
14942 |
-
|
14943 |
-
|
14944 |
-
|
14945 |
-
|
14946 |
-
|
14947 |
-
|
14948 |
-
|
14949 |
-
|
14950 |
-
|
14951 |
-
|
14952 |
-
|
14953 |
-
|
14954 |
-
|
14955 |
-
|
14956 |
-
|
14957 |
-
|
14958 |
-
|
14959 |
-
|
14960 |
-
|
14961 |
-
|
14962 |
-
|
14963 |
-
|
14964 |
-
|
14965 |
-
|
14966 |
-
|
14967 |
-
|
14968 |
-
|
14969 |
-
|
14970 |
-
|
14971 |
-
|
14972 |
-
|
14973 |
-
|
14974 |
-
};
|
14975 |
-
|
14976 |
-
|
14977 |
-
|
14978 |
-
|
14979 |
-
|
14980 |
-
|
14981 |
-
|
14982 |
-
|
14983 |
-
|
14984 |
-
|
14985 |
-
|
14986 |
-
|
14987 |
-
|
14988 |
-
|
14989 |
-
|
14990 |
-
|
14991 |
-
|
14992 |
-
|
14993 |
-
|
14994 |
-
|
14995 |
-
|
14996 |
-
|
14997 |
-
|
14998 |
-
|
14999 |
-
|
15000 |
-
|
15001 |
-
|
15002 |
-
|
15003 |
-
|
15004 |
-
|
15005 |
-
|
15006 |
-
|
15007 |
-
|
15008 |
-
|
15009 |
-
|
15010 |
-
|
15011 |
-
|
15012 |
-
|
15013 |
-
|
15014 |
-
|
15015 |
-
|
15016 |
-
|
15017 |
-
|
15018 |
-
|
15019 |
-
|
15020 |
-
|
15021 |
-
|
15022 |
-
|
15023 |
-
|
15024 |
-
|
15025 |
-
|
15026 |
-
|
15027 |
-
|
15028 |
-
|
15029 |
-
function
|
15030 |
-
|
15031 |
-
|
15032 |
-
|
15033 |
-
|
15034 |
-
|
15035 |
-
|
15036 |
-
|
15037 |
-
|
15038 |
-
|
15039 |
-
|
15040 |
-
}
|
15041 |
-
|
15042 |
-
function
|
15043 |
-
|
15044 |
-
|
15045 |
-
|
15046 |
-
|
15047 |
-
|
15048 |
-
|
15049 |
-
|
15050 |
-
|
15051 |
-
|
15052 |
-
|
15053 |
-
|
15054 |
-
|
15055 |
-
|
15056 |
-
|
15057 |
-
|
15058 |
-
|
15059 |
-
|
15060 |
-
|
15061 |
-
|
15062 |
-
|
15063 |
-
|
15064 |
-
|
15065 |
-
|
15066 |
-
|
15067 |
-
|
15068 |
-
|
15069 |
-
|
15070 |
-
|
15071 |
-
|
15072 |
-
|
15073 |
-
|
15074 |
-
|
15075 |
-
|
15076 |
-
|
15077 |
-
|
15078 |
-
|
15079 |
-
|
15080 |
-
|
15081 |
-
|
15082 |
-
|
15083 |
-
|
15084 |
-
|
15085 |
-
|
15086 |
-
|
15087 |
-
|
15088 |
-
|
15089 |
-
|
15090 |
-
|
15091 |
-
|
15092 |
-
|
15093 |
-
|
15094 |
-
|
15095 |
-
|
15096 |
-
|
15097 |
-
|
15098 |
-
|
15099 |
-
|
15100 |
-
|
15101 |
-
|
15102 |
-
|
15103 |
-
|
15104 |
-
|
15105 |
-
|
15106 |
-
|
15107 |
-
|
15108 |
-
|
15109 |
-
|
15110 |
-
|
15111 |
-
|
15112 |
-
|
15113 |
-
|
15114 |
-
|
15115 |
-
|
15116 |
-
|
15117 |
-
|
15118 |
-
|
15119 |
-
|
15120 |
-
|
15121 |
-
|
15122 |
-
|
15123 |
-
|
15124 |
-
|
15125 |
-
|
15126 |
-
|
15127 |
-
|
15128 |
-
|
15129 |
-
|
15130 |
-
|
15131 |
-
|
15132 |
-
|
15133 |
-
|
15134 |
-
|
15135 |
-
|
15136 |
-
|
15137 |
-
|
15138 |
-
|
15139 |
-
|
15140 |
-
|
15141 |
-
|
15142 |
-
|
15143 |
-
|
15144 |
-
|
15145 |
-
|
15146 |
-
|
15147 |
-
|
15148 |
-
|
15149 |
-
|
15150 |
-
|
15151 |
-
|
15152 |
-
|
15153 |
-
|
15154 |
-
|
15155 |
-
|
15156 |
-
|
15157 |
-
|
15158 |
-
|
15159 |
-
|
15160 |
-
|
15161 |
-
|
15162 |
-
|
15163 |
-
|
15164 |
-
|
15165 |
-
|
15166 |
-
|
15167 |
-
|
15168 |
-
|
15169 |
-
|
15170 |
-
|
15171 |
-
|
15172 |
-
};
|
15173 |
-
|
15174 |
-
|
15175 |
-
|
15176 |
-
|
15177 |
-
|
15178 |
-
|
15179 |
-
|
15180 |
-
|
15181 |
-
|
15182 |
-
|
15183 |
-
|
15184 |
-
|
15185 |
-
|
15186 |
-
|
15187 |
-
|
15188 |
-
|
15189 |
-
|
15190 |
-
|
15191 |
-
|
15192 |
-
|
15193 |
-
|
15194 |
-
|
15195 |
-
|
15196 |
-
|
15197 |
-
|
15198 |
-
|
15199 |
-
|
15200 |
-
|
15201 |
-
|
15202 |
-
|
15203 |
-
|
15204 |
-
|
15205 |
-
|
15206 |
-
|
15207 |
-
|
15208 |
-
|
15209 |
-
|
15210 |
-
|
15211 |
-
|
15212 |
-
|
15213 |
-
|
15214 |
-
|
15215 |
-
|
15216 |
-
|
15217 |
-
|
15218 |
-
|
15219 |
-
|
15220 |
-
|
15221 |
-
|
15222 |
-
|
15223 |
-
|
15224 |
-
|
15225 |
-
|
15226 |
-
|
15227 |
-
|
15228 |
-
|
15229 |
-
|
15230 |
-
|
15231 |
-
|
15232 |
-
|
15233 |
-
|
15234 |
-
|
15235 |
-
|
15236 |
-
|
15237 |
-
|
15238 |
-
|
15239 |
-
|
15240 |
-
|
15241 |
-
|
15242 |
-
|
15243 |
-
|
15244 |
-
|
15245 |
-
|
15246 |
-
|
15247 |
-
|
15248 |
-
|
15249 |
-
|
15250 |
-
|
15251 |
-
|
15252 |
-
|
15253 |
-
|
15254 |
-
|
15255 |
-
|
15256 |
-
|
15257 |
-
|
15258 |
-
|
15259 |
-
|
15260 |
-
|
15261 |
-
|
15262 |
-
|
15263 |
-
|
15264 |
-
|
15265 |
-
|
15266 |
-
|
15267 |
-
|
15268 |
-
|
15269 |
-
|
15270 |
-
|
15271 |
-
|
15272 |
-
|
15273 |
-
|
15274 |
-
|
15275 |
-
|
15276 |
-
|
15277 |
-
|
15278 |
-
|
15279 |
-
|
15280 |
-
|
15281 |
-
|
15282 |
-
|
15283 |
-
|
15284 |
-
|
15285 |
-
|
15286 |
-
|
15287 |
-
|
15288 |
-
|
15289 |
-
|
15290 |
-
|
15291 |
-
|
15292 |
-
|
15293 |
-
|
15294 |
-
|
15295 |
-
|
15296 |
-
|
15297 |
-
|
15298 |
-
|
15299 |
-
|
15300 |
-
|
15301 |
-
|
15302 |
-
|
15303 |
-
|
15304 |
-
|
15305 |
-
|
15306 |
-
|
15307 |
-
|
15308 |
-
|
15309 |
-
|
15310 |
-
|
15311 |
-
|
15312 |
-
|
15313 |
-
|
15314 |
-
|
15315 |
-
|
15316 |
-
|
15317 |
-
|
15318 |
-
|
15319 |
-
|
15320 |
-
|
15321 |
-
|
15322 |
-
|
15323 |
-
|
15324 |
-
|
15325 |
-
|
15326 |
-
|
15327 |
-
|
15328 |
-
|
15329 |
-
|
15330 |
-
|
15331 |
-
|
15332 |
-
|
15333 |
-
|
15334 |
-
|
15335 |
-
|
15336 |
-
|
15337 |
-
|
15338 |
-
|
15339 |
-
|
15340 |
-
|
15341 |
-
|
15342 |
-
|
15343 |
-
|
15344 |
-
|
15345 |
-
|
15346 |
-
|
15347 |
-
|
15348 |
-
|
15349 |
-
|
15350 |
-
|
15351 |
-
|
15352 |
-
|
15353 |
-
|
15354 |
-
|
15355 |
-
|
15356 |
-
|
15357 |
-
|
15358 |
-
|
15359 |
-
|
15360 |
-
|
15361 |
-
|
15362 |
-
|
15363 |
-
|
15364 |
-
|
15365 |
-
|
15366 |
-
|
15367 |
-
|
15368 |
-
|
15369 |
-
|
15370 |
-
|
15371 |
-
|
15372 |
-
|
15373 |
-
|
15374 |
-
|
15375 |
-
|
15376 |
-
|
15377 |
-
|
15378 |
-
|
15379 |
-
|
15380 |
-
|
15381 |
-
|
15382 |
-
|
15383 |
-
|
15384 |
-
|
15385 |
-
|
15386 |
-
|
15387 |
-
|
15388 |
-
|
15389 |
-
|
15390 |
-
|
15391 |
-
|
15392 |
-
|
15393 |
-
|
15394 |
-
|
15395 |
-
|
15396 |
-
|
15397 |
-
|
15398 |
-
|
15399 |
-
|
15400 |
-
|
15401 |
-
|
15402 |
-
|
15403 |
-
|
15404 |
-
|
15405 |
-
|
15406 |
-
|
15407 |
-
|
15408 |
-
|
15409 |
-
|
15410 |
-
|
15411 |
-
|
15412 |
-
|
15413 |
-
|
15414 |
-
|
15415 |
-
|
15416 |
-
|
15417 |
-
|
15418 |
-
|
15419 |
-
|
15420 |
-
|
15421 |
-
|
15422 |
-
|
15423 |
-
|
15424 |
-
|
15425 |
-
|
15426 |
-
|
15427 |
-
|
15428 |
-
|
15429 |
-
|
15430 |
-
|
15431 |
-
|
15432 |
-
|
15433 |
-
|
15434 |
-
|
15435 |
-
|
15436 |
-
|
15437 |
-
|
15438 |
-
|
15439 |
-
|
15440 |
-
|
15441 |
-
|
15442 |
-
|
15443 |
-
|
15444 |
-
|
15445 |
-
|
15446 |
-
|
15447 |
-
|
15448 |
-
|
15449 |
-
|
15450 |
-
|
15451 |
-
|
15452 |
-
|
15453 |
-
|
15454 |
-
|
15455 |
-
|
15456 |
-
|
15457 |
-
|
15458 |
-
|
15459 |
-
|
15460 |
-
|
15461 |
-
|
15462 |
-
|
15463 |
-
|
15464 |
-
|
15465 |
-
|
15466 |
-
|
15467 |
-
|
15468 |
-
|
15469 |
-
|
15470 |
-
|
15471 |
-
|
15472 |
-
|
15473 |
-
|
15474 |
-
|
15475 |
-
|
15476 |
-
|
15477 |
-
}
|
15478 |
-
|
15479 |
-
|
15480 |
-
|
15481 |
-
|
15482 |
-
|
15483 |
-
|
15484 |
-
|
15485 |
-
|
15486 |
-
|
15487 |
-
|
15488 |
-
|
15489 |
-
|
15490 |
-
|
15491 |
-
|
15492 |
-
|
15493 |
-
|
15494 |
-
|
15495 |
-
|
15496 |
-
|
15497 |
-
|
15498 |
-
|
15499 |
-
|
15500 |
-
|
15501 |
-
|
15502 |
-
|
15503 |
-
|
15504 |
-
|
15505 |
-
|
15506 |
-
|
15507 |
-
|
15508 |
-
|
15509 |
-
|
15510 |
-
|
15511 |
-
|
15512 |
-
|
15513 |
-
|
15514 |
-
|
15515 |
-
|
15516 |
-
|
15517 |
-
|
15518 |
-
|
15519 |
-
|
15520 |
-
|
15521 |
-
|
15522 |
-
|
15523 |
-
|
15524 |
-
|
15525 |
-
|
15526 |
-
|
15527 |
-
|
15528 |
-
|
15529 |
-
|
15530 |
-
|
15531 |
-
|
15532 |
-
|
15533 |
-
|
15534 |
-
|
15535 |
-
|
15536 |
-
|
15537 |
-
|
15538 |
-
|
15539 |
-
|
15540 |
-
|
15541 |
-
|
15542 |
-
|
15543 |
-
|
15544 |
-
|
15545 |
-
|
15546 |
-
|
15547 |
-
|
15548 |
-
|
15549 |
-
|
15550 |
-
|
15551 |
-
|
15552 |
-
|
15553 |
-
|
15554 |
-
|
15555 |
-
|
15556 |
-
|
15557 |
-
|
15558 |
-
|
15559 |
-
|
15560 |
-
|
15561 |
-
|
15562 |
-
|
15563 |
-
|
15564 |
-
|
15565 |
-
|
15566 |
-
|
15567 |
-
|
15568 |
-
|
15569 |
-
|
15570 |
-
|
15571 |
-
|
15572 |
-
|
15573 |
-
|
15574 |
-
|
15575 |
-
|
15576 |
-
|
15577 |
-
|
15578 |
-
|
15579 |
-
|
15580 |
-
|
15581 |
-
|
15582 |
-
|
15583 |
-
|
15584 |
-
|
15585 |
-
|
15586 |
-
|
15587 |
-
|
15588 |
-
|
15589 |
-
|
15590 |
-
|
15591 |
-
|
15592 |
-
|
15593 |
-
|
15594 |
-
|
15595 |
-
|
15596 |
-
|
15597 |
-
|
15598 |
-
|
15599 |
-
|
15600 |
-
|
15601 |
-
|
15602 |
-
|
15603 |
-
|
15604 |
-
|
15605 |
-
|
15606 |
-
|
15607 |
-
|
15608 |
-
|
15609 |
-
|
15610 |
-
|
15611 |
-
|
15612 |
-
|
15613 |
-
|
15614 |
-
|
15615 |
-
|
15616 |
-
|
15617 |
-
|
15618 |
-
|
15619 |
-
|
15620 |
-
|
15621 |
-
|
15622 |
-
|
15623 |
-
}
|
15624 |
-
|
15625 |
-
|
15626 |
-
|
15627 |
-
|
15628 |
-
|
15629 |
-
|
15630 |
-
|
15631 |
-
|
15632 |
-
|
15633 |
-
|
15634 |
-
|
15635 |
-
|
15636 |
-
|
15637 |
-
|
15638 |
-
|
15639 |
-
|
15640 |
-
|
15641 |
-
|
15642 |
-
|
15643 |
-
|
15644 |
-
|
15645 |
-
|
15646 |
-
|
15647 |
-
|
15648 |
-
|
15649 |
-
|
15650 |
-
|
15651 |
-
|
15652 |
-
|
15653 |
-
|
15654 |
-
|
15655 |
-
|
15656 |
-
|
15657 |
-
|
15658 |
-
|
15659 |
-
|
15660 |
-
|
15661 |
-
|
15662 |
-
|
15663 |
-
|
15664 |
-
|
15665 |
-
|
15666 |
-
|
15667 |
-
|
15668 |
-
|
15669 |
-
|
15670 |
-
|
15671 |
-
|
15672 |
-
|
15673 |
-
|
15674 |
-
|
15675 |
-
|
15676 |
-
|
15677 |
-
|
15678 |
-
|
15679 |
-
|
15680 |
-
|
15681 |
-
|
15682 |
-
|
15683 |
-
|
15684 |
-
|
15685 |
-
|
15686 |
-
|
15687 |
-
|
15688 |
-
|
15689 |
-
|
15690 |
-
|
15691 |
-
|
15692 |
-
|
15693 |
-
|
15694 |
-
|
15695 |
-
|
15696 |
-
|
15697 |
-
|
15698 |
-
|
15699 |
-
|
15700 |
-
|
15701 |
-
|
15702 |
-
|
15703 |
-
|
15704 |
-
|
15705 |
-
|
15706 |
-
|
15707 |
-
|
15708 |
-
|
15709 |
-
|
15710 |
-
|
15711 |
-
|
15712 |
-
|
15713 |
-
|
15714 |
-
|
15715 |
-
|
15716 |
-
|
15717 |
-
|
15718 |
-
|
15719 |
-
|
15720 |
-
|
15721 |
-
|
15722 |
-
return
|
15723 |
-
}
|
15724 |
-
|
15725 |
-
|
15726 |
-
|
15727 |
-
|
15728 |
-
|
15729 |
-
|
15730 |
-
|
15731 |
-
}
|
15732 |
-
|
15733 |
-
|
15734 |
-
|
15735 |
-
|
15736 |
-
|
15737 |
-
|
15738 |
-
|
15739 |
-
|
15740 |
-
|
15741 |
-
|
15742 |
-
|
15743 |
-
|
15744 |
-
|
15745 |
-
|
15746 |
-
|
15747 |
-
|
15748 |
-
|
15749 |
-
|
15750 |
-
|
15751 |
-
|
15752 |
-
|
15753 |
-
|
15754 |
-
|
15755 |
-
|
15756 |
-
|
15757 |
-
|
15758 |
-
|
15759 |
-
|
15760 |
-
|
15761 |
-
|
15762 |
-
|
15763 |
-
|
15764 |
-
|
15765 |
-
|
15766 |
-
|
15767 |
-
|
15768 |
-
|
15769 |
-
|
15770 |
-
|
15771 |
-
|
15772 |
-
|
15773 |
-
|
15774 |
-
|
15775 |
-
|
15776 |
-
|
15777 |
-
|
15778 |
-
|
15779 |
-
|
15780 |
-
|
15781 |
-
|
15782 |
-
|
15783 |
-
|
15784 |
-
|
15785 |
-
|
15786 |
-
|
15787 |
-
|
15788 |
-
|
15789 |
-
|
15790 |
-
|
15791 |
-
|
15792 |
-
|
15793 |
-
|
15794 |
-
|
15795 |
-
|
15796 |
-
|
15797 |
-
|
15798 |
-
|
15799 |
-
|
15800 |
-
|
15801 |
-
|
15802 |
-
|
15803 |
-
|
15804 |
-
|
15805 |
-
|
15806 |
-
|
15807 |
-
|
15808 |
-
|
15809 |
-
|
15810 |
-
|
15811 |
-
|
15812 |
-
|
15813 |
-
|
15814 |
-
}
|
15815 |
-
|
15816 |
-
function
|
15817 |
-
|
15818 |
-
|
15819 |
-
|
15820 |
-
|
15821 |
-
|
15822 |
-
|
15823 |
-
|
15824 |
-
|
15825 |
-
|
15826 |
-
function
|
15827 |
-
|
15828 |
-
|
15829 |
-
|
15830 |
-
|
15831 |
-
|
15832 |
-
}
|
15833 |
-
|
15834 |
-
|
15835 |
-
|
15836 |
-
|
15837 |
-
|
15838 |
-
|
15839 |
-
|
15840 |
-
|
15841 |
-
|
15842 |
-
|
15843 |
-
|
15844 |
-
|
15845 |
-
|
15846 |
-
|
15847 |
-
}
|
15848 |
-
|
15849 |
-
|
15850 |
-
|
15851 |
-
|
15852 |
-
|
15853 |
-
|
15854 |
-
|
15855 |
-
|
15856 |
-
|
15857 |
-
|
15858 |
-
|
15859 |
-
|
15860 |
-
|
15861 |
-
|
15862 |
-
|
15863 |
-
|
15864 |
-
|
15865 |
-
|
15866 |
-
|
15867 |
-
|
15868 |
-
|
15869 |
-
|
15870 |
-
|
15871 |
-
|
15872 |
-
|
15873 |
-
|
15874 |
-
|
15875 |
-
|
15876 |
-
|
15877 |
-
|
15878 |
-
|
15879 |
-
|
15880 |
-
|
15881 |
-
|
15882 |
-
|
15883 |
-
|
15884 |
-
|
15885 |
-
|
15886 |
-
|
15887 |
-
|
15888 |
-
|
15889 |
-
|
15890 |
-
|
15891 |
-
|
15892 |
-
|
15893 |
-
|
15894 |
-
|
15895 |
-
|
15896 |
-
|
15897 |
-
|
15898 |
-
|
15899 |
-
|
15900 |
-
|
15901 |
-
|
15902 |
-
|
15903 |
-
|
15904 |
-
|
15905 |
-
|
15906 |
-
|
15907 |
-
|
15908 |
-
|
15909 |
-
|
15910 |
-
|
15911 |
-
|
15912 |
-
|
15913 |
-
|
15914 |
-
|
15915 |
-
|
15916 |
-
|
15917 |
-
|
15918 |
-
|
15919 |
-
|
15920 |
-
|
15921 |
-
|
15922 |
-
|
15923 |
-
|
15924 |
-
|
15925 |
-
|
15926 |
-
|
15927 |
-
|
15928 |
-
|
15929 |
-
|
15930 |
-
|
15931 |
-
|
15932 |
-
|
15933 |
-
|
15934 |
-
|
15935 |
-
|
15936 |
-
|
15937 |
-
|
15938 |
-
|
15939 |
-
|
15940 |
-
|
15941 |
-
|
15942 |
-
|
15943 |
-
|
15944 |
-
|
15945 |
-
|
15946 |
-
|
15947 |
-
|
15948 |
-
|
15949 |
-
|
15950 |
-
|
15951 |
-
|
15952 |
-
|
15953 |
-
|
15954 |
-
|
15955 |
-
|
15956 |
-
|
15957 |
-
|
15958 |
-
|
15959 |
-
|
15960 |
-
|
15961 |
-
|
15962 |
-
|
15963 |
-
|
15964 |
-
|
15965 |
-
|
15966 |
-
|
15967 |
-
|
15968 |
-
|
15969 |
-
|
15970 |
-
|
15971 |
-
|
15972 |
-
|
15973 |
-
|
15974 |
-
|
15975 |
-
|
15976 |
-
|
15977 |
-
|
15978 |
-
|
15979 |
-
|
15980 |
-
|
15981 |
-
|
15982 |
-
|
15983 |
-
|
15984 |
-
|
15985 |
-
|
15986 |
-
|
15987 |
-
|
15988 |
-
|
15989 |
-
|
15990 |
-
|
15991 |
-
|
15992 |
-
|
15993 |
-
|
15994 |
-
|
15995 |
-
|
15996 |
-
|
15997 |
-
|
15998 |
-
|
15999 |
-
|
16000 |
-
|
16001 |
-
|
16002 |
-
|
16003 |
-
|
16004 |
-
|
16005 |
-
|
16006 |
-
|
16007 |
-
|
16008 |
-
|
16009 |
-
|
16010 |
-
|
16011 |
-
|
16012 |
-
|
16013 |
-
|
16014 |
-
|
16015 |
-
|
16016 |
-
|
16017 |
-
|
16018 |
-
|
16019 |
-
|
16020 |
-
|
16021 |
-
|
16022 |
-
|
16023 |
-
|
16024 |
-
|
16025 |
-
|
16026 |
-
|
16027 |
-
|
16028 |
-
|
16029 |
-
|
16030 |
-
|
16031 |
-
|
16032 |
-
|
16033 |
-
|
16034 |
-
|
16035 |
-
|
16036 |
-
|
16037 |
-
|
16038 |
-
|
16039 |
-
|
16040 |
-
|
16041 |
-
|
16042 |
-
|
16043 |
-
|
16044 |
-
|
16045 |
-
|
16046 |
-
|
16047 |
-
|
16048 |
-
|
16049 |
-
|
16050 |
-
|
16051 |
-
|
16052 |
-
|
16053 |
-
}
|
16054 |
-
|
16055 |
-
|
16056 |
-
|
16057 |
-
|
16058 |
-
|
16059 |
-
|
16060 |
-
|
16061 |
-
|
16062 |
-
|
16063 |
-
|
16064 |
-
|
16065 |
-
|
16066 |
-
|
16067 |
-
|
16068 |
-
|
16069 |
-
|
16070 |
-
|
16071 |
-
|
16072 |
-
|
16073 |
-
|
16074 |
-
|
16075 |
-
|
16076 |
-
|
16077 |
-
|
16078 |
-
|
16079 |
-
|
16080 |
-
|
16081 |
-
|
16082 |
-
|
16083 |
-
|
16084 |
-
|
16085 |
-
|
16086 |
-
|
16087 |
-
|
16088 |
-
|
16089 |
-
|
16090 |
-
|
16091 |
-
|
16092 |
-
|
16093 |
-
|
16094 |
-
var
|
16095 |
-
|
16096 |
-
function
|
16097 |
-
|
16098 |
-
|
16099 |
-
|
16100 |
-
|
16101 |
-
|
16102 |
-
|
16103 |
-
|
16104 |
-
|
16105 |
-
|
16106 |
-
|
16107 |
-
|
16108 |
-
|
16109 |
-
|
16110 |
-
|
16111 |
-
|
16112 |
-
|
16113 |
-
|
16114 |
-
|
16115 |
-
|
16116 |
-
|
16117 |
-
|
16118 |
-
|
16119 |
-
|
16120 |
-
|
16121 |
-
|
16122 |
-
|
16123 |
-
|
16124 |
-
|
16125 |
-
|
16126 |
-
|
16127 |
-
|
16128 |
-
|
16129 |
-
|
16130 |
-
|
16131 |
-
|
16132 |
-
|
16133 |
-
|
16134 |
-
|
16135 |
-
|
16136 |
-
|
16137 |
-
|
16138 |
-
|
16139 |
-
|
16140 |
-
|
16141 |
-
|
16142 |
-
|
16143 |
-
|
16144 |
-
|
16145 |
-
|
16146 |
-
|
16147 |
-
|
16148 |
-
|
16149 |
-
|
16150 |
-
|
16151 |
-
|
16152 |
-
|
16153 |
-
|
16154 |
-
|
16155 |
-
|
16156 |
-
|
16157 |
-
|
16158 |
-
|
16159 |
-
|
16160 |
-
|
16161 |
-
|
16162 |
-
|
16163 |
-
|
16164 |
-
|
16165 |
-
|
16166 |
-
|
16167 |
-
|
16168 |
-
|
16169 |
-
|
16170 |
-
|
16171 |
-
|
16172 |
-
|
16173 |
-
|
16174 |
-
|
16175 |
-
|
16176 |
-
|
16177 |
-
|
16178 |
-
|
16179 |
-
|
16180 |
-
|
16181 |
-
var
|
16182 |
-
|
16183 |
-
|
16184 |
-
|
16185 |
-
|
16186 |
-
|
16187 |
-
|
16188 |
-
|
16189 |
-
|
16190 |
-
|
16191 |
-
|
16192 |
-
|
16193 |
-
|
16194 |
-
|
16195 |
-
|
16196 |
-
|
16197 |
-
|
16198 |
-
|
16199 |
-
|
16200 |
-
|
16201 |
-
|
16202 |
-
|
16203 |
-
|
16204 |
-
|
16205 |
-
|
16206 |
-
|
16207 |
-
|
16208 |
-
|
16209 |
-
|
16210 |
-
|
16211 |
-
|
16212 |
-
|
16213 |
-
|
16214 |
-
|
16215 |
-
|
16216 |
-
|
16217 |
-
|
16218 |
-
|
16219 |
-
|
16220 |
-
|
16221 |
-
|
16222 |
-
|
16223 |
-
|
16224 |
-
|
16225 |
-
|
16226 |
-
|
16227 |
-
|
16228 |
-
|
16229 |
-
|
16230 |
-
|
16231 |
-
|
16232 |
-
|
16233 |
-
|
16234 |
-
|
16235 |
-
|
16236 |
-
|
16237 |
-
|
16238 |
-
|
16239 |
-
|
16240 |
-
|
16241 |
-
|
16242 |
-
|
16243 |
-
|
16244 |
-
|
16245 |
-
|
16246 |
-
|
16247 |
-
|
16248 |
-
|
16249 |
-
|
16250 |
-
|
16251 |
-
|
16252 |
-
|
16253 |
-
|
16254 |
-
|
16255 |
-
|
16256 |
-
|
16257 |
-
|
16258 |
-
|
16259 |
-
|
16260 |
-
|
16261 |
-
|
16262 |
-
|
16263 |
-
|
16264 |
-
|
16265 |
-
|
16266 |
-
|
16267 |
-
|
16268 |
-
if (
|
16269 |
-
|
16270 |
-
}
|
16271 |
-
|
16272 |
-
|
16273 |
-
|
16274 |
-
|
16275 |
-
|
16276 |
-
|
16277 |
-
|
16278 |
-
|
16279 |
-
|
16280 |
-
};
|
16281 |
-
|
16282 |
-
|
16283 |
-
|
16284 |
-
|
16285 |
-
|
16286 |
-
|
16287 |
-
|
16288 |
-
|
16289 |
-
|
16290 |
-
|
16291 |
-
|
16292 |
-
|
16293 |
-
|
16294 |
-
|
16295 |
-
|
16296 |
-
|
16297 |
-
|
16298 |
-
|
16299 |
-
|
16300 |
-
|
16301 |
-
|
16302 |
-
|
16303 |
-
|
16304 |
-
|
16305 |
-
|
16306 |
-
|
16307 |
-
|
16308 |
-
|
16309 |
-
|
16310 |
-
|
16311 |
-
|
16312 |
-
|
16313 |
-
|
16314 |
-
|
16315 |
-
|
16316 |
-
|
16317 |
-
|
16318 |
-
|
16319 |
-
|
16320 |
-
|
16321 |
-
|
16322 |
-
|
16323 |
-
|
16324 |
-
|
16325 |
-
|
16326 |
-
|
16327 |
-
|
16328 |
-
|
16329 |
-
|
16330 |
-
|
16331 |
-
|
16332 |
-
|
16333 |
-
|
16334 |
-
|
16335 |
-
|
16336 |
-
|
16337 |
-
|
16338 |
-
|
16339 |
-
|
16340 |
-
|
16341 |
-
|
16342 |
-
|
16343 |
-
|
16344 |
-
|
16345 |
-
|
16346 |
-
|
16347 |
-
|
16348 |
-
|
16349 |
-
|
16350 |
-
|
16351 |
-
|
16352 |
-
|
16353 |
-
|
16354 |
-
|
16355 |
-
|
16356 |
-
|
16357 |
-
|
16358 |
-
|
16359 |
-
|
16360 |
-
|
16361 |
-
|
16362 |
-
|
16363 |
-
|
16364 |
-
|
16365 |
-
|
16366 |
-
|
16367 |
-
|
16368 |
-
|
16369 |
-
|
16370 |
-
|
16371 |
-
|
16372 |
-
|
16373 |
-
|
16374 |
-
|
16375 |
-
|
16376 |
-
|
16377 |
-
|
16378 |
-
|
16379 |
-
|
16380 |
-
|
16381 |
-
|
16382 |
-
|
16383 |
-
|
16384 |
-
|
16385 |
-
|
16386 |
-
|
16387 |
-
|
16388 |
-
|
16389 |
-
|
16390 |
-
|
16391 |
-
|
16392 |
-
|
16393 |
-
|
16394 |
-
|
16395 |
-
|
16396 |
-
|
16397 |
-
|
16398 |
-
|
16399 |
-
|
16400 |
-
|
16401 |
-
return
|
16402 |
-
|
16403 |
-
|
16404 |
-
|
16405 |
-
|
16406 |
-
|
16407 |
-
|
16408 |
-
|
16409 |
-
|
16410 |
-
|
16411 |
-
|
16412 |
-
|
16413 |
-
|
16414 |
-
|
16415 |
-
|
16416 |
-
|
16417 |
-
|
16418 |
-
|
16419 |
-
|
16420 |
-
|
16421 |
-
|
16422 |
-
|
16423 |
-
|
16424 |
-
|
16425 |
-
|
16426 |
-
|
16427 |
-
|
16428 |
-
|
16429 |
-
|
16430 |
-
|
16431 |
-
|
16432 |
-
|
16433 |
-
|
16434 |
-
|
16435 |
-
|
16436 |
-
|
16437 |
-
|
16438 |
-
|
16439 |
-
|
16440 |
-
|
16441 |
-
|
16442 |
-
|
16443 |
-
|
16444 |
-
|
16445 |
-
|
16446 |
-
|
16447 |
-
|
16448 |
-
|
16449 |
-
|
16450 |
-
|
16451 |
-
|
16452 |
-
|
16453 |
-
|
16454 |
-
|
16455 |
-
|
16456 |
-
|
16457 |
-
|
16458 |
-
|
16459 |
-
|
16460 |
-
var
|
16461 |
-
var
|
16462 |
-
var
|
16463 |
-
|
16464 |
-
|
16465 |
-
|
16466 |
-
|
16467 |
-
|
16468 |
-
|
16469 |
-
|
16470 |
-
|
16471 |
-
|
16472 |
-
|
16473 |
-
|
16474 |
-
|
16475 |
-
|
16476 |
-
|
16477 |
-
|
16478 |
-
|
16479 |
-
|
16480 |
-
|
16481 |
-
|
16482 |
-
|
16483 |
-
|
16484 |
-
|
16485 |
-
|
16486 |
-
|
16487 |
-
|
16488 |
-
|
16489 |
-
|
16490 |
-
|
16491 |
-
|
16492 |
-
|
16493 |
-
|
16494 |
-
|
16495 |
-
|
16496 |
-
|
16497 |
-
|
16498 |
-
|
16499 |
-
|
16500 |
-
|
16501 |
-
|
16502 |
-
|
16503 |
-
|
16504 |
-
|
16505 |
-
|
16506 |
-
|
16507 |
-
|
16508 |
-
|
16509 |
-
|
16510 |
-
|
16511 |
-
|
16512 |
-
|
16513 |
-
|
16514 |
-
|
16515 |
-
|
16516 |
-
|
16517 |
-
|
16518 |
-
|
16519 |
-
|
16520 |
-
|
16521 |
-
|
16522 |
-
|
16523 |
-
|
16524 |
-
|
16525 |
-
|
16526 |
-
|
16527 |
-
|
16528 |
-
|
16529 |
-
|
16530 |
-
|
16531 |
-
|
16532 |
-
|
16533 |
-
|
16534 |
-
|
16535 |
-
|
16536 |
-
|
16537 |
-
|
16538 |
-
|
16539 |
-
|
16540 |
-
|
16541 |
-
|
16542 |
-
|
16543 |
-
|
16544 |
-
|
16545 |
-
|
16546 |
-
|
16547 |
-
|
16548 |
-
|
16549 |
-
|
16550 |
-
|
16551 |
-
|
16552 |
-
|
16553 |
-
|
16554 |
-
|
16555 |
-
|
16556 |
-
|
16557 |
-
|
16558 |
-
|
16559 |
-
|
16560 |
-
|
16561 |
-
|
16562 |
-
|
16563 |
-
|
16564 |
-
|
16565 |
-
|
16566 |
-
|
16567 |
-
|
16568 |
-
|
16569 |
-
|
16570 |
-
|
16571 |
-
|
16572 |
-
|
16573 |
-
|
16574 |
-
|
16575 |
-
|
16576 |
-
|
16577 |
-
|
16578 |
-
|
16579 |
-
|
16580 |
-
|
16581 |
-
|
16582 |
-
|
16583 |
-
|
16584 |
-
|
16585 |
-
|
16586 |
-
|
16587 |
-
|
16588 |
-
|
16589 |
-
|
16590 |
-
|
16591 |
-
|
16592 |
-
|
16593 |
-
|
16594 |
-
|
16595 |
-
|
16596 |
-
|
16597 |
-
|
16598 |
-
|
16599 |
-
|
16600 |
-
|
16601 |
-
|
16602 |
-
|
16603 |
-
|
16604 |
-
|
16605 |
-
|
16606 |
-
|
16607 |
-
|
16608 |
-
|
16609 |
-
|
16610 |
-
|
16611 |
-
if (
|
16612 |
-
|
16613 |
-
}
|
16614 |
-
|
16615 |
-
|
16616 |
-
|
16617 |
-
|
16618 |
-
|
16619 |
-
|
16620 |
-
|
16621 |
-
|
16622 |
-
|
16623 |
-
|
16624 |
-
|
16625 |
-
|
16626 |
-
|
16627 |
-
|
16628 |
-
|
16629 |
-
|
16630 |
-
|
16631 |
-
|
16632 |
-
|
16633 |
-
|
16634 |
-
|
16635 |
-
|
16636 |
-
|
16637 |
-
|
16638 |
-
|
16639 |
-
|
16640 |
-
|
16641 |
-
|
16642 |
-
|
16643 |
-
|
16644 |
-
|
16645 |
-
|
16646 |
-
|
16647 |
-
|
16648 |
-
|
16649 |
-
|
16650 |
-
|
16651 |
-
|
16652 |
-
|
16653 |
-
|
16654 |
-
|
16655 |
-
|
16656 |
-
|
16657 |
-
|
16658 |
-
|
16659 |
-
|
16660 |
-
|
16661 |
-
|
16662 |
-
|
16663 |
-
|
16664 |
-
|
16665 |
-
|
16666 |
-
|
16667 |
-
|
16668 |
-
|
16669 |
-
|
16670 |
-
|
16671 |
-
|
16672 |
-
|
16673 |
-
|
16674 |
-
|
16675 |
-
|
16676 |
-
|
16677 |
-
|
16678 |
-
|
16679 |
-
|
16680 |
-
|
16681 |
-
|
16682 |
-
|
16683 |
-
|
16684 |
-
|
16685 |
-
|
16686 |
-
|
16687 |
-
|
16688 |
-
|
16689 |
-
|
16690 |
-
|
16691 |
-
|
16692 |
-
|
16693 |
-
|
16694 |
-
|
16695 |
-
|
16696 |
-
|
16697 |
-
|
16698 |
-
|
16699 |
-
|
16700 |
-
|
16701 |
-
|
16702 |
-
|
16703 |
-
|
16704 |
-
|
16705 |
-
|
16706 |
-
|
16707 |
-
|
16708 |
-
|
16709 |
-
|
16710 |
-
|
16711 |
-
|
16712 |
-
|
16713 |
-
|
16714 |
-
|
16715 |
-
|
16716 |
-
|
16717 |
-
|
16718 |
-
|
16719 |
-
|
16720 |
-
|
16721 |
-
|
16722 |
-
|
16723 |
-
|
16724 |
-
|
16725 |
-
|
16726 |
-
|
16727 |
-
|
16728 |
-
|
16729 |
-
|
16730 |
-
|
16731 |
-
|
16732 |
-
|
16733 |
-
|
16734 |
-
|
16735 |
-
|
16736 |
-
|
16737 |
-
|
16738 |
-
|
16739 |
-
|
16740 |
-
|
16741 |
-
|
16742 |
-
|
16743 |
-
|
16744 |
-
|
16745 |
-
|
16746 |
-
|
16747 |
-
|
16748 |
-
|
16749 |
-
|
16750 |
-
|
16751 |
-
|
16752 |
-
|
16753 |
-
|
16754 |
-
|
16755 |
-
|
16756 |
-
|
16757 |
-
|
16758 |
-
|
16759 |
-
|
16760 |
-
|
16761 |
-
|
16762 |
-
|
16763 |
-
|
16764 |
-
|
16765 |
-
|
16766 |
-
|
16767 |
-
|
16768 |
-
|
16769 |
-
|
16770 |
-
|
16771 |
-
|
16772 |
-
|
16773 |
-
|
16774 |
-
|
16775 |
-
|
16776 |
-
|
16777 |
-
|
16778 |
-
|
16779 |
-
|
16780 |
-
|
16781 |
-
|
16782 |
-
|
16783 |
-
|
16784 |
-
|
16785 |
-
|
16786 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16787 |
});
|
16788 |
-
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
16789 |
|
16790 |
/***/ },
|
16791 |
|
12251 |
/***/ 537:
|
12252 |
/***/ function(module, exports, __webpack_require__) {
|
12253 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12254 |
/*!
|
12255 |
+
* html2canvas 1.0.0-alpha.10 <https://html2canvas.hertzen.com>
|
12256 |
+
* Copyright (c) 2018 Niklas von Hertzen <https://hertzen.com>
|
12257 |
+
* Released under MIT License
|
|
|
|
|
12258 |
*/
|
12259 |
+
(function webpackUniversalModuleDefinition(root, factory) {
|
12260 |
+
if(true)
|
12261 |
+
module.exports = factory();
|
12262 |
+
else if(typeof define === 'function' && define.amd)
|
12263 |
+
define([], factory);
|
12264 |
+
else if(typeof exports === 'object')
|
12265 |
+
exports["html2canvas"] = factory();
|
12266 |
+
else
|
12267 |
+
root["html2canvas"] = factory();
|
12268 |
+
})(this, function() {
|
12269 |
+
return /******/ (function(modules) { // webpackBootstrap
|
12270 |
+
/******/ // The module cache
|
12271 |
+
/******/ var installedModules = {};
|
12272 |
+
/******/
|
12273 |
+
/******/ // The require function
|
12274 |
+
/******/ function __webpack_require__(moduleId) {
|
12275 |
+
/******/
|
12276 |
+
/******/ // Check if module is in cache
|
12277 |
+
/******/ if(installedModules[moduleId]) {
|
12278 |
+
/******/ return installedModules[moduleId].exports;
|
12279 |
+
/******/ }
|
12280 |
+
/******/ // Create a new module (and put it into the cache)
|
12281 |
+
/******/ var module = installedModules[moduleId] = {
|
12282 |
+
/******/ i: moduleId,
|
12283 |
+
/******/ l: false,
|
12284 |
+
/******/ exports: {}
|
12285 |
+
/******/ };
|
12286 |
+
/******/
|
12287 |
+
/******/ // Execute the module function
|
12288 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
12289 |
+
/******/
|
12290 |
+
/******/ // Flag the module as loaded
|
12291 |
+
/******/ module.l = true;
|
12292 |
+
/******/
|
12293 |
+
/******/ // Return the exports of the module
|
12294 |
+
/******/ return module.exports;
|
12295 |
+
/******/ }
|
12296 |
+
/******/
|
12297 |
+
/******/
|
12298 |
+
/******/ // expose the modules object (__webpack_modules__)
|
12299 |
+
/******/ __webpack_require__.m = modules;
|
12300 |
+
/******/
|
12301 |
+
/******/ // expose the module cache
|
12302 |
+
/******/ __webpack_require__.c = installedModules;
|
12303 |
+
/******/
|
12304 |
+
/******/ // define getter function for harmony exports
|
12305 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
12306 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
12307 |
+
/******/ Object.defineProperty(exports, name, {
|
12308 |
+
/******/ configurable: false,
|
12309 |
+
/******/ enumerable: true,
|
12310 |
+
/******/ get: getter
|
12311 |
+
/******/ });
|
12312 |
+
/******/ }
|
12313 |
+
/******/ };
|
12314 |
+
/******/
|
12315 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
12316 |
+
/******/ __webpack_require__.n = function(module) {
|
12317 |
+
/******/ var getter = module && module.__esModule ?
|
12318 |
+
/******/ function getDefault() { return module['default']; } :
|
12319 |
+
/******/ function getModuleExports() { return module; };
|
12320 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
12321 |
+
/******/ return getter;
|
12322 |
+
/******/ };
|
12323 |
+
/******/
|
12324 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
12325 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
12326 |
+
/******/
|
12327 |
+
/******/ // __webpack_public_path__
|
12328 |
+
/******/ __webpack_require__.p = "";
|
12329 |
+
/******/
|
12330 |
+
/******/ // Load entry module and return exports
|
12331 |
+
/******/ return __webpack_require__(__webpack_require__.s = 27);
|
12332 |
+
/******/ })
|
12333 |
+
/************************************************************************/
|
12334 |
+
/******/ ([
|
12335 |
+
/* 0 */
|
12336 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12337 |
|
12338 |
+
"use strict";
|
12339 |
+
|
12340 |
+
|
12341 |
+
// http://dev.w3.org/csswg/css-color/
|
12342 |
+
|
12343 |
+
Object.defineProperty(exports, "__esModule", {
|
12344 |
+
value: true
|
12345 |
+
});
|
12346 |
+
|
12347 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
12348 |
|
12349 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
12350 |
+
|
12351 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12352 |
+
|
12353 |
+
var HEX3 = /^#([a-f0-9]{3})$/i;
|
12354 |
+
var hex3 = function hex3(value) {
|
12355 |
+
var match = value.match(HEX3);
|
12356 |
+
if (match) {
|
12357 |
+
return [parseInt(match[1][0] + match[1][0], 16), parseInt(match[1][1] + match[1][1], 16), parseInt(match[1][2] + match[1][2], 16), null];
|
12358 |
+
}
|
12359 |
+
return false;
|
12360 |
+
};
|
12361 |
+
|
12362 |
+
var HEX6 = /^#([a-f0-9]{6})$/i;
|
12363 |
+
var hex6 = function hex6(value) {
|
12364 |
+
var match = value.match(HEX6);
|
12365 |
+
if (match) {
|
12366 |
+
return [parseInt(match[1].substring(0, 2), 16), parseInt(match[1].substring(2, 4), 16), parseInt(match[1].substring(4, 6), 16), null];
|
12367 |
}
|
12368 |
+
return false;
|
12369 |
+
};
|
12370 |
|
12371 |
+
var RGB = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
|
12372 |
+
var rgb = function rgb(value) {
|
12373 |
+
var match = value.match(RGB);
|
12374 |
+
if (match) {
|
12375 |
+
return [Number(match[1]), Number(match[2]), Number(match[3]), null];
|
12376 |
}
|
12377 |
+
return false;
|
12378 |
+
};
|
12379 |
|
12380 |
+
var RGBA = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;
|
12381 |
+
var rgba = function rgba(value) {
|
12382 |
+
var match = value.match(RGBA);
|
12383 |
+
if (match && match.length > 4) {
|
12384 |
+
return [Number(match[1]), Number(match[2]), Number(match[3]), Number(match[4])];
|
12385 |
}
|
12386 |
+
return false;
|
12387 |
+
};
|
12388 |
|
12389 |
+
var fromArray = function fromArray(array) {
|
12390 |
+
return [Math.min(array[0], 255), Math.min(array[1], 255), Math.min(array[2], 255), array.length > 3 ? array[3] : null];
|
12391 |
+
};
|
12392 |
|
12393 |
+
var namedColor = function namedColor(name) {
|
12394 |
+
var color = NAMED_COLORS[name.toLowerCase()];
|
12395 |
+
return color ? color : false;
|
12396 |
+
};
|
12397 |
+
|
12398 |
+
var Color = function () {
|
12399 |
+
function Color(value) {
|
12400 |
+
_classCallCheck(this, Color);
|
12401 |
+
|
12402 |
+
var _ref = Array.isArray(value) ? fromArray(value) : hex3(value) || rgb(value) || rgba(value) || namedColor(value) || hex6(value) || [0, 0, 0, null],
|
12403 |
+
_ref2 = _slicedToArray(_ref, 4),
|
12404 |
+
r = _ref2[0],
|
12405 |
+
g = _ref2[1],
|
12406 |
+
b = _ref2[2],
|
12407 |
+
a = _ref2[3];
|
12408 |
+
|
12409 |
+
this.r = r;
|
12410 |
+
this.g = g;
|
12411 |
+
this.b = b;
|
12412 |
+
this.a = a;
|
12413 |
}
|
12414 |
|
12415 |
+
_createClass(Color, [{
|
12416 |
+
key: 'isTransparent',
|
12417 |
+
value: function isTransparent() {
|
12418 |
+
return this.a === 0;
|
12419 |
+
}
|
12420 |
+
}, {
|
12421 |
+
key: 'toString',
|
12422 |
+
value: function toString() {
|
12423 |
+
return this.a !== null && this.a !== 1 ? 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + this.a + ')' : 'rgb(' + this.r + ',' + this.g + ',' + this.b + ')';
|
12424 |
+
}
|
12425 |
+
}]);
|
12426 |
+
|
12427 |
+
return Color;
|
12428 |
+
}();
|
12429 |
+
|
12430 |
+
exports.default = Color;
|
12431 |
+
|
12432 |
+
|
12433 |
+
var NAMED_COLORS = {
|
12434 |
+
transparent: [0, 0, 0, 0],
|
12435 |
+
aliceblue: [240, 248, 255, null],
|
12436 |
+
antiquewhite: [250, 235, 215, null],
|
12437 |
+
aqua: [0, 255, 255, null],
|
12438 |
+
aquamarine: [127, 255, 212, null],
|
12439 |
+
azure: [240, 255, 255, null],
|
12440 |
+
beige: [245, 245, 220, null],
|
12441 |
+
bisque: [255, 228, 196, null],
|
12442 |
+
black: [0, 0, 0, null],
|
12443 |
+
blanchedalmond: [255, 235, 205, null],
|
12444 |
+
blue: [0, 0, 255, null],
|
12445 |
+
blueviolet: [138, 43, 226, null],
|
12446 |
+
brown: [165, 42, 42, null],
|
12447 |
+
burlywood: [222, 184, 135, null],
|
12448 |
+
cadetblue: [95, 158, 160, null],
|
12449 |
+
chartreuse: [127, 255, 0, null],
|
12450 |
+
chocolate: [210, 105, 30, null],
|
12451 |
+
coral: [255, 127, 80, null],
|
12452 |
+
cornflowerblue: [100, 149, 237, null],
|
12453 |
+
cornsilk: [255, 248, 220, null],
|
12454 |
+
crimson: [220, 20, 60, null],
|
12455 |
+
cyan: [0, 255, 255, null],
|
12456 |
+
darkblue: [0, 0, 139, null],
|
12457 |
+
darkcyan: [0, 139, 139, null],
|
12458 |
+
darkgoldenrod: [184, 134, 11, null],
|
12459 |
+
darkgray: [169, 169, 169, null],
|
12460 |
+
darkgreen: [0, 100, 0, null],
|
12461 |
+
darkgrey: [169, 169, 169, null],
|
12462 |
+
darkkhaki: [189, 183, 107, null],
|
12463 |
+
darkmagenta: [139, 0, 139, null],
|
12464 |
+
darkolivegreen: [85, 107, 47, null],
|
12465 |
+
darkorange: [255, 140, 0, null],
|
12466 |
+
darkorchid: [153, 50, 204, null],
|
12467 |
+
darkred: [139, 0, 0, null],
|
12468 |
+
darksalmon: [233, 150, 122, null],
|
12469 |
+
darkseagreen: [143, 188, 143, null],
|
12470 |
+
darkslateblue: [72, 61, 139, null],
|
12471 |
+
darkslategray: [47, 79, 79, null],
|
12472 |
+
darkslategrey: [47, 79, 79, null],
|
12473 |
+
darkturquoise: [0, 206, 209, null],
|
12474 |
+
darkviolet: [148, 0, 211, null],
|
12475 |
+
deeppink: [255, 20, 147, null],
|
12476 |
+
deepskyblue: [0, 191, 255, null],
|
12477 |
+
dimgray: [105, 105, 105, null],
|
12478 |
+
dimgrey: [105, 105, 105, null],
|
12479 |
+
dodgerblue: [30, 144, 255, null],
|
12480 |
+
firebrick: [178, 34, 34, null],
|
12481 |
+
floralwhite: [255, 250, 240, null],
|
12482 |
+
forestgreen: [34, 139, 34, null],
|
12483 |
+
fuchsia: [255, 0, 255, null],
|
12484 |
+
gainsboro: [220, 220, 220, null],
|
12485 |
+
ghostwhite: [248, 248, 255, null],
|
12486 |
+
gold: [255, 215, 0, null],
|
12487 |
+
goldenrod: [218, 165, 32, null],
|
12488 |
+
gray: [128, 128, 128, null],
|
12489 |
+
green: [0, 128, 0, null],
|
12490 |
+
greenyellow: [173, 255, 47, null],
|
12491 |
+
grey: [128, 128, 128, null],
|
12492 |
+
honeydew: [240, 255, 240, null],
|
12493 |
+
hotpink: [255, 105, 180, null],
|
12494 |
+
indianred: [205, 92, 92, null],
|
12495 |
+
indigo: [75, 0, 130, null],
|
12496 |
+
ivory: [255, 255, 240, null],
|
12497 |
+
khaki: [240, 230, 140, null],
|
12498 |
+
lavender: [230, 230, 250, null],
|
12499 |
+
lavenderblush: [255, 240, 245, null],
|
12500 |
+
lawngreen: [124, 252, 0, null],
|
12501 |
+
lemonchiffon: [255, 250, 205, null],
|
12502 |
+
lightblue: [173, 216, 230, null],
|
12503 |
+
lightcoral: [240, 128, 128, null],
|
12504 |
+
lightcyan: [224, 255, 255, null],
|
12505 |
+
lightgoldenrodyellow: [250, 250, 210, null],
|
12506 |
+
lightgray: [211, 211, 211, null],
|
12507 |
+
lightgreen: [144, 238, 144, null],
|
12508 |
+
lightgrey: [211, 211, 211, null],
|
12509 |
+
lightpink: [255, 182, 193, null],
|
12510 |
+
lightsalmon: [255, 160, 122, null],
|
12511 |
+
lightseagreen: [32, 178, 170, null],
|
12512 |
+
lightskyblue: [135, 206, 250, null],
|
12513 |
+
lightslategray: [119, 136, 153, null],
|
12514 |
+
lightslategrey: [119, 136, 153, null],
|
12515 |
+
lightsteelblue: [176, 196, 222, null],
|
12516 |
+
lightyellow: [255, 255, 224, null],
|
12517 |
+
lime: [0, 255, 0, null],
|
12518 |
+
limegreen: [50, 205, 50, null],
|
12519 |
+
linen: [250, 240, 230, null],
|
12520 |
+
magenta: [255, 0, 255, null],
|
12521 |
+
maroon: [128, 0, 0, null],
|
12522 |
+
mediumaquamarine: [102, 205, 170, null],
|
12523 |
+
mediumblue: [0, 0, 205, null],
|
12524 |
+
mediumorchid: [186, 85, 211, null],
|
12525 |
+
mediumpurple: [147, 112, 219, null],
|
12526 |
+
mediumseagreen: [60, 179, 113, null],
|
12527 |
+
mediumslateblue: [123, 104, 238, null],
|
12528 |
+
mediumspringgreen: [0, 250, 154, null],
|
12529 |
+
mediumturquoise: [72, 209, 204, null],
|
12530 |
+
mediumvioletred: [199, 21, 133, null],
|
12531 |
+
midnightblue: [25, 25, 112, null],
|
12532 |
+
mintcream: [245, 255, 250, null],
|
12533 |
+
mistyrose: [255, 228, 225, null],
|
12534 |
+
moccasin: [255, 228, 181, null],
|
12535 |
+
navajowhite: [255, 222, 173, null],
|
12536 |
+
navy: [0, 0, 128, null],
|
12537 |
+
oldlace: [253, 245, 230, null],
|
12538 |
+
olive: [128, 128, 0, null],
|
12539 |
+
olivedrab: [107, 142, 35, null],
|
12540 |
+
orange: [255, 165, 0, null],
|
12541 |
+
orangered: [255, 69, 0, null],
|
12542 |
+
orchid: [218, 112, 214, null],
|
12543 |
+
palegoldenrod: [238, 232, 170, null],
|
12544 |
+
palegreen: [152, 251, 152, null],
|
12545 |
+
paleturquoise: [175, 238, 238, null],
|
12546 |
+
palevioletred: [219, 112, 147, null],
|
12547 |
+
papayawhip: [255, 239, 213, null],
|
12548 |
+
peachpuff: [255, 218, 185, null],
|
12549 |
+
peru: [205, 133, 63, null],
|
12550 |
+
pink: [255, 192, 203, null],
|
12551 |
+
plum: [221, 160, 221, null],
|
12552 |
+
powderblue: [176, 224, 230, null],
|
12553 |
+
purple: [128, 0, 128, null],
|
12554 |
+
rebeccapurple: [102, 51, 153, null],
|
12555 |
+
red: [255, 0, 0, null],
|
12556 |
+
rosybrown: [188, 143, 143, null],
|
12557 |
+
royalblue: [65, 105, 225, null],
|
12558 |
+
saddlebrown: [139, 69, 19, null],
|
12559 |
+
salmon: [250, 128, 114, null],
|
12560 |
+
sandybrown: [244, 164, 96, null],
|
12561 |
+
seagreen: [46, 139, 87, null],
|
12562 |
+
seashell: [255, 245, 238, null],
|
12563 |
+
sienna: [160, 82, 45, null],
|
12564 |
+
silver: [192, 192, 192, null],
|
12565 |
+
skyblue: [135, 206, 235, null],
|
12566 |
+
slateblue: [106, 90, 205, null],
|
12567 |
+
slategray: [112, 128, 144, null],
|
12568 |
+
slategrey: [112, 128, 144, null],
|
12569 |
+
snow: [255, 250, 250, null],
|
12570 |
+
springgreen: [0, 255, 127, null],
|
12571 |
+
steelblue: [70, 130, 180, null],
|
12572 |
+
tan: [210, 180, 140, null],
|
12573 |
+
teal: [0, 128, 128, null],
|
12574 |
+
thistle: [216, 191, 216, null],
|
12575 |
+
tomato: [255, 99, 71, null],
|
12576 |
+
turquoise: [64, 224, 208, null],
|
12577 |
+
violet: [238, 130, 238, null],
|
12578 |
+
wheat: [245, 222, 179, null],
|
12579 |
+
white: [255, 255, 255, null],
|
12580 |
+
whitesmoke: [245, 245, 245, null],
|
12581 |
+
yellow: [255, 255, 0, null],
|
12582 |
+
yellowgreen: [154, 205, 50, null]
|
12583 |
+
};
|
12584 |
|
12585 |
+
var TRANSPARENT = exports.TRANSPARENT = new Color([0, 0, 0, 0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12586 |
|
12587 |
+
/***/ }),
|
12588 |
+
/* 1 */
|
12589 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12590 |
|
12591 |
+
"use strict";
|
|
|
12592 |
|
|
|
|
|
|
|
|
|
12593 |
|
12594 |
+
Object.defineProperty(exports, "__esModule", {
|
12595 |
+
value: true
|
12596 |
+
});
|
12597 |
+
exports.parseBoundCurves = exports.calculatePaddingBoxPath = exports.calculateBorderBoxPath = exports.parsePathForBorder = exports.parseDocumentSize = exports.calculateContentBox = exports.calculatePaddingBox = exports.parseBounds = exports.Bounds = undefined;
|
|
|
|
|
12598 |
|
12599 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
|
|
|
|
12600 |
|
12601 |
+
var _Vector = __webpack_require__(7);
|
|
|
|
|
|
|
12602 |
|
12603 |
+
var _Vector2 = _interopRequireDefault(_Vector);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12604 |
|
12605 |
+
var _BezierCurve = __webpack_require__(32);
|
|
|
|
|
|
|
|
|
12606 |
|
12607 |
+
var _BezierCurve2 = _interopRequireDefault(_BezierCurve);
|
12608 |
|
12609 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
|
|
|
12610 |
|
12611 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12612 |
|
12613 |
+
var TOP = 0;
|
12614 |
+
var RIGHT = 1;
|
12615 |
+
var BOTTOM = 2;
|
12616 |
+
var LEFT = 3;
|
12617 |
|
12618 |
+
var H = 0;
|
12619 |
+
var V = 1;
|
12620 |
|
12621 |
+
var Bounds = exports.Bounds = function () {
|
12622 |
+
function Bounds(x, y, w, h) {
|
12623 |
+
_classCallCheck(this, Bounds);
|
12624 |
|
12625 |
+
this.left = x;
|
12626 |
+
this.top = y;
|
12627 |
+
this.width = w;
|
12628 |
+
this.height = h;
|
|
|
|
|
|
|
|
|
|
|
12629 |
}
|
12630 |
|
12631 |
+
_createClass(Bounds, null, [{
|
12632 |
+
key: 'fromClientRect',
|
12633 |
+
value: function fromClientRect(clientRect, scrollX, scrollY) {
|
12634 |
+
return new Bounds(clientRect.left + scrollX, clientRect.top + scrollY, clientRect.width, clientRect.height);
|
12635 |
+
}
|
12636 |
+
}]);
|
12637 |
|
12638 |
+
return Bounds;
|
12639 |
+
}();
|
|
|
12640 |
|
12641 |
+
var parseBounds = exports.parseBounds = function parseBounds(node, scrollX, scrollY) {
|
12642 |
+
return Bounds.fromClientRect(node.getBoundingClientRect(), scrollX, scrollY);
|
12643 |
+
};
|
12644 |
|
12645 |
+
var calculatePaddingBox = exports.calculatePaddingBox = function calculatePaddingBox(bounds, borders) {
|
12646 |
+
return new Bounds(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth, bounds.width - (borders[RIGHT].borderWidth + borders[LEFT].borderWidth), bounds.height - (borders[TOP].borderWidth + borders[BOTTOM].borderWidth));
|
12647 |
+
};
|
|
|
|
|
|
|
|
|
|
|
12648 |
|
12649 |
+
var calculateContentBox = exports.calculateContentBox = function calculateContentBox(bounds, padding, borders) {
|
12650 |
+
// TODO support percentage paddings
|
12651 |
+
var paddingTop = padding[TOP].value;
|
12652 |
+
var paddingRight = padding[RIGHT].value;
|
12653 |
+
var paddingBottom = padding[BOTTOM].value;
|
12654 |
+
var paddingLeft = padding[LEFT].value;
|
|
|
12655 |
|
12656 |
+
return new Bounds(bounds.left + paddingLeft + borders[LEFT].borderWidth, bounds.top + paddingTop + borders[TOP].borderWidth, bounds.width - (borders[RIGHT].borderWidth + borders[LEFT].borderWidth + paddingLeft + paddingRight), bounds.height - (borders[TOP].borderWidth + borders[BOTTOM].borderWidth + paddingTop + paddingBottom));
|
12657 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12658 |
|
12659 |
+
var parseDocumentSize = exports.parseDocumentSize = function parseDocumentSize(document) {
|
12660 |
+
var body = document.body;
|
12661 |
+
var documentElement = document.documentElement;
|
12662 |
|
12663 |
+
if (!body || !documentElement) {
|
12664 |
+
throw new Error( true ? 'Unable to get document size' : '');
|
|
|
|
|
|
|
12665 |
}
|
12666 |
+
var width = Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth));
|
12667 |
|
12668 |
+
var height = Math.max(Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), Math.max(body.clientHeight, documentElement.clientHeight));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12669 |
|
12670 |
+
return new Bounds(0, 0, width, height);
|
12671 |
+
};
|
12672 |
+
|
12673 |
+
var parsePathForBorder = exports.parsePathForBorder = function parsePathForBorder(curves, borderSide) {
|
12674 |
+
switch (borderSide) {
|
12675 |
+
case TOP:
|
12676 |
+
return createPathFromCurves(curves.topLeftOuter, curves.topLeftInner, curves.topRightOuter, curves.topRightInner);
|
12677 |
+
case RIGHT:
|
12678 |
+
return createPathFromCurves(curves.topRightOuter, curves.topRightInner, curves.bottomRightOuter, curves.bottomRightInner);
|
12679 |
+
case BOTTOM:
|
12680 |
+
return createPathFromCurves(curves.bottomRightOuter, curves.bottomRightInner, curves.bottomLeftOuter, curves.bottomLeftInner);
|
12681 |
+
case LEFT:
|
12682 |
+
default:
|
12683 |
+
return createPathFromCurves(curves.bottomLeftOuter, curves.bottomLeftInner, curves.topLeftOuter, curves.topLeftInner);
|
|
|
|
|
12684 |
}
|
12685 |
+
};
|
12686 |
|
12687 |
+
var createPathFromCurves = function createPathFromCurves(outer1, inner1, outer2, inner2) {
|
12688 |
+
var path = [];
|
12689 |
+
if (outer1 instanceof _BezierCurve2.default) {
|
12690 |
+
path.push(outer1.subdivide(0.5, false));
|
12691 |
+
} else {
|
12692 |
+
path.push(outer1);
|
|
|
|
|
12693 |
}
|
12694 |
|
12695 |
+
if (outer2 instanceof _BezierCurve2.default) {
|
12696 |
+
path.push(outer2.subdivide(0.5, true));
|
12697 |
+
} else {
|
12698 |
+
path.push(outer2);
|
12699 |
+
}
|
12700 |
|
12701 |
+
if (inner2 instanceof _BezierCurve2.default) {
|
12702 |
+
path.push(inner2.subdivide(0.5, true).reverse());
|
12703 |
+
} else {
|
12704 |
+
path.push(inner2);
|
12705 |
}
|
12706 |
|
12707 |
+
if (inner1 instanceof _BezierCurve2.default) {
|
12708 |
+
path.push(inner1.subdivide(0.5, false).reverse());
|
12709 |
+
} else {
|
12710 |
+
path.push(inner1);
|
12711 |
+
}
|
12712 |
|
12713 |
+
return path;
|
12714 |
+
};
|
12715 |
|
12716 |
+
var calculateBorderBoxPath = exports.calculateBorderBoxPath = function calculateBorderBoxPath(curves) {
|
12717 |
+
return [curves.topLeftOuter, curves.topRightOuter, curves.bottomRightOuter, curves.bottomLeftOuter];
|
12718 |
+
};
|
|
|
|
|
12719 |
|
12720 |
+
var calculatePaddingBoxPath = exports.calculatePaddingBoxPath = function calculatePaddingBoxPath(curves) {
|
12721 |
+
return [curves.topLeftInner, curves.topRightInner, curves.bottomRightInner, curves.bottomLeftInner];
|
12722 |
+
};
|
|
|
12723 |
|
12724 |
+
var parseBoundCurves = exports.parseBoundCurves = function parseBoundCurves(bounds, borders, borderRadius) {
|
12725 |
+
var tlh = borderRadius[CORNER.TOP_LEFT][H].getAbsoluteValue(bounds.width);
|
12726 |
+
var tlv = borderRadius[CORNER.TOP_LEFT][V].getAbsoluteValue(bounds.height);
|
12727 |
+
var trh = borderRadius[CORNER.TOP_RIGHT][H].getAbsoluteValue(bounds.width);
|
12728 |
+
var trv = borderRadius[CORNER.TOP_RIGHT][V].getAbsoluteValue(bounds.height);
|
12729 |
+
var brh = borderRadius[CORNER.BOTTOM_RIGHT][H].getAbsoluteValue(bounds.width);
|
12730 |
+
var brv = borderRadius[CORNER.BOTTOM_RIGHT][V].getAbsoluteValue(bounds.height);
|
12731 |
+
var blh = borderRadius[CORNER.BOTTOM_LEFT][H].getAbsoluteValue(bounds.width);
|
12732 |
+
var blv = borderRadius[CORNER.BOTTOM_LEFT][V].getAbsoluteValue(bounds.height);
|
12733 |
+
|
12734 |
+
var factors = [];
|
12735 |
+
factors.push((tlh + trh) / bounds.width);
|
12736 |
+
factors.push((blh + brh) / bounds.width);
|
12737 |
+
factors.push((tlv + blv) / bounds.height);
|
12738 |
+
factors.push((trv + brv) / bounds.height);
|
12739 |
+
var maxFactor = Math.max.apply(Math, factors);
|
12740 |
+
|
12741 |
+
if (maxFactor > 1) {
|
12742 |
+
tlh /= maxFactor;
|
12743 |
+
tlv /= maxFactor;
|
12744 |
+
trh /= maxFactor;
|
12745 |
+
trv /= maxFactor;
|
12746 |
+
brh /= maxFactor;
|
12747 |
+
brv /= maxFactor;
|
12748 |
+
blh /= maxFactor;
|
12749 |
+
blv /= maxFactor;
|
12750 |
}
|
12751 |
|
12752 |
+
var topWidth = bounds.width - trh;
|
12753 |
+
var rightHeight = bounds.height - brv;
|
12754 |
+
var bottomWidth = bounds.width - brh;
|
12755 |
+
var leftHeight = bounds.height - blv;
|
12756 |
|
12757 |
+
return {
|
12758 |
+
topLeftOuter: tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left, bounds.top, tlh, tlv, CORNER.TOP_LEFT) : new _Vector2.default(bounds.left, bounds.top),
|
12759 |
+
topLeftInner: tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth, Math.max(0, tlh - borders[LEFT].borderWidth), Math.max(0, tlv - borders[TOP].borderWidth), CORNER.TOP_LEFT) : new _Vector2.default(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth),
|
12760 |
+
topRightOuter: trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT) : new _Vector2.default(bounds.left + bounds.width, bounds.top),
|
12761 |
+
topRightInner: trh > 0 || trv > 0 ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borders[LEFT].borderWidth), bounds.top + borders[TOP].borderWidth, topWidth > bounds.width + borders[LEFT].borderWidth ? 0 : trh - borders[LEFT].borderWidth, trv - borders[TOP].borderWidth, CORNER.TOP_RIGHT) : new _Vector2.default(bounds.left + bounds.width - borders[RIGHT].borderWidth, bounds.top + borders[TOP].borderWidth),
|
12762 |
+
bottomRightOuter: brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT) : new _Vector2.default(bounds.left + bounds.width, bounds.top + bounds.height),
|
12763 |
+
bottomRightInner: brh > 0 || brv > 0 ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - borders[LEFT].borderWidth), bounds.top + Math.min(rightHeight, bounds.height + borders[TOP].borderWidth), Math.max(0, brh - borders[RIGHT].borderWidth), brv - borders[BOTTOM].borderWidth, CORNER.BOTTOM_RIGHT) : new _Vector2.default(bounds.left + bounds.width - borders[RIGHT].borderWidth, bounds.top + bounds.height - borders[BOTTOM].borderWidth),
|
12764 |
+
bottomLeftOuter: blh > 0 || blv > 0 ? getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT) : new _Vector2.default(bounds.left, bounds.top + bounds.height),
|
12765 |
+
bottomLeftInner: blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borders[LEFT].borderWidth, bounds.top + leftHeight, Math.max(0, blh - borders[LEFT].borderWidth), blv - borders[BOTTOM].borderWidth, CORNER.BOTTOM_LEFT) : new _Vector2.default(bounds.left + borders[LEFT].borderWidth, bounds.top + bounds.height - borders[BOTTOM].borderWidth)
|
12766 |
+
};
|
12767 |
+
};
|
12768 |
|
12769 |
+
var CORNER = {
|
12770 |
+
TOP_LEFT: 0,
|
12771 |
+
TOP_RIGHT: 1,
|
12772 |
+
BOTTOM_RIGHT: 2,
|
12773 |
+
BOTTOM_LEFT: 3
|
12774 |
+
};
|
12775 |
|
12776 |
+
var getCurvePoints = function getCurvePoints(x, y, r1, r2, position) {
|
12777 |
+
var kappa = 4 * ((Math.sqrt(2) - 1) / 3);
|
12778 |
+
var ox = r1 * kappa; // control point offset horizontal
|
12779 |
+
var oy = r2 * kappa; // control point offset vertical
|
12780 |
+
var xm = x + r1; // x-middle
|
12781 |
+
var ym = y + r2; // y-middle
|
12782 |
+
|
12783 |
+
switch (position) {
|
12784 |
+
case CORNER.TOP_LEFT:
|
12785 |
+
return new _BezierCurve2.default(new _Vector2.default(x, ym), new _Vector2.default(x, ym - oy), new _Vector2.default(xm - ox, y), new _Vector2.default(xm, y));
|
12786 |
+
case CORNER.TOP_RIGHT:
|
12787 |
+
return new _BezierCurve2.default(new _Vector2.default(x, y), new _Vector2.default(x + ox, y), new _Vector2.default(xm, ym - oy), new _Vector2.default(xm, ym));
|
12788 |
+
case CORNER.BOTTOM_RIGHT:
|
12789 |
+
return new _BezierCurve2.default(new _Vector2.default(xm, y), new _Vector2.default(xm, y + oy), new _Vector2.default(x + ox, ym), new _Vector2.default(x, ym));
|
12790 |
+
case CORNER.BOTTOM_LEFT:
|
12791 |
+
default:
|
12792 |
+
return new _BezierCurve2.default(new _Vector2.default(xm, ym), new _Vector2.default(xm - ox, ym), new _Vector2.default(x, y + oy), new _Vector2.default(x, y));
|
12793 |
}
|
12794 |
+
};
|
12795 |
|
12796 |
+
/***/ }),
|
12797 |
+
/* 2 */
|
12798 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12799 |
|
12800 |
+
"use strict";
|
12801 |
|
|
|
12802 |
|
12803 |
+
Object.defineProperty(exports, "__esModule", {
|
12804 |
+
value: true
|
12805 |
+
});
|
12806 |
+
exports.calculateLengthFromValueWithUnit = exports.LENGTH_TYPE = undefined;
|
12807 |
|
12808 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
|
|
|
|
|
|
12809 |
|
12810 |
+
var _NodeContainer = __webpack_require__(3);
|
|
|
12811 |
|
12812 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
|
|
|
|
12813 |
|
12814 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12815 |
|
12816 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12817 |
|
12818 |
+
var LENGTH_WITH_UNIT = /([\d.]+)(px|r?em|%)/i;
|
|
|
|
|
12819 |
|
12820 |
+
var LENGTH_TYPE = exports.LENGTH_TYPE = {
|
12821 |
+
PX: 0,
|
12822 |
+
PERCENTAGE: 1
|
12823 |
+
};
|
12824 |
|
12825 |
+
var Length = function () {
|
12826 |
+
function Length(value) {
|
12827 |
+
_classCallCheck(this, Length);
|
|
|
|
|
|
|
|
|
12828 |
|
12829 |
+
this.type = value.substr(value.length - 1) === '%' ? LENGTH_TYPE.PERCENTAGE : LENGTH_TYPE.PX;
|
12830 |
+
var parsedValue = parseFloat(value);
|
12831 |
+
if (true && isNaN(parsedValue)) {
|
12832 |
+
console.error('Invalid value given for Length: "' + value + '"');
|
12833 |
}
|
12834 |
+
this.value = isNaN(parsedValue) ? 0 : parsedValue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12835 |
}
|
12836 |
|
12837 |
+
_createClass(Length, [{
|
12838 |
+
key: 'isPercentage',
|
12839 |
+
value: function isPercentage() {
|
12840 |
+
return this.type === LENGTH_TYPE.PERCENTAGE;
|
12841 |
+
}
|
12842 |
+
}, {
|
12843 |
+
key: 'getAbsoluteValue',
|
12844 |
+
value: function getAbsoluteValue(parentLength) {
|
12845 |
+
return this.isPercentage() ? parentLength * (this.value / 100) : this.value;
|
12846 |
+
}
|
12847 |
+
}], [{
|
12848 |
+
key: 'create',
|
12849 |
+
value: function create(v) {
|
12850 |
+
return new Length(v);
|
12851 |
+
}
|
12852 |
+
}]);
|
12853 |
|
12854 |
+
return Length;
|
12855 |
+
}();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12856 |
|
12857 |
+
exports.default = Length;
|
|
|
|
|
|
|
12858 |
|
|
|
|
|
|
|
|
|
12859 |
|
12860 |
+
var getRootFontSize = function getRootFontSize(container) {
|
12861 |
+
var parent = container.parent;
|
12862 |
+
return parent ? getRootFontSize(parent) : parseFloat(container.style.font.fontSize);
|
12863 |
+
};
|
12864 |
|
12865 |
+
var calculateLengthFromValueWithUnit = exports.calculateLengthFromValueWithUnit = function calculateLengthFromValueWithUnit(container, value, unit) {
|
12866 |
+
switch (unit) {
|
12867 |
+
case 'px':
|
12868 |
+
case '%':
|
12869 |
+
return new Length(value + unit);
|
12870 |
+
case 'em':
|
12871 |
+
case 'rem':
|
12872 |
+
var length = new Length(value);
|
12873 |
+
length.value *= unit === 'em' ? parseFloat(container.style.font.fontSize) : getRootFontSize(container);
|
12874 |
+
return length;
|
12875 |
+
default:
|
12876 |
+
// TODO: handle correctly if unknown unit is used
|
12877 |
+
return new Length('0');
|
12878 |
}
|
12879 |
+
};
|
12880 |
|
12881 |
+
/***/ }),
|
12882 |
+
/* 3 */
|
12883 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12884 |
|
12885 |
+
"use strict";
|
|
|
|
|
12886 |
|
|
|
|
|
|
|
12887 |
|
12888 |
+
Object.defineProperty(exports, "__esModule", {
|
12889 |
+
value: true
|
12890 |
+
});
|
12891 |
|
12892 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
|
|
12893 |
|
12894 |
+
var _Color = __webpack_require__(0);
|
|
|
|
|
|
|
12895 |
|
12896 |
+
var _Color2 = _interopRequireDefault(_Color);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12897 |
|
12898 |
+
var _Util = __webpack_require__(4);
|
|
|
12899 |
|
12900 |
+
var _background = __webpack_require__(5);
|
|
|
12901 |
|
12902 |
+
var _border = __webpack_require__(12);
|
|
|
|
|
|
|
|
|
|
|
12903 |
|
12904 |
+
var _borderRadius = __webpack_require__(33);
|
|
|
|
|
|
|
12905 |
|
12906 |
+
var _display = __webpack_require__(34);
|
|
|
|
|
12907 |
|
12908 |
+
var _float = __webpack_require__(35);
|
|
|
12909 |
|
12910 |
+
var _font = __webpack_require__(36);
|
|
|
|
|
|
|
|
|
|
|
12911 |
|
12912 |
+
var _letterSpacing = __webpack_require__(37);
|
|
|
|
|
12913 |
|
12914 |
+
var _lineBreak = __webpack_require__(38);
|
|
|
|
|
12915 |
|
12916 |
+
var _listStyle = __webpack_require__(8);
|
12917 |
|
12918 |
+
var _margin = __webpack_require__(39);
|
|
|
|
|
|
|
12919 |
|
12920 |
+
var _overflow = __webpack_require__(40);
|
12921 |
|
12922 |
+
var _overflowWrap = __webpack_require__(18);
|
|
|
|
|
12923 |
|
12924 |
+
var _padding = __webpack_require__(17);
|
|
|
|
|
12925 |
|
12926 |
+
var _position = __webpack_require__(19);
|
|
|
|
|
12927 |
|
12928 |
+
var _textDecoration = __webpack_require__(11);
|
|
|
12929 |
|
12930 |
+
var _textShadow = __webpack_require__(41);
|
|
|
|
|
12931 |
|
12932 |
+
var _textTransform = __webpack_require__(20);
|
|
|
|
|
12933 |
|
12934 |
+
var _transform = __webpack_require__(42);
|
|
|
|
|
|
|
12935 |
|
12936 |
+
var _visibility = __webpack_require__(43);
|
|
|
|
|
|
|
|
|
|
|
|
|
12937 |
|
12938 |
+
var _wordBreak = __webpack_require__(44);
|
12939 |
|
12940 |
+
var _zIndex = __webpack_require__(45);
|
|
|
|
|
12941 |
|
12942 |
+
var _Bounds = __webpack_require__(1);
|
|
|
|
|
12943 |
|
12944 |
+
var _Input = __webpack_require__(21);
|
12945 |
|
12946 |
+
var _ListItem = __webpack_require__(14);
|
|
|
|
|
|
|
|
|
12947 |
|
12948 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
12949 |
|
12950 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
|
12951 |
|
12952 |
+
var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];
|
12953 |
|
12954 |
+
var NodeContainer = function () {
|
12955 |
+
function NodeContainer(node, parent, resourceLoader, index) {
|
12956 |
+
var _this = this;
|
12957 |
|
12958 |
+
_classCallCheck(this, NodeContainer);
|
|
|
|
|
|
|
|
|
12959 |
|
12960 |
+
this.parent = parent;
|
12961 |
+
this.tagName = node.tagName;
|
12962 |
+
this.index = index;
|
12963 |
+
this.childNodes = [];
|
12964 |
+
this.listItems = [];
|
12965 |
+
if (typeof node.start === 'number') {
|
12966 |
+
this.listStart = node.start;
|
12967 |
+
}
|
12968 |
+
var defaultView = node.ownerDocument.defaultView;
|
12969 |
+
var scrollX = defaultView.pageXOffset;
|
12970 |
+
var scrollY = defaultView.pageYOffset;
|
12971 |
+
var style = defaultView.getComputedStyle(node, null);
|
12972 |
+
var display = (0, _display.parseDisplay)(style.display);
|
12973 |
+
|
12974 |
+
var IS_INPUT = node.type === 'radio' || node.type === 'checkbox';
|
12975 |
+
|
12976 |
+
var position = (0, _position.parsePosition)(style.position);
|
12977 |
+
|
12978 |
+
this.style = {
|
12979 |
+
background: IS_INPUT ? _Input.INPUT_BACKGROUND : (0, _background.parseBackground)(style, resourceLoader),
|
12980 |
+
border: IS_INPUT ? _Input.INPUT_BORDERS : (0, _border.parseBorder)(style),
|
12981 |
+
borderRadius: (node instanceof defaultView.HTMLInputElement || node instanceof HTMLInputElement) && IS_INPUT ? (0, _Input.getInputBorderRadius)(node) : (0, _borderRadius.parseBorderRadius)(style),
|
12982 |
+
color: IS_INPUT ? _Input.INPUT_COLOR : new _Color2.default(style.color),
|
12983 |
+
display: display,
|
12984 |
+
float: (0, _float.parseCSSFloat)(style.float),
|
12985 |
+
font: (0, _font.parseFont)(style),
|
12986 |
+
letterSpacing: (0, _letterSpacing.parseLetterSpacing)(style.letterSpacing),
|
12987 |
+
listStyle: display === _display.DISPLAY.LIST_ITEM ? (0, _listStyle.parseListStyle)(style) : null,
|
12988 |
+
lineBreak: (0, _lineBreak.parseLineBreak)(style.lineBreak),
|
12989 |
+
margin: (0, _margin.parseMargin)(style),
|
12990 |
+
opacity: parseFloat(style.opacity),
|
12991 |
+
overflow: INPUT_TAGS.indexOf(node.tagName) === -1 ? (0, _overflow.parseOverflow)(style.overflow) : _overflow.OVERFLOW.HIDDEN,
|
12992 |
+
overflowWrap: (0, _overflowWrap.parseOverflowWrap)(style.overflowWrap ? style.overflowWrap : style.wordWrap),
|
12993 |
+
padding: (0, _padding.parsePadding)(style),
|
12994 |
+
position: position,
|
12995 |
+
textDecoration: (0, _textDecoration.parseTextDecoration)(style),
|
12996 |
+
textShadow: (0, _textShadow.parseTextShadow)(style.textShadow),
|
12997 |
+
textTransform: (0, _textTransform.parseTextTransform)(style.textTransform),
|
12998 |
+
transform: (0, _transform.parseTransform)(style),
|
12999 |
+
visibility: (0, _visibility.parseVisibility)(style.visibility),
|
13000 |
+
wordBreak: (0, _wordBreak.parseWordBreak)(style.wordBreak),
|
13001 |
+
zIndex: (0, _zIndex.parseZIndex)(position !== _position.POSITION.STATIC ? style.zIndex : 'auto')
|
13002 |
+
};
|
13003 |
|
13004 |
+
if (this.isTransformed()) {
|
13005 |
+
// getBoundingClientRect provides values post-transform, we want them without the transformation
|
13006 |
+
node.style.transform = 'matrix(1,0,0,1,0,0)';
|
13007 |
+
}
|
13008 |
|
13009 |
+
if (display === _display.DISPLAY.LIST_ITEM) {
|
13010 |
+
var listOwner = (0, _ListItem.getListOwner)(this);
|
13011 |
+
if (listOwner) {
|
13012 |
+
var listIndex = listOwner.listItems.length;
|
13013 |
+
listOwner.listItems.push(this);
|
13014 |
+
this.listIndex = node.hasAttribute('value') && typeof node.value === 'number' ? node.value : listIndex === 0 ? typeof listOwner.listStart === 'number' ? listOwner.listStart : 1 : listOwner.listItems[listIndex - 1].listIndex + 1;
|
13015 |
+
}
|
13016 |
+
}
|
13017 |
|
13018 |
+
// TODO move bound retrieval for all nodes to a later stage?
|
13019 |
+
if (node.tagName === 'IMG') {
|
13020 |
+
node.addEventListener('load', function () {
|
13021 |
+
_this.bounds = (0, _Bounds.parseBounds)(node, scrollX, scrollY);
|
13022 |
+
_this.curvedBounds = (0, _Bounds.parseBoundCurves)(_this.bounds, _this.style.border, _this.style.borderRadius);
|
13023 |
+
});
|
13024 |
+
}
|
13025 |
+
this.image = getImage(node, resourceLoader);
|
13026 |
+
this.bounds = IS_INPUT ? (0, _Input.reformatInputBounds)((0, _Bounds.parseBounds)(node, scrollX, scrollY)) : (0, _Bounds.parseBounds)(node, scrollX, scrollY);
|
13027 |
+
this.curvedBounds = (0, _Bounds.parseBoundCurves)(this.bounds, this.style.border, this.style.borderRadius);
|
13028 |
+
|
13029 |
+
if (true) {
|
13030 |
+
this.name = '' + node.tagName.toLowerCase() + (node.id ? '#' + node.id : '') + node.className.toString().split(' ').map(function (s) {
|
13031 |
+
return s.length ? '.' + s : '';
|
13032 |
+
}).join('');
|
13033 |
+
}
|
13034 |
+
}
|
13035 |
|
13036 |
+
_createClass(NodeContainer, [{
|
13037 |
+
key: 'getClipPaths',
|
13038 |
+
value: function getClipPaths() {
|
13039 |
+
var parentClips = this.parent ? this.parent.getClipPaths() : [];
|
13040 |
+
var isClipped = this.style.overflow !== _overflow.OVERFLOW.VISIBLE;
|
|
|
13041 |
|
13042 |
+
return isClipped ? parentClips.concat([(0, _Bounds.calculatePaddingBoxPath)(this.curvedBounds)]) : parentClips;
|
13043 |
+
}
|
13044 |
+
}, {
|
13045 |
+
key: 'isInFlow',
|
13046 |
+
value: function isInFlow() {
|
13047 |
+
return this.isRootElement() && !this.isFloating() && !this.isAbsolutelyPositioned();
|
13048 |
+
}
|
13049 |
+
}, {
|
13050 |
+
key: 'isVisible',
|
13051 |
+
value: function isVisible() {
|
13052 |
+
return !(0, _Util.contains)(this.style.display, _display.DISPLAY.NONE) && this.style.opacity > 0 && this.style.visibility === _visibility.VISIBILITY.VISIBLE;
|
13053 |
+
}
|
13054 |
+
}, {
|
13055 |
+
key: 'isAbsolutelyPositioned',
|
13056 |
+
value: function isAbsolutelyPositioned() {
|
13057 |
+
return this.style.position !== _position.POSITION.STATIC && this.style.position !== _position.POSITION.RELATIVE;
|
13058 |
+
}
|
13059 |
+
}, {
|
13060 |
+
key: 'isPositioned',
|
13061 |
+
value: function isPositioned() {
|
13062 |
+
return this.style.position !== _position.POSITION.STATIC;
|
13063 |
+
}
|
13064 |
+
}, {
|
13065 |
+
key: 'isFloating',
|
13066 |
+
value: function isFloating() {
|
13067 |
+
return this.style.float !== _float.FLOAT.NONE;
|
13068 |
+
}
|
13069 |
+
}, {
|
13070 |
+
key: 'isRootElement',
|
13071 |
+
value: function isRootElement() {
|
13072 |
+
return this.parent === null;
|
13073 |
+
}
|
13074 |
+
}, {
|
13075 |
+
key: 'isTransformed',
|
13076 |
+
value: function isTransformed() {
|
13077 |
+
return this.style.transform !== null;
|
13078 |
+
}
|
13079 |
+
}, {
|
13080 |
+
key: 'isPositionedWithZIndex',
|
13081 |
+
value: function isPositionedWithZIndex() {
|
13082 |
+
return this.isPositioned() && !this.style.zIndex.auto;
|
13083 |
+
}
|
13084 |
+
}, {
|
13085 |
+
key: 'isInlineLevel',
|
13086 |
+
value: function isInlineLevel() {
|
13087 |
+
return (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_BLOCK) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_FLEX) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_GRID) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_LIST_ITEM) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_TABLE);
|
13088 |
+
}
|
13089 |
+
}, {
|
13090 |
+
key: 'isInlineBlockOrInlineTable',
|
13091 |
+
value: function isInlineBlockOrInlineTable() {
|
13092 |
+
return (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_BLOCK) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_TABLE);
|
13093 |
+
}
|
13094 |
+
}]);
|
13095 |
|
13096 |
+
return NodeContainer;
|
13097 |
+
}();
|
13098 |
|
13099 |
+
exports.default = NodeContainer;
|
|
|
|
|
|
|
13100 |
|
|
|
|
|
|
|
|
|
|
|
13101 |
|
13102 |
+
var getImage = function getImage(node, resourceLoader) {
|
13103 |
+
if (node instanceof node.ownerDocument.defaultView.SVGSVGElement || node instanceof SVGSVGElement) {
|
13104 |
+
var s = new XMLSerializer();
|
13105 |
+
return resourceLoader.loadImage('data:image/svg+xml,' + encodeURIComponent(s.serializeToString(node)));
|
13106 |
+
}
|
13107 |
+
switch (node.tagName) {
|
13108 |
+
case 'IMG':
|
13109 |
+
// $FlowFixMe
|
13110 |
+
var img = node;
|
13111 |
+
return resourceLoader.loadImage(img.currentSrc || img.src);
|
13112 |
+
case 'CANVAS':
|
13113 |
+
// $FlowFixMe
|
13114 |
+
var canvas = node;
|
13115 |
+
return resourceLoader.loadCanvas(canvas);
|
13116 |
+
case 'IFRAME':
|
13117 |
+
var iframeKey = node.getAttribute('data-html2canvas-internal-iframe-key');
|
13118 |
+
if (iframeKey) {
|
13119 |
+
return iframeKey;
|
13120 |
}
|
13121 |
+
break;
|
13122 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13123 |
|
13124 |
+
return null;
|
13125 |
+
};
|
13126 |
|
13127 |
+
/***/ }),
|
13128 |
+
/* 4 */
|
13129 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
13130 |
|
13131 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13132 |
|
|
|
|
|
|
|
13133 |
|
13134 |
+
Object.defineProperty(exports, "__esModule", {
|
13135 |
+
value: true
|
13136 |
+
});
|
13137 |
+
var contains = exports.contains = function contains(bit, value) {
|
13138 |
+
return (bit & value) !== 0;
|
13139 |
+
};
|
13140 |
|
13141 |
+
var distance = exports.distance = function distance(a, b) {
|
13142 |
+
return Math.sqrt(a * a + b * b);
|
13143 |
+
};
|
|
|
13144 |
|
13145 |
+
var copyCSSStyles = exports.copyCSSStyles = function copyCSSStyles(style, target) {
|
13146 |
+
// Edge does not provide value for cssText
|
13147 |
+
for (var i = style.length - 1; i >= 0; i--) {
|
13148 |
+
var property = style.item(i);
|
13149 |
+
// Safari shows pseudoelements if content is set
|
13150 |
+
if (property !== 'content') {
|
13151 |
+
target.style.setProperty(property, style.getPropertyValue(property));
|
13152 |
+
}
|
13153 |
+
}
|
13154 |
+
return target;
|
13155 |
+
};
|
13156 |
|
13157 |
+
var SMALL_IMAGE = exports.SMALL_IMAGE = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13158 |
|
13159 |
+
/***/ }),
|
13160 |
+
/* 5 */
|
13161 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13162 |
|
13163 |
+
"use strict";
|
|
|
13164 |
|
|
|
|
|
|
|
|
|
13165 |
|
13166 |
+
Object.defineProperty(exports, "__esModule", {
|
13167 |
+
value: true
|
13168 |
+
});
|
13169 |
+
exports.parseBackgroundImage = exports.parseBackground = exports.calculateBackgroundRepeatPath = exports.calculateBackgroundPosition = exports.calculateBackgroungPositioningArea = exports.calculateBackgroungPaintingArea = exports.calculateGradientBackgroundSize = exports.calculateBackgroundSize = exports.BACKGROUND_ORIGIN = exports.BACKGROUND_CLIP = exports.BACKGROUND_SIZE = exports.BACKGROUND_REPEAT = undefined;
|
|
|
|
|
|
|
13170 |
|
13171 |
+
var _Color = __webpack_require__(0);
|
13172 |
|
13173 |
+
var _Color2 = _interopRequireDefault(_Color);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13174 |
|
13175 |
+
var _Length = __webpack_require__(2);
|
|
|
13176 |
|
13177 |
+
var _Length2 = _interopRequireDefault(_Length);
|
13178 |
|
13179 |
+
var _Size = __webpack_require__(31);
|
|
|
13180 |
|
13181 |
+
var _Size2 = _interopRequireDefault(_Size);
|
|
|
|
|
|
|
|
|
|
|
|
|
13182 |
|
13183 |
+
var _Vector = __webpack_require__(7);
|
13184 |
|
13185 |
+
var _Vector2 = _interopRequireDefault(_Vector);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13186 |
|
13187 |
+
var _Bounds = __webpack_require__(1);
|
13188 |
|
13189 |
+
var _padding = __webpack_require__(17);
|
|
|
|
|
|
|
|
|
|
|
|
|
13190 |
|
13191 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
13192 |
|
13193 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
13194 |
|
13195 |
+
var BACKGROUND_REPEAT = exports.BACKGROUND_REPEAT = {
|
13196 |
+
REPEAT: 0,
|
13197 |
+
NO_REPEAT: 1,
|
13198 |
+
REPEAT_X: 2,
|
13199 |
+
REPEAT_Y: 3
|
13200 |
+
};
|
13201 |
|
13202 |
+
var BACKGROUND_SIZE = exports.BACKGROUND_SIZE = {
|
13203 |
+
AUTO: 0,
|
13204 |
+
CONTAIN: 1,
|
13205 |
+
COVER: 2,
|
13206 |
+
LENGTH: 3
|
13207 |
+
};
|
|
|
|
|
13208 |
|
13209 |
+
var BACKGROUND_CLIP = exports.BACKGROUND_CLIP = {
|
13210 |
+
BORDER_BOX: 0,
|
13211 |
+
PADDING_BOX: 1,
|
13212 |
+
CONTENT_BOX: 2
|
13213 |
+
};
|
13214 |
|
13215 |
+
var BACKGROUND_ORIGIN = exports.BACKGROUND_ORIGIN = BACKGROUND_CLIP;
|
13216 |
|
13217 |
+
var AUTO = 'auto';
|
13218 |
|
13219 |
+
var BackgroundSize = function BackgroundSize(size) {
|
13220 |
+
_classCallCheck(this, BackgroundSize);
|
13221 |
|
13222 |
+
switch (size) {
|
13223 |
+
case 'contain':
|
13224 |
+
this.size = BACKGROUND_SIZE.CONTAIN;
|
13225 |
+
break;
|
13226 |
+
case 'cover':
|
13227 |
+
this.size = BACKGROUND_SIZE.COVER;
|
13228 |
+
break;
|
13229 |
+
case 'auto':
|
13230 |
+
this.size = BACKGROUND_SIZE.AUTO;
|
13231 |
+
break;
|
13232 |
+
default:
|
13233 |
+
this.value = new _Length2.default(size);
|
13234 |
+
}
|
13235 |
+
};
|
13236 |
|
13237 |
+
var calculateBackgroundSize = exports.calculateBackgroundSize = function calculateBackgroundSize(backgroundImage, image, bounds) {
|
13238 |
+
var width = 0;
|
13239 |
+
var height = 0;
|
13240 |
+
var size = backgroundImage.size;
|
13241 |
+
if (size[0].size === BACKGROUND_SIZE.CONTAIN || size[0].size === BACKGROUND_SIZE.COVER) {
|
13242 |
+
var targetRatio = bounds.width / bounds.height;
|
13243 |
+
var currentRatio = image.width / image.height;
|
13244 |
+
return targetRatio < currentRatio !== (size[0].size === BACKGROUND_SIZE.COVER) ? new _Size2.default(bounds.width, bounds.width / currentRatio) : new _Size2.default(bounds.height * currentRatio, bounds.height);
|
13245 |
+
}
|
13246 |
|
13247 |
+
if (size[0].value) {
|
13248 |
+
width = size[0].value.getAbsoluteValue(bounds.width);
|
13249 |
+
}
|
13250 |
+
|
13251 |
+
if (size[0].size === BACKGROUND_SIZE.AUTO && size[1].size === BACKGROUND_SIZE.AUTO) {
|
13252 |
+
height = image.height;
|
13253 |
+
} else if (size[1].size === BACKGROUND_SIZE.AUTO) {
|
13254 |
+
height = width / image.width * image.height;
|
13255 |
+
} else if (size[1].value) {
|
13256 |
+
height = size[1].value.getAbsoluteValue(bounds.height);
|
13257 |
+
}
|
13258 |
+
|
13259 |
+
if (size[0].size === BACKGROUND_SIZE.AUTO) {
|
13260 |
+
width = height / image.height * image.width;
|
13261 |
+
}
|
13262 |
+
|
13263 |
+
return new _Size2.default(width, height);
|
13264 |
+
};
|
13265 |
+
|
13266 |
+
var calculateGradientBackgroundSize = exports.calculateGradientBackgroundSize = function calculateGradientBackgroundSize(backgroundImage, bounds) {
|
13267 |
+
var size = backgroundImage.size;
|
13268 |
+
var width = size[0].value ? size[0].value.getAbsoluteValue(bounds.width) : bounds.width;
|
13269 |
+
var height = size[1].value ? size[1].value.getAbsoluteValue(bounds.height) : size[0].value ? width : bounds.height;
|
13270 |
+
|
13271 |
+
return new _Size2.default(width, height);
|
13272 |
+
};
|
13273 |
+
|
13274 |
+
var AUTO_SIZE = new BackgroundSize(AUTO);
|
13275 |
+
|
13276 |
+
var calculateBackgroungPaintingArea = exports.calculateBackgroungPaintingArea = function calculateBackgroungPaintingArea(curves, clip) {
|
13277 |
+
switch (clip) {
|
13278 |
+
case BACKGROUND_CLIP.BORDER_BOX:
|
13279 |
+
return (0, _Bounds.calculateBorderBoxPath)(curves);
|
13280 |
+
case BACKGROUND_CLIP.PADDING_BOX:
|
13281 |
+
default:
|
13282 |
+
return (0, _Bounds.calculatePaddingBoxPath)(curves);
|
13283 |
+
}
|
13284 |
+
};
|
13285 |
+
|
13286 |
+
var calculateBackgroungPositioningArea = exports.calculateBackgroungPositioningArea = function calculateBackgroungPositioningArea(backgroundOrigin, bounds, padding, border) {
|
13287 |
+
var paddingBox = (0, _Bounds.calculatePaddingBox)(bounds, border);
|
13288 |
+
|
13289 |
+
switch (backgroundOrigin) {
|
13290 |
+
case BACKGROUND_ORIGIN.BORDER_BOX:
|
13291 |
+
return bounds;
|
13292 |
+
case BACKGROUND_ORIGIN.CONTENT_BOX:
|
13293 |
+
var paddingLeft = padding[_padding.PADDING_SIDES.LEFT].getAbsoluteValue(bounds.width);
|
13294 |
+
var paddingRight = padding[_padding.PADDING_SIDES.RIGHT].getAbsoluteValue(bounds.width);
|
13295 |
+
var paddingTop = padding[_padding.PADDING_SIDES.TOP].getAbsoluteValue(bounds.width);
|
13296 |
+
var paddingBottom = padding[_padding.PADDING_SIDES.BOTTOM].getAbsoluteValue(bounds.width);
|
13297 |
+
return new _Bounds.Bounds(paddingBox.left + paddingLeft, paddingBox.top + paddingTop, paddingBox.width - paddingLeft - paddingRight, paddingBox.height - paddingTop - paddingBottom);
|
13298 |
+
case BACKGROUND_ORIGIN.PADDING_BOX:
|
13299 |
+
default:
|
13300 |
+
return paddingBox;
|
13301 |
+
}
|
13302 |
+
};
|
13303 |
+
|
13304 |
+
var calculateBackgroundPosition = exports.calculateBackgroundPosition = function calculateBackgroundPosition(position, size, bounds) {
|
13305 |
+
return new _Vector2.default(position[0].getAbsoluteValue(bounds.width - size.width), position[1].getAbsoluteValue(bounds.height - size.height));
|
13306 |
+
};
|
13307 |
+
|
13308 |
+
var calculateBackgroundRepeatPath = exports.calculateBackgroundRepeatPath = function calculateBackgroundRepeatPath(background, position, size, backgroundPositioningArea, bounds) {
|
13309 |
+
var repeat = background.repeat;
|
13310 |
+
switch (repeat) {
|
13311 |
+
case BACKGROUND_REPEAT.REPEAT_X:
|
13312 |
+
return [new _Vector2.default(Math.round(bounds.left), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(size.height + backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left), Math.round(size.height + backgroundPositioningArea.top + position.y))];
|
13313 |
+
case BACKGROUND_REPEAT.REPEAT_Y:
|
13314 |
+
return [new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(bounds.height + bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(bounds.height + bounds.top))];
|
13315 |
+
case BACKGROUND_REPEAT.NO_REPEAT:
|
13316 |
+
return [new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(backgroundPositioningArea.top + position.y + size.height)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y + size.height))];
|
13317 |
+
default:
|
13318 |
+
return [new _Vector2.default(Math.round(bounds.left), Math.round(bounds.top)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(bounds.top)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(bounds.height + bounds.top)), new _Vector2.default(Math.round(bounds.left), Math.round(bounds.height + bounds.top))];
|
13319 |
+
}
|
13320 |
+
};
|
13321 |
+
|
13322 |
+
var parseBackground = exports.parseBackground = function parseBackground(style, resourceLoader) {
|
13323 |
+
return {
|
13324 |
+
backgroundColor: new _Color2.default(style.backgroundColor),
|
13325 |
+
backgroundImage: parseBackgroundImages(style, resourceLoader),
|
13326 |
+
backgroundClip: parseBackgroundClip(style.backgroundClip),
|
13327 |
+
backgroundOrigin: parseBackgroundOrigin(style.backgroundOrigin)
|
13328 |
+
};
|
13329 |
+
};
|
13330 |
+
|
13331 |
+
var parseBackgroundClip = function parseBackgroundClip(backgroundClip) {
|
13332 |
+
switch (backgroundClip) {
|
13333 |
+
case 'padding-box':
|
13334 |
+
return BACKGROUND_CLIP.PADDING_BOX;
|
13335 |
+
case 'content-box':
|
13336 |
+
return BACKGROUND_CLIP.CONTENT_BOX;
|
13337 |
+
}
|
13338 |
+
return BACKGROUND_CLIP.BORDER_BOX;
|
13339 |
+
};
|
13340 |
+
|
13341 |
+
var parseBackgroundOrigin = function parseBackgroundOrigin(backgroundOrigin) {
|
13342 |
+
switch (backgroundOrigin) {
|
13343 |
+
case 'padding-box':
|
13344 |
+
return BACKGROUND_ORIGIN.PADDING_BOX;
|
13345 |
+
case 'content-box':
|
13346 |
+
return BACKGROUND_ORIGIN.CONTENT_BOX;
|
13347 |
+
}
|
13348 |
+
return BACKGROUND_ORIGIN.BORDER_BOX;
|
13349 |
+
};
|
13350 |
+
|
13351 |
+
var parseBackgroundRepeat = function parseBackgroundRepeat(backgroundRepeat) {
|
13352 |
+
switch (backgroundRepeat.trim()) {
|
13353 |
+
case 'no-repeat':
|
13354 |
+
return BACKGROUND_REPEAT.NO_REPEAT;
|
13355 |
+
case 'repeat-x':
|
13356 |
+
case 'repeat no-repeat':
|
13357 |
+
return BACKGROUND_REPEAT.REPEAT_X;
|
13358 |
+
case 'repeat-y':
|
13359 |
+
case 'no-repeat repeat':
|
13360 |
+
return BACKGROUND_REPEAT.REPEAT_Y;
|
13361 |
+
case 'repeat':
|
13362 |
+
return BACKGROUND_REPEAT.REPEAT;
|
13363 |
+
}
|
13364 |
+
|
13365 |
+
if (true) {
|
13366 |
+
console.error('Invalid background-repeat value "' + backgroundRepeat + '"');
|
13367 |
+
}
|
13368 |
+
|
13369 |
+
return BACKGROUND_REPEAT.REPEAT;
|
13370 |
+
};
|
13371 |
+
|
13372 |
+
var parseBackgroundImages = function parseBackgroundImages(style, resourceLoader) {
|
13373 |
+
var sources = parseBackgroundImage(style.backgroundImage).map(function (backgroundImage) {
|
13374 |
+
if (backgroundImage.method === 'url') {
|
13375 |
+
var key = resourceLoader.loadImage(backgroundImage.args[0]);
|
13376 |
+
backgroundImage.args = key ? [key] : [];
|
13377 |
}
|
13378 |
+
return backgroundImage;
|
13379 |
+
});
|
13380 |
+
var positions = style.backgroundPosition.split(',');
|
13381 |
+
var repeats = style.backgroundRepeat.split(',');
|
13382 |
+
var sizes = style.backgroundSize.split(',');
|
13383 |
|
13384 |
+
return sources.map(function (source, index) {
|
13385 |
+
var size = (sizes[index] || AUTO).trim().split(' ').map(parseBackgroundSize);
|
13386 |
+
var position = (positions[index] || AUTO).trim().split(' ').map(parseBackgoundPosition);
|
13387 |
|
13388 |
+
return {
|
13389 |
+
source: source,
|
13390 |
+
repeat: parseBackgroundRepeat(typeof repeats[index] === 'string' ? repeats[index] : repeats[0]),
|
13391 |
+
size: size.length < 2 ? [size[0], AUTO_SIZE] : [size[0], size[1]],
|
13392 |
+
position: position.length < 2 ? [position[0], position[0]] : [position[0], position[1]]
|
13393 |
+
};
|
13394 |
+
});
|
13395 |
+
};
|
13396 |
+
|
13397 |
+
var parseBackgroundSize = function parseBackgroundSize(size) {
|
13398 |
+
return size === 'auto' ? AUTO_SIZE : new BackgroundSize(size);
|
13399 |
+
};
|
13400 |
+
|
13401 |
+
var parseBackgoundPosition = function parseBackgoundPosition(position) {
|
13402 |
+
switch (position) {
|
13403 |
+
case 'bottom':
|
13404 |
+
case 'right':
|
13405 |
+
return new _Length2.default('100%');
|
13406 |
+
case 'left':
|
13407 |
+
case 'top':
|
13408 |
+
return new _Length2.default('0%');
|
13409 |
+
case 'auto':
|
13410 |
+
return new _Length2.default('0');
|
13411 |
+
}
|
13412 |
+
return new _Length2.default(position);
|
13413 |
+
};
|
13414 |
+
|
13415 |
+
var parseBackgroundImage = exports.parseBackgroundImage = function parseBackgroundImage(image) {
|
13416 |
+
var whitespace = /^\s$/;
|
13417 |
+
var results = [];
|
13418 |
+
|
13419 |
+
var args = [];
|
13420 |
+
var method = '';
|
13421 |
+
var quote = null;
|
13422 |
+
var definition = '';
|
13423 |
+
var mode = 0;
|
13424 |
+
var numParen = 0;
|
13425 |
+
|
13426 |
+
var appendResult = function appendResult() {
|
13427 |
+
var prefix = '';
|
13428 |
+
if (method) {
|
13429 |
+
if (definition.substr(0, 1) === '"') {
|
13430 |
+
definition = definition.substr(1, definition.length - 2);
|
13431 |
+
}
|
13432 |
+
|
13433 |
+
if (definition) {
|
13434 |
+
args.push(definition.trim());
|
13435 |
+
}
|
13436 |
+
|
13437 |
+
var prefix_i = method.indexOf('-', 1) + 1;
|
13438 |
+
if (method.substr(0, 1) === '-' && prefix_i > 0) {
|
13439 |
+
prefix = method.substr(0, prefix_i).toLowerCase();
|
13440 |
+
method = method.substr(prefix_i);
|
13441 |
+
}
|
13442 |
+
method = method.toLowerCase();
|
13443 |
+
if (method !== 'none') {
|
13444 |
+
results.push({
|
13445 |
+
prefix: prefix,
|
13446 |
+
method: method,
|
13447 |
+
args: args
|
13448 |
+
});
|
13449 |
+
}
|
13450 |
}
|
13451 |
+
args = [];
|
13452 |
+
method = definition = '';
|
13453 |
+
};
|
13454 |
|
13455 |
+
image.split('').forEach(function (c) {
|
13456 |
+
if (mode === 0 && whitespace.test(c)) {
|
13457 |
+
return;
|
13458 |
+
}
|
13459 |
+
switch (c) {
|
13460 |
+
case '"':
|
13461 |
+
if (!quote) {
|
13462 |
+
quote = c;
|
13463 |
+
} else if (quote === c) {
|
13464 |
+
quote = null;
|
13465 |
+
}
|
13466 |
+
break;
|
13467 |
+
case '(':
|
13468 |
+
if (quote) {
|
13469 |
+
break;
|
13470 |
+
} else if (mode === 0) {
|
13471 |
+
mode = 1;
|
13472 |
+
return;
|
13473 |
+
} else {
|
13474 |
+
numParen++;
|
13475 |
+
}
|
13476 |
+
break;
|
13477 |
+
case ')':
|
13478 |
+
if (quote) {
|
13479 |
+
break;
|
13480 |
+
} else if (mode === 1) {
|
13481 |
+
if (numParen === 0) {
|
13482 |
+
mode = 0;
|
13483 |
+
appendResult();
|
13484 |
+
return;
|
13485 |
+
} else {
|
13486 |
+
numParen--;
|
13487 |
+
}
|
13488 |
+
}
|
13489 |
+
break;
|
13490 |
+
|
13491 |
+
case ',':
|
13492 |
+
if (quote) {
|
13493 |
+
break;
|
13494 |
+
} else if (mode === 0) {
|
13495 |
+
appendResult();
|
13496 |
+
return;
|
13497 |
+
} else if (mode === 1) {
|
13498 |
+
if (numParen === 0 && !method.match(/^url$/i)) {
|
13499 |
+
args.push(definition.trim());
|
13500 |
+
definition = '';
|
13501 |
+
return;
|
13502 |
+
}
|
13503 |
+
}
|
13504 |
+
break;
|
13505 |
+
}
|
13506 |
|
13507 |
+
if (mode === 0) {
|
13508 |
+
method += c;
|
|
|
|
|
|
|
13509 |
} else {
|
13510 |
+
definition += c;
|
13511 |
}
|
13512 |
+
});
|
13513 |
|
13514 |
+
appendResult();
|
13515 |
+
return results;
|
13516 |
+
};
|
13517 |
|
13518 |
+
/***/ }),
|
13519 |
+
/* 6 */
|
13520 |
+
/***/ (function(module, exports, __webpack_require__) {
|
13521 |
|
13522 |
+
"use strict";
|
|
|
|
|
|
|
13523 |
|
|
|
|
|
|
|
|
|
|
|
|
|
13524 |
|
13525 |
+
Object.defineProperty(exports, "__esModule", {
|
13526 |
+
value: true
|
13527 |
+
});
|
13528 |
+
var PATH = exports.PATH = {
|
13529 |
+
VECTOR: 0,
|
13530 |
+
BEZIER_CURVE: 1,
|
13531 |
+
CIRCLE: 2
|
13532 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13533 |
|
13534 |
+
/***/ }),
|
13535 |
+
/* 7 */
|
13536 |
+
/***/ (function(module, exports, __webpack_require__) {
|
13537 |
|
13538 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
13539 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13540 |
|
13541 |
+
Object.defineProperty(exports, "__esModule", {
|
13542 |
+
value: true
|
13543 |
+
});
|
|
|
13544 |
|
13545 |
+
var _Path = __webpack_require__(6);
|
13546 |
+
|
13547 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
13548 |
+
|
13549 |
+
var Vector = function Vector(x, y) {
|
13550 |
+
_classCallCheck(this, Vector);
|
13551 |
+
|
13552 |
+
this.type = _Path.PATH.VECTOR;
|
13553 |
+
this.x = x;
|
13554 |
+
this.y = y;
|
13555 |
+
if (true) {
|
13556 |
+
if (isNaN(x)) {
|
13557 |
+
console.error('Invalid x value given for Vector');
|
13558 |
+
}
|
13559 |
+
if (isNaN(y)) {
|
13560 |
+
console.error('Invalid y value given for Vector');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13561 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13562 |
}
|
13563 |
};
|
13564 |
|
13565 |
+
exports.default = Vector;
|
13566 |
+
|
13567 |
+
/***/ }),
|
13568 |
+
/* 8 */
|
13569 |
+
/***/ (function(module, exports, __webpack_require__) {
|
13570 |
|
13571 |
+
"use strict";
|
13572 |
+
|
13573 |
+
|
13574 |
+
Object.defineProperty(exports, "__esModule", {
|
13575 |
+
value: true
|
13576 |
+
});
|
13577 |
+
exports.parseListStyle = exports.parseListStyleType = exports.LIST_STYLE_TYPE = exports.LIST_STYLE_POSITION = undefined;
|
13578 |
+
|
13579 |
+
var _background = __webpack_require__(5);
|
13580 |
|
13581 |
+
var LIST_STYLE_POSITION = exports.LIST_STYLE_POSITION = {
|
13582 |
+
INSIDE: 0,
|
13583 |
+
OUTSIDE: 1
|
13584 |
+
};
|
|
|
|
|
|
|
13585 |
|
13586 |
+
var LIST_STYLE_TYPE = exports.LIST_STYLE_TYPE = {
|
13587 |
+
NONE: -1,
|
13588 |
+
DISC: 0,
|
13589 |
+
CIRCLE: 1,
|
13590 |
+
SQUARE: 2,
|
13591 |
+
DECIMAL: 3,
|
13592 |
+
CJK_DECIMAL: 4,
|
13593 |
+
DECIMAL_LEADING_ZERO: 5,
|
13594 |
+
LOWER_ROMAN: 6,
|
13595 |
+
UPPER_ROMAN: 7,
|
13596 |
+
LOWER_GREEK: 8,
|
13597 |
+
LOWER_ALPHA: 9,
|
13598 |
+
UPPER_ALPHA: 10,
|
13599 |
+
ARABIC_INDIC: 11,
|
13600 |
+
ARMENIAN: 12,
|
13601 |
+
BENGALI: 13,
|
13602 |
+
CAMBODIAN: 14,
|
13603 |
+
CJK_EARTHLY_BRANCH: 15,
|
13604 |
+
CJK_HEAVENLY_STEM: 16,
|
13605 |
+
CJK_IDEOGRAPHIC: 17,
|
13606 |
+
DEVANAGARI: 18,
|
13607 |
+
ETHIOPIC_NUMERIC: 19,
|
13608 |
+
GEORGIAN: 20,
|
13609 |
+
GUJARATI: 21,
|
13610 |
+
GURMUKHI: 22,
|
13611 |
+
HEBREW: 22,
|
13612 |
+
HIRAGANA: 23,
|
13613 |
+
HIRAGANA_IROHA: 24,
|
13614 |
+
JAPANESE_FORMAL: 25,
|
13615 |
+
JAPANESE_INFORMAL: 26,
|
13616 |
+
KANNADA: 27,
|
13617 |
+
KATAKANA: 28,
|
13618 |
+
KATAKANA_IROHA: 29,
|
13619 |
+
KHMER: 30,
|
13620 |
+
KOREAN_HANGUL_FORMAL: 31,
|
13621 |
+
KOREAN_HANJA_FORMAL: 32,
|
13622 |
+
KOREAN_HANJA_INFORMAL: 33,
|
13623 |
+
LAO: 34,
|
13624 |
+
LOWER_ARMENIAN: 35,
|
13625 |
+
MALAYALAM: 36,
|
13626 |
+
MONGOLIAN: 37,
|
13627 |
+
MYANMAR: 38,
|
13628 |
+
ORIYA: 39,
|
13629 |
+
PERSIAN: 40,
|
13630 |
+
SIMP_CHINESE_FORMAL: 41,
|
13631 |
+
SIMP_CHINESE_INFORMAL: 42,
|
13632 |
+
TAMIL: 43,
|
13633 |
+
TELUGU: 44,
|
13634 |
+
THAI: 45,
|
13635 |
+
TIBETAN: 46,
|
13636 |
+
TRAD_CHINESE_FORMAL: 47,
|
13637 |
+
TRAD_CHINESE_INFORMAL: 48,
|
13638 |
+
UPPER_ARMENIAN: 49,
|
13639 |
+
DISCLOSURE_OPEN: 50,
|
13640 |
+
DISCLOSURE_CLOSED: 51
|
13641 |
};
|
13642 |
|
13643 |
+
var parseListStyleType = exports.parseListStyleType = function parseListStyleType(type) {
|
13644 |
+
switch (type) {
|
13645 |
+
case 'disc':
|
13646 |
+
return LIST_STYLE_TYPE.DISC;
|
13647 |
+
case 'circle':
|
13648 |
+
return LIST_STYLE_TYPE.CIRCLE;
|
13649 |
+
case 'square':
|
13650 |
+
return LIST_STYLE_TYPE.SQUARE;
|
13651 |
+
case 'decimal':
|
13652 |
+
return LIST_STYLE_TYPE.DECIMAL;
|
13653 |
+
case 'cjk-decimal':
|
13654 |
+
return LIST_STYLE_TYPE.CJK_DECIMAL;
|
13655 |
+
case 'decimal-leading-zero':
|
13656 |
+
return LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO;
|
13657 |
+
case 'lower-roman':
|
13658 |
+
return LIST_STYLE_TYPE.LOWER_ROMAN;
|
13659 |
+
case 'upper-roman':
|
13660 |
+
return LIST_STYLE_TYPE.UPPER_ROMAN;
|
13661 |
+
case 'lower-greek':
|
13662 |
+
return LIST_STYLE_TYPE.LOWER_GREEK;
|
13663 |
+
case 'lower-alpha':
|
13664 |
+
return LIST_STYLE_TYPE.LOWER_ALPHA;
|
13665 |
+
case 'upper-alpha':
|
13666 |
+
return LIST_STYLE_TYPE.UPPER_ALPHA;
|
13667 |
+
case 'arabic-indic':
|
13668 |
+
return LIST_STYLE_TYPE.ARABIC_INDIC;
|
13669 |
+
case 'armenian':
|
13670 |
+
return LIST_STYLE_TYPE.ARMENIAN;
|
13671 |
+
case 'bengali':
|
13672 |
+
return LIST_STYLE_TYPE.BENGALI;
|
13673 |
+
case 'cambodian':
|
13674 |
+
return LIST_STYLE_TYPE.CAMBODIAN;
|
13675 |
+
case 'cjk-earthly-branch':
|
13676 |
+
return LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH;
|
13677 |
+
case 'cjk-heavenly-stem':
|
13678 |
+
return LIST_STYLE_TYPE.CJK_HEAVENLY_STEM;
|
13679 |
+
case 'cjk-ideographic':
|
13680 |
+
return LIST_STYLE_TYPE.CJK_IDEOGRAPHIC;
|
13681 |
+
case 'devanagari':
|
13682 |
+
return LIST_STYLE_TYPE.DEVANAGARI;
|
13683 |
+
case 'ethiopic-numeric':
|
13684 |
+
return LIST_STYLE_TYPE.ETHIOPIC_NUMERIC;
|
13685 |
+
case 'georgian':
|
13686 |
+
return LIST_STYLE_TYPE.GEORGIAN;
|
13687 |
+
case 'gujarati':
|
13688 |
+
return LIST_STYLE_TYPE.GUJARATI;
|
13689 |
+
case 'gurmukhi':
|
13690 |
+
return LIST_STYLE_TYPE.GURMUKHI;
|
13691 |
+
case 'hebrew':
|
13692 |
+
return LIST_STYLE_TYPE.HEBREW;
|
13693 |
+
case 'hiragana':
|
13694 |
+
return LIST_STYLE_TYPE.HIRAGANA;
|
13695 |
+
case 'hiragana-iroha':
|
13696 |
+
return LIST_STYLE_TYPE.HIRAGANA_IROHA;
|
13697 |
+
case 'japanese-formal':
|
13698 |
+
return LIST_STYLE_TYPE.JAPANESE_FORMAL;
|
13699 |
+
case 'japanese-informal':
|
13700 |
+
return LIST_STYLE_TYPE.JAPANESE_INFORMAL;
|
13701 |
+
case 'kannada':
|
13702 |
+
return LIST_STYLE_TYPE.KANNADA;
|
13703 |
+
case 'katakana':
|
13704 |
+
return LIST_STYLE_TYPE.KATAKANA;
|
13705 |
+
case 'katakana-iroha':
|
13706 |
+
return LIST_STYLE_TYPE.KATAKANA_IROHA;
|
13707 |
+
case 'khmer':
|
13708 |
+
return LIST_STYLE_TYPE.KHMER;
|
13709 |
+
case 'korean-hangul-formal':
|
13710 |
+
return LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL;
|
13711 |
+
case 'korean-hanja-formal':
|
13712 |
+
return LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL;
|
13713 |
+
case 'korean-hanja-informal':
|
13714 |
+
return LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL;
|
13715 |
+
case 'lao':
|
13716 |
+
return LIST_STYLE_TYPE.LAO;
|
13717 |
+
case 'lower-armenian':
|
13718 |
+
return LIST_STYLE_TYPE.LOWER_ARMENIAN;
|
13719 |
+
case 'malayalam':
|
13720 |
+
return LIST_STYLE_TYPE.MALAYALAM;
|
13721 |
+
case 'mongolian':
|
13722 |
+
return LIST_STYLE_TYPE.MONGOLIAN;
|
13723 |
+
case 'myanmar':
|
13724 |
+
return LIST_STYLE_TYPE.MYANMAR;
|
13725 |
+
case 'oriya':
|
13726 |
+
return LIST_STYLE_TYPE.ORIYA;
|
13727 |
+
case 'persian':
|
13728 |
+
return LIST_STYLE_TYPE.PERSIAN;
|
13729 |
+
case 'simp-chinese-formal':
|
13730 |
+
return LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL;
|
13731 |
+
case 'simp-chinese-informal':
|
13732 |
+
return LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL;
|
13733 |
+
case 'tamil':
|
13734 |
+
return LIST_STYLE_TYPE.TAMIL;
|
13735 |
+
case 'telugu':
|
13736 |
+
return LIST_STYLE_TYPE.TELUGU;
|
13737 |
+
case 'thai':
|
13738 |
+
return LIST_STYLE_TYPE.THAI;
|
13739 |
+
case 'tibetan':
|
13740 |
+
return LIST_STYLE_TYPE.TIBETAN;
|
13741 |
+
case 'trad-chinese-formal':
|
13742 |
+
return LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL;
|
13743 |
+
case 'trad-chinese-informal':
|
13744 |
+
return LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL;
|
13745 |
+
case 'upper-armenian':
|
13746 |
+
return LIST_STYLE_TYPE.UPPER_ARMENIAN;
|
13747 |
+
case 'disclosure-open':
|
13748 |
+
return LIST_STYLE_TYPE.DISCLOSURE_OPEN;
|
13749 |
+
case 'disclosure-closed':
|
13750 |
+
return LIST_STYLE_TYPE.DISCLOSURE_CLOSED;
|
13751 |
+
case 'none':
|
13752 |
+
default:
|
13753 |
+
return LIST_STYLE_TYPE.NONE;
|
13754 |
+
}
|
13755 |
};
|
|
|
13756 |
|
13757 |
+
var parseListStyle = exports.parseListStyle = function parseListStyle(style) {
|
13758 |
+
var listStyleImage = (0, _background.parseBackgroundImage)(style.getPropertyValue('list-style-image'));
|
13759 |
+
return {
|
13760 |
+
listStyleType: parseListStyleType(style.getPropertyValue('list-style-type')),
|
13761 |
+
listStyleImage: listStyleImage.length ? listStyleImage[0] : null,
|
13762 |
+
listStylePosition: parseListStylePosition(style.getPropertyValue('list-style-position'))
|
13763 |
+
};
|
13764 |
+
};
|
13765 |
|
13766 |
+
var parseListStylePosition = function parseListStylePosition(position) {
|
13767 |
+
switch (position) {
|
13768 |
+
case 'inside':
|
13769 |
+
return LIST_STYLE_POSITION.INSIDE;
|
13770 |
+
case 'outside':
|
13771 |
+
default:
|
13772 |
+
return LIST_STYLE_POSITION.OUTSIDE;
|
13773 |
+
}
|
13774 |
+
};
|
13775 |
|
13776 |
+
/***/ }),
|
13777 |
+
/* 9 */
|
13778 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13779 |
|
13780 |
+
"use strict";
|
|
|
|
|
|
|
13781 |
|
|
|
|
|
13782 |
|
13783 |
+
Object.defineProperty(exports, "__esModule", {
|
13784 |
+
value: true
|
13785 |
+
});
|
13786 |
|
13787 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13788 |
|
13789 |
+
var _textTransform = __webpack_require__(20);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13790 |
|
13791 |
+
var _TextBounds = __webpack_require__(22);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13792 |
|
13793 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13794 |
|
13795 |
+
var TextContainer = function () {
|
13796 |
+
function TextContainer(text, parent, bounds) {
|
13797 |
+
_classCallCheck(this, TextContainer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13798 |
|
13799 |
+
this.text = text;
|
13800 |
+
this.parent = parent;
|
13801 |
+
this.bounds = bounds;
|
13802 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13803 |
|
13804 |
+
_createClass(TextContainer, null, [{
|
13805 |
+
key: 'fromTextNode',
|
13806 |
+
value: function fromTextNode(node, parent) {
|
13807 |
+
var text = transform(node.data, parent.style.textTransform);
|
13808 |
+
return new TextContainer(text, parent, (0, _TextBounds.parseTextBounds)(text, parent, node));
|
13809 |
+
}
|
13810 |
+
}]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13811 |
|
13812 |
+
return TextContainer;
|
13813 |
+
}();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13814 |
|
13815 |
+
exports.default = TextContainer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13816 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13817 |
|
13818 |
+
var CAPITALIZE = /(^|\s|:|-|\(|\))([a-z])/g;
|
|
|
13819 |
|
13820 |
+
var transform = function transform(text, _transform) {
|
13821 |
+
switch (_transform) {
|
13822 |
+
case _textTransform.TEXT_TRANSFORM.LOWERCASE:
|
13823 |
+
return text.toLowerCase();
|
13824 |
+
case _textTransform.TEXT_TRANSFORM.CAPITALIZE:
|
13825 |
+
return text.replace(CAPITALIZE, capitalize);
|
13826 |
+
case _textTransform.TEXT_TRANSFORM.UPPERCASE:
|
13827 |
+
return text.toUpperCase();
|
13828 |
+
default:
|
13829 |
+
return text;
|
13830 |
+
}
|
13831 |
+
};
|
13832 |
|
13833 |
+
function capitalize(m, p1, p2) {
|
13834 |
+
if (m.length > 0) {
|
13835 |
+
return p1 + p2.toUpperCase();
|
13836 |
+
}
|
|
|
|
|
13837 |
|
13838 |
+
return m;
|
13839 |
+
}
|
|
|
13840 |
|
13841 |
+
/***/ }),
|
13842 |
+
/* 10 */
|
13843 |
+
/***/ (function(module, exports, __webpack_require__) {
|
13844 |
|
13845 |
+
"use strict";
|
|
|
|
|
13846 |
|
|
|
|
|
13847 |
|
13848 |
+
Object.defineProperty(exports, "__esModule", {
|
13849 |
+
value: true
|
13850 |
+
});
|
13851 |
|
13852 |
+
var _ForeignObjectRenderer = __webpack_require__(23);
|
13853 |
+
|
13854 |
+
var testRangeBounds = function testRangeBounds(document) {
|
13855 |
+
var TEST_HEIGHT = 123;
|
13856 |
+
|
13857 |
+
if (document.createRange) {
|
13858 |
+
var range = document.createRange();
|
13859 |
+
if (range.getBoundingClientRect) {
|
13860 |
+
var testElement = document.createElement('boundtest');
|
13861 |
+
testElement.style.height = TEST_HEIGHT + 'px';
|
13862 |
+
testElement.style.display = 'block';
|
13863 |
+
document.body.appendChild(testElement);
|
13864 |
+
|
13865 |
+
range.selectNode(testElement);
|
13866 |
+
var rangeBounds = range.getBoundingClientRect();
|
13867 |
+
var rangeHeight = Math.round(rangeBounds.height);
|
13868 |
+
document.body.removeChild(testElement);
|
13869 |
+
if (rangeHeight === TEST_HEIGHT) {
|
13870 |
+
return true;
|
13871 |
+
}
|
13872 |
+
}
|
13873 |
+
}
|
13874 |
|
13875 |
+
return false;
|
13876 |
+
};
|
13877 |
|
13878 |
+
// iOS 10.3 taints canvas with base64 images unless crossOrigin = 'anonymous'
|
13879 |
+
var testBase64 = function testBase64(document, src) {
|
13880 |
+
var img = new Image();
|
13881 |
+
var canvas = document.createElement('canvas');
|
13882 |
+
var ctx = canvas.getContext('2d');
|
13883 |
+
|
13884 |
+
return new Promise(function (resolve) {
|
13885 |
+
// Single pixel base64 image renders fine on iOS 10.3???
|
13886 |
+
img.src = src;
|
13887 |
+
|
13888 |
+
var onload = function onload() {
|
13889 |
+
try {
|
13890 |
+
ctx.drawImage(img, 0, 0);
|
13891 |
+
canvas.toDataURL();
|
13892 |
+
} catch (e) {
|
13893 |
+
return resolve(false);
|
13894 |
+
}
|
13895 |
|
13896 |
+
return resolve(true);
|
13897 |
+
};
|
13898 |
|
13899 |
+
img.onload = onload;
|
13900 |
+
img.onerror = function () {
|
13901 |
+
return resolve(false);
|
13902 |
+
};
|
|
|
13903 |
|
13904 |
+
if (img.complete === true) {
|
13905 |
+
setTimeout(function () {
|
13906 |
+
onload();
|
13907 |
+
}, 500);
|
13908 |
+
}
|
13909 |
+
});
|
13910 |
+
};
|
13911 |
|
13912 |
+
var testCORS = function testCORS() {
|
13913 |
+
return typeof new Image().crossOrigin !== 'undefined';
|
13914 |
+
};
|
13915 |
|
13916 |
+
var testResponseType = function testResponseType() {
|
13917 |
+
return typeof new XMLHttpRequest().responseType === 'string';
|
13918 |
+
};
|
13919 |
|
13920 |
+
var testSVG = function testSVG(document) {
|
13921 |
+
var img = new Image();
|
13922 |
+
var canvas = document.createElement('canvas');
|
13923 |
+
var ctx = canvas.getContext('2d');
|
13924 |
+
img.src = 'data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\'></svg>';
|
13925 |
|
13926 |
+
try {
|
13927 |
+
ctx.drawImage(img, 0, 0);
|
13928 |
+
canvas.toDataURL();
|
13929 |
+
} catch (e) {
|
13930 |
+
return false;
|
13931 |
+
}
|
13932 |
+
return true;
|
13933 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13934 |
|
13935 |
+
var isGreenPixel = function isGreenPixel(data) {
|
13936 |
+
return data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;
|
13937 |
+
};
|
13938 |
|
13939 |
+
var testForeignObject = function testForeignObject(document) {
|
13940 |
+
var canvas = document.createElement('canvas');
|
13941 |
+
var size = 100;
|
13942 |
+
canvas.width = size;
|
13943 |
+
canvas.height = size;
|
13944 |
+
var ctx = canvas.getContext('2d');
|
13945 |
+
ctx.fillStyle = 'rgb(0, 255, 0)';
|
13946 |
+
ctx.fillRect(0, 0, size, size);
|
13947 |
+
|
13948 |
+
var img = new Image();
|
13949 |
+
var greenImageSrc = canvas.toDataURL();
|
13950 |
+
img.src = greenImageSrc;
|
13951 |
+
var svg = (0, _ForeignObjectRenderer.createForeignObjectSVG)(size, size, 0, 0, img);
|
13952 |
+
ctx.fillStyle = 'red';
|
13953 |
+
ctx.fillRect(0, 0, size, size);
|
13954 |
+
|
13955 |
+
return (0, _ForeignObjectRenderer.loadSerializedSVG)(svg).then(function (img) {
|
13956 |
+
ctx.drawImage(img, 0, 0);
|
13957 |
+
var data = ctx.getImageData(0, 0, size, size).data;
|
13958 |
+
ctx.fillStyle = 'red';
|
13959 |
+
ctx.fillRect(0, 0, size, size);
|
13960 |
+
|
13961 |
+
var node = document.createElement('div');
|
13962 |
+
node.style.backgroundImage = 'url(' + greenImageSrc + ')';
|
13963 |
+
node.style.height = size + 'px';
|
13964 |
+
// Firefox 55 does not render inline <img /> tags
|
13965 |
+
return isGreenPixel(data) ? (0, _ForeignObjectRenderer.loadSerializedSVG)((0, _ForeignObjectRenderer.createForeignObjectSVG)(size, size, 0, 0, node)) : Promise.reject(false);
|
13966 |
+
}).then(function (img) {
|
13967 |
+
ctx.drawImage(img, 0, 0);
|
13968 |
+
// Edge does not render background-images
|
13969 |
+
return isGreenPixel(ctx.getImageData(0, 0, size, size).data);
|
13970 |
+
}).catch(function (e) {
|
13971 |
+
return false;
|
13972 |
+
});
|
13973 |
+
};
|
13974 |
|
13975 |
+
var FEATURES = {
|
13976 |
+
// $FlowFixMe - get/set properties not yet supported
|
13977 |
+
get SUPPORT_RANGE_BOUNDS() {
|
13978 |
+
'use strict';
|
13979 |
|
13980 |
+
var value = testRangeBounds(document);
|
13981 |
+
Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });
|
13982 |
+
return value;
|
13983 |
+
},
|
13984 |
+
// $FlowFixMe - get/set properties not yet supported
|
13985 |
+
get SUPPORT_SVG_DRAWING() {
|
13986 |
+
'use strict';
|
13987 |
|
13988 |
+
var value = testSVG(document);
|
13989 |
+
Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });
|
13990 |
+
return value;
|
13991 |
+
},
|
13992 |
+
// $FlowFixMe - get/set properties not yet supported
|
13993 |
+
get SUPPORT_BASE64_DRAWING() {
|
13994 |
+
'use strict';
|
13995 |
+
|
13996 |
+
return function (src) {
|
13997 |
+
var _value = testBase64(document, src);
|
13998 |
+
Object.defineProperty(FEATURES, 'SUPPORT_BASE64_DRAWING', { value: function value() {
|
13999 |
+
return _value;
|
14000 |
+
} });
|
14001 |
+
return _value;
|
14002 |
+
};
|
14003 |
+
},
|
14004 |
+
// $FlowFixMe - get/set properties not yet supported
|
14005 |
+
get SUPPORT_FOREIGNOBJECT_DRAWING() {
|
14006 |
+
'use strict';
|
14007 |
|
14008 |
+
var value = typeof Array.from === 'function' && typeof window.fetch === 'function' ? testForeignObject(document) : Promise.resolve(false);
|
14009 |
+
Object.defineProperty(FEATURES, 'SUPPORT_FOREIGNOBJECT_DRAWING', { value: value });
|
14010 |
+
return value;
|
14011 |
+
},
|
14012 |
+
// $FlowFixMe - get/set properties not yet supported
|
14013 |
+
get SUPPORT_CORS_IMAGES() {
|
14014 |
+
'use strict';
|
14015 |
|
14016 |
+
var value = testCORS();
|
14017 |
+
Object.defineProperty(FEATURES, 'SUPPORT_CORS_IMAGES', { value: value });
|
14018 |
+
return value;
|
14019 |
+
},
|
14020 |
+
// $FlowFixMe - get/set properties not yet supported
|
14021 |
+
get SUPPORT_RESPONSE_TYPE() {
|
14022 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14023 |
|
14024 |
+
var value = testResponseType();
|
14025 |
+
Object.defineProperty(FEATURES, 'SUPPORT_RESPONSE_TYPE', { value: value });
|
14026 |
+
return value;
|
14027 |
+
},
|
14028 |
+
// $FlowFixMe - get/set properties not yet supported
|
14029 |
+
get SUPPORT_CORS_XHR() {
|
14030 |
+
'use strict';
|
14031 |
|
14032 |
+
var value = 'withCredentials' in new XMLHttpRequest();
|
14033 |
+
Object.defineProperty(FEATURES, 'SUPPORT_CORS_XHR', { value: value });
|
14034 |
+
return value;
|
14035 |
+
}
|
14036 |
+
};
|
14037 |
|
14038 |
+
exports.default = FEATURES;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14039 |
|
14040 |
+
/***/ }),
|
14041 |
+
/* 11 */
|
14042 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14043 |
|
14044 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14045 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14046 |
|
14047 |
+
Object.defineProperty(exports, "__esModule", {
|
14048 |
+
value: true
|
14049 |
+
});
|
14050 |
+
exports.parseTextDecoration = exports.TEXT_DECORATION_LINE = exports.TEXT_DECORATION = exports.TEXT_DECORATION_STYLE = undefined;
|
14051 |
+
|
14052 |
+
var _Color = __webpack_require__(0);
|
14053 |
+
|
14054 |
+
var _Color2 = _interopRequireDefault(_Color);
|
14055 |
+
|
14056 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14057 |
+
|
14058 |
+
var TEXT_DECORATION_STYLE = exports.TEXT_DECORATION_STYLE = {
|
14059 |
+
SOLID: 0,
|
14060 |
+
DOUBLE: 1,
|
14061 |
+
DOTTED: 2,
|
14062 |
+
DASHED: 3,
|
14063 |
+
WAVY: 4
|
14064 |
+
};
|
14065 |
+
|
14066 |
+
var TEXT_DECORATION = exports.TEXT_DECORATION = {
|
14067 |
+
NONE: null
|
14068 |
+
};
|
14069 |
+
|
14070 |
+
var TEXT_DECORATION_LINE = exports.TEXT_DECORATION_LINE = {
|
14071 |
+
UNDERLINE: 1,
|
14072 |
+
OVERLINE: 2,
|
14073 |
+
LINE_THROUGH: 3,
|
14074 |
+
BLINK: 4
|
14075 |
+
};
|
14076 |
+
|
14077 |
+
var parseLine = function parseLine(line) {
|
14078 |
+
switch (line) {
|
14079 |
+
case 'underline':
|
14080 |
+
return TEXT_DECORATION_LINE.UNDERLINE;
|
14081 |
+
case 'overline':
|
14082 |
+
return TEXT_DECORATION_LINE.OVERLINE;
|
14083 |
+
case 'line-through':
|
14084 |
+
return TEXT_DECORATION_LINE.LINE_THROUGH;
|
14085 |
+
}
|
14086 |
+
return TEXT_DECORATION_LINE.BLINK;
|
14087 |
+
};
|
14088 |
+
|
14089 |
+
var parseTextDecorationLine = function parseTextDecorationLine(line) {
|
14090 |
+
if (line === 'none') {
|
14091 |
+
return null;
|
14092 |
+
}
|
14093 |
+
|
14094 |
+
return line.split(' ').map(parseLine);
|
14095 |
+
};
|
14096 |
+
|
14097 |
+
var parseTextDecorationStyle = function parseTextDecorationStyle(style) {
|
14098 |
+
switch (style) {
|
14099 |
+
case 'double':
|
14100 |
+
return TEXT_DECORATION_STYLE.DOUBLE;
|
14101 |
+
case 'dotted':
|
14102 |
+
return TEXT_DECORATION_STYLE.DOTTED;
|
14103 |
+
case 'dashed':
|
14104 |
+
return TEXT_DECORATION_STYLE.DASHED;
|
14105 |
+
case 'wavy':
|
14106 |
+
return TEXT_DECORATION_STYLE.WAVY;
|
14107 |
+
}
|
14108 |
+
return TEXT_DECORATION_STYLE.SOLID;
|
14109 |
+
};
|
14110 |
+
|
14111 |
+
var parseTextDecoration = exports.parseTextDecoration = function parseTextDecoration(style) {
|
14112 |
+
var textDecorationLine = parseTextDecorationLine(style.textDecorationLine ? style.textDecorationLine : style.textDecoration);
|
14113 |
+
if (textDecorationLine === null) {
|
14114 |
+
return TEXT_DECORATION.NONE;
|
14115 |
+
}
|
14116 |
+
|
14117 |
+
var textDecorationColor = style.textDecorationColor ? new _Color2.default(style.textDecorationColor) : null;
|
14118 |
+
var textDecorationStyle = parseTextDecorationStyle(style.textDecorationStyle);
|
14119 |
+
|
14120 |
+
return {
|
14121 |
+
textDecorationLine: textDecorationLine,
|
14122 |
+
textDecorationColor: textDecorationColor,
|
14123 |
+
textDecorationStyle: textDecorationStyle
|
14124 |
+
};
|
14125 |
+
};
|
14126 |
+
|
14127 |
+
/***/ }),
|
14128 |
+
/* 12 */
|
14129 |
+
/***/ (function(module, exports, __webpack_require__) {
|
14130 |
+
|
14131 |
+
"use strict";
|
14132 |
+
|
14133 |
+
|
14134 |
+
Object.defineProperty(exports, "__esModule", {
|
14135 |
+
value: true
|
14136 |
+
});
|
14137 |
+
exports.parseBorder = exports.BORDER_SIDES = exports.BORDER_STYLE = undefined;
|
14138 |
+
|
14139 |
+
var _Color = __webpack_require__(0);
|
14140 |
+
|
14141 |
+
var _Color2 = _interopRequireDefault(_Color);
|
14142 |
+
|
14143 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14144 |
+
|
14145 |
+
var BORDER_STYLE = exports.BORDER_STYLE = {
|
14146 |
+
NONE: 0,
|
14147 |
+
SOLID: 1
|
14148 |
+
};
|
14149 |
+
|
14150 |
+
var BORDER_SIDES = exports.BORDER_SIDES = {
|
14151 |
+
TOP: 0,
|
14152 |
+
RIGHT: 1,
|
14153 |
+
BOTTOM: 2,
|
14154 |
+
LEFT: 3
|
14155 |
+
};
|
14156 |
+
|
14157 |
+
var SIDES = Object.keys(BORDER_SIDES).map(function (s) {
|
14158 |
+
return s.toLowerCase();
|
14159 |
+
});
|
14160 |
+
|
14161 |
+
var parseBorderStyle = function parseBorderStyle(style) {
|
14162 |
+
switch (style) {
|
14163 |
+
case 'none':
|
14164 |
+
return BORDER_STYLE.NONE;
|
14165 |
+
}
|
14166 |
+
return BORDER_STYLE.SOLID;
|
14167 |
+
};
|
14168 |
+
|
14169 |
+
var parseBorder = exports.parseBorder = function parseBorder(style) {
|
14170 |
+
return SIDES.map(function (side) {
|
14171 |
+
var borderColor = new _Color2.default(style.getPropertyValue('border-' + side + '-color'));
|
14172 |
+
var borderStyle = parseBorderStyle(style.getPropertyValue('border-' + side + '-style'));
|
14173 |
+
var borderWidth = parseFloat(style.getPropertyValue('border-' + side + '-width'));
|
14174 |
+
return {
|
14175 |
+
borderColor: borderColor,
|
14176 |
+
borderStyle: borderStyle,
|
14177 |
+
borderWidth: isNaN(borderWidth) ? 0 : borderWidth
|
14178 |
+
};
|
14179 |
+
});
|
14180 |
+
};
|
14181 |
+
|
14182 |
+
/***/ }),
|
14183 |
+
/* 13 */
|
14184 |
+
/***/ (function(module, exports, __webpack_require__) {
|
14185 |
+
|
14186 |
+
"use strict";
|
14187 |
+
|
14188 |
+
|
14189 |
+
Object.defineProperty(exports, "__esModule", {
|
14190 |
+
value: true
|
14191 |
+
});
|
14192 |
+
var toCodePoints = exports.toCodePoints = function toCodePoints(str) {
|
14193 |
+
var codePoints = [];
|
14194 |
+
var i = 0;
|
14195 |
+
var length = str.length;
|
14196 |
+
while (i < length) {
|
14197 |
+
var value = str.charCodeAt(i++);
|
14198 |
+
if (value >= 0xd800 && value <= 0xdbff && i < length) {
|
14199 |
+
var extra = str.charCodeAt(i++);
|
14200 |
+
if ((extra & 0xfc00) === 0xdc00) {
|
14201 |
+
codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);
|
14202 |
+
} else {
|
14203 |
+
codePoints.push(value);
|
14204 |
+
i--;
|
14205 |
+
}
|
14206 |
+
} else {
|
14207 |
+
codePoints.push(value);
|
14208 |
+
}
|
14209 |
+
}
|
14210 |
+
return codePoints;
|
14211 |
+
};
|
14212 |
+
|
14213 |
+
var fromCodePoint = exports.fromCodePoint = function fromCodePoint() {
|
14214 |
+
if (String.fromCodePoint) {
|
14215 |
+
return String.fromCodePoint.apply(String, arguments);
|
14216 |
+
}
|
14217 |
+
|
14218 |
+
var length = arguments.length;
|
14219 |
+
if (!length) {
|
14220 |
+
return '';
|
14221 |
+
}
|
14222 |
+
|
14223 |
+
var codeUnits = [];
|
14224 |
+
|
14225 |
+
var index = -1;
|
14226 |
+
var result = '';
|
14227 |
+
while (++index < length) {
|
14228 |
+
var codePoint = arguments.length <= index ? undefined : arguments[index];
|
14229 |
+
if (codePoint <= 0xffff) {
|
14230 |
+
codeUnits.push(codePoint);
|
14231 |
+
} else {
|
14232 |
+
codePoint -= 0x10000;
|
14233 |
+
codeUnits.push((codePoint >> 10) + 0xd800, codePoint % 0x400 + 0xdc00);
|
14234 |
+
}
|
14235 |
+
if (index + 1 === length || codeUnits.length > 0x4000) {
|
14236 |
+
result += String.fromCharCode.apply(String, codeUnits);
|
14237 |
+
codeUnits.length = 0;
|
14238 |
+
}
|
14239 |
+
}
|
14240 |
+
return result;
|
14241 |
+
};
|
14242 |
+
|
14243 |
+
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
14244 |
+
|
14245 |
+
// Use a lookup table to find the index.
|
14246 |
+
var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
|
14247 |
+
for (var i = 0; i < chars.length; i++) {
|
14248 |
+
lookup[chars.charCodeAt(i)] = i;
|
14249 |
+
}
|
14250 |
+
|
14251 |
+
var decode = exports.decode = function decode(base64) {
|
14252 |
+
var bufferLength = base64.length * 0.75,
|
14253 |
+
len = base64.length,
|
14254 |
+
i = void 0,
|
14255 |
+
p = 0,
|
14256 |
+
encoded1 = void 0,
|
14257 |
+
encoded2 = void 0,
|
14258 |
+
encoded3 = void 0,
|
14259 |
+
encoded4 = void 0;
|
14260 |
+
|
14261 |
+
if (base64[base64.length - 1] === '=') {
|
14262 |
+
bufferLength--;
|
14263 |
+
if (base64[base64.length - 2] === '=') {
|
14264 |
+
bufferLength--;
|
14265 |
+
}
|
14266 |
+
}
|
14267 |
+
|
14268 |
+
var buffer = typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint8Array.prototype.slice !== 'undefined' ? new ArrayBuffer(bufferLength) : new Array(bufferLength);
|
14269 |
+
var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
|
14270 |
+
|
14271 |
+
for (i = 0; i < len; i += 4) {
|
14272 |
+
encoded1 = lookup[base64.charCodeAt(i)];
|
14273 |
+
encoded2 = lookup[base64.charCodeAt(i + 1)];
|
14274 |
+
encoded3 = lookup[base64.charCodeAt(i + 2)];
|
14275 |
+
encoded4 = lookup[base64.charCodeAt(i + 3)];
|
14276 |
+
|
14277 |
+
bytes[p++] = encoded1 << 2 | encoded2 >> 4;
|
14278 |
+
bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
|
14279 |
+
bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
|
14280 |
+
}
|
14281 |
+
|
14282 |
+
return buffer;
|
14283 |
+
};
|
14284 |
+
|
14285 |
+
var polyUint16Array = exports.polyUint16Array = function polyUint16Array(buffer) {
|
14286 |
+
var length = buffer.length;
|
14287 |
+
var bytes = [];
|
14288 |
+
for (var _i = 0; _i < length; _i += 2) {
|
14289 |
+
bytes.push(buffer[_i + 1] << 8 | buffer[_i]);
|
14290 |
+
}
|
14291 |
+
return bytes;
|
14292 |
+
};
|
14293 |
+
|
14294 |
+
var polyUint32Array = exports.polyUint32Array = function polyUint32Array(buffer) {
|
14295 |
+
var length = buffer.length;
|
14296 |
+
var bytes = [];
|
14297 |
+
for (var _i2 = 0; _i2 < length; _i2 += 4) {
|
14298 |
+
bytes.push(buffer[_i2 + 3] << 24 | buffer[_i2 + 2] << 16 | buffer[_i2 + 1] << 8 | buffer[_i2]);
|
14299 |
+
}
|
14300 |
+
return bytes;
|
14301 |
+
};
|
14302 |
+
|
14303 |
+
/***/ }),
|
14304 |
+
/* 14 */
|
14305 |
+
/***/ (function(module, exports, __webpack_require__) {
|
14306 |
+
|
14307 |
+
"use strict";
|
14308 |
+
|
14309 |
+
|
14310 |
+
Object.defineProperty(exports, "__esModule", {
|
14311 |
+
value: true
|
14312 |
+
});
|
14313 |
+
exports.createCounterText = exports.inlineListItemElement = exports.getListOwner = undefined;
|
14314 |
+
|
14315 |
+
var _Util = __webpack_require__(4);
|
14316 |
+
|
14317 |
+
var _NodeContainer = __webpack_require__(3);
|
14318 |
+
|
14319 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
14320 |
+
|
14321 |
+
var _TextContainer = __webpack_require__(9);
|
14322 |
+
|
14323 |
+
var _TextContainer2 = _interopRequireDefault(_TextContainer);
|
14324 |
+
|
14325 |
+
var _listStyle = __webpack_require__(8);
|
14326 |
+
|
14327 |
+
var _Unicode = __webpack_require__(24);
|
14328 |
+
|
14329 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14330 |
+
|
14331 |
+
// Margin between the enumeration and the list item content
|
14332 |
+
var MARGIN_RIGHT = 7;
|
14333 |
+
|
14334 |
+
var ancestorTypes = ['OL', 'UL', 'MENU'];
|
14335 |
+
|
14336 |
+
var getListOwner = exports.getListOwner = function getListOwner(container) {
|
14337 |
+
var parent = container.parent;
|
14338 |
+
if (!parent) {
|
14339 |
+
return null;
|
14340 |
+
}
|
14341 |
+
|
14342 |
+
do {
|
14343 |
+
var isAncestor = ancestorTypes.indexOf(parent.tagName) !== -1;
|
14344 |
+
if (isAncestor) {
|
14345 |
+
return parent;
|
14346 |
+
}
|
14347 |
+
parent = parent.parent;
|
14348 |
+
} while (parent);
|
14349 |
+
|
14350 |
+
return container.parent;
|
14351 |
+
};
|
14352 |
+
|
14353 |
+
var inlineListItemElement = exports.inlineListItemElement = function inlineListItemElement(node, container, resourceLoader) {
|
14354 |
+
var listStyle = container.style.listStyle;
|
14355 |
+
|
14356 |
+
if (!listStyle) {
|
14357 |
+
return;
|
14358 |
+
}
|
14359 |
+
|
14360 |
+
var style = node.ownerDocument.defaultView.getComputedStyle(node, null);
|
14361 |
+
var wrapper = node.ownerDocument.createElement('html2canvaswrapper');
|
14362 |
+
(0, _Util.copyCSSStyles)(style, wrapper);
|
14363 |
+
|
14364 |
+
wrapper.style.position = 'absolute';
|
14365 |
+
wrapper.style.bottom = 'auto';
|
14366 |
+
wrapper.style.display = 'block';
|
14367 |
+
wrapper.style.letterSpacing = 'normal';
|
14368 |
+
|
14369 |
+
switch (listStyle.listStylePosition) {
|
14370 |
+
case _listStyle.LIST_STYLE_POSITION.OUTSIDE:
|
14371 |
+
wrapper.style.left = 'auto';
|
14372 |
+
wrapper.style.right = node.ownerDocument.defaultView.innerWidth - container.bounds.left - container.style.margin[1].getAbsoluteValue(container.bounds.width) + MARGIN_RIGHT + 'px';
|
14373 |
+
wrapper.style.textAlign = 'right';
|
14374 |
+
break;
|
14375 |
+
case _listStyle.LIST_STYLE_POSITION.INSIDE:
|
14376 |
+
wrapper.style.left = container.bounds.left - container.style.margin[3].getAbsoluteValue(container.bounds.width) + 'px';
|
14377 |
+
wrapper.style.right = 'auto';
|
14378 |
+
wrapper.style.textAlign = 'left';
|
14379 |
+
break;
|
14380 |
+
}
|
14381 |
+
|
14382 |
+
var text = void 0;
|
14383 |
+
var MARGIN_TOP = container.style.margin[0].getAbsoluteValue(container.bounds.width);
|
14384 |
+
var styleImage = listStyle.listStyleImage;
|
14385 |
+
if (styleImage) {
|
14386 |
+
if (styleImage.method === 'url') {
|
14387 |
+
var image = node.ownerDocument.createElement('img');
|
14388 |
+
image.src = styleImage.args[0];
|
14389 |
+
wrapper.style.top = container.bounds.top - MARGIN_TOP + 'px';
|
14390 |
+
wrapper.style.width = 'auto';
|
14391 |
+
wrapper.style.height = 'auto';
|
14392 |
+
wrapper.appendChild(image);
|
14393 |
+
} else {
|
14394 |
+
var size = parseFloat(container.style.font.fontSize) * 0.5;
|
14395 |
+
wrapper.style.top = container.bounds.top - MARGIN_TOP + container.bounds.height - 1.5 * size + 'px';
|
14396 |
+
wrapper.style.width = size + 'px';
|
14397 |
+
wrapper.style.height = size + 'px';
|
14398 |
+
wrapper.style.backgroundImage = style.listStyleImage;
|
14399 |
+
}
|
14400 |
+
} else if (typeof container.listIndex === 'number') {
|
14401 |
+
text = node.ownerDocument.createTextNode(createCounterText(container.listIndex, listStyle.listStyleType, true));
|
14402 |
+
wrapper.appendChild(text);
|
14403 |
+
wrapper.style.top = container.bounds.top - MARGIN_TOP + 'px';
|
14404 |
+
}
|
14405 |
+
|
14406 |
+
// $FlowFixMe
|
14407 |
+
var body = node.ownerDocument.body;
|
14408 |
+
body.appendChild(wrapper);
|
14409 |
+
|
14410 |
+
if (text) {
|
14411 |
+
container.childNodes.push(_TextContainer2.default.fromTextNode(text, container));
|
14412 |
+
body.removeChild(wrapper);
|
14413 |
+
} else {
|
14414 |
+
// $FlowFixMe
|
14415 |
+
container.childNodes.push(new _NodeContainer2.default(wrapper, container, resourceLoader, 0));
|
14416 |
+
}
|
14417 |
+
};
|
14418 |
+
|
14419 |
+
var ROMAN_UPPER = {
|
14420 |
+
integers: [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],
|
14421 |
+
values: ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']
|
14422 |
+
};
|
14423 |
+
|
14424 |
+
var ARMENIAN = {
|
14425 |
+
integers: [9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],
|
14426 |
+
values: ['Ք', 'Փ', 'Ւ', 'Ց', 'Ր', 'Տ', 'Վ', 'Ս', 'Ռ', 'Ջ', 'Պ', 'Չ', 'Ո', 'Շ', 'Ն', 'Յ', 'Մ', 'Ճ', 'Ղ', 'Ձ', 'Հ', 'Կ', 'Ծ', 'Խ', 'Լ', 'Ի', 'Ժ', 'Թ', 'Ը', 'Է', 'Զ', 'Ե', 'Դ', 'Գ', 'Բ', 'Ա']
|
14427 |
+
};
|
14428 |
+
|
14429 |
+
var HEBREW = {
|
14430 |
+
integers: [10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 19, 18, 17, 16, 15, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],
|
14431 |
+
values: ['י׳', 'ט׳', 'ח׳', 'ז׳', 'ו׳', 'ה׳', 'ד׳', 'ג׳', 'ב׳', 'א׳', 'ת', 'ש', 'ר', 'ק', 'צ', 'פ', 'ע', 'ס', 'נ', 'מ', 'ל', 'כ', 'יט', 'יח', 'יז', 'טז', 'טו', 'י', 'ט', 'ח', 'ז', 'ו', 'ה', 'ד', 'ג', 'ב', 'א']
|
14432 |
+
};
|
14433 |
+
|
14434 |
+
var GEORGIAN = {
|
14435 |
+
integers: [10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],
|
14436 |
+
values: ['ჵ', 'ჰ', 'ჯ', 'ჴ', 'ხ', 'ჭ', 'წ', 'ძ', 'ც', 'ჩ', 'შ', 'ყ', 'ღ', 'ქ', 'ფ', 'ჳ', 'ტ', 'ს', 'რ', 'ჟ', 'პ', 'ო', 'ჲ', 'ნ', 'მ', 'ლ', 'კ', 'ი', 'თ', 'ჱ', 'ზ', 'ვ', 'ე', 'დ', 'გ', 'ბ', 'ა']
|
14437 |
+
};
|
14438 |
+
|
14439 |
+
var createAdditiveCounter = function createAdditiveCounter(value, min, max, symbols, fallback, suffix) {
|
14440 |
+
if (value < min || value > max) {
|
14441 |
+
return createCounterText(value, fallback, suffix.length > 0);
|
14442 |
+
}
|
14443 |
+
|
14444 |
+
return symbols.integers.reduce(function (string, integer, index) {
|
14445 |
+
while (value >= integer) {
|
14446 |
+
value -= integer;
|
14447 |
+
string += symbols.values[index];
|
14448 |
+
}
|
14449 |
+
return string;
|
14450 |
+
}, '') + suffix;
|
14451 |
+
};
|
14452 |
+
|
14453 |
+
var createCounterStyleWithSymbolResolver = function createCounterStyleWithSymbolResolver(value, codePointRangeLength, isNumeric, resolver) {
|
14454 |
+
var string = '';
|
14455 |
+
|
14456 |
+
do {
|
14457 |
+
if (!isNumeric) {
|
14458 |
+
value--;
|
14459 |
+
}
|
14460 |
+
string = resolver(value) + string;
|
14461 |
+
value /= codePointRangeLength;
|
14462 |
+
} while (value * codePointRangeLength >= codePointRangeLength);
|
14463 |
+
|
14464 |
+
return string;
|
14465 |
+
};
|
14466 |
+
|
14467 |
+
var createCounterStyleFromRange = function createCounterStyleFromRange(value, codePointRangeStart, codePointRangeEnd, isNumeric, suffix) {
|
14468 |
+
var codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1;
|
14469 |
+
|
14470 |
+
return (value < 0 ? '-' : '') + (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, function (codePoint) {
|
14471 |
+
return (0, _Unicode.fromCodePoint)(Math.floor(codePoint % codePointRangeLength) + codePointRangeStart);
|
14472 |
+
}) + suffix);
|
14473 |
+
};
|
14474 |
+
|
14475 |
+
var createCounterStyleFromSymbols = function createCounterStyleFromSymbols(value, symbols) {
|
14476 |
+
var suffix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '. ';
|
14477 |
+
|
14478 |
+
var codePointRangeLength = symbols.length;
|
14479 |
+
return createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, false, function (codePoint) {
|
14480 |
+
return symbols[Math.floor(codePoint % codePointRangeLength)];
|
14481 |
+
}) + suffix;
|
14482 |
+
};
|
14483 |
+
|
14484 |
+
var CJK_ZEROS = 1 << 0;
|
14485 |
+
var CJK_TEN_COEFFICIENTS = 1 << 1;
|
14486 |
+
var CJK_TEN_HIGH_COEFFICIENTS = 1 << 2;
|
14487 |
+
var CJK_HUNDRED_COEFFICIENTS = 1 << 3;
|
14488 |
+
|
14489 |
+
var createCJKCounter = function createCJKCounter(value, numbers, multipliers, negativeSign, suffix, flags) {
|
14490 |
+
if (value < -9999 || value > 9999) {
|
14491 |
+
return createCounterText(value, _listStyle.LIST_STYLE_TYPE.CJK_DECIMAL, suffix.length > 0);
|
14492 |
+
}
|
14493 |
+
var tmp = Math.abs(value);
|
14494 |
+
var string = suffix;
|
14495 |
+
|
14496 |
+
if (tmp === 0) {
|
14497 |
+
return numbers[0] + string;
|
14498 |
+
}
|
14499 |
+
|
14500 |
+
for (var digit = 0; tmp > 0 && digit <= 4; digit++) {
|
14501 |
+
var coefficient = tmp % 10;
|
14502 |
+
|
14503 |
+
if (coefficient === 0 && (0, _Util.contains)(flags, CJK_ZEROS) && string !== '') {
|
14504 |
+
string = numbers[coefficient] + string;
|
14505 |
+
} else if (coefficient > 1 || coefficient === 1 && digit === 0 || coefficient === 1 && digit === 1 && (0, _Util.contains)(flags, CJK_TEN_COEFFICIENTS) || coefficient === 1 && digit === 1 && (0, _Util.contains)(flags, CJK_TEN_HIGH_COEFFICIENTS) && value > 100 || coefficient === 1 && digit > 1 && (0, _Util.contains)(flags, CJK_HUNDRED_COEFFICIENTS)) {
|
14506 |
+
string = numbers[coefficient] + (digit > 0 ? multipliers[digit - 1] : '') + string;
|
14507 |
+
} else if (coefficient === 1 && digit > 0) {
|
14508 |
+
string = multipliers[digit - 1] + string;
|
14509 |
+
}
|
14510 |
+
tmp = Math.floor(tmp / 10);
|
14511 |
+
}
|
14512 |
+
|
14513 |
+
return (value < 0 ? negativeSign : '') + string;
|
14514 |
+
};
|
14515 |
+
|
14516 |
+
var CHINESE_INFORMAL_MULTIPLIERS = '十百千萬';
|
14517 |
+
var CHINESE_FORMAL_MULTIPLIERS = '拾佰仟萬';
|
14518 |
+
var JAPANESE_NEGATIVE = 'マイナス';
|
14519 |
+
var KOREAN_NEGATIVE = '마이너스 ';
|
14520 |
+
|
14521 |
+
var createCounterText = exports.createCounterText = function createCounterText(value, type, appendSuffix) {
|
14522 |
+
var defaultSuffix = appendSuffix ? '. ' : '';
|
14523 |
+
var cjkSuffix = appendSuffix ? '、' : '';
|
14524 |
+
var koreanSuffix = appendSuffix ? ', ' : '';
|
14525 |
+
switch (type) {
|
14526 |
+
case _listStyle.LIST_STYLE_TYPE.DISC:
|
14527 |
+
return '•';
|
14528 |
+
case _listStyle.LIST_STYLE_TYPE.CIRCLE:
|
14529 |
+
return '◦';
|
14530 |
+
case _listStyle.LIST_STYLE_TYPE.SQUARE:
|
14531 |
+
return '◾';
|
14532 |
+
case _listStyle.LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO:
|
14533 |
+
var string = createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);
|
14534 |
+
return string.length < 4 ? '0' + string : string;
|
14535 |
+
case _listStyle.LIST_STYLE_TYPE.CJK_DECIMAL:
|
14536 |
+
return createCounterStyleFromSymbols(value, '〇一二三四五六七八九', cjkSuffix);
|
14537 |
+
case _listStyle.LIST_STYLE_TYPE.LOWER_ROMAN:
|
14538 |
+
return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix).toLowerCase();
|
14539 |
+
case _listStyle.LIST_STYLE_TYPE.UPPER_ROMAN:
|
14540 |
+
return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
|
14541 |
+
case _listStyle.LIST_STYLE_TYPE.LOWER_GREEK:
|
14542 |
+
return createCounterStyleFromRange(value, 945, 969, false, defaultSuffix);
|
14543 |
+
case _listStyle.LIST_STYLE_TYPE.LOWER_ALPHA:
|
14544 |
+
return createCounterStyleFromRange(value, 97, 122, false, defaultSuffix);
|
14545 |
+
case _listStyle.LIST_STYLE_TYPE.UPPER_ALPHA:
|
14546 |
+
return createCounterStyleFromRange(value, 65, 90, false, defaultSuffix);
|
14547 |
+
case _listStyle.LIST_STYLE_TYPE.ARABIC_INDIC:
|
14548 |
+
return createCounterStyleFromRange(value, 1632, 1641, true, defaultSuffix);
|
14549 |
+
case _listStyle.LIST_STYLE_TYPE.ARMENIAN:
|
14550 |
+
case _listStyle.LIST_STYLE_TYPE.UPPER_ARMENIAN:
|
14551 |
+
return createAdditiveCounter(value, 1, 9999, ARMENIAN, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
|
14552 |
+
case _listStyle.LIST_STYLE_TYPE.LOWER_ARMENIAN:
|
14553 |
+
return createAdditiveCounter(value, 1, 9999, ARMENIAN, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix).toLowerCase();
|
14554 |
+
case _listStyle.LIST_STYLE_TYPE.BENGALI:
|
14555 |
+
return createCounterStyleFromRange(value, 2534, 2543, true, defaultSuffix);
|
14556 |
+
case _listStyle.LIST_STYLE_TYPE.CAMBODIAN:
|
14557 |
+
case _listStyle.LIST_STYLE_TYPE.KHMER:
|
14558 |
+
return createCounterStyleFromRange(value, 6112, 6121, true, defaultSuffix);
|
14559 |
+
case _listStyle.LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH:
|
14560 |
+
return createCounterStyleFromSymbols(value, '子丑寅卯辰巳午未申酉戌亥', cjkSuffix);
|
14561 |
+
case _listStyle.LIST_STYLE_TYPE.CJK_HEAVENLY_STEM:
|
14562 |
+
return createCounterStyleFromSymbols(value, '甲乙丙丁戊己庚辛壬癸', cjkSuffix);
|
14563 |
+
case _listStyle.LIST_STYLE_TYPE.CJK_IDEOGRAPHIC:
|
14564 |
+
case _listStyle.LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL:
|
14565 |
+
return createCJKCounter(value, '零一二三四五六七八九', CHINESE_INFORMAL_MULTIPLIERS, '負', cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
|
14566 |
+
case _listStyle.LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL:
|
14567 |
+
return createCJKCounter(value, '零壹貳參肆伍陸柒捌玖', CHINESE_FORMAL_MULTIPLIERS, '負', cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
|
14568 |
+
case _listStyle.LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL:
|
14569 |
+
return createCJKCounter(value, '零一二三四五六七八九', CHINESE_INFORMAL_MULTIPLIERS, '负', cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
|
14570 |
+
case _listStyle.LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL:
|
14571 |
+
return createCJKCounter(value, '零壹贰叁肆伍陆柒捌玖', CHINESE_FORMAL_MULTIPLIERS, '负', cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
|
14572 |
+
case _listStyle.LIST_STYLE_TYPE.JAPANESE_INFORMAL:
|
14573 |
+
return createCJKCounter(value, '〇一二三四五六七八九', '十百千万', JAPANESE_NEGATIVE, cjkSuffix, 0);
|
14574 |
+
case _listStyle.LIST_STYLE_TYPE.JAPANESE_FORMAL:
|
14575 |
+
return createCJKCounter(value, '零壱弐参四伍六七八九', '拾百千万', JAPANESE_NEGATIVE, cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
|
14576 |
+
case _listStyle.LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL:
|
14577 |
+
return createCJKCounter(value, '영일이삼사오육칠팔구', '십백천만', KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
|
14578 |
+
case _listStyle.LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL:
|
14579 |
+
return createCJKCounter(value, '零一二三四五六七八九', '十百千萬', KOREAN_NEGATIVE, koreanSuffix, 0);
|
14580 |
+
case _listStyle.LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL:
|
14581 |
+
return createCJKCounter(value, '零壹貳參四五六七八九', '拾百千', KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
|
14582 |
+
case _listStyle.LIST_STYLE_TYPE.DEVANAGARI:
|
14583 |
+
return createCounterStyleFromRange(value, 0x966, 0x96f, true, defaultSuffix);
|
14584 |
+
case _listStyle.LIST_STYLE_TYPE.GEORGIAN:
|
14585 |
+
return createAdditiveCounter(value, 1, 19999, GEORGIAN, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
|
14586 |
+
case _listStyle.LIST_STYLE_TYPE.GUJARATI:
|
14587 |
+
return createCounterStyleFromRange(value, 0xae6, 0xaef, true, defaultSuffix);
|
14588 |
+
case _listStyle.LIST_STYLE_TYPE.GURMUKHI:
|
14589 |
+
return createCounterStyleFromRange(value, 0xa66, 0xa6f, true, defaultSuffix);
|
14590 |
+
case _listStyle.LIST_STYLE_TYPE.HEBREW:
|
14591 |
+
return createAdditiveCounter(value, 1, 10999, HEBREW, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
|
14592 |
+
case _listStyle.LIST_STYLE_TYPE.HIRAGANA:
|
14593 |
+
return createCounterStyleFromSymbols(value, 'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん');
|
14594 |
+
case _listStyle.LIST_STYLE_TYPE.HIRAGANA_IROHA:
|
14595 |
+
return createCounterStyleFromSymbols(value, 'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす');
|
14596 |
+
case _listStyle.LIST_STYLE_TYPE.KANNADA:
|
14597 |
+
return createCounterStyleFromRange(value, 0xce6, 0xcef, true, defaultSuffix);
|
14598 |
+
case _listStyle.LIST_STYLE_TYPE.KATAKANA:
|
14599 |
+
return createCounterStyleFromSymbols(value, 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン', cjkSuffix);
|
14600 |
+
case _listStyle.LIST_STYLE_TYPE.KATAKANA_IROHA:
|
14601 |
+
return createCounterStyleFromSymbols(value, 'イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス', cjkSuffix);
|
14602 |
+
case _listStyle.LIST_STYLE_TYPE.LAO:
|
14603 |
+
return createCounterStyleFromRange(value, 0xed0, 0xed9, true, defaultSuffix);
|
14604 |
+
case _listStyle.LIST_STYLE_TYPE.MONGOLIAN:
|
14605 |
+
return createCounterStyleFromRange(value, 0x1810, 0x1819, true, defaultSuffix);
|
14606 |
+
case _listStyle.LIST_STYLE_TYPE.MYANMAR:
|
14607 |
+
return createCounterStyleFromRange(value, 0x1040, 0x1049, true, defaultSuffix);
|
14608 |
+
case _listStyle.LIST_STYLE_TYPE.ORIYA:
|
14609 |
+
return createCounterStyleFromRange(value, 0xb66, 0xb6f, true, defaultSuffix);
|
14610 |
+
case _listStyle.LIST_STYLE_TYPE.PERSIAN:
|
14611 |
+
return createCounterStyleFromRange(value, 0x6f0, 0x6f9, true, defaultSuffix);
|
14612 |
+
case _listStyle.LIST_STYLE_TYPE.TAMIL:
|
14613 |
+
return createCounterStyleFromRange(value, 0xbe6, 0xbef, true, defaultSuffix);
|
14614 |
+
case _listStyle.LIST_STYLE_TYPE.TELUGU:
|
14615 |
+
return createCounterStyleFromRange(value, 0xc66, 0xc6f, true, defaultSuffix);
|
14616 |
+
case _listStyle.LIST_STYLE_TYPE.THAI:
|
14617 |
+
return createCounterStyleFromRange(value, 0xe50, 0xe59, true, defaultSuffix);
|
14618 |
+
case _listStyle.LIST_STYLE_TYPE.TIBETAN:
|
14619 |
+
return createCounterStyleFromRange(value, 0xf20, 0xf29, true, defaultSuffix);
|
14620 |
+
case _listStyle.LIST_STYLE_TYPE.DECIMAL:
|
14621 |
+
default:
|
14622 |
+
return createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);
|
14623 |
+
}
|
14624 |
+
};
|
14625 |
+
|
14626 |
+
/***/ }),
|
14627 |
+
/* 15 */
|
14628 |
+
/***/ (function(module, exports, __webpack_require__) {
|
14629 |
+
|
14630 |
+
"use strict";
|
14631 |
+
|
14632 |
+
|
14633 |
+
Object.defineProperty(exports, "__esModule", {
|
14634 |
+
value: true
|
14635 |
+
});
|
14636 |
+
|
14637 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
14638 |
+
|
14639 |
+
var _Path = __webpack_require__(6);
|
14640 |
+
|
14641 |
+
var _textDecoration = __webpack_require__(11);
|
14642 |
+
|
14643 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
14644 |
+
|
14645 |
+
var addColorStops = function addColorStops(gradient, canvasGradient) {
|
14646 |
+
var maxStop = Math.max.apply(null, gradient.colorStops.map(function (colorStop) {
|
14647 |
+
return colorStop.stop;
|
14648 |
+
}));
|
14649 |
+
var f = 1 / Math.max(1, maxStop);
|
14650 |
+
gradient.colorStops.forEach(function (colorStop) {
|
14651 |
+
canvasGradient.addColorStop(f * colorStop.stop, colorStop.color.toString());
|
14652 |
+
});
|
14653 |
+
};
|
14654 |
+
|
14655 |
+
var CanvasRenderer = function () {
|
14656 |
+
function CanvasRenderer(canvas) {
|
14657 |
+
_classCallCheck(this, CanvasRenderer);
|
14658 |
+
|
14659 |
+
this.canvas = canvas ? canvas : document.createElement('canvas');
|
14660 |
+
}
|
14661 |
+
|
14662 |
+
_createClass(CanvasRenderer, [{
|
14663 |
+
key: 'render',
|
14664 |
+
value: function render(options) {
|
14665 |
+
this.ctx = this.canvas.getContext('2d');
|
14666 |
+
this.options = options;
|
14667 |
+
this.canvas.width = Math.floor(options.width * options.scale);
|
14668 |
+
this.canvas.height = Math.floor(options.height * options.scale);
|
14669 |
+
this.canvas.style.width = options.width + 'px';
|
14670 |
+
this.canvas.style.height = options.height + 'px';
|
14671 |
+
|
14672 |
+
this.ctx.scale(this.options.scale, this.options.scale);
|
14673 |
+
this.ctx.translate(-options.x, -options.y);
|
14674 |
+
this.ctx.textBaseline = 'bottom';
|
14675 |
+
options.logger.log('Canvas renderer initialized (' + options.width + 'x' + options.height + ' at ' + options.x + ',' + options.y + ') with scale ' + this.options.scale);
|
14676 |
+
}
|
14677 |
+
}, {
|
14678 |
+
key: 'clip',
|
14679 |
+
value: function clip(clipPaths, callback) {
|
14680 |
+
var _this = this;
|
14681 |
+
|
14682 |
+
if (clipPaths.length) {
|
14683 |
+
this.ctx.save();
|
14684 |
+
clipPaths.forEach(function (path) {
|
14685 |
+
_this.path(path);
|
14686 |
+
_this.ctx.clip();
|
14687 |
+
});
|
14688 |
+
}
|
14689 |
+
|
14690 |
+
callback();
|
14691 |
+
|
14692 |
+
if (clipPaths.length) {
|
14693 |
+
this.ctx.restore();
|
14694 |
+
}
|
14695 |
+
}
|
14696 |
+
}, {
|
14697 |
+
key: 'drawImage',
|
14698 |
+
value: function drawImage(image, source, destination) {
|
14699 |
+
this.ctx.drawImage(image, source.left, source.top, source.width, source.height, destination.left, destination.top, destination.width, destination.height);
|
14700 |
+
}
|
14701 |
+
}, {
|
14702 |
+
key: 'drawShape',
|
14703 |
+
value: function drawShape(path, color) {
|
14704 |
+
this.path(path);
|
14705 |
+
this.ctx.fillStyle = color.toString();
|
14706 |
+
this.ctx.fill();
|
14707 |
+
}
|
14708 |
+
}, {
|
14709 |
+
key: 'fill',
|
14710 |
+
value: function fill(color) {
|
14711 |
+
this.ctx.fillStyle = color.toString();
|
14712 |
+
this.ctx.fill();
|
14713 |
+
}
|
14714 |
+
}, {
|
14715 |
+
key: 'getTarget',
|
14716 |
+
value: function getTarget() {
|
14717 |
+
return Promise.resolve(this.canvas);
|
14718 |
+
}
|
14719 |
+
}, {
|
14720 |
+
key: 'path',
|
14721 |
+
value: function path(_path) {
|
14722 |
+
var _this2 = this;
|
14723 |
+
|
14724 |
+
this.ctx.beginPath();
|
14725 |
+
if (Array.isArray(_path)) {
|
14726 |
+
_path.forEach(function (point, index) {
|
14727 |
+
var start = point.type === _Path.PATH.VECTOR ? point : point.start;
|
14728 |
+
if (index === 0) {
|
14729 |
+
_this2.ctx.moveTo(start.x, start.y);
|
14730 |
+
} else {
|
14731 |
+
_this2.ctx.lineTo(start.x, start.y);
|
14732 |
+
}
|
14733 |
+
|
14734 |
+
if (point.type === _Path.PATH.BEZIER_CURVE) {
|
14735 |
+
_this2.ctx.bezierCurveTo(point.startControl.x, point.startControl.y, point.endControl.x, point.endControl.y, point.end.x, point.end.y);
|
14736 |
+
}
|
14737 |
+
});
|
14738 |
+
} else {
|
14739 |
+
this.ctx.arc(_path.x + _path.radius, _path.y + _path.radius, _path.radius, 0, Math.PI * 2, true);
|
14740 |
+
}
|
14741 |
+
|
14742 |
+
this.ctx.closePath();
|
14743 |
+
}
|
14744 |
+
}, {
|
14745 |
+
key: 'rectangle',
|
14746 |
+
value: function rectangle(x, y, width, height, color) {
|
14747 |
+
this.ctx.fillStyle = color.toString();
|
14748 |
+
this.ctx.fillRect(x, y, width, height);
|
14749 |
+
}
|
14750 |
+
}, {
|
14751 |
+
key: 'renderLinearGradient',
|
14752 |
+
value: function renderLinearGradient(bounds, gradient) {
|
14753 |
+
var linearGradient = this.ctx.createLinearGradient(bounds.left + gradient.direction.x1, bounds.top + gradient.direction.y1, bounds.left + gradient.direction.x0, bounds.top + gradient.direction.y0);
|
14754 |
+
|
14755 |
+
addColorStops(gradient, linearGradient);
|
14756 |
+
this.ctx.fillStyle = linearGradient;
|
14757 |
+
this.ctx.fillRect(bounds.left, bounds.top, bounds.width, bounds.height);
|
14758 |
+
}
|
14759 |
+
}, {
|
14760 |
+
key: 'renderRadialGradient',
|
14761 |
+
value: function renderRadialGradient(bounds, gradient) {
|
14762 |
+
var _this3 = this;
|
14763 |
+
|
14764 |
+
var x = bounds.left + gradient.center.x;
|
14765 |
+
var y = bounds.top + gradient.center.y;
|
14766 |
+
|
14767 |
+
var radialGradient = this.ctx.createRadialGradient(x, y, 0, x, y, gradient.radius.x);
|
14768 |
+
if (!radialGradient) {
|
14769 |
+
return;
|
14770 |
+
}
|
14771 |
+
|
14772 |
+
addColorStops(gradient, radialGradient);
|
14773 |
+
this.ctx.fillStyle = radialGradient;
|
14774 |
+
|
14775 |
+
if (gradient.radius.x !== gradient.radius.y) {
|
14776 |
+
// transforms for elliptical radial gradient
|
14777 |
+
var midX = bounds.left + 0.5 * bounds.width;
|
14778 |
+
var midY = bounds.top + 0.5 * bounds.height;
|
14779 |
+
var f = gradient.radius.y / gradient.radius.x;
|
14780 |
+
var invF = 1 / f;
|
14781 |
+
|
14782 |
+
this.transform(midX, midY, [1, 0, 0, f, 0, 0], function () {
|
14783 |
+
return _this3.ctx.fillRect(bounds.left, invF * (bounds.top - midY) + midY, bounds.width, bounds.height * invF);
|
14784 |
+
});
|
14785 |
+
} else {
|
14786 |
+
this.ctx.fillRect(bounds.left, bounds.top, bounds.width, bounds.height);
|
14787 |
+
}
|
14788 |
+
}
|
14789 |
+
}, {
|
14790 |
+
key: 'renderRepeat',
|
14791 |
+
value: function renderRepeat(path, image, imageSize, offsetX, offsetY) {
|
14792 |
+
this.path(path);
|
14793 |
+
this.ctx.fillStyle = this.ctx.createPattern(this.resizeImage(image, imageSize), 'repeat');
|
14794 |
+
this.ctx.translate(offsetX, offsetY);
|
14795 |
+
this.ctx.fill();
|
14796 |
+
this.ctx.translate(-offsetX, -offsetY);
|
14797 |
+
}
|
14798 |
+
}, {
|
14799 |
+
key: 'renderTextNode',
|
14800 |
+
value: function renderTextNode(textBounds, color, font, textDecoration, textShadows) {
|
14801 |
+
var _this4 = this;
|
14802 |
+
|
14803 |
+
this.ctx.font = [font.fontStyle, font.fontVariant, font.fontWeight, font.fontSize, font.fontFamily].join(' ');
|
14804 |
+
|
14805 |
+
textBounds.forEach(function (text) {
|
14806 |
+
_this4.ctx.fillStyle = color.toString();
|
14807 |
+
if (textShadows && text.text.trim().length) {
|
14808 |
+
textShadows.slice(0).reverse().forEach(function (textShadow) {
|
14809 |
+
_this4.ctx.shadowColor = textShadow.color.toString();
|
14810 |
+
_this4.ctx.shadowOffsetX = textShadow.offsetX * _this4.options.scale;
|
14811 |
+
_this4.ctx.shadowOffsetY = textShadow.offsetY * _this4.options.scale;
|
14812 |
+
_this4.ctx.shadowBlur = textShadow.blur;
|
14813 |
+
|
14814 |
+
_this4.ctx.fillText(text.text, text.bounds.left, text.bounds.top + text.bounds.height);
|
14815 |
+
});
|
14816 |
+
} else {
|
14817 |
+
_this4.ctx.fillText(text.text, text.bounds.left, text.bounds.top + text.bounds.height);
|
14818 |
+
}
|
14819 |
+
|
14820 |
+
if (textDecoration !== null) {
|
14821 |
+
var textDecorationColor = textDecoration.textDecorationColor || color;
|
14822 |
+
textDecoration.textDecorationLine.forEach(function (textDecorationLine) {
|
14823 |
+
switch (textDecorationLine) {
|
14824 |
+
case _textDecoration.TEXT_DECORATION_LINE.UNDERLINE:
|
14825 |
+
// Draws a line at the baseline of the font
|
14826 |
+
// TODO As some browsers display the line as more than 1px if the font-size is big,
|
14827 |
+
// need to take that into account both in position and size
|
14828 |
+
var _options$fontMetrics$ = _this4.options.fontMetrics.getMetrics(font),
|
14829 |
+
baseline = _options$fontMetrics$.baseline;
|
14830 |
+
|
14831 |
+
_this4.rectangle(text.bounds.left, Math.round(text.bounds.top + baseline), text.bounds.width, 1, textDecorationColor);
|
14832 |
+
break;
|
14833 |
+
case _textDecoration.TEXT_DECORATION_LINE.OVERLINE:
|
14834 |
+
_this4.rectangle(text.bounds.left, Math.round(text.bounds.top), text.bounds.width, 1, textDecorationColor);
|
14835 |
+
break;
|
14836 |
+
case _textDecoration.TEXT_DECORATION_LINE.LINE_THROUGH:
|
14837 |
+
// TODO try and find exact position for line-through
|
14838 |
+
var _options$fontMetrics$2 = _this4.options.fontMetrics.getMetrics(font),
|
14839 |
+
middle = _options$fontMetrics$2.middle;
|
14840 |
+
|
14841 |
+
_this4.rectangle(text.bounds.left, Math.ceil(text.bounds.top + middle), text.bounds.width, 1, textDecorationColor);
|
14842 |
+
break;
|
14843 |
+
}
|
14844 |
+
});
|
14845 |
+
}
|
14846 |
+
});
|
14847 |
+
}
|
14848 |
+
}, {
|
14849 |
+
key: 'resizeImage',
|
14850 |
+
value: function resizeImage(image, size) {
|
14851 |
+
if (image.width === size.width && image.height === size.height) {
|
14852 |
+
return image;
|
14853 |
+
}
|
14854 |
+
|
14855 |
+
var canvas = this.canvas.ownerDocument.createElement('canvas');
|
14856 |
+
canvas.width = size.width;
|
14857 |
+
canvas.height = size.height;
|
14858 |
+
var ctx = canvas.getContext('2d');
|
14859 |
+
ctx.drawImage(image, 0, 0, image.width, image.height, 0, 0, size.width, size.height);
|
14860 |
+
return canvas;
|
14861 |
+
}
|
14862 |
+
}, {
|
14863 |
+
key: 'setOpacity',
|
14864 |
+
value: function setOpacity(opacity) {
|
14865 |
+
this.ctx.globalAlpha = opacity;
|
14866 |
+
}
|
14867 |
+
}, {
|
14868 |
+
key: 'transform',
|
14869 |
+
value: function transform(offsetX, offsetY, matrix, callback) {
|
14870 |
+
this.ctx.save();
|
14871 |
+
this.ctx.translate(offsetX, offsetY);
|
14872 |
+
this.ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
|
14873 |
+
this.ctx.translate(-offsetX, -offsetY);
|
14874 |
+
|
14875 |
+
callback();
|
14876 |
+
|
14877 |
+
this.ctx.restore();
|
14878 |
+
}
|
14879 |
+
}]);
|
14880 |
+
|
14881 |
+
return CanvasRenderer;
|
14882 |
+
}();
|
14883 |
+
|
14884 |
+
exports.default = CanvasRenderer;
|
14885 |
+
|
14886 |
+
/***/ }),
|
14887 |
+
/* 16 */
|
14888 |
+
/***/ (function(module, exports, __webpack_require__) {
|
14889 |
+
|
14890 |
+
"use strict";
|
14891 |
+
|
14892 |
+
|
14893 |
+
Object.defineProperty(exports, "__esModule", {
|
14894 |
+
value: true
|
14895 |
+
});
|
14896 |
+
|
14897 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
14898 |
+
|
14899 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
14900 |
+
|
14901 |
+
var Logger = function () {
|
14902 |
+
function Logger(enabled, id, start) {
|
14903 |
+
_classCallCheck(this, Logger);
|
14904 |
+
|
14905 |
+
this.enabled = typeof window !== 'undefined' && enabled;
|
14906 |
+
this.start = start ? start : Date.now();
|
14907 |
+
this.id = id;
|
14908 |
+
}
|
14909 |
+
|
14910 |
+
_createClass(Logger, [{
|
14911 |
+
key: 'child',
|
14912 |
+
value: function child(id) {
|
14913 |
+
return new Logger(this.enabled, id, this.start);
|
14914 |
+
}
|
14915 |
+
|
14916 |
+
// eslint-disable-next-line flowtype/no-weak-types
|
14917 |
+
|
14918 |
+
}, {
|
14919 |
+
key: 'log',
|
14920 |
+
value: function log() {
|
14921 |
+
if (this.enabled && window.console && window.console.log) {
|
14922 |
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
14923 |
+
args[_key] = arguments[_key];
|
14924 |
+
}
|
14925 |
+
|
14926 |
+
Function.prototype.bind.call(window.console.log, window.console).apply(window.console, [Date.now() - this.start + 'ms', this.id ? 'html2canvas (' + this.id + '):' : 'html2canvas:'].concat([].slice.call(args, 0)));
|
14927 |
+
}
|
14928 |
+
}
|
14929 |
+
|
14930 |
+
// eslint-disable-next-line flowtype/no-weak-types
|
14931 |
+
|
14932 |
+
}, {
|
14933 |
+
key: 'error',
|
14934 |
+
value: function error() {
|
14935 |
+
if (this.enabled && window.console && window.console.error) {
|
14936 |
+
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
14937 |
+
args[_key2] = arguments[_key2];
|
14938 |
+
}
|
14939 |
+
|
14940 |
+
Function.prototype.bind.call(window.console.error, window.console).apply(window.console, [Date.now() - this.start + 'ms', this.id ? 'html2canvas (' + this.id + '):' : 'html2canvas:'].concat([].slice.call(args, 0)));
|
14941 |
+
}
|
14942 |
+
}
|
14943 |
+
}]);
|
14944 |
+
|
14945 |
+
return Logger;
|
14946 |
+
}();
|
14947 |
+
|
14948 |
+
exports.default = Logger;
|
14949 |
+
|
14950 |
+
/***/ }),
|
14951 |
+
/* 17 */
|
14952 |
+
/***/ (function(module, exports, __webpack_require__) {
|
14953 |
+
|
14954 |
+
"use strict";
|
14955 |
+
|
14956 |
+
|
14957 |
+
Object.defineProperty(exports, "__esModule", {
|
14958 |
+
value: true
|
14959 |
+
});
|
14960 |
+
exports.parsePadding = exports.PADDING_SIDES = undefined;
|
14961 |
+
|
14962 |
+
var _Length = __webpack_require__(2);
|
14963 |
+
|
14964 |
+
var _Length2 = _interopRequireDefault(_Length);
|
14965 |
+
|
14966 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14967 |
+
|
14968 |
+
var PADDING_SIDES = exports.PADDING_SIDES = {
|
14969 |
+
TOP: 0,
|
14970 |
+
RIGHT: 1,
|
14971 |
+
BOTTOM: 2,
|
14972 |
+
LEFT: 3
|
14973 |
+
};
|
14974 |
+
|
14975 |
+
var SIDES = ['top', 'right', 'bottom', 'left'];
|
14976 |
+
|
14977 |
+
var parsePadding = exports.parsePadding = function parsePadding(style) {
|
14978 |
+
return SIDES.map(function (side) {
|
14979 |
+
return new _Length2.default(style.getPropertyValue('padding-' + side));
|
14980 |
+
});
|
14981 |
+
};
|
14982 |
+
|
14983 |
+
/***/ }),
|
14984 |
+
/* 18 */
|
14985 |
+
/***/ (function(module, exports, __webpack_require__) {
|
14986 |
+
|
14987 |
+
"use strict";
|
14988 |
+
|
14989 |
+
|
14990 |
+
Object.defineProperty(exports, "__esModule", {
|
14991 |
+
value: true
|
14992 |
+
});
|
14993 |
+
var OVERFLOW_WRAP = exports.OVERFLOW_WRAP = {
|
14994 |
+
NORMAL: 0,
|
14995 |
+
BREAK_WORD: 1
|
14996 |
+
};
|
14997 |
+
|
14998 |
+
var parseOverflowWrap = exports.parseOverflowWrap = function parseOverflowWrap(overflow) {
|
14999 |
+
switch (overflow) {
|
15000 |
+
case 'break-word':
|
15001 |
+
return OVERFLOW_WRAP.BREAK_WORD;
|
15002 |
+
case 'normal':
|
15003 |
+
default:
|
15004 |
+
return OVERFLOW_WRAP.NORMAL;
|
15005 |
+
}
|
15006 |
+
};
|
15007 |
+
|
15008 |
+
/***/ }),
|
15009 |
+
/* 19 */
|
15010 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15011 |
+
|
15012 |
+
"use strict";
|
15013 |
+
|
15014 |
+
|
15015 |
+
Object.defineProperty(exports, "__esModule", {
|
15016 |
+
value: true
|
15017 |
+
});
|
15018 |
+
var POSITION = exports.POSITION = {
|
15019 |
+
STATIC: 0,
|
15020 |
+
RELATIVE: 1,
|
15021 |
+
ABSOLUTE: 2,
|
15022 |
+
FIXED: 3,
|
15023 |
+
STICKY: 4
|
15024 |
+
};
|
15025 |
+
|
15026 |
+
var parsePosition = exports.parsePosition = function parsePosition(position) {
|
15027 |
+
switch (position) {
|
15028 |
+
case 'relative':
|
15029 |
+
return POSITION.RELATIVE;
|
15030 |
+
case 'absolute':
|
15031 |
+
return POSITION.ABSOLUTE;
|
15032 |
+
case 'fixed':
|
15033 |
+
return POSITION.FIXED;
|
15034 |
+
case 'sticky':
|
15035 |
+
return POSITION.STICKY;
|
15036 |
+
}
|
15037 |
+
|
15038 |
+
return POSITION.STATIC;
|
15039 |
+
};
|
15040 |
+
|
15041 |
+
/***/ }),
|
15042 |
+
/* 20 */
|
15043 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15044 |
+
|
15045 |
+
"use strict";
|
15046 |
+
|
15047 |
+
|
15048 |
+
Object.defineProperty(exports, "__esModule", {
|
15049 |
+
value: true
|
15050 |
+
});
|
15051 |
+
var TEXT_TRANSFORM = exports.TEXT_TRANSFORM = {
|
15052 |
+
NONE: 0,
|
15053 |
+
LOWERCASE: 1,
|
15054 |
+
UPPERCASE: 2,
|
15055 |
+
CAPITALIZE: 3
|
15056 |
+
};
|
15057 |
+
|
15058 |
+
var parseTextTransform = exports.parseTextTransform = function parseTextTransform(textTransform) {
|
15059 |
+
switch (textTransform) {
|
15060 |
+
case 'uppercase':
|
15061 |
+
return TEXT_TRANSFORM.UPPERCASE;
|
15062 |
+
case 'lowercase':
|
15063 |
+
return TEXT_TRANSFORM.LOWERCASE;
|
15064 |
+
case 'capitalize':
|
15065 |
+
return TEXT_TRANSFORM.CAPITALIZE;
|
15066 |
+
}
|
15067 |
+
|
15068 |
+
return TEXT_TRANSFORM.NONE;
|
15069 |
+
};
|
15070 |
+
|
15071 |
+
/***/ }),
|
15072 |
+
/* 21 */
|
15073 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15074 |
+
|
15075 |
+
"use strict";
|
15076 |
+
|
15077 |
+
|
15078 |
+
Object.defineProperty(exports, "__esModule", {
|
15079 |
+
value: true
|
15080 |
+
});
|
15081 |
+
exports.reformatInputBounds = exports.inlineSelectElement = exports.inlineTextAreaElement = exports.inlineInputElement = exports.getInputBorderRadius = exports.INPUT_BACKGROUND = exports.INPUT_BORDERS = exports.INPUT_COLOR = undefined;
|
15082 |
+
|
15083 |
+
var _TextContainer = __webpack_require__(9);
|
15084 |
+
|
15085 |
+
var _TextContainer2 = _interopRequireDefault(_TextContainer);
|
15086 |
+
|
15087 |
+
var _background = __webpack_require__(5);
|
15088 |
+
|
15089 |
+
var _border = __webpack_require__(12);
|
15090 |
+
|
15091 |
+
var _Circle = __webpack_require__(50);
|
15092 |
+
|
15093 |
+
var _Circle2 = _interopRequireDefault(_Circle);
|
15094 |
+
|
15095 |
+
var _Vector = __webpack_require__(7);
|
15096 |
+
|
15097 |
+
var _Vector2 = _interopRequireDefault(_Vector);
|
15098 |
+
|
15099 |
+
var _Color = __webpack_require__(0);
|
15100 |
+
|
15101 |
+
var _Color2 = _interopRequireDefault(_Color);
|
15102 |
+
|
15103 |
+
var _Length = __webpack_require__(2);
|
15104 |
+
|
15105 |
+
var _Length2 = _interopRequireDefault(_Length);
|
15106 |
+
|
15107 |
+
var _Bounds = __webpack_require__(1);
|
15108 |
+
|
15109 |
+
var _TextBounds = __webpack_require__(22);
|
15110 |
+
|
15111 |
+
var _Util = __webpack_require__(4);
|
15112 |
+
|
15113 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15114 |
+
|
15115 |
+
var INPUT_COLOR = exports.INPUT_COLOR = new _Color2.default([42, 42, 42]);
|
15116 |
+
var INPUT_BORDER_COLOR = new _Color2.default([165, 165, 165]);
|
15117 |
+
var INPUT_BACKGROUND_COLOR = new _Color2.default([222, 222, 222]);
|
15118 |
+
var INPUT_BORDER = {
|
15119 |
+
borderWidth: 1,
|
15120 |
+
borderColor: INPUT_BORDER_COLOR,
|
15121 |
+
borderStyle: _border.BORDER_STYLE.SOLID
|
15122 |
+
};
|
15123 |
+
var INPUT_BORDERS = exports.INPUT_BORDERS = [INPUT_BORDER, INPUT_BORDER, INPUT_BORDER, INPUT_BORDER];
|
15124 |
+
var INPUT_BACKGROUND = exports.INPUT_BACKGROUND = {
|
15125 |
+
backgroundColor: INPUT_BACKGROUND_COLOR,
|
15126 |
+
backgroundImage: [],
|
15127 |
+
backgroundClip: _background.BACKGROUND_CLIP.PADDING_BOX,
|
15128 |
+
backgroundOrigin: _background.BACKGROUND_ORIGIN.PADDING_BOX
|
15129 |
+
};
|
15130 |
+
|
15131 |
+
var RADIO_BORDER_RADIUS = new _Length2.default('50%');
|
15132 |
+
var RADIO_BORDER_RADIUS_TUPLE = [RADIO_BORDER_RADIUS, RADIO_BORDER_RADIUS];
|
15133 |
+
var INPUT_RADIO_BORDER_RADIUS = [RADIO_BORDER_RADIUS_TUPLE, RADIO_BORDER_RADIUS_TUPLE, RADIO_BORDER_RADIUS_TUPLE, RADIO_BORDER_RADIUS_TUPLE];
|
15134 |
+
|
15135 |
+
var CHECKBOX_BORDER_RADIUS = new _Length2.default('3px');
|
15136 |
+
var CHECKBOX_BORDER_RADIUS_TUPLE = [CHECKBOX_BORDER_RADIUS, CHECKBOX_BORDER_RADIUS];
|
15137 |
+
var INPUT_CHECKBOX_BORDER_RADIUS = [CHECKBOX_BORDER_RADIUS_TUPLE, CHECKBOX_BORDER_RADIUS_TUPLE, CHECKBOX_BORDER_RADIUS_TUPLE, CHECKBOX_BORDER_RADIUS_TUPLE];
|
15138 |
+
|
15139 |
+
var getInputBorderRadius = exports.getInputBorderRadius = function getInputBorderRadius(node) {
|
15140 |
+
return node.type === 'radio' ? INPUT_RADIO_BORDER_RADIUS : INPUT_CHECKBOX_BORDER_RADIUS;
|
15141 |
+
};
|
15142 |
+
|
15143 |
+
var inlineInputElement = exports.inlineInputElement = function inlineInputElement(node, container) {
|
15144 |
+
if (node.type === 'radio' || node.type === 'checkbox') {
|
15145 |
+
if (node.checked) {
|
15146 |
+
var size = Math.min(container.bounds.width, container.bounds.height);
|
15147 |
+
container.childNodes.push(node.type === 'checkbox' ? [new _Vector2.default(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79), new _Vector2.default(container.bounds.left + size * 0.16, container.bounds.top + size * 0.5549), new _Vector2.default(container.bounds.left + size * 0.27347, container.bounds.top + size * 0.44071), new _Vector2.default(container.bounds.left + size * 0.39694, container.bounds.top + size * 0.5649), new _Vector2.default(container.bounds.left + size * 0.72983, container.bounds.top + size * 0.23), new _Vector2.default(container.bounds.left + size * 0.84, container.bounds.top + size * 0.34085), new _Vector2.default(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79)] : new _Circle2.default(container.bounds.left + size / 4, container.bounds.top + size / 4, size / 4));
|
15148 |
+
}
|
15149 |
+
} else {
|
15150 |
+
inlineFormElement(getInputValue(node), node, container, false);
|
15151 |
+
}
|
15152 |
+
};
|
15153 |
+
|
15154 |
+
var inlineTextAreaElement = exports.inlineTextAreaElement = function inlineTextAreaElement(node, container) {
|
15155 |
+
inlineFormElement(node.value, node, container, true);
|
15156 |
+
};
|
15157 |
+
|
15158 |
+
var inlineSelectElement = exports.inlineSelectElement = function inlineSelectElement(node, container) {
|
15159 |
+
var option = node.options[node.selectedIndex || 0];
|
15160 |
+
inlineFormElement(option ? option.text || '' : '', node, container, false);
|
15161 |
+
};
|
15162 |
+
|
15163 |
+
var reformatInputBounds = exports.reformatInputBounds = function reformatInputBounds(bounds) {
|
15164 |
+
if (bounds.width > bounds.height) {
|
15165 |
+
bounds.left += (bounds.width - bounds.height) / 2;
|
15166 |
+
bounds.width = bounds.height;
|
15167 |
+
} else if (bounds.width < bounds.height) {
|
15168 |
+
bounds.top += (bounds.height - bounds.width) / 2;
|
15169 |
+
bounds.height = bounds.width;
|
15170 |
+
}
|
15171 |
+
return bounds;
|
15172 |
+
};
|
15173 |
+
|
15174 |
+
var inlineFormElement = function inlineFormElement(value, node, container, allowLinebreak) {
|
15175 |
+
var body = node.ownerDocument.body;
|
15176 |
+
if (value.length > 0 && body) {
|
15177 |
+
var wrapper = node.ownerDocument.createElement('html2canvaswrapper');
|
15178 |
+
(0, _Util.copyCSSStyles)(node.ownerDocument.defaultView.getComputedStyle(node, null), wrapper);
|
15179 |
+
wrapper.style.position = 'absolute';
|
15180 |
+
wrapper.style.left = container.bounds.left + 'px';
|
15181 |
+
wrapper.style.top = container.bounds.top + 'px';
|
15182 |
+
if (!allowLinebreak) {
|
15183 |
+
wrapper.style.whiteSpace = 'nowrap';
|
15184 |
+
}
|
15185 |
+
var text = node.ownerDocument.createTextNode(value);
|
15186 |
+
wrapper.appendChild(text);
|
15187 |
+
body.appendChild(wrapper);
|
15188 |
+
container.childNodes.push(_TextContainer2.default.fromTextNode(text, container));
|
15189 |
+
body.removeChild(wrapper);
|
15190 |
+
}
|
15191 |
+
};
|
15192 |
+
|
15193 |
+
var getInputValue = function getInputValue(node) {
|
15194 |
+
var value = node.type === 'password' ? new Array(node.value.length + 1).join('\u2022') : node.value;
|
15195 |
+
|
15196 |
+
return value.length === 0 ? node.placeholder || '' : value;
|
15197 |
+
};
|
15198 |
+
|
15199 |
+
/***/ }),
|
15200 |
+
/* 22 */
|
15201 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15202 |
+
|
15203 |
+
"use strict";
|
15204 |
+
|
15205 |
+
|
15206 |
+
Object.defineProperty(exports, "__esModule", {
|
15207 |
+
value: true
|
15208 |
+
});
|
15209 |
+
exports.parseTextBounds = exports.TextBounds = undefined;
|
15210 |
+
|
15211 |
+
var _Bounds = __webpack_require__(1);
|
15212 |
+
|
15213 |
+
var _textDecoration = __webpack_require__(11);
|
15214 |
+
|
15215 |
+
var _Feature = __webpack_require__(10);
|
15216 |
+
|
15217 |
+
var _Feature2 = _interopRequireDefault(_Feature);
|
15218 |
+
|
15219 |
+
var _Unicode = __webpack_require__(24);
|
15220 |
+
|
15221 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15222 |
+
|
15223 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
15224 |
+
|
15225 |
+
var TextBounds = exports.TextBounds = function TextBounds(text, bounds) {
|
15226 |
+
_classCallCheck(this, TextBounds);
|
15227 |
+
|
15228 |
+
this.text = text;
|
15229 |
+
this.bounds = bounds;
|
15230 |
+
};
|
15231 |
+
|
15232 |
+
var parseTextBounds = exports.parseTextBounds = function parseTextBounds(value, parent, node) {
|
15233 |
+
var letterRendering = parent.style.letterSpacing !== 0;
|
15234 |
+
var textList = letterRendering ? (0, _Unicode.toCodePoints)(value).map(function (i) {
|
15235 |
+
return (0, _Unicode.fromCodePoint)(i);
|
15236 |
+
}) : (0, _Unicode.breakWords)(value, parent);
|
15237 |
+
var length = textList.length;
|
15238 |
+
var defaultView = node.parentNode ? node.parentNode.ownerDocument.defaultView : null;
|
15239 |
+
var scrollX = defaultView ? defaultView.pageXOffset : 0;
|
15240 |
+
var scrollY = defaultView ? defaultView.pageYOffset : 0;
|
15241 |
+
var textBounds = [];
|
15242 |
+
var offset = 0;
|
15243 |
+
for (var i = 0; i < length; i++) {
|
15244 |
+
var text = textList[i];
|
15245 |
+
if (parent.style.textDecoration !== _textDecoration.TEXT_DECORATION.NONE || text.trim().length > 0) {
|
15246 |
+
if (_Feature2.default.SUPPORT_RANGE_BOUNDS) {
|
15247 |
+
textBounds.push(new TextBounds(text, getRangeBounds(node, offset, text.length, scrollX, scrollY)));
|
15248 |
+
} else {
|
15249 |
+
var replacementNode = node.splitText(text.length);
|
15250 |
+
textBounds.push(new TextBounds(text, getWrapperBounds(node, scrollX, scrollY)));
|
15251 |
+
node = replacementNode;
|
15252 |
+
}
|
15253 |
+
} else if (!_Feature2.default.SUPPORT_RANGE_BOUNDS) {
|
15254 |
+
node = node.splitText(text.length);
|
15255 |
+
}
|
15256 |
+
offset += text.length;
|
15257 |
+
}
|
15258 |
+
return textBounds;
|
15259 |
+
};
|
15260 |
+
|
15261 |
+
var getWrapperBounds = function getWrapperBounds(node, scrollX, scrollY) {
|
15262 |
+
var wrapper = node.ownerDocument.createElement('html2canvaswrapper');
|
15263 |
+
wrapper.appendChild(node.cloneNode(true));
|
15264 |
+
var parentNode = node.parentNode;
|
15265 |
+
if (parentNode) {
|
15266 |
+
parentNode.replaceChild(wrapper, node);
|
15267 |
+
var bounds = (0, _Bounds.parseBounds)(wrapper, scrollX, scrollY);
|
15268 |
+
if (wrapper.firstChild) {
|
15269 |
+
parentNode.replaceChild(wrapper.firstChild, wrapper);
|
15270 |
+
}
|
15271 |
+
return bounds;
|
15272 |
+
}
|
15273 |
+
return new _Bounds.Bounds(0, 0, 0, 0);
|
15274 |
+
};
|
15275 |
+
|
15276 |
+
var getRangeBounds = function getRangeBounds(node, offset, length, scrollX, scrollY) {
|
15277 |
+
var range = node.ownerDocument.createRange();
|
15278 |
+
range.setStart(node, offset);
|
15279 |
+
range.setEnd(node, offset + length);
|
15280 |
+
return _Bounds.Bounds.fromClientRect(range.getBoundingClientRect(), scrollX, scrollY);
|
15281 |
+
};
|
15282 |
+
|
15283 |
+
/***/ }),
|
15284 |
+
/* 23 */
|
15285 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15286 |
+
|
15287 |
+
"use strict";
|
15288 |
+
|
15289 |
+
|
15290 |
+
Object.defineProperty(exports, "__esModule", {
|
15291 |
+
value: true
|
15292 |
+
});
|
15293 |
+
|
15294 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
15295 |
+
|
15296 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
15297 |
+
|
15298 |
+
var ForeignObjectRenderer = function () {
|
15299 |
+
function ForeignObjectRenderer(element) {
|
15300 |
+
_classCallCheck(this, ForeignObjectRenderer);
|
15301 |
+
|
15302 |
+
this.element = element;
|
15303 |
+
}
|
15304 |
+
|
15305 |
+
_createClass(ForeignObjectRenderer, [{
|
15306 |
+
key: 'render',
|
15307 |
+
value: function render(options) {
|
15308 |
+
var _this = this;
|
15309 |
+
|
15310 |
+
this.options = options;
|
15311 |
+
this.canvas = document.createElement('canvas');
|
15312 |
+
this.ctx = this.canvas.getContext('2d');
|
15313 |
+
this.canvas.width = Math.floor(options.width) * options.scale;
|
15314 |
+
this.canvas.height = Math.floor(options.height) * options.scale;
|
15315 |
+
this.canvas.style.width = options.width + 'px';
|
15316 |
+
this.canvas.style.height = options.height + 'px';
|
15317 |
+
|
15318 |
+
options.logger.log('ForeignObject renderer initialized (' + options.width + 'x' + options.height + ' at ' + options.x + ',' + options.y + ') with scale ' + options.scale);
|
15319 |
+
var svg = createForeignObjectSVG(Math.max(options.windowWidth, options.width) * options.scale, Math.max(options.windowHeight, options.height) * options.scale, options.scrollX * options.scale, options.scrollY * options.scale, this.element);
|
15320 |
+
|
15321 |
+
return loadSerializedSVG(svg).then(function (img) {
|
15322 |
+
if (options.backgroundColor) {
|
15323 |
+
_this.ctx.fillStyle = options.backgroundColor.toString();
|
15324 |
+
_this.ctx.fillRect(0, 0, options.width * options.scale, options.height * options.scale);
|
15325 |
+
}
|
15326 |
+
|
15327 |
+
_this.ctx.drawImage(img, -options.x * options.scale, -options.y * options.scale);
|
15328 |
+
return _this.canvas;
|
15329 |
+
});
|
15330 |
+
}
|
15331 |
+
}]);
|
15332 |
+
|
15333 |
+
return ForeignObjectRenderer;
|
15334 |
+
}();
|
15335 |
+
|
15336 |
+
exports.default = ForeignObjectRenderer;
|
15337 |
+
var createForeignObjectSVG = exports.createForeignObjectSVG = function createForeignObjectSVG(width, height, x, y, node) {
|
15338 |
+
var xmlns = 'http://www.w3.org/2000/svg';
|
15339 |
+
var svg = document.createElementNS(xmlns, 'svg');
|
15340 |
+
var foreignObject = document.createElementNS(xmlns, 'foreignObject');
|
15341 |
+
svg.setAttributeNS(null, 'width', width);
|
15342 |
+
svg.setAttributeNS(null, 'height', height);
|
15343 |
+
|
15344 |
+
foreignObject.setAttributeNS(null, 'width', '100%');
|
15345 |
+
foreignObject.setAttributeNS(null, 'height', '100%');
|
15346 |
+
foreignObject.setAttributeNS(null, 'x', x);
|
15347 |
+
foreignObject.setAttributeNS(null, 'y', y);
|
15348 |
+
foreignObject.setAttributeNS(null, 'externalResourcesRequired', 'true');
|
15349 |
+
svg.appendChild(foreignObject);
|
15350 |
+
|
15351 |
+
foreignObject.appendChild(node);
|
15352 |
+
|
15353 |
+
return svg;
|
15354 |
+
};
|
15355 |
+
|
15356 |
+
var loadSerializedSVG = exports.loadSerializedSVG = function loadSerializedSVG(svg) {
|
15357 |
+
return new Promise(function (resolve, reject) {
|
15358 |
+
var img = new Image();
|
15359 |
+
img.onload = function () {
|
15360 |
+
return resolve(img);
|
15361 |
+
};
|
15362 |
+
img.onerror = reject;
|
15363 |
+
|
15364 |
+
img.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(new XMLSerializer().serializeToString(svg));
|
15365 |
+
});
|
15366 |
+
};
|
15367 |
+
|
15368 |
+
/***/ }),
|
15369 |
+
/* 24 */
|
15370 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15371 |
+
|
15372 |
+
"use strict";
|
15373 |
+
|
15374 |
+
|
15375 |
+
Object.defineProperty(exports, "__esModule", {
|
15376 |
+
value: true
|
15377 |
+
});
|
15378 |
+
exports.breakWords = exports.fromCodePoint = exports.toCodePoints = undefined;
|
15379 |
+
|
15380 |
+
var _cssLineBreak = __webpack_require__(46);
|
15381 |
+
|
15382 |
+
Object.defineProperty(exports, 'toCodePoints', {
|
15383 |
+
enumerable: true,
|
15384 |
+
get: function get() {
|
15385 |
+
return _cssLineBreak.toCodePoints;
|
15386 |
+
}
|
15387 |
+
});
|
15388 |
+
Object.defineProperty(exports, 'fromCodePoint', {
|
15389 |
+
enumerable: true,
|
15390 |
+
get: function get() {
|
15391 |
+
return _cssLineBreak.fromCodePoint;
|
15392 |
+
}
|
15393 |
+
});
|
15394 |
+
|
15395 |
+
var _NodeContainer = __webpack_require__(3);
|
15396 |
+
|
15397 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
15398 |
+
|
15399 |
+
var _overflowWrap = __webpack_require__(18);
|
15400 |
+
|
15401 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15402 |
+
|
15403 |
+
var breakWords = exports.breakWords = function breakWords(str, parent) {
|
15404 |
+
var breaker = (0, _cssLineBreak.LineBreaker)(str, {
|
15405 |
+
lineBreak: parent.style.lineBreak,
|
15406 |
+
wordBreak: parent.style.overflowWrap === _overflowWrap.OVERFLOW_WRAP.BREAK_WORD ? 'break-word' : parent.style.wordBreak
|
15407 |
+
});
|
15408 |
+
|
15409 |
+
var words = [];
|
15410 |
+
var bk = void 0;
|
15411 |
+
|
15412 |
+
while (!(bk = breaker.next()).done) {
|
15413 |
+
words.push(bk.value.slice());
|
15414 |
+
}
|
15415 |
+
|
15416 |
+
return words;
|
15417 |
+
};
|
15418 |
+
|
15419 |
+
/***/ }),
|
15420 |
+
/* 25 */
|
15421 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15422 |
+
|
15423 |
+
"use strict";
|
15424 |
+
|
15425 |
+
|
15426 |
+
Object.defineProperty(exports, "__esModule", {
|
15427 |
+
value: true
|
15428 |
+
});
|
15429 |
+
exports.FontMetrics = undefined;
|
15430 |
+
|
15431 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
15432 |
+
|
15433 |
+
var _Util = __webpack_require__(4);
|
15434 |
+
|
15435 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
15436 |
+
|
15437 |
+
var SAMPLE_TEXT = 'Hidden Text';
|
15438 |
+
|
15439 |
+
var FontMetrics = exports.FontMetrics = function () {
|
15440 |
+
function FontMetrics(document) {
|
15441 |
+
_classCallCheck(this, FontMetrics);
|
15442 |
+
|
15443 |
+
this._data = {};
|
15444 |
+
this._document = document;
|
15445 |
+
}
|
15446 |
+
|
15447 |
+
_createClass(FontMetrics, [{
|
15448 |
+
key: '_parseMetrics',
|
15449 |
+
value: function _parseMetrics(font) {
|
15450 |
+
var container = this._document.createElement('div');
|
15451 |
+
var img = this._document.createElement('img');
|
15452 |
+
var span = this._document.createElement('span');
|
15453 |
+
|
15454 |
+
var body = this._document.body;
|
15455 |
+
if (!body) {
|
15456 |
+
throw new Error( true ? 'No document found for font metrics' : '');
|
15457 |
+
}
|
15458 |
+
|
15459 |
+
container.style.visibility = 'hidden';
|
15460 |
+
container.style.fontFamily = font.fontFamily;
|
15461 |
+
container.style.fontSize = font.fontSize;
|
15462 |
+
container.style.margin = '0';
|
15463 |
+
container.style.padding = '0';
|
15464 |
+
|
15465 |
+
body.appendChild(container);
|
15466 |
+
|
15467 |
+
img.src = _Util.SMALL_IMAGE;
|
15468 |
+
img.width = 1;
|
15469 |
+
img.height = 1;
|
15470 |
+
|
15471 |
+
img.style.margin = '0';
|
15472 |
+
img.style.padding = '0';
|
15473 |
+
img.style.verticalAlign = 'baseline';
|
15474 |
+
|
15475 |
+
span.style.fontFamily = font.fontFamily;
|
15476 |
+
span.style.fontSize = font.fontSize;
|
15477 |
+
span.style.margin = '0';
|
15478 |
+
span.style.padding = '0';
|
15479 |
+
|
15480 |
+
span.appendChild(this._document.createTextNode(SAMPLE_TEXT));
|
15481 |
+
container.appendChild(span);
|
15482 |
+
container.appendChild(img);
|
15483 |
+
var baseline = img.offsetTop - span.offsetTop + 2;
|
15484 |
+
|
15485 |
+
container.removeChild(span);
|
15486 |
+
container.appendChild(this._document.createTextNode(SAMPLE_TEXT));
|
15487 |
+
|
15488 |
+
container.style.lineHeight = 'normal';
|
15489 |
+
img.style.verticalAlign = 'super';
|
15490 |
+
|
15491 |
+
var middle = img.offsetTop - container.offsetTop + 2;
|
15492 |
+
|
15493 |
+
body.removeChild(container);
|
15494 |
+
|
15495 |
+
return { baseline: baseline, middle: middle };
|
15496 |
+
}
|
15497 |
+
}, {
|
15498 |
+
key: 'getMetrics',
|
15499 |
+
value: function getMetrics(font) {
|
15500 |
+
var key = font.fontFamily + ' ' + font.fontSize;
|
15501 |
+
if (this._data[key] === undefined) {
|
15502 |
+
this._data[key] = this._parseMetrics(font);
|
15503 |
+
}
|
15504 |
+
|
15505 |
+
return this._data[key];
|
15506 |
+
}
|
15507 |
+
}]);
|
15508 |
+
|
15509 |
+
return FontMetrics;
|
15510 |
+
}();
|
15511 |
+
|
15512 |
+
/***/ }),
|
15513 |
+
/* 26 */
|
15514 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15515 |
+
|
15516 |
+
"use strict";
|
15517 |
+
|
15518 |
+
|
15519 |
+
Object.defineProperty(exports, "__esModule", {
|
15520 |
+
value: true
|
15521 |
+
});
|
15522 |
+
exports.Proxy = undefined;
|
15523 |
+
|
15524 |
+
var _Feature = __webpack_require__(10);
|
15525 |
+
|
15526 |
+
var _Feature2 = _interopRequireDefault(_Feature);
|
15527 |
+
|
15528 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15529 |
+
|
15530 |
+
var Proxy = exports.Proxy = function Proxy(src, options) {
|
15531 |
+
if (!options.proxy) {
|
15532 |
+
return Promise.reject( true ? 'No proxy defined' : null);
|
15533 |
+
}
|
15534 |
+
var proxy = options.proxy;
|
15535 |
+
|
15536 |
+
return new Promise(function (resolve, reject) {
|
15537 |
+
var responseType = _Feature2.default.SUPPORT_CORS_XHR && _Feature2.default.SUPPORT_RESPONSE_TYPE ? 'blob' : 'text';
|
15538 |
+
var xhr = _Feature2.default.SUPPORT_CORS_XHR ? new XMLHttpRequest() : new XDomainRequest();
|
15539 |
+
xhr.onload = function () {
|
15540 |
+
if (xhr instanceof XMLHttpRequest) {
|
15541 |
+
if (xhr.status === 200) {
|
15542 |
+
if (responseType === 'text') {
|
15543 |
+
resolve(xhr.response);
|
15544 |
+
} else {
|
15545 |
+
var reader = new FileReader();
|
15546 |
+
// $FlowFixMe
|
15547 |
+
reader.addEventListener('load', function () {
|
15548 |
+
return resolve(reader.result);
|
15549 |
+
}, false);
|
15550 |
+
// $FlowFixMe
|
15551 |
+
reader.addEventListener('error', function (e) {
|
15552 |
+
return reject(e);
|
15553 |
+
}, false);
|
15554 |
+
reader.readAsDataURL(xhr.response);
|
15555 |
+
}
|
15556 |
+
} else {
|
15557 |
+
reject( true ? 'Failed to proxy resource ' + src.substring(0, 256) + ' with status code ' + xhr.status : '');
|
15558 |
+
}
|
15559 |
+
} else {
|
15560 |
+
resolve(xhr.responseText);
|
15561 |
+
}
|
15562 |
+
};
|
15563 |
+
|
15564 |
+
xhr.onerror = reject;
|
15565 |
+
xhr.open('GET', proxy + '?url=' + encodeURIComponent(src) + '&responseType=' + responseType);
|
15566 |
+
|
15567 |
+
if (responseType !== 'text' && xhr instanceof XMLHttpRequest) {
|
15568 |
+
xhr.responseType = responseType;
|
15569 |
+
}
|
15570 |
+
|
15571 |
+
if (options.imageTimeout) {
|
15572 |
+
var timeout = options.imageTimeout;
|
15573 |
+
xhr.timeout = timeout;
|
15574 |
+
xhr.ontimeout = function () {
|
15575 |
+
return reject( true ? 'Timed out (' + timeout + 'ms) proxying ' + src.substring(0, 256) : '');
|
15576 |
+
};
|
15577 |
+
}
|
15578 |
+
|
15579 |
+
xhr.send();
|
15580 |
+
});
|
15581 |
+
};
|
15582 |
+
|
15583 |
+
/***/ }),
|
15584 |
+
/* 27 */
|
15585 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15586 |
+
|
15587 |
+
"use strict";
|
15588 |
+
|
15589 |
+
|
15590 |
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
15591 |
+
|
15592 |
+
var _CanvasRenderer = __webpack_require__(15);
|
15593 |
+
|
15594 |
+
var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer);
|
15595 |
+
|
15596 |
+
var _Logger = __webpack_require__(16);
|
15597 |
+
|
15598 |
+
var _Logger2 = _interopRequireDefault(_Logger);
|
15599 |
+
|
15600 |
+
var _Window = __webpack_require__(28);
|
15601 |
+
|
15602 |
+
var _Bounds = __webpack_require__(1);
|
15603 |
+
|
15604 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15605 |
+
|
15606 |
+
var html2canvas = function html2canvas(element, conf) {
|
15607 |
+
var config = conf || {};
|
15608 |
+
var logger = new _Logger2.default(typeof config.logging === 'boolean' ? config.logging : true);
|
15609 |
+
logger.log('html2canvas ' + "1.0.0-alpha.10");
|
15610 |
+
|
15611 |
+
if (true && typeof config.onrendered === 'function') {
|
15612 |
+
logger.error('onrendered option is deprecated, html2canvas returns a Promise with the canvas as the value');
|
15613 |
+
}
|
15614 |
+
|
15615 |
+
var ownerDocument = element.ownerDocument;
|
15616 |
+
if (!ownerDocument) {
|
15617 |
+
return Promise.reject('Provided element is not within a Document');
|
15618 |
+
}
|
15619 |
+
var defaultView = ownerDocument.defaultView;
|
15620 |
+
|
15621 |
+
var scrollX = defaultView.pageXOffset;
|
15622 |
+
var scrollY = defaultView.pageYOffset;
|
15623 |
+
|
15624 |
+
var isDocument = element.tagName === 'HTML' || element.tagName === 'BODY';
|
15625 |
+
|
15626 |
+
var _ref = isDocument ? (0, _Bounds.parseDocumentSize)(ownerDocument) : (0, _Bounds.parseBounds)(element, scrollX, scrollY),
|
15627 |
+
width = _ref.width,
|
15628 |
+
height = _ref.height,
|
15629 |
+
left = _ref.left,
|
15630 |
+
top = _ref.top;
|
15631 |
+
|
15632 |
+
var defaultOptions = {
|
15633 |
+
async: true,
|
15634 |
+
allowTaint: false,
|
15635 |
+
backgroundColor: '#ffffff',
|
15636 |
+
imageTimeout: 15000,
|
15637 |
+
logging: true,
|
15638 |
+
proxy: null,
|
15639 |
+
removeContainer: true,
|
15640 |
+
foreignObjectRendering: false,
|
15641 |
+
scale: defaultView.devicePixelRatio || 1,
|
15642 |
+
target: new _CanvasRenderer2.default(config.canvas),
|
15643 |
+
useCORS: false,
|
15644 |
+
x: left,
|
15645 |
+
y: top,
|
15646 |
+
width: Math.ceil(width),
|
15647 |
+
height: Math.ceil(height),
|
15648 |
+
windowWidth: defaultView.innerWidth,
|
15649 |
+
windowHeight: defaultView.innerHeight,
|
15650 |
+
scrollX: defaultView.pageXOffset,
|
15651 |
+
scrollY: defaultView.pageYOffset
|
15652 |
+
};
|
15653 |
+
|
15654 |
+
var result = (0, _Window.renderElement)(element, _extends({}, defaultOptions, config), logger);
|
15655 |
+
|
15656 |
+
if (true) {
|
15657 |
+
return result.catch(function (e) {
|
15658 |
+
logger.error(e);
|
15659 |
+
throw e;
|
15660 |
+
});
|
15661 |
+
}
|
15662 |
+
return result;
|
15663 |
+
};
|
15664 |
+
|
15665 |
+
html2canvas.CanvasRenderer = _CanvasRenderer2.default;
|
15666 |
+
|
15667 |
+
module.exports = html2canvas;
|
15668 |
+
|
15669 |
+
/***/ }),
|
15670 |
+
/* 28 */
|
15671 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15672 |
+
|
15673 |
+
"use strict";
|
15674 |
+
|
15675 |
+
|
15676 |
+
Object.defineProperty(exports, "__esModule", {
|
15677 |
+
value: true
|
15678 |
+
});
|
15679 |
+
exports.renderElement = undefined;
|
15680 |
+
|
15681 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
15682 |
+
|
15683 |
+
var _Logger = __webpack_require__(16);
|
15684 |
+
|
15685 |
+
var _Logger2 = _interopRequireDefault(_Logger);
|
15686 |
+
|
15687 |
+
var _NodeParser = __webpack_require__(29);
|
15688 |
+
|
15689 |
+
var _Renderer = __webpack_require__(51);
|
15690 |
+
|
15691 |
+
var _Renderer2 = _interopRequireDefault(_Renderer);
|
15692 |
+
|
15693 |
+
var _ForeignObjectRenderer = __webpack_require__(23);
|
15694 |
+
|
15695 |
+
var _ForeignObjectRenderer2 = _interopRequireDefault(_ForeignObjectRenderer);
|
15696 |
+
|
15697 |
+
var _Feature = __webpack_require__(10);
|
15698 |
+
|
15699 |
+
var _Feature2 = _interopRequireDefault(_Feature);
|
15700 |
+
|
15701 |
+
var _Bounds = __webpack_require__(1);
|
15702 |
+
|
15703 |
+
var _Clone = __webpack_require__(54);
|
15704 |
+
|
15705 |
+
var _Font = __webpack_require__(25);
|
15706 |
+
|
15707 |
+
var _Color = __webpack_require__(0);
|
15708 |
+
|
15709 |
+
var _Color2 = _interopRequireDefault(_Color);
|
15710 |
+
|
15711 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15712 |
+
|
15713 |
+
var renderElement = exports.renderElement = function renderElement(element, options, logger) {
|
15714 |
+
var ownerDocument = element.ownerDocument;
|
15715 |
+
|
15716 |
+
var windowBounds = new _Bounds.Bounds(options.scrollX, options.scrollY, options.windowWidth, options.windowHeight);
|
15717 |
+
|
15718 |
+
// http://www.w3.org/TR/css3-background/#special-backgrounds
|
15719 |
+
var documentBackgroundColor = ownerDocument.documentElement ? new _Color2.default(getComputedStyle(ownerDocument.documentElement).backgroundColor) : _Color.TRANSPARENT;
|
15720 |
+
var bodyBackgroundColor = ownerDocument.body ? new _Color2.default(getComputedStyle(ownerDocument.body).backgroundColor) : _Color.TRANSPARENT;
|
15721 |
+
|
15722 |
+
var backgroundColor = element === ownerDocument.documentElement ? documentBackgroundColor.isTransparent() ? bodyBackgroundColor.isTransparent() ? options.backgroundColor ? new _Color2.default(options.backgroundColor) : null : bodyBackgroundColor : documentBackgroundColor : options.backgroundColor ? new _Color2.default(options.backgroundColor) : null;
|
15723 |
+
|
15724 |
+
return (options.foreignObjectRendering ? // $FlowFixMe
|
15725 |
+
_Feature2.default.SUPPORT_FOREIGNOBJECT_DRAWING : Promise.resolve(false)).then(function (supportForeignObject) {
|
15726 |
+
return supportForeignObject ? function (cloner) {
|
15727 |
+
if (true) {
|
15728 |
+
logger.log('Document cloned, using foreignObject rendering');
|
15729 |
+
}
|
15730 |
+
|
15731 |
+
return cloner.inlineFonts(ownerDocument).then(function () {
|
15732 |
+
return cloner.resourceLoader.ready();
|
15733 |
+
}).then(function () {
|
15734 |
+
var renderer = new _ForeignObjectRenderer2.default(cloner.documentElement);
|
15735 |
+
return renderer.render({
|
15736 |
+
backgroundColor: backgroundColor,
|
15737 |
+
logger: logger,
|
15738 |
+
scale: options.scale,
|
15739 |
+
x: options.x,
|
15740 |
+
y: options.y,
|
15741 |
+
width: options.width,
|
15742 |
+
height: options.height,
|
15743 |
+
windowWidth: options.windowWidth,
|
15744 |
+
windowHeight: options.windowHeight,
|
15745 |
+
scrollX: options.scrollX,
|
15746 |
+
scrollY: options.scrollY
|
15747 |
+
});
|
15748 |
+
});
|
15749 |
+
}(new _Clone.DocumentCloner(element, options, logger, true, renderElement)) : (0, _Clone.cloneWindow)(ownerDocument, windowBounds, element, options, logger, renderElement).then(function (_ref) {
|
15750 |
+
var _ref2 = _slicedToArray(_ref, 3),
|
15751 |
+
container = _ref2[0],
|
15752 |
+
clonedElement = _ref2[1],
|
15753 |
+
resourceLoader = _ref2[2];
|
15754 |
+
|
15755 |
+
if (true) {
|
15756 |
+
logger.log('Document cloned, using computed rendering');
|
15757 |
+
}
|
15758 |
+
|
15759 |
+
var stack = (0, _NodeParser.NodeParser)(clonedElement, resourceLoader, logger);
|
15760 |
+
var clonedDocument = clonedElement.ownerDocument;
|
15761 |
+
|
15762 |
+
if (backgroundColor === stack.container.style.background.backgroundColor) {
|
15763 |
+
stack.container.style.background.backgroundColor = _Color.TRANSPARENT;
|
15764 |
+
}
|
15765 |
+
|
15766 |
+
return resourceLoader.ready().then(function (imageStore) {
|
15767 |
+
var fontMetrics = new _Font.FontMetrics(clonedDocument);
|
15768 |
+
if (true) {
|
15769 |
+
logger.log('Starting renderer');
|
15770 |
+
}
|
15771 |
+
|
15772 |
+
var renderOptions = {
|
15773 |
+
backgroundColor: backgroundColor,
|
15774 |
+
fontMetrics: fontMetrics,
|
15775 |
+
imageStore: imageStore,
|
15776 |
+
logger: logger,
|
15777 |
+
scale: options.scale,
|
15778 |
+
x: options.x,
|
15779 |
+
y: options.y,
|
15780 |
+
width: options.width,
|
15781 |
+
height: options.height
|
15782 |
+
};
|
15783 |
+
|
15784 |
+
if (Array.isArray(options.target)) {
|
15785 |
+
return Promise.all(options.target.map(function (target) {
|
15786 |
+
var renderer = new _Renderer2.default(target, renderOptions);
|
15787 |
+
return renderer.render(stack);
|
15788 |
+
}));
|
15789 |
+
} else {
|
15790 |
+
var renderer = new _Renderer2.default(options.target, renderOptions);
|
15791 |
+
var canvas = renderer.render(stack);
|
15792 |
+
if (options.removeContainer === true) {
|
15793 |
+
if (container.parentNode) {
|
15794 |
+
container.parentNode.removeChild(container);
|
15795 |
+
} else if (true) {
|
15796 |
+
logger.log('Cannot detach cloned iframe as it is not in the DOM anymore');
|
15797 |
+
}
|
15798 |
+
}
|
15799 |
+
|
15800 |
+
return canvas;
|
15801 |
+
}
|
15802 |
+
});
|
15803 |
+
});
|
15804 |
+
});
|
15805 |
+
};
|
15806 |
+
|
15807 |
+
/***/ }),
|
15808 |
+
/* 29 */
|
15809 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15810 |
+
|
15811 |
+
"use strict";
|
15812 |
+
|
15813 |
+
|
15814 |
+
Object.defineProperty(exports, "__esModule", {
|
15815 |
+
value: true
|
15816 |
+
});
|
15817 |
+
exports.NodeParser = undefined;
|
15818 |
+
|
15819 |
+
var _StackingContext = __webpack_require__(30);
|
15820 |
+
|
15821 |
+
var _StackingContext2 = _interopRequireDefault(_StackingContext);
|
15822 |
+
|
15823 |
+
var _NodeContainer = __webpack_require__(3);
|
15824 |
+
|
15825 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
15826 |
+
|
15827 |
+
var _TextContainer = __webpack_require__(9);
|
15828 |
+
|
15829 |
+
var _TextContainer2 = _interopRequireDefault(_TextContainer);
|
15830 |
+
|
15831 |
+
var _Input = __webpack_require__(21);
|
15832 |
+
|
15833 |
+
var _ListItem = __webpack_require__(14);
|
15834 |
+
|
15835 |
+
var _listStyle = __webpack_require__(8);
|
15836 |
+
|
15837 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15838 |
+
|
15839 |
+
var NodeParser = exports.NodeParser = function NodeParser(node, resourceLoader, logger) {
|
15840 |
+
if (true) {
|
15841 |
+
logger.log('Starting node parsing');
|
15842 |
+
}
|
15843 |
+
|
15844 |
+
var index = 0;
|
15845 |
+
|
15846 |
+
var container = new _NodeContainer2.default(node, null, resourceLoader, index++);
|
15847 |
+
var stack = new _StackingContext2.default(container, null, true);
|
15848 |
+
|
15849 |
+
parseNodeTree(node, container, stack, resourceLoader, index);
|
15850 |
+
|
15851 |
+
if (true) {
|
15852 |
+
logger.log('Finished parsing node tree');
|
15853 |
+
}
|
15854 |
+
|
15855 |
+
return stack;
|
15856 |
+
};
|
15857 |
+
|
15858 |
+
var IGNORED_NODE_NAMES = ['SCRIPT', 'HEAD', 'TITLE', 'OBJECT', 'BR', 'OPTION'];
|
15859 |
+
|
15860 |
+
var parseNodeTree = function parseNodeTree(node, parent, stack, resourceLoader, index) {
|
15861 |
+
if (true && index > 50000) {
|
15862 |
+
throw new Error('Recursion error while parsing node tree');
|
15863 |
+
}
|
15864 |
+
|
15865 |
+
for (var childNode = node.firstChild, nextNode; childNode; childNode = nextNode) {
|
15866 |
+
nextNode = childNode.nextSibling;
|
15867 |
+
var defaultView = childNode.ownerDocument.defaultView;
|
15868 |
+
if (childNode instanceof defaultView.Text || childNode instanceof Text || defaultView.parent && childNode instanceof defaultView.parent.Text) {
|
15869 |
+
if (childNode.data.trim().length > 0) {
|
15870 |
+
parent.childNodes.push(_TextContainer2.default.fromTextNode(childNode, parent));
|
15871 |
+
}
|
15872 |
+
} else if (childNode instanceof defaultView.HTMLElement || childNode instanceof HTMLElement || defaultView.parent && childNode instanceof defaultView.parent.HTMLElement) {
|
15873 |
+
if (IGNORED_NODE_NAMES.indexOf(childNode.nodeName) === -1) {
|
15874 |
+
var container = new _NodeContainer2.default(childNode, parent, resourceLoader, index++);
|
15875 |
+
if (container.isVisible()) {
|
15876 |
+
if (childNode.tagName === 'INPUT') {
|
15877 |
+
// $FlowFixMe
|
15878 |
+
(0, _Input.inlineInputElement)(childNode, container);
|
15879 |
+
} else if (childNode.tagName === 'TEXTAREA') {
|
15880 |
+
// $FlowFixMe
|
15881 |
+
(0, _Input.inlineTextAreaElement)(childNode, container);
|
15882 |
+
} else if (childNode.tagName === 'SELECT') {
|
15883 |
+
// $FlowFixMe
|
15884 |
+
(0, _Input.inlineSelectElement)(childNode, container);
|
15885 |
+
} else if (container.style.listStyle && container.style.listStyle.listStyleType !== _listStyle.LIST_STYLE_TYPE.NONE) {
|
15886 |
+
(0, _ListItem.inlineListItemElement)(childNode, container, resourceLoader);
|
15887 |
+
}
|
15888 |
+
|
15889 |
+
var SHOULD_TRAVERSE_CHILDREN = childNode.tagName !== 'TEXTAREA';
|
15890 |
+
var treatAsRealStackingContext = createsRealStackingContext(container, childNode);
|
15891 |
+
if (treatAsRealStackingContext || createsStackingContext(container)) {
|
15892 |
+
// for treatAsRealStackingContext:false, any positioned descendants and descendants
|
15893 |
+
// which actually create a new stacking context should be considered part of the parent stacking context
|
15894 |
+
var parentStack = treatAsRealStackingContext || container.isPositioned() ? stack.getRealParentStackingContext() : stack;
|
15895 |
+
var childStack = new _StackingContext2.default(container, parentStack, treatAsRealStackingContext);
|
15896 |
+
parentStack.contexts.push(childStack);
|
15897 |
+
if (SHOULD_TRAVERSE_CHILDREN) {
|
15898 |
+
parseNodeTree(childNode, container, childStack, resourceLoader, index);
|
15899 |
+
}
|
15900 |
+
} else {
|
15901 |
+
stack.children.push(container);
|
15902 |
+
if (SHOULD_TRAVERSE_CHILDREN) {
|
15903 |
+
parseNodeTree(childNode, container, stack, resourceLoader, index);
|
15904 |
+
}
|
15905 |
+
}
|
15906 |
+
}
|
15907 |
+
}
|
15908 |
+
} else if (childNode instanceof defaultView.SVGSVGElement || childNode instanceof SVGSVGElement || defaultView.parent && childNode instanceof defaultView.parent.SVGSVGElement) {
|
15909 |
+
var _container = new _NodeContainer2.default(childNode, parent, resourceLoader, index++);
|
15910 |
+
var _treatAsRealStackingContext = createsRealStackingContext(_container, childNode);
|
15911 |
+
if (_treatAsRealStackingContext || createsStackingContext(_container)) {
|
15912 |
+
// for treatAsRealStackingContext:false, any positioned descendants and descendants
|
15913 |
+
// which actually create a new stacking context should be considered part of the parent stacking context
|
15914 |
+
var _parentStack = _treatAsRealStackingContext || _container.isPositioned() ? stack.getRealParentStackingContext() : stack;
|
15915 |
+
var _childStack = new _StackingContext2.default(_container, _parentStack, _treatAsRealStackingContext);
|
15916 |
+
_parentStack.contexts.push(_childStack);
|
15917 |
+
} else {
|
15918 |
+
stack.children.push(_container);
|
15919 |
+
}
|
15920 |
+
}
|
15921 |
+
}
|
15922 |
+
};
|
15923 |
+
|
15924 |
+
var createsRealStackingContext = function createsRealStackingContext(container, node) {
|
15925 |
+
return container.isRootElement() || container.isPositionedWithZIndex() || container.style.opacity < 1 || container.isTransformed() || isBodyWithTransparentRoot(container, node);
|
15926 |
+
};
|
15927 |
+
|
15928 |
+
var createsStackingContext = function createsStackingContext(container) {
|
15929 |
+
return container.isPositioned() || container.isFloating();
|
15930 |
+
};
|
15931 |
+
|
15932 |
+
var isBodyWithTransparentRoot = function isBodyWithTransparentRoot(container, node) {
|
15933 |
+
return node.nodeName === 'BODY' && container.parent instanceof _NodeContainer2.default && container.parent.style.background.backgroundColor.isTransparent();
|
15934 |
+
};
|
15935 |
+
|
15936 |
+
/***/ }),
|
15937 |
+
/* 30 */
|
15938 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15939 |
+
|
15940 |
+
"use strict";
|
15941 |
+
|
15942 |
+
|
15943 |
+
Object.defineProperty(exports, "__esModule", {
|
15944 |
+
value: true
|
15945 |
+
});
|
15946 |
+
|
15947 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
15948 |
+
|
15949 |
+
var _NodeContainer = __webpack_require__(3);
|
15950 |
+
|
15951 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
15952 |
+
|
15953 |
+
var _position = __webpack_require__(19);
|
15954 |
+
|
15955 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
15956 |
+
|
15957 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
15958 |
+
|
15959 |
+
var StackingContext = function () {
|
15960 |
+
function StackingContext(container, parent, treatAsRealStackingContext) {
|
15961 |
+
_classCallCheck(this, StackingContext);
|
15962 |
+
|
15963 |
+
this.container = container;
|
15964 |
+
this.parent = parent;
|
15965 |
+
this.contexts = [];
|
15966 |
+
this.children = [];
|
15967 |
+
this.treatAsRealStackingContext = treatAsRealStackingContext;
|
15968 |
+
}
|
15969 |
+
|
15970 |
+
_createClass(StackingContext, [{
|
15971 |
+
key: 'getOpacity',
|
15972 |
+
value: function getOpacity() {
|
15973 |
+
return this.parent ? this.container.style.opacity * this.parent.getOpacity() : this.container.style.opacity;
|
15974 |
+
}
|
15975 |
+
}, {
|
15976 |
+
key: 'getRealParentStackingContext',
|
15977 |
+
value: function getRealParentStackingContext() {
|
15978 |
+
return !this.parent || this.treatAsRealStackingContext ? this : this.parent.getRealParentStackingContext();
|
15979 |
+
}
|
15980 |
+
}]);
|
15981 |
+
|
15982 |
+
return StackingContext;
|
15983 |
+
}();
|
15984 |
+
|
15985 |
+
exports.default = StackingContext;
|
15986 |
+
|
15987 |
+
/***/ }),
|
15988 |
+
/* 31 */
|
15989 |
+
/***/ (function(module, exports, __webpack_require__) {
|
15990 |
+
|
15991 |
+
"use strict";
|
15992 |
+
|
15993 |
+
|
15994 |
+
Object.defineProperty(exports, "__esModule", {
|
15995 |
+
value: true
|
15996 |
+
});
|
15997 |
+
|
15998 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
15999 |
+
|
16000 |
+
var Size = function Size(width, height) {
|
16001 |
+
_classCallCheck(this, Size);
|
16002 |
+
|
16003 |
+
this.width = width;
|
16004 |
+
this.height = height;
|
16005 |
+
};
|
16006 |
+
|
16007 |
+
exports.default = Size;
|
16008 |
+
|
16009 |
+
/***/ }),
|
16010 |
+
/* 32 */
|
16011 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16012 |
+
|
16013 |
+
"use strict";
|
16014 |
+
|
16015 |
+
|
16016 |
+
Object.defineProperty(exports, "__esModule", {
|
16017 |
+
value: true
|
16018 |
+
});
|
16019 |
+
|
16020 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
16021 |
+
|
16022 |
+
var _Path = __webpack_require__(6);
|
16023 |
+
|
16024 |
+
var _Vector = __webpack_require__(7);
|
16025 |
+
|
16026 |
+
var _Vector2 = _interopRequireDefault(_Vector);
|
16027 |
+
|
16028 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16029 |
+
|
16030 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
16031 |
+
|
16032 |
+
var lerp = function lerp(a, b, t) {
|
16033 |
+
return new _Vector2.default(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t);
|
16034 |
+
};
|
16035 |
+
|
16036 |
+
var BezierCurve = function () {
|
16037 |
+
function BezierCurve(start, startControl, endControl, end) {
|
16038 |
+
_classCallCheck(this, BezierCurve);
|
16039 |
+
|
16040 |
+
this.type = _Path.PATH.BEZIER_CURVE;
|
16041 |
+
this.start = start;
|
16042 |
+
this.startControl = startControl;
|
16043 |
+
this.endControl = endControl;
|
16044 |
+
this.end = end;
|
16045 |
+
}
|
16046 |
+
|
16047 |
+
_createClass(BezierCurve, [{
|
16048 |
+
key: 'subdivide',
|
16049 |
+
value: function subdivide(t, firstHalf) {
|
16050 |
+
var ab = lerp(this.start, this.startControl, t);
|
16051 |
+
var bc = lerp(this.startControl, this.endControl, t);
|
16052 |
+
var cd = lerp(this.endControl, this.end, t);
|
16053 |
+
var abbc = lerp(ab, bc, t);
|
16054 |
+
var bccd = lerp(bc, cd, t);
|
16055 |
+
var dest = lerp(abbc, bccd, t);
|
16056 |
+
return firstHalf ? new BezierCurve(this.start, ab, abbc, dest) : new BezierCurve(dest, bccd, cd, this.end);
|
16057 |
+
}
|
16058 |
+
}, {
|
16059 |
+
key: 'reverse',
|
16060 |
+
value: function reverse() {
|
16061 |
+
return new BezierCurve(this.end, this.endControl, this.startControl, this.start);
|
16062 |
+
}
|
16063 |
+
}]);
|
16064 |
+
|
16065 |
+
return BezierCurve;
|
16066 |
+
}();
|
16067 |
+
|
16068 |
+
exports.default = BezierCurve;
|
16069 |
+
|
16070 |
+
/***/ }),
|
16071 |
+
/* 33 */
|
16072 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16073 |
+
|
16074 |
+
"use strict";
|
16075 |
+
|
16076 |
+
|
16077 |
+
Object.defineProperty(exports, "__esModule", {
|
16078 |
+
value: true
|
16079 |
+
});
|
16080 |
+
exports.parseBorderRadius = undefined;
|
16081 |
+
|
16082 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
16083 |
+
|
16084 |
+
var _Length = __webpack_require__(2);
|
16085 |
+
|
16086 |
+
var _Length2 = _interopRequireDefault(_Length);
|
16087 |
+
|
16088 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16089 |
+
|
16090 |
+
var SIDES = ['top-left', 'top-right', 'bottom-right', 'bottom-left'];
|
16091 |
+
|
16092 |
+
var parseBorderRadius = exports.parseBorderRadius = function parseBorderRadius(style) {
|
16093 |
+
return SIDES.map(function (side) {
|
16094 |
+
var value = style.getPropertyValue('border-' + side + '-radius');
|
16095 |
+
|
16096 |
+
var _value$split$map = value.split(' ').map(_Length2.default.create),
|
16097 |
+
_value$split$map2 = _slicedToArray(_value$split$map, 2),
|
16098 |
+
horizontal = _value$split$map2[0],
|
16099 |
+
vertical = _value$split$map2[1];
|
16100 |
+
|
16101 |
+
return typeof vertical === 'undefined' ? [horizontal, horizontal] : [horizontal, vertical];
|
16102 |
+
});
|
16103 |
+
};
|
16104 |
+
|
16105 |
+
/***/ }),
|
16106 |
+
/* 34 */
|
16107 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16108 |
+
|
16109 |
+
"use strict";
|
16110 |
+
|
16111 |
+
|
16112 |
+
Object.defineProperty(exports, "__esModule", {
|
16113 |
+
value: true
|
16114 |
+
});
|
16115 |
+
var DISPLAY = exports.DISPLAY = {
|
16116 |
+
NONE: 1 << 0,
|
16117 |
+
BLOCK: 1 << 1,
|
16118 |
+
INLINE: 1 << 2,
|
16119 |
+
RUN_IN: 1 << 3,
|
16120 |
+
FLOW: 1 << 4,
|
16121 |
+
FLOW_ROOT: 1 << 5,
|
16122 |
+
TABLE: 1 << 6,
|
16123 |
+
FLEX: 1 << 7,
|
16124 |
+
GRID: 1 << 8,
|
16125 |
+
RUBY: 1 << 9,
|
16126 |
+
SUBGRID: 1 << 10,
|
16127 |
+
LIST_ITEM: 1 << 11,
|
16128 |
+
TABLE_ROW_GROUP: 1 << 12,
|
16129 |
+
TABLE_HEADER_GROUP: 1 << 13,
|
16130 |
+
TABLE_FOOTER_GROUP: 1 << 14,
|
16131 |
+
TABLE_ROW: 1 << 15,
|
16132 |
+
TABLE_CELL: 1 << 16,
|
16133 |
+
TABLE_COLUMN_GROUP: 1 << 17,
|
16134 |
+
TABLE_COLUMN: 1 << 18,
|
16135 |
+
TABLE_CAPTION: 1 << 19,
|
16136 |
+
RUBY_BASE: 1 << 20,
|
16137 |
+
RUBY_TEXT: 1 << 21,
|
16138 |
+
RUBY_BASE_CONTAINER: 1 << 22,
|
16139 |
+
RUBY_TEXT_CONTAINER: 1 << 23,
|
16140 |
+
CONTENTS: 1 << 24,
|
16141 |
+
INLINE_BLOCK: 1 << 25,
|
16142 |
+
INLINE_LIST_ITEM: 1 << 26,
|
16143 |
+
INLINE_TABLE: 1 << 27,
|
16144 |
+
INLINE_FLEX: 1 << 28,
|
16145 |
+
INLINE_GRID: 1 << 29
|
16146 |
+
};
|
16147 |
+
|
16148 |
+
var parseDisplayValue = function parseDisplayValue(display) {
|
16149 |
+
switch (display) {
|
16150 |
+
case 'block':
|
16151 |
+
return DISPLAY.BLOCK;
|
16152 |
+
case 'inline':
|
16153 |
+
return DISPLAY.INLINE;
|
16154 |
+
case 'run-in':
|
16155 |
+
return DISPLAY.RUN_IN;
|
16156 |
+
case 'flow':
|
16157 |
+
return DISPLAY.FLOW;
|
16158 |
+
case 'flow-root':
|
16159 |
+
return DISPLAY.FLOW_ROOT;
|
16160 |
+
case 'table':
|
16161 |
+
return DISPLAY.TABLE;
|
16162 |
+
case 'flex':
|
16163 |
+
return DISPLAY.FLEX;
|
16164 |
+
case 'grid':
|
16165 |
+
return DISPLAY.GRID;
|
16166 |
+
case 'ruby':
|
16167 |
+
return DISPLAY.RUBY;
|
16168 |
+
case 'subgrid':
|
16169 |
+
return DISPLAY.SUBGRID;
|
16170 |
+
case 'list-item':
|
16171 |
+
return DISPLAY.LIST_ITEM;
|
16172 |
+
case 'table-row-group':
|
16173 |
+
return DISPLAY.TABLE_ROW_GROUP;
|
16174 |
+
case 'table-header-group':
|
16175 |
+
return DISPLAY.TABLE_HEADER_GROUP;
|
16176 |
+
case 'table-footer-group':
|
16177 |
+
return DISPLAY.TABLE_FOOTER_GROUP;
|
16178 |
+
case 'table-row':
|
16179 |
+
return DISPLAY.TABLE_ROW;
|
16180 |
+
case 'table-cell':
|
16181 |
+
return DISPLAY.TABLE_CELL;
|
16182 |
+
case 'table-column-group':
|
16183 |
+
return DISPLAY.TABLE_COLUMN_GROUP;
|
16184 |
+
case 'table-column':
|
16185 |
+
return DISPLAY.TABLE_COLUMN;
|
16186 |
+
case 'table-caption':
|
16187 |
+
return DISPLAY.TABLE_CAPTION;
|
16188 |
+
case 'ruby-base':
|
16189 |
+
return DISPLAY.RUBY_BASE;
|
16190 |
+
case 'ruby-text':
|
16191 |
+
return DISPLAY.RUBY_TEXT;
|
16192 |
+
case 'ruby-base-container':
|
16193 |
+
return DISPLAY.RUBY_BASE_CONTAINER;
|
16194 |
+
case 'ruby-text-container':
|
16195 |
+
return DISPLAY.RUBY_TEXT_CONTAINER;
|
16196 |
+
case 'contents':
|
16197 |
+
return DISPLAY.CONTENTS;
|
16198 |
+
case 'inline-block':
|
16199 |
+
return DISPLAY.INLINE_BLOCK;
|
16200 |
+
case 'inline-list-item':
|
16201 |
+
return DISPLAY.INLINE_LIST_ITEM;
|
16202 |
+
case 'inline-table':
|
16203 |
+
return DISPLAY.INLINE_TABLE;
|
16204 |
+
case 'inline-flex':
|
16205 |
+
return DISPLAY.INLINE_FLEX;
|
16206 |
+
case 'inline-grid':
|
16207 |
+
return DISPLAY.INLINE_GRID;
|
16208 |
+
}
|
16209 |
+
|
16210 |
+
return DISPLAY.NONE;
|
16211 |
+
};
|
16212 |
+
|
16213 |
+
var setDisplayBit = function setDisplayBit(bit, display) {
|
16214 |
+
return bit | parseDisplayValue(display);
|
16215 |
+
};
|
16216 |
+
|
16217 |
+
var parseDisplay = exports.parseDisplay = function parseDisplay(display) {
|
16218 |
+
return display.split(' ').reduce(setDisplayBit, 0);
|
16219 |
+
};
|
16220 |
+
|
16221 |
+
/***/ }),
|
16222 |
+
/* 35 */
|
16223 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16224 |
+
|
16225 |
+
"use strict";
|
16226 |
+
|
16227 |
+
|
16228 |
+
Object.defineProperty(exports, "__esModule", {
|
16229 |
+
value: true
|
16230 |
+
});
|
16231 |
+
var FLOAT = exports.FLOAT = {
|
16232 |
+
NONE: 0,
|
16233 |
+
LEFT: 1,
|
16234 |
+
RIGHT: 2,
|
16235 |
+
INLINE_START: 3,
|
16236 |
+
INLINE_END: 4
|
16237 |
+
};
|
16238 |
+
|
16239 |
+
var parseCSSFloat = exports.parseCSSFloat = function parseCSSFloat(float) {
|
16240 |
+
switch (float) {
|
16241 |
+
case 'left':
|
16242 |
+
return FLOAT.LEFT;
|
16243 |
+
case 'right':
|
16244 |
+
return FLOAT.RIGHT;
|
16245 |
+
case 'inline-start':
|
16246 |
+
return FLOAT.INLINE_START;
|
16247 |
+
case 'inline-end':
|
16248 |
+
return FLOAT.INLINE_END;
|
16249 |
+
}
|
16250 |
+
return FLOAT.NONE;
|
16251 |
+
};
|
16252 |
+
|
16253 |
+
/***/ }),
|
16254 |
+
/* 36 */
|
16255 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16256 |
+
|
16257 |
+
"use strict";
|
16258 |
+
|
16259 |
+
|
16260 |
+
Object.defineProperty(exports, "__esModule", {
|
16261 |
+
value: true
|
16262 |
+
});
|
16263 |
+
|
16264 |
+
|
16265 |
+
var parseFontWeight = function parseFontWeight(weight) {
|
16266 |
+
switch (weight) {
|
16267 |
+
case 'normal':
|
16268 |
+
return 400;
|
16269 |
+
case 'bold':
|
16270 |
+
return 700;
|
16271 |
+
}
|
16272 |
+
|
16273 |
+
var value = parseInt(weight, 10);
|
16274 |
+
return isNaN(value) ? 400 : value;
|
16275 |
+
};
|
16276 |
+
|
16277 |
+
var parseFont = exports.parseFont = function parseFont(style) {
|
16278 |
+
var fontFamily = style.fontFamily;
|
16279 |
+
var fontSize = style.fontSize;
|
16280 |
+
var fontStyle = style.fontStyle;
|
16281 |
+
var fontVariant = style.fontVariant;
|
16282 |
+
var fontWeight = parseFontWeight(style.fontWeight);
|
16283 |
+
|
16284 |
+
return {
|
16285 |
+
fontFamily: fontFamily,
|
16286 |
+
fontSize: fontSize,
|
16287 |
+
fontStyle: fontStyle,
|
16288 |
+
fontVariant: fontVariant,
|
16289 |
+
fontWeight: fontWeight
|
16290 |
+
};
|
16291 |
+
};
|
16292 |
+
|
16293 |
+
/***/ }),
|
16294 |
+
/* 37 */
|
16295 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16296 |
+
|
16297 |
+
"use strict";
|
16298 |
+
|
16299 |
+
|
16300 |
+
Object.defineProperty(exports, "__esModule", {
|
16301 |
+
value: true
|
16302 |
+
});
|
16303 |
+
var parseLetterSpacing = exports.parseLetterSpacing = function parseLetterSpacing(letterSpacing) {
|
16304 |
+
if (letterSpacing === 'normal') {
|
16305 |
+
return 0;
|
16306 |
+
}
|
16307 |
+
var value = parseFloat(letterSpacing);
|
16308 |
+
return isNaN(value) ? 0 : value;
|
16309 |
+
};
|
16310 |
+
|
16311 |
+
/***/ }),
|
16312 |
+
/* 38 */
|
16313 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16314 |
+
|
16315 |
+
"use strict";
|
16316 |
+
|
16317 |
+
|
16318 |
+
Object.defineProperty(exports, "__esModule", {
|
16319 |
+
value: true
|
16320 |
+
});
|
16321 |
+
var LINE_BREAK = exports.LINE_BREAK = {
|
16322 |
+
NORMAL: 'normal',
|
16323 |
+
STRICT: 'strict'
|
16324 |
+
};
|
16325 |
+
|
16326 |
+
var parseLineBreak = exports.parseLineBreak = function parseLineBreak(wordBreak) {
|
16327 |
+
switch (wordBreak) {
|
16328 |
+
case 'strict':
|
16329 |
+
return LINE_BREAK.STRICT;
|
16330 |
+
case 'normal':
|
16331 |
+
default:
|
16332 |
+
return LINE_BREAK.NORMAL;
|
16333 |
+
}
|
16334 |
+
};
|
16335 |
+
|
16336 |
+
/***/ }),
|
16337 |
+
/* 39 */
|
16338 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16339 |
+
|
16340 |
+
"use strict";
|
16341 |
+
|
16342 |
+
|
16343 |
+
Object.defineProperty(exports, "__esModule", {
|
16344 |
+
value: true
|
16345 |
+
});
|
16346 |
+
exports.parseMargin = undefined;
|
16347 |
+
|
16348 |
+
var _Length = __webpack_require__(2);
|
16349 |
+
|
16350 |
+
var _Length2 = _interopRequireDefault(_Length);
|
16351 |
+
|
16352 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16353 |
+
|
16354 |
+
var SIDES = ['top', 'right', 'bottom', 'left'];
|
16355 |
+
|
16356 |
+
var parseMargin = exports.parseMargin = function parseMargin(style) {
|
16357 |
+
return SIDES.map(function (side) {
|
16358 |
+
return new _Length2.default(style.getPropertyValue('margin-' + side));
|
16359 |
+
});
|
16360 |
+
};
|
16361 |
+
|
16362 |
+
/***/ }),
|
16363 |
+
/* 40 */
|
16364 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16365 |
+
|
16366 |
+
"use strict";
|
16367 |
+
|
16368 |
+
|
16369 |
+
Object.defineProperty(exports, "__esModule", {
|
16370 |
+
value: true
|
16371 |
+
});
|
16372 |
+
var OVERFLOW = exports.OVERFLOW = {
|
16373 |
+
VISIBLE: 0,
|
16374 |
+
HIDDEN: 1,
|
16375 |
+
SCROLL: 2,
|
16376 |
+
AUTO: 3
|
16377 |
+
};
|
16378 |
+
|
16379 |
+
var parseOverflow = exports.parseOverflow = function parseOverflow(overflow) {
|
16380 |
+
switch (overflow) {
|
16381 |
+
case 'hidden':
|
16382 |
+
return OVERFLOW.HIDDEN;
|
16383 |
+
case 'scroll':
|
16384 |
+
return OVERFLOW.SCROLL;
|
16385 |
+
case 'auto':
|
16386 |
+
return OVERFLOW.AUTO;
|
16387 |
+
case 'visible':
|
16388 |
+
default:
|
16389 |
+
return OVERFLOW.VISIBLE;
|
16390 |
+
}
|
16391 |
+
};
|
16392 |
+
|
16393 |
+
/***/ }),
|
16394 |
+
/* 41 */
|
16395 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16396 |
+
|
16397 |
+
"use strict";
|
16398 |
+
|
16399 |
+
|
16400 |
+
Object.defineProperty(exports, "__esModule", {
|
16401 |
+
value: true
|
16402 |
+
});
|
16403 |
+
exports.parseTextShadow = undefined;
|
16404 |
+
|
16405 |
+
var _Color = __webpack_require__(0);
|
16406 |
+
|
16407 |
+
var _Color2 = _interopRequireDefault(_Color);
|
16408 |
+
|
16409 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16410 |
+
|
16411 |
+
var NUMBER = /^([+-]|\d|\.)$/i;
|
16412 |
+
|
16413 |
+
var parseTextShadow = exports.parseTextShadow = function parseTextShadow(textShadow) {
|
16414 |
+
if (textShadow === 'none' || typeof textShadow !== 'string') {
|
16415 |
+
return null;
|
16416 |
+
}
|
16417 |
+
|
16418 |
+
var currentValue = '';
|
16419 |
+
var isLength = false;
|
16420 |
+
var values = [];
|
16421 |
+
var shadows = [];
|
16422 |
+
var numParens = 0;
|
16423 |
+
var color = null;
|
16424 |
+
|
16425 |
+
var appendValue = function appendValue() {
|
16426 |
+
if (currentValue.length) {
|
16427 |
+
if (isLength) {
|
16428 |
+
values.push(parseFloat(currentValue));
|
16429 |
+
} else {
|
16430 |
+
color = new _Color2.default(currentValue);
|
16431 |
+
}
|
16432 |
+
}
|
16433 |
+
isLength = false;
|
16434 |
+
currentValue = '';
|
16435 |
+
};
|
16436 |
+
|
16437 |
+
var appendShadow = function appendShadow() {
|
16438 |
+
if (values.length && color !== null) {
|
16439 |
+
shadows.push({
|
16440 |
+
color: color,
|
16441 |
+
offsetX: values[0] || 0,
|
16442 |
+
offsetY: values[1] || 0,
|
16443 |
+
blur: values[2] || 0
|
16444 |
+
});
|
16445 |
+
}
|
16446 |
+
values.splice(0, values.length);
|
16447 |
+
color = null;
|
16448 |
+
};
|
16449 |
+
|
16450 |
+
for (var i = 0; i < textShadow.length; i++) {
|
16451 |
+
var c = textShadow[i];
|
16452 |
+
switch (c) {
|
16453 |
+
case '(':
|
16454 |
+
currentValue += c;
|
16455 |
+
numParens++;
|
16456 |
+
break;
|
16457 |
+
case ')':
|
16458 |
+
currentValue += c;
|
16459 |
+
numParens--;
|
16460 |
+
break;
|
16461 |
+
case ',':
|
16462 |
+
if (numParens === 0) {
|
16463 |
+
appendValue();
|
16464 |
+
appendShadow();
|
16465 |
+
} else {
|
16466 |
+
currentValue += c;
|
16467 |
+
}
|
16468 |
+
break;
|
16469 |
+
case ' ':
|
16470 |
+
if (numParens === 0) {
|
16471 |
+
appendValue();
|
16472 |
+
} else {
|
16473 |
+
currentValue += c;
|
16474 |
+
}
|
16475 |
+
break;
|
16476 |
+
default:
|
16477 |
+
if (currentValue.length === 0 && NUMBER.test(c)) {
|
16478 |
+
isLength = true;
|
16479 |
+
}
|
16480 |
+
currentValue += c;
|
16481 |
+
}
|
16482 |
+
}
|
16483 |
+
|
16484 |
+
appendValue();
|
16485 |
+
appendShadow();
|
16486 |
+
|
16487 |
+
if (shadows.length === 0) {
|
16488 |
+
return null;
|
16489 |
+
}
|
16490 |
+
|
16491 |
+
return shadows;
|
16492 |
+
};
|
16493 |
+
|
16494 |
+
/***/ }),
|
16495 |
+
/* 42 */
|
16496 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16497 |
+
|
16498 |
+
"use strict";
|
16499 |
+
|
16500 |
+
|
16501 |
+
Object.defineProperty(exports, "__esModule", {
|
16502 |
+
value: true
|
16503 |
+
});
|
16504 |
+
exports.parseTransform = undefined;
|
16505 |
+
|
16506 |
+
var _Length = __webpack_require__(2);
|
16507 |
+
|
16508 |
+
var _Length2 = _interopRequireDefault(_Length);
|
16509 |
+
|
16510 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16511 |
+
|
16512 |
+
var toFloat = function toFloat(s) {
|
16513 |
+
return parseFloat(s.trim());
|
16514 |
+
};
|
16515 |
+
|
16516 |
+
var MATRIX = /(matrix|matrix3d)\((.+)\)/;
|
16517 |
+
|
16518 |
+
var parseTransform = exports.parseTransform = function parseTransform(style) {
|
16519 |
+
var transform = parseTransformMatrix(style.transform || style.webkitTransform || style.mozTransform ||
|
16520 |
+
// $FlowFixMe
|
16521 |
+
style.msTransform ||
|
16522 |
+
// $FlowFixMe
|
16523 |
+
style.oTransform);
|
16524 |
+
if (transform === null) {
|
16525 |
+
return null;
|
16526 |
+
}
|
16527 |
+
|
16528 |
+
return {
|
16529 |
+
transform: transform,
|
16530 |
+
transformOrigin: parseTransformOrigin(style.transformOrigin || style.webkitTransformOrigin || style.mozTransformOrigin ||
|
16531 |
+
// $FlowFixMe
|
16532 |
+
style.msTransformOrigin ||
|
16533 |
+
// $FlowFixMe
|
16534 |
+
style.oTransformOrigin)
|
16535 |
+
};
|
16536 |
+
};
|
16537 |
+
|
16538 |
+
// $FlowFixMe
|
16539 |
+
var parseTransformOrigin = function parseTransformOrigin(origin) {
|
16540 |
+
if (typeof origin !== 'string') {
|
16541 |
+
var v = new _Length2.default('0');
|
16542 |
+
return [v, v];
|
16543 |
+
}
|
16544 |
+
var values = origin.split(' ').map(_Length2.default.create);
|
16545 |
+
return [values[0], values[1]];
|
16546 |
+
};
|
16547 |
+
|
16548 |
+
// $FlowFixMe
|
16549 |
+
var parseTransformMatrix = function parseTransformMatrix(transform) {
|
16550 |
+
if (transform === 'none' || typeof transform !== 'string') {
|
16551 |
+
return null;
|
16552 |
+
}
|
16553 |
+
|
16554 |
+
var match = transform.match(MATRIX);
|
16555 |
+
if (match) {
|
16556 |
+
if (match[1] === 'matrix') {
|
16557 |
+
var matrix = match[2].split(',').map(toFloat);
|
16558 |
+
return [matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]];
|
16559 |
+
} else {
|
16560 |
+
var matrix3d = match[2].split(',').map(toFloat);
|
16561 |
+
return [matrix3d[0], matrix3d[1], matrix3d[4], matrix3d[5], matrix3d[12], matrix3d[13]];
|
16562 |
+
}
|
16563 |
+
}
|
16564 |
+
return null;
|
16565 |
+
};
|
16566 |
+
|
16567 |
+
/***/ }),
|
16568 |
+
/* 43 */
|
16569 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16570 |
+
|
16571 |
+
"use strict";
|
16572 |
+
|
16573 |
+
|
16574 |
+
Object.defineProperty(exports, "__esModule", {
|
16575 |
+
value: true
|
16576 |
+
});
|
16577 |
+
var VISIBILITY = exports.VISIBILITY = {
|
16578 |
+
VISIBLE: 0,
|
16579 |
+
HIDDEN: 1,
|
16580 |
+
COLLAPSE: 2
|
16581 |
+
};
|
16582 |
+
|
16583 |
+
var parseVisibility = exports.parseVisibility = function parseVisibility(visibility) {
|
16584 |
+
switch (visibility) {
|
16585 |
+
case 'hidden':
|
16586 |
+
return VISIBILITY.HIDDEN;
|
16587 |
+
case 'collapse':
|
16588 |
+
return VISIBILITY.COLLAPSE;
|
16589 |
+
case 'visible':
|
16590 |
+
default:
|
16591 |
+
return VISIBILITY.VISIBLE;
|
16592 |
+
}
|
16593 |
+
};
|
16594 |
+
|
16595 |
+
/***/ }),
|
16596 |
+
/* 44 */
|
16597 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16598 |
+
|
16599 |
+
"use strict";
|
16600 |
+
|
16601 |
+
|
16602 |
+
Object.defineProperty(exports, "__esModule", {
|
16603 |
+
value: true
|
16604 |
+
});
|
16605 |
+
var WORD_BREAK = exports.WORD_BREAK = {
|
16606 |
+
NORMAL: 'normal',
|
16607 |
+
BREAK_ALL: 'break-all',
|
16608 |
+
KEEP_ALL: 'keep-all'
|
16609 |
+
};
|
16610 |
+
|
16611 |
+
var parseWordBreak = exports.parseWordBreak = function parseWordBreak(wordBreak) {
|
16612 |
+
switch (wordBreak) {
|
16613 |
+
case 'break-all':
|
16614 |
+
return WORD_BREAK.BREAK_ALL;
|
16615 |
+
case 'keep-all':
|
16616 |
+
return WORD_BREAK.KEEP_ALL;
|
16617 |
+
case 'normal':
|
16618 |
+
default:
|
16619 |
+
return WORD_BREAK.NORMAL;
|
16620 |
+
}
|
16621 |
+
};
|
16622 |
+
|
16623 |
+
/***/ }),
|
16624 |
+
/* 45 */
|
16625 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16626 |
+
|
16627 |
+
"use strict";
|
16628 |
+
|
16629 |
+
|
16630 |
+
Object.defineProperty(exports, "__esModule", {
|
16631 |
+
value: true
|
16632 |
+
});
|
16633 |
+
var parseZIndex = exports.parseZIndex = function parseZIndex(zIndex) {
|
16634 |
+
var auto = zIndex === 'auto';
|
16635 |
+
return {
|
16636 |
+
auto: auto,
|
16637 |
+
order: auto ? 0 : parseInt(zIndex, 10)
|
16638 |
+
};
|
16639 |
+
};
|
16640 |
+
|
16641 |
+
/***/ }),
|
16642 |
+
/* 46 */
|
16643 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16644 |
+
|
16645 |
+
"use strict";
|
16646 |
+
|
16647 |
+
|
16648 |
+
Object.defineProperty(exports, "__esModule", {
|
16649 |
+
value: true
|
16650 |
+
});
|
16651 |
+
|
16652 |
+
var _Util = __webpack_require__(13);
|
16653 |
+
|
16654 |
+
Object.defineProperty(exports, 'toCodePoints', {
|
16655 |
+
enumerable: true,
|
16656 |
+
get: function get() {
|
16657 |
+
return _Util.toCodePoints;
|
16658 |
+
}
|
16659 |
+
});
|
16660 |
+
Object.defineProperty(exports, 'fromCodePoint', {
|
16661 |
+
enumerable: true,
|
16662 |
+
get: function get() {
|
16663 |
+
return _Util.fromCodePoint;
|
16664 |
+
}
|
16665 |
+
});
|
16666 |
+
|
16667 |
+
var _LineBreak = __webpack_require__(47);
|
16668 |
+
|
16669 |
+
Object.defineProperty(exports, 'LineBreaker', {
|
16670 |
+
enumerable: true,
|
16671 |
+
get: function get() {
|
16672 |
+
return _LineBreak.LineBreaker;
|
16673 |
+
}
|
16674 |
+
});
|
16675 |
+
|
16676 |
+
/***/ }),
|
16677 |
+
/* 47 */
|
16678 |
+
/***/ (function(module, exports, __webpack_require__) {
|
16679 |
+
|
16680 |
+
"use strict";
|
16681 |
+
|
16682 |
+
|
16683 |
+
Object.defineProperty(exports, "__esModule", {
|
16684 |
+
value: true
|
16685 |
+
});
|
16686 |
+
exports.LineBreaker = exports.inlineBreakOpportunities = exports.lineBreakAtIndex = exports.codePointsToCharacterClasses = exports.UnicodeTrie = exports.BREAK_ALLOWED = exports.BREAK_NOT_ALLOWED = exports.BREAK_MANDATORY = exports.classes = exports.LETTER_NUMBER_MODIFIER = undefined;
|
16687 |
+
|
16688 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
16689 |
+
|
16690 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
16691 |
+
|
16692 |
+
var _Trie = __webpack_require__(48);
|
16693 |
+
|
16694 |
+
var _linebreakTrie = __webpack_require__(49);
|
16695 |
+
|
16696 |
+
var _linebreakTrie2 = _interopRequireDefault(_linebreakTrie);
|
16697 |
+
|
16698 |
+
var _Util = __webpack_require__(13);
|
16699 |
+
|
16700 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
16701 |
+
|
16702 |
+
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
16703 |
+
|
16704 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
16705 |
+
|
16706 |
+
var LETTER_NUMBER_MODIFIER = exports.LETTER_NUMBER_MODIFIER = 50;
|
16707 |
+
|
16708 |
+
// Non-tailorable Line Breaking Classes
|
16709 |
+
var BK = 1; // Cause a line break (after)
|
16710 |
+
var CR = 2; // Cause a line break (after), except between CR and LF
|
16711 |
+
var LF = 3; // Cause a line break (after)
|
16712 |
+
var CM = 4; // Prohibit a line break between the character and the preceding character
|
16713 |
+
var NL = 5; // Cause a line break (after)
|
16714 |
+
var SG = 6; // Do not occur in well-formed text
|
16715 |
+
var WJ = 7; // Prohibit line breaks before and after
|
16716 |
+
var ZW = 8; // Provide a break opportunity
|
16717 |
+
var GL = 9; // Prohibit line breaks before and after
|
16718 |
+
var SP = 10; // Enable indirect line breaks
|
16719 |
+
var ZWJ = 11; // Prohibit line breaks within joiner sequences
|
16720 |
+
// Break Opportunities
|
16721 |
+
var B2 = 12; // Provide a line break opportunity before and after the character
|
16722 |
+
var BA = 13; // Generally provide a line break opportunity after the character
|
16723 |
+
var BB = 14; // Generally provide a line break opportunity before the character
|
16724 |
+
var HY = 15; // Provide a line break opportunity after the character, except in numeric context
|
16725 |
+
var CB = 16; // Provide a line break opportunity contingent on additional information
|
16726 |
+
// Characters Prohibiting Certain Breaks
|
16727 |
+
var CL = 17; // Prohibit line breaks before
|
16728 |
+
var CP = 18; // Prohibit line breaks before
|
16729 |
+
var EX = 19; // Prohibit line breaks before
|
16730 |
+
var IN = 20; // Allow only indirect line breaks between pairs
|
16731 |
+
var NS = 21; // Allow only indirect line breaks before
|
16732 |
+
var OP = 22; // Prohibit line breaks after
|
16733 |
+
var QU = 23; // Act like they are both opening and closing
|
16734 |
+
// Numeric Context
|
16735 |
+
var IS = 24; // Prevent breaks after any and before numeric
|
16736 |
+
var NU = 25; // Form numeric expressions for line breaking purposes
|
16737 |
+
var PO = 26; // Do not break following a numeric expression
|
16738 |
+
var PR = 27; // Do not break in front of a numeric expression
|
16739 |
+
var SY = 28; // Prevent a break before; and allow a break after
|
16740 |
+
// Other Characters
|
16741 |
+
var AI = 29; // Act like AL when the resolvedEAW is N; otherwise; act as ID
|
16742 |
+
var AL = 30; // Are alphabetic characters or symbols that are used with alphabetic characters
|
16743 |
+
var CJ = 31; // Treat as NS or ID for strict or normal breaking.
|
16744 |
+
var EB = 32; // Do not break from following Emoji Modifier
|
16745 |
+
var EM = 33; // Do not break from preceding Emoji Base
|
16746 |
+
var H2 = 34; // Form Korean syllable blocks
|
16747 |
+
var H3 = 35; // Form Korean syllable blocks
|
16748 |
+
var HL = 36; // Do not break around a following hyphen; otherwise act as Alphabetic
|
16749 |
+
var ID = 37; // Break before or after; except in some numeric context
|
16750 |
+
var JL = 38; // Form Korean syllable blocks
|
16751 |
+
var JV = 39; // Form Korean syllable blocks
|
16752 |
+
var JT = 40; // Form Korean syllable blocks
|
16753 |
+
var RI = 41; // Keep pairs together. For pairs; break before and after other classes
|
16754 |
+
var SA = 42; // Provide a line break opportunity contingent on additional, language-specific context analysis
|
16755 |
+
var XX = 43; // Have as yet unknown line breaking behavior or unassigned code positions
|
16756 |
+
|
16757 |
+
var classes = exports.classes = {
|
16758 |
+
BK: BK,
|
16759 |
+
CR: CR,
|
16760 |
+
LF: LF,
|
16761 |
+
CM: CM,
|
16762 |
+
NL: NL,
|
16763 |
+
SG: SG,
|
16764 |
+
WJ: WJ,
|
16765 |
+
ZW: ZW,
|
16766 |
+
GL: GL,
|
16767 |
+
SP: SP,
|
16768 |
+
ZWJ: ZWJ,
|
16769 |
+
B2: B2,
|
16770 |
+
BA: BA,
|
16771 |
+
BB: BB,
|
16772 |
+
HY: HY,
|
16773 |
+
CB: CB,
|
16774 |
+
CL: CL,
|
16775 |
+
CP: CP,
|
16776 |
+
EX: EX,
|
16777 |
+
IN: IN,
|
16778 |
+
NS: NS,
|
16779 |
+
OP: OP,
|
16780 |
+
QU: QU,
|
16781 |
+
IS: IS,
|
16782 |
+
NU: NU,
|
16783 |
+
PO: PO,
|
16784 |
+
PR: PR,
|
16785 |
+
SY: SY,
|
16786 |
+
AI: AI,
|
16787 |
+
AL: AL,
|
16788 |
+
CJ: CJ,
|
16789 |
+
EB: EB,
|
16790 |
+
EM: EM,
|
16791 |
+
H2: H2,
|
16792 |
+
H3: H3,
|
16793 |
+
HL: HL,
|
16794 |
+
ID: ID,
|
16795 |
+
JL: JL,
|
16796 |
+
JV: JV,
|
16797 |
+
JT: JT,
|
16798 |
+
RI: RI,
|
16799 |
+
SA: SA,
|
16800 |
+
XX: XX
|
16801 |
+
};
|
16802 |
+
|
16803 |
+
var BREAK_MANDATORY = exports.BREAK_MANDATORY = '!';
|
16804 |
+
var BREAK_NOT_ALLOWED = exports.BREAK_NOT_ALLOWED = '×';
|
16805 |
+
var BREAK_ALLOWED = exports.BREAK_ALLOWED = '÷';
|
16806 |
+
var UnicodeTrie = exports.UnicodeTrie = (0, _Trie.createTrieFromBase64)(_linebreakTrie2.default);
|
16807 |
+
|
16808 |
+
var ALPHABETICS = [AL, HL];
|
16809 |
+
var HARD_LINE_BREAKS = [BK, CR, LF, NL];
|
16810 |
+
var SPACE = [SP, ZW];
|
16811 |
+
var PREFIX_POSTFIX = [PR, PO];
|
16812 |
+
var LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE);
|
16813 |
+
var KOREAN_SYLLABLE_BLOCK = [JL, JV, JT, H2, H3];
|
16814 |
+
var HYPHEN = [HY, BA];
|
16815 |
+
|
16816 |
+
var codePointsToCharacterClasses = exports.codePointsToCharacterClasses = function codePointsToCharacterClasses(codePoints) {
|
16817 |
+
var lineBreak = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'strict';
|
16818 |
+
|
16819 |
+
var types = [];
|
16820 |
+
var indicies = [];
|
16821 |
+
var categories = [];
|
16822 |
+
codePoints.forEach(function (codePoint, index) {
|
16823 |
+
var classType = UnicodeTrie.get(codePoint);
|
16824 |
+
if (classType > LETTER_NUMBER_MODIFIER) {
|
16825 |
+
categories.push(true);
|
16826 |
+
classType -= LETTER_NUMBER_MODIFIER;
|
16827 |
+
} else {
|
16828 |
+
categories.push(false);
|
16829 |
+
}
|
16830 |
+
|
16831 |
+
if (['normal', 'auto', 'loose'].indexOf(lineBreak) !== -1) {
|
16832 |
+
// U+2010, – U+2013, 〜 U+301C, ゠ U+30A0
|
16833 |
+
if ([0x2010, 0x2013, 0x301c, 0x30a0].indexOf(codePoint) !== -1) {
|
16834 |
+
indicies.push(index);
|
16835 |
+
return types.push(CB);
|
16836 |
+
}
|
16837 |
+
}
|
16838 |
+
|
16839 |
+
if (classType === CM || classType === ZWJ) {
|
16840 |
+
// LB10 Treat any remaining combining mark or ZWJ as AL.
|
16841 |
+
if (index === 0) {
|
16842 |
+
indicies.push(index);
|
16843 |
+
return types.push(AL);
|
16844 |
+
}
|
16845 |
+
|
16846 |
+
// LB9 Do not break a combining character sequence; treat it as if it has the line breaking class of
|
16847 |
+
// the base character in all of the following rules. Treat ZWJ as if it were CM.
|
16848 |
+
var prev = types[index - 1];
|
16849 |
+
if (LINE_BREAKS.indexOf(prev) === -1) {
|
16850 |
+
indicies.push(indicies[index - 1]);
|
16851 |
+
return types.push(prev);
|
16852 |
+
}
|
16853 |
+
indicies.push(index);
|
16854 |
+
return types.push(AL);
|
16855 |
+
}
|
16856 |
+
|
16857 |
+
indicies.push(index);
|
16858 |
+
|
16859 |
+
if (classType === CJ) {
|
16860 |
+
return types.push(lineBreak === 'strict' ? NS : ID);
|
16861 |
+
}
|
16862 |
+
|
16863 |
+
if (classType === SA) {
|
16864 |
+
return types.push(AL);
|
16865 |
+
}
|
16866 |
+
|
16867 |
+
if (classType === AI) {
|
16868 |
+
return types.push(AL);
|
16869 |
+
}
|
16870 |
+
|
16871 |
+
// For supplementary characters, a useful default is to treat characters in the range 10000..1FFFD as AL
|
16872 |
+
// and characters in the ranges 20000..2FFFD and 30000..3FFFD as ID, until the implementation can be revised
|
16873 |
+
// to take into account the actual line breaking properties for these characters.
|
16874 |
+
if (classType === XX) {
|
16875 |
+
if (codePoint >= 0x20000 && codePoint <= 0x2fffd || codePoint >= 0x30000 && codePoint <= 0x3fffd) {
|
16876 |
+
return types.push(ID);
|
16877 |
+
} else {
|
16878 |
+
return types.push(AL);
|
16879 |
+
}
|
16880 |
+
}
|
16881 |
+
|
16882 |
+
types.push(classType);
|
16883 |
+
});
|
16884 |
+
|
16885 |
+
return [indicies, types, categories];
|
16886 |
+
};
|
16887 |
+
|
16888 |
+
var isAdjacentWithSpaceIgnored = function isAdjacentWithSpaceIgnored(a, b, currentIndex, classTypes) {
|
16889 |
+
var current = classTypes[currentIndex];
|
16890 |
+
if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) {
|
16891 |
+
var i = currentIndex;
|
16892 |
+
while (i <= classTypes.length) {
|
16893 |
+
i++;
|
16894 |
+
var next = classTypes[i];
|
16895 |
+
|
16896 |
+
if (next === b) {
|
16897 |
+
return true;
|
16898 |
+
}
|
16899 |
+
|
16900 |
+
if (next !== SP) {
|
16901 |
+
break;
|
16902 |
+
}
|
16903 |
+
}
|
16904 |
+
}
|
16905 |
+
|
16906 |
+
if (current === SP) {
|
16907 |
+
var _i = currentIndex;
|
16908 |
+
|
16909 |
+
while (_i > 0) {
|
16910 |
+
_i--;
|
16911 |
+
var prev = classTypes[_i];
|
16912 |
+
|
16913 |
+
if (Array.isArray(a) ? a.indexOf(prev) !== -1 : a === prev) {
|
16914 |
+
var n = currentIndex;
|
16915 |
+
while (n <= classTypes.length) {
|
16916 |
+
n++;
|
16917 |
+
var _next = classTypes[n];
|
16918 |
+
|
16919 |
+
if (_next === b) {
|
16920 |
+
return true;
|
16921 |
+
}
|
16922 |
+
|
16923 |
+
if (_next !== SP) {
|
16924 |
+
break;
|
16925 |
+
}
|
16926 |
+
}
|
16927 |
+
}
|
16928 |
+
|
16929 |
+
if (prev !== SP) {
|
16930 |
+
break;
|
16931 |
+
}
|
16932 |
+
}
|
16933 |
+
}
|
16934 |
+
return false;
|
16935 |
+
};
|
16936 |
+
|
16937 |
+
var previousNonSpaceClassType = function previousNonSpaceClassType(currentIndex, classTypes) {
|
16938 |
+
var i = currentIndex;
|
16939 |
+
while (i >= 0) {
|
16940 |
+
var type = classTypes[i];
|
16941 |
+
if (type === SP) {
|
16942 |
+
i--;
|
16943 |
+
} else {
|
16944 |
+
return type;
|
16945 |
+
}
|
16946 |
+
}
|
16947 |
+
return 0;
|
16948 |
+
};
|
16949 |
+
|
16950 |
+
var _lineBreakAtIndex = function _lineBreakAtIndex(codePoints, classTypes, indicies, index, forbiddenBreaks) {
|
16951 |
+
if (indicies[index] === 0) {
|
16952 |
+
return BREAK_NOT_ALLOWED;
|
16953 |
+
}
|
16954 |
+
|
16955 |
+
var currentIndex = index - 1;
|
16956 |
+
if (Array.isArray(forbiddenBreaks) && forbiddenBreaks[currentIndex] === true) {
|
16957 |
+
return BREAK_NOT_ALLOWED;
|
16958 |
+
}
|
16959 |
+
|
16960 |
+
var beforeIndex = currentIndex - 1;
|
16961 |
+
var afterIndex = currentIndex + 1;
|
16962 |
+
var current = classTypes[currentIndex];
|
16963 |
+
|
16964 |
+
// LB4 Always break after hard line breaks.
|
16965 |
+
// LB5 Treat CR followed by LF, as well as CR, LF, and NL as hard line breaks.
|
16966 |
+
var before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0;
|
16967 |
+
var next = classTypes[afterIndex];
|
16968 |
+
|
16969 |
+
if (current === CR && next === LF) {
|
16970 |
+
return BREAK_NOT_ALLOWED;
|
16971 |
+
}
|
16972 |
+
|
16973 |
+
if (HARD_LINE_BREAKS.indexOf(current) !== -1) {
|
16974 |
+
return BREAK_MANDATORY;
|
16975 |
+
}
|
16976 |
+
|
16977 |
+
// LB6 Do not break before hard line breaks.
|
16978 |
+
if (HARD_LINE_BREAKS.indexOf(next) !== -1) {
|
16979 |
+
return BREAK_NOT_ALLOWED;
|
16980 |
+
}
|
16981 |
+
|
16982 |
+
// LB7 Do not break before spaces or zero width space.
|
16983 |
+
if (SPACE.indexOf(next) !== -1) {
|
16984 |
+
return BREAK_NOT_ALLOWED;
|
16985 |
+
}
|
16986 |
+
|
16987 |
+
// LB8 Break before any character following a zero-width space, even if one or more spaces intervene.
|
16988 |
+
if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) {
|
16989 |
+
return BREAK_ALLOWED;
|
16990 |
+
}
|
16991 |
+
|
16992 |
+
// LB8a Do not break between a zero width joiner and an ideograph, emoji base or emoji modifier.
|
16993 |
+
if (UnicodeTrie.get(codePoints[currentIndex]) === ZWJ && (next === ID || next === EB || next === EM)) {
|
16994 |
+
return BREAK_NOT_ALLOWED;
|
16995 |
+
}
|
16996 |
+
|
16997 |
+
// LB11 Do not break before or after Word joiner and related characters.
|
16998 |
+
if (current === WJ || next === WJ) {
|
16999 |
+
return BREAK_NOT_ALLOWED;
|
17000 |
+
}
|
17001 |
+
|
17002 |
+
// LB12 Do not break after NBSP and related characters.
|
17003 |
+
if (current === GL) {
|
17004 |
+
return BREAK_NOT_ALLOWED;
|
17005 |
+
}
|
17006 |
+
|
17007 |
+
// LB12a Do not break before NBSP and related characters, except after spaces and hyphens.
|
17008 |
+
if ([SP, BA, HY].indexOf(current) === -1 && next === GL) {
|
17009 |
+
return BREAK_NOT_ALLOWED;
|
17010 |
+
}
|
17011 |
+
|
17012 |
+
// LB13 Do not break before ‘]’ or ‘!’ or ‘;’ or ‘/’, even after spaces.
|
17013 |
+
if ([CL, CP, EX, IS, SY].indexOf(next) !== -1) {
|
17014 |
+
return BREAK_NOT_ALLOWED;
|
17015 |
+
}
|
17016 |
+
|
17017 |
+
// LB14 Do not break after ‘[’, even after spaces.
|
17018 |
+
if (previousNonSpaceClassType(currentIndex, classTypes) === OP) {
|
17019 |
+
return BREAK_NOT_ALLOWED;
|
17020 |
+
}
|
17021 |
+
|
17022 |
+
// LB15 Do not break within ‘”[’, even with intervening spaces.
|
17023 |
+
if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) {
|
17024 |
+
return BREAK_NOT_ALLOWED;
|
17025 |
+
}
|
17026 |
+
|
17027 |
+
// LB16 Do not break between closing punctuation and a nonstarter (lb=NS), even with intervening spaces.
|
17028 |
+
if (isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes)) {
|
17029 |
+
return BREAK_NOT_ALLOWED;
|
17030 |
+
}
|
17031 |
+
|
17032 |
+
// LB17 Do not break within ‘——’, even with intervening spaces.
|
17033 |
+
if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) {
|
17034 |
+
return BREAK_NOT_ALLOWED;
|
17035 |
+
}
|
17036 |
+
|
17037 |
+
// LB18 Break after spaces.
|
17038 |
+
if (current === SP) {
|
17039 |
+
return BREAK_ALLOWED;
|
17040 |
+
}
|
17041 |
+
|
17042 |
+
// LB19 Do not break before or after quotation marks, such as ‘ ” ’.
|
17043 |
+
if (current === QU || next === QU) {
|
17044 |
+
return BREAK_NOT_ALLOWED;
|
17045 |
+
}
|
17046 |
+
|
17047 |
+
// LB20 Break before and after unresolved CB.
|
17048 |
+
if (next === CB || current === CB) {
|
17049 |
+
return BREAK_ALLOWED;
|
17050 |
+
}
|
17051 |
+
|
17052 |
+
// LB21 Do not break before hyphen-minus, other hyphens, fixed-width spaces, small kana, and other non-starters, or after acute accents.
|
17053 |
+
if ([BA, HY, NS].indexOf(next) !== -1 || current === BB) {
|
17054 |
+
return BREAK_NOT_ALLOWED;
|
17055 |
+
}
|
17056 |
+
|
17057 |
+
// LB21a Don't break after Hebrew + Hyphen.
|
17058 |
+
if (before === HL && HYPHEN.indexOf(current) !== -1) {
|
17059 |
+
return BREAK_NOT_ALLOWED;
|
17060 |
+
}
|
17061 |
+
|
17062 |
+
// LB21b Don’t break between Solidus and Hebrew letters.
|
17063 |
+
if (current === SY && next === HL) {
|
17064 |
+
return BREAK_NOT_ALLOWED;
|
17065 |
+
}
|
17066 |
+
|
17067 |
+
// LB22 Do not break between two ellipses, or between letters, numbers or exclamations and ellipsis.
|
17068 |
+
if (next === IN && ALPHABETICS.concat(IN, EX, NU, ID, EB, EM).indexOf(current) !== -1) {
|
17069 |
+
return BREAK_NOT_ALLOWED;
|
17070 |
+
}
|
17071 |
+
|
17072 |
+
// LB23 Do not break between digits and letters.
|
17073 |
+
if (ALPHABETICS.indexOf(next) !== -1 && current === NU || ALPHABETICS.indexOf(current) !== -1 && next === NU) {
|
17074 |
+
return BREAK_NOT_ALLOWED;
|
17075 |
+
}
|
17076 |
+
|
17077 |
+
// LB23a Do not break between numeric prefixes and ideographs, or between ideographs and numeric postfixes.
|
17078 |
+
if (current === PR && [ID, EB, EM].indexOf(next) !== -1 || [ID, EB, EM].indexOf(current) !== -1 && next === PO) {
|
17079 |
+
return BREAK_NOT_ALLOWED;
|
17080 |
+
}
|
17081 |
+
|
17082 |
+
// LB24 Do not break between numeric prefix/postfix and letters, or between letters and prefix/postfix.
|
17083 |
+
if (ALPHABETICS.indexOf(current) !== -1 && PREFIX_POSTFIX.indexOf(next) !== -1 || PREFIX_POSTFIX.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) {
|
17084 |
+
return BREAK_NOT_ALLOWED;
|
17085 |
+
}
|
17086 |
+
|
17087 |
+
// LB25 Do not break between the following pairs of classes relevant to numbers:
|
17088 |
+
if (
|
17089 |
+
// (PR | PO) × ( OP | HY )? NU
|
17090 |
+
[PR, PO].indexOf(current) !== -1 && (next === NU || [OP, HY].indexOf(next) !== -1 && classTypes[afterIndex + 1] === NU) ||
|
17091 |
+
// ( OP | HY ) × NU
|
17092 |
+
[OP, HY].indexOf(current) !== -1 && next === NU ||
|
17093 |
+
// NU × (NU | SY | IS)
|
17094 |
+
current === NU && [NU, SY, IS].indexOf(next) !== -1) {
|
17095 |
+
return BREAK_NOT_ALLOWED;
|
17096 |
+
}
|
17097 |
+
|
17098 |
+
// NU (NU | SY | IS)* × (NU | SY | IS | CL | CP)
|
17099 |
+
if ([NU, SY, IS, CL, CP].indexOf(next) !== -1) {
|
17100 |
+
var prevIndex = currentIndex;
|
17101 |
+
while (prevIndex >= 0) {
|
17102 |
+
var type = classTypes[prevIndex];
|
17103 |
+
if (type === NU) {
|
17104 |
+
return BREAK_NOT_ALLOWED;
|
17105 |
+
} else if ([SY, IS].indexOf(type) !== -1) {
|
17106 |
+
prevIndex--;
|
17107 |
+
} else {
|
17108 |
+
break;
|
17109 |
+
}
|
17110 |
+
}
|
17111 |
+
}
|
17112 |
+
|
17113 |
+
// NU (NU | SY | IS)* (CL | CP)? × (PO | PR))
|
17114 |
+
if ([PR, PO].indexOf(next) !== -1) {
|
17115 |
+
var _prevIndex = [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex;
|
17116 |
+
while (_prevIndex >= 0) {
|
17117 |
+
var _type = classTypes[_prevIndex];
|
17118 |
+
if (_type === NU) {
|
17119 |
+
return BREAK_NOT_ALLOWED;
|
17120 |
+
} else if ([SY, IS].indexOf(_type) !== -1) {
|
17121 |
+
_prevIndex--;
|
17122 |
+
} else {
|
17123 |
+
break;
|
17124 |
+
}
|
17125 |
+
}
|
17126 |
+
}
|
17127 |
+
|
17128 |
+
// LB26 Do not break a Korean syllable.
|
17129 |
+
if (JL === current && [JL, JV, H2, H3].indexOf(next) !== -1 || [JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next) !== -1 || [JT, H3].indexOf(current) !== -1 && next === JT) {
|
17130 |
+
return BREAK_NOT_ALLOWED;
|
17131 |
+
}
|
17132 |
+
|
17133 |
+
// LB27 Treat a Korean Syllable Block the same as ID.
|
17134 |
+
if (KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next) !== -1 || KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR) {
|
17135 |
+
return BREAK_NOT_ALLOWED;
|
17136 |
+
}
|
17137 |
+
|
17138 |
+
// LB28 Do not break between alphabetics (“at”).
|
17139 |
+
if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) {
|
17140 |
+
return BREAK_NOT_ALLOWED;
|
17141 |
+
}
|
17142 |
+
|
17143 |
+
// LB29 Do not break between numeric punctuation and alphabetics (“e.g.”).
|
17144 |
+
if (current === IS && ALPHABETICS.indexOf(next) !== -1) {
|
17145 |
+
return BREAK_NOT_ALLOWED;
|
17146 |
+
}
|
17147 |
+
|
17148 |
+
// LB30 Do not break between letters, numbers, or ordinary symbols and opening or closing parentheses.
|
17149 |
+
if (ALPHABETICS.concat(NU).indexOf(current) !== -1 && next === OP || ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP) {
|
17150 |
+
return BREAK_NOT_ALLOWED;
|
17151 |
+
}
|
17152 |
+
|
17153 |
+
// LB30a Break between two regional indicator symbols if and only if there are an even number of regional
|
17154 |
+
// indicators preceding the position of the break.
|
17155 |
+
if (current === RI && next === RI) {
|
17156 |
+
var i = indicies[currentIndex];
|
17157 |
+
var count = 1;
|
17158 |
+
while (i > 0) {
|
17159 |
+
i--;
|
17160 |
+
if (classTypes[i] === RI) {
|
17161 |
+
count++;
|
17162 |
+
} else {
|
17163 |
+
break;
|
17164 |
+
}
|
17165 |
+
}
|
17166 |
+
if (count % 2 !== 0) {
|
17167 |
+
return BREAK_NOT_ALLOWED;
|
17168 |
+
}
|
17169 |
+
}
|
17170 |
+
|
17171 |
+
// LB30b Do not break between an emoji base and an emoji modifier.
|
17172 |
+
if (current === EB && next === EM) {
|
17173 |
+
return BREAK_NOT_ALLOWED;
|
17174 |
+
}
|
17175 |
+
|
17176 |
+
return BREAK_ALLOWED;
|
17177 |
+
};
|
17178 |
+
|
17179 |
+
var lineBreakAtIndex = exports.lineBreakAtIndex = function lineBreakAtIndex(codePoints, index) {
|
17180 |
+
// LB2 Never break at the start of text.
|
17181 |
+
if (index === 0) {
|
17182 |
+
return BREAK_NOT_ALLOWED;
|
17183 |
+
}
|
17184 |
+
|
17185 |
+
// LB3 Always break at the end of text.
|
17186 |
+
if (index >= codePoints.length) {
|
17187 |
+
return BREAK_MANDATORY;
|
17188 |
+
}
|
17189 |
+
|
17190 |
+
var _codePointsToCharacte = codePointsToCharacterClasses(codePoints),
|
17191 |
+
_codePointsToCharacte2 = _slicedToArray(_codePointsToCharacte, 2),
|
17192 |
+
indicies = _codePointsToCharacte2[0],
|
17193 |
+
classTypes = _codePointsToCharacte2[1];
|
17194 |
+
|
17195 |
+
return _lineBreakAtIndex(codePoints, classTypes, indicies, index);
|
17196 |
+
};
|
17197 |
+
|
17198 |
+
var cssFormattedClasses = function cssFormattedClasses(codePoints, options) {
|
17199 |
+
if (!options) {
|
17200 |
+
options = { lineBreak: 'normal', wordBreak: 'normal' };
|
17201 |
+
}
|
17202 |
+
|
17203 |
+
var _codePointsToCharacte3 = codePointsToCharacterClasses(codePoints, options.lineBreak),
|
17204 |
+
_codePointsToCharacte4 = _slicedToArray(_codePointsToCharacte3, 3),
|
17205 |
+
indicies = _codePointsToCharacte4[0],
|
17206 |
+
classTypes = _codePointsToCharacte4[1],
|
17207 |
+
isLetterNumber = _codePointsToCharacte4[2];
|
17208 |
+
|
17209 |
+
if (options.wordBreak === 'break-all' || options.wordBreak === 'break-word') {
|
17210 |
+
classTypes = classTypes.map(function (type) {
|
17211 |
+
return [NU, AL, SA].indexOf(type) !== -1 ? ID : type;
|
17212 |
+
});
|
17213 |
+
}
|
17214 |
+
|
17215 |
+
var forbiddenBreakpoints = options.wordBreak === 'keep-all' ? isLetterNumber.map(function (isLetterNumber, i) {
|
17216 |
+
return isLetterNumber && codePoints[i] >= 0x4e00 && codePoints[i] <= 0x9fff;
|
17217 |
+
}) : null;
|
17218 |
+
|
17219 |
+
return [indicies, classTypes, forbiddenBreakpoints];
|
17220 |
+
};
|
17221 |
+
|
17222 |
+
var inlineBreakOpportunities = exports.inlineBreakOpportunities = function inlineBreakOpportunities(str, options) {
|
17223 |
+
var codePoints = (0, _Util.toCodePoints)(str);
|
17224 |
+
var output = BREAK_NOT_ALLOWED;
|
17225 |
+
|
17226 |
+
var _cssFormattedClasses = cssFormattedClasses(codePoints, options),
|
17227 |
+
_cssFormattedClasses2 = _slicedToArray(_cssFormattedClasses, 3),
|
17228 |
+
indicies = _cssFormattedClasses2[0],
|
17229 |
+
classTypes = _cssFormattedClasses2[1],
|
17230 |
+
forbiddenBreakpoints = _cssFormattedClasses2[2];
|
17231 |
+
|
17232 |
+
codePoints.forEach(function (codePoint, i) {
|
17233 |
+
output += (0, _Util.fromCodePoint)(codePoint) + (i >= codePoints.length - 1 ? BREAK_MANDATORY : _lineBreakAtIndex(codePoints, classTypes, indicies, i + 1, forbiddenBreakpoints));
|
17234 |
+
});
|
17235 |
+
|
17236 |
+
return output;
|
17237 |
+
};
|
17238 |
+
|
17239 |
+
var Break = function () {
|
17240 |
+
function Break(codePoints, lineBreak, start, end) {
|
17241 |
+
_classCallCheck(this, Break);
|
17242 |
+
|
17243 |
+
this._codePoints = codePoints;
|
17244 |
+
this.required = lineBreak === BREAK_MANDATORY;
|
17245 |
+
this.start = start;
|
17246 |
+
this.end = end;
|
17247 |
+
}
|
17248 |
+
|
17249 |
+
_createClass(Break, [{
|
17250 |
+
key: 'slice',
|
17251 |
+
value: function slice() {
|
17252 |
+
return _Util.fromCodePoint.apply(undefined, _toConsumableArray(this._codePoints.slice(this.start, this.end)));
|
17253 |
+
}
|
17254 |
+
}]);
|
17255 |
+
|
17256 |
+
return Break;
|
17257 |
+
}();
|
17258 |
+
|
17259 |
+
var LineBreaker = exports.LineBreaker = function LineBreaker(str, options) {
|
17260 |
+
var codePoints = (0, _Util.toCodePoints)(str);
|
17261 |
+
|
17262 |
+
var _cssFormattedClasses3 = cssFormattedClasses(codePoints, options),
|
17263 |
+
_cssFormattedClasses4 = _slicedToArray(_cssFormattedClasses3, 3),
|
17264 |
+
indicies = _cssFormattedClasses4[0],
|
17265 |
+
classTypes = _cssFormattedClasses4[1],
|
17266 |
+
forbiddenBreakpoints = _cssFormattedClasses4[2];
|
17267 |
+
|
17268 |
+
var length = codePoints.length;
|
17269 |
+
var lastEnd = 0;
|
17270 |
+
var nextIndex = 0;
|
17271 |
+
|
17272 |
+
return {
|
17273 |
+
next: function next() {
|
17274 |
+
if (nextIndex >= length) {
|
17275 |
+
return { done: true };
|
17276 |
+
}
|
17277 |
+
var lineBreak = BREAK_NOT_ALLOWED;
|
17278 |
+
while (nextIndex < length && (lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) === BREAK_NOT_ALLOWED) {}
|
17279 |
+
|
17280 |
+
if (lineBreak !== BREAK_NOT_ALLOWED || nextIndex === length) {
|
17281 |
+
var value = new Break(codePoints, lineBreak, lastEnd, nextIndex);
|
17282 |
+
lastEnd = nextIndex;
|
17283 |
+
return { value: value, done: false };
|
17284 |
+
}
|
17285 |
+
|
17286 |
+
return { done: true };
|
17287 |
+
}
|
17288 |
+
};
|
17289 |
+
};
|
17290 |
+
|
17291 |
+
/***/ }),
|
17292 |
+
/* 48 */
|
17293 |
+
/***/ (function(module, exports, __webpack_require__) {
|
17294 |
+
|
17295 |
+
"use strict";
|
17296 |
+
|
17297 |
+
|
17298 |
+
Object.defineProperty(exports, "__esModule", {
|
17299 |
+
value: true
|
17300 |
+
});
|
17301 |
+
exports.Trie = exports.createTrieFromBase64 = exports.UTRIE2_INDEX_2_MASK = exports.UTRIE2_INDEX_2_BLOCK_LENGTH = exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = exports.UTRIE2_INDEX_1_OFFSET = exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH = exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET = exports.UTRIE2_INDEX_2_BMP_LENGTH = exports.UTRIE2_LSCP_INDEX_2_LENGTH = exports.UTRIE2_DATA_MASK = exports.UTRIE2_DATA_BLOCK_LENGTH = exports.UTRIE2_LSCP_INDEX_2_OFFSET = exports.UTRIE2_SHIFT_1_2 = exports.UTRIE2_INDEX_SHIFT = exports.UTRIE2_SHIFT_1 = exports.UTRIE2_SHIFT_2 = undefined;
|
17302 |
+
|
17303 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
17304 |
+
|
17305 |
+
var _Util = __webpack_require__(13);
|
17306 |
+
|
17307 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
17308 |
+
|
17309 |
+
/** Shift size for getting the index-2 table offset. */
|
17310 |
+
var UTRIE2_SHIFT_2 = exports.UTRIE2_SHIFT_2 = 5;
|
17311 |
+
|
17312 |
+
/** Shift size for getting the index-1 table offset. */
|
17313 |
+
var UTRIE2_SHIFT_1 = exports.UTRIE2_SHIFT_1 = 6 + 5;
|
17314 |
+
|
17315 |
+
/**
|
17316 |
+
* Shift size for shifting left the index array values.
|
17317 |
+
* Increases possible data size with 16-bit index values at the cost
|
17318 |
+
* of compactability.
|
17319 |
+
* This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
|
17320 |
+
*/
|
17321 |
+
var UTRIE2_INDEX_SHIFT = exports.UTRIE2_INDEX_SHIFT = 2;
|
17322 |
+
|
17323 |
+
/**
|
17324 |
+
* Difference between the two shift sizes,
|
17325 |
+
* for getting an index-1 offset from an index-2 offset. 6=11-5
|
17326 |
+
*/
|
17327 |
+
var UTRIE2_SHIFT_1_2 = exports.UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;
|
17328 |
+
|
17329 |
+
/**
|
17330 |
+
* The part of the index-2 table for U+D800..U+DBFF stores values for
|
17331 |
+
* lead surrogate code _units_ not code _points_.
|
17332 |
+
* Values for lead surrogate code _points_ are indexed with this portion of the table.
|
17333 |
+
* Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
|
17334 |
+
*/
|
17335 |
+
var UTRIE2_LSCP_INDEX_2_OFFSET = exports.UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;
|
17336 |
+
|
17337 |
+
/** Number of entries in a data block. 32=0x20 */
|
17338 |
+
var UTRIE2_DATA_BLOCK_LENGTH = exports.UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;
|
17339 |
+
/** Mask for getting the lower bits for the in-data-block offset. */
|
17340 |
+
var UTRIE2_DATA_MASK = exports.UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;
|
17341 |
+
|
17342 |
+
var UTRIE2_LSCP_INDEX_2_LENGTH = exports.UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;
|
17343 |
+
/** Count the lengths of both BMP pieces. 2080=0x820 */
|
17344 |
+
var UTRIE2_INDEX_2_BMP_LENGTH = exports.UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;
|
17345 |
+
/**
|
17346 |
+
* The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
|
17347 |
+
* Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.
|
17348 |
+
*/
|
17349 |
+
var UTRIE2_UTF8_2B_INDEX_2_OFFSET = exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;
|
17350 |
+
var UTRIE2_UTF8_2B_INDEX_2_LENGTH = exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */
|
17351 |
+
/**
|
17352 |
+
* The index-1 table, only used for supplementary code points, at offset 2112=0x840.
|
17353 |
+
* Variable length, for code points up to highStart, where the last single-value range starts.
|
17354 |
+
* Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
|
17355 |
+
* (For 0x100000 supplementary code points U+10000..U+10ffff.)
|
17356 |
+
*
|
17357 |
+
* The part of the index-2 table for supplementary code points starts
|
17358 |
+
* after this index-1 table.
|
17359 |
+
*
|
17360 |
+
* Both the index-1 table and the following part of the index-2 table
|
17361 |
+
* are omitted completely if there is only BMP data.
|
17362 |
+
*/
|
17363 |
+
var UTRIE2_INDEX_1_OFFSET = exports.UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;
|
17364 |
+
|
17365 |
+
/**
|
17366 |
+
* Number of index-1 entries for the BMP. 32=0x20
|
17367 |
+
* This part of the index-1 table is omitted from the serialized form.
|
17368 |
+
*/
|
17369 |
+
var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;
|
17370 |
+
|
17371 |
+
/** Number of entries in an index-2 block. 64=0x40 */
|
17372 |
+
var UTRIE2_INDEX_2_BLOCK_LENGTH = exports.UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;
|
17373 |
+
/** Mask for getting the lower bits for the in-index-2-block offset. */
|
17374 |
+
var UTRIE2_INDEX_2_MASK = exports.UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;
|
17375 |
+
|
17376 |
+
var createTrieFromBase64 = exports.createTrieFromBase64 = function createTrieFromBase64(base64) {
|
17377 |
+
var buffer = (0, _Util.decode)(base64);
|
17378 |
+
var view32 = Array.isArray(buffer) ? (0, _Util.polyUint32Array)(buffer) : new Uint32Array(buffer);
|
17379 |
+
var view16 = Array.isArray(buffer) ? (0, _Util.polyUint16Array)(buffer) : new Uint16Array(buffer);
|
17380 |
+
var headerLength = 24;
|
17381 |
+
|
17382 |
+
var index = view16.slice(headerLength / 2, view32[4] / 2);
|
17383 |
+
var data = view32[5] === 2 ? view16.slice((headerLength + view32[4]) / 2) : view32.slice(Math.ceil((headerLength + view32[4]) / 4));
|
17384 |
+
|
17385 |
+
return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);
|
17386 |
+
};
|
17387 |
+
|
17388 |
+
var Trie = exports.Trie = function () {
|
17389 |
+
function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
|
17390 |
+
_classCallCheck(this, Trie);
|
17391 |
+
|
17392 |
+
this.initialValue = initialValue;
|
17393 |
+
this.errorValue = errorValue;
|
17394 |
+
this.highStart = highStart;
|
17395 |
+
this.highValueIndex = highValueIndex;
|
17396 |
+
this.index = index;
|
17397 |
+
this.data = data;
|
17398 |
+
}
|
17399 |
+
|
17400 |
+
/**
|
17401 |
+
* Get the value for a code point as stored in the Trie.
|
17402 |
+
*
|
17403 |
+
* @param codePoint the code point
|
17404 |
+
* @return the value
|
17405 |
+
*/
|
17406 |
+
|
17407 |
+
|
17408 |
+
_createClass(Trie, [{
|
17409 |
+
key: 'get',
|
17410 |
+
value: function get(codePoint) {
|
17411 |
+
var ix = void 0;
|
17412 |
+
if (codePoint >= 0) {
|
17413 |
+
if (codePoint < 0x0d800 || codePoint > 0x0dbff && codePoint <= 0x0ffff) {
|
17414 |
+
// Ordinary BMP code point, excluding leading surrogates.
|
17415 |
+
// BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index.
|
17416 |
+
// 16 bit data is stored in the index array itself.
|
17417 |
+
ix = this.index[codePoint >> UTRIE2_SHIFT_2];
|
17418 |
+
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
17419 |
+
return this.data[ix];
|
17420 |
+
}
|
17421 |
+
|
17422 |
+
if (codePoint <= 0xffff) {
|
17423 |
+
// Lead Surrogate Code Point. A Separate index section is stored for
|
17424 |
+
// lead surrogate code units and code points.
|
17425 |
+
// The main index has the code unit data.
|
17426 |
+
// For this function, we need the code point data.
|
17427 |
+
// Note: this expression could be refactored for slightly improved efficiency, but
|
17428 |
+
// surrogate code points will be so rare in practice that it's not worth it.
|
17429 |
+
ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + (codePoint - 0xd800 >> UTRIE2_SHIFT_2)];
|
17430 |
+
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
17431 |
+
return this.data[ix];
|
17432 |
+
}
|
17433 |
+
|
17434 |
+
if (codePoint < this.highStart) {
|
17435 |
+
// Supplemental code point, use two-level lookup.
|
17436 |
+
ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);
|
17437 |
+
ix = this.index[ix];
|
17438 |
+
ix += codePoint >> UTRIE2_SHIFT_2 & UTRIE2_INDEX_2_MASK;
|
17439 |
+
ix = this.index[ix];
|
17440 |
+
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
17441 |
+
return this.data[ix];
|
17442 |
+
}
|
17443 |
+
if (codePoint <= 0x10ffff) {
|
17444 |
+
return this.data[this.highValueIndex];
|
17445 |
+
}
|
17446 |
+
}
|
17447 |
+
|
17448 |
+
// Fall through. The code point is outside of the legal range of 0..0x10ffff.
|
17449 |
+
return this.errorValue;
|
17450 |
+
}
|
17451 |
+
}]);
|
17452 |
+
|
17453 |
+
return Trie;
|
17454 |
+
}();
|
17455 |
+
|
17456 |
+
/***/ }),
|
17457 |
+
/* 49 */
|
17458 |
+
/***/ (function(module, exports, __webpack_require__) {
|
17459 |
+
|
17460 |
+
"use strict";
|
17461 |
+
|
17462 |
+
|
17463 |
+
module.exports = 'KwAAAAAAAAAACA4AIDoAAPAfAAACAAAAAAAIABAAGABAAEgAUABYAF4AZgBeAGYAYABoAHAAeABeAGYAfACEAIAAiACQAJgAoACoAK0AtQC9AMUAXgBmAF4AZgBeAGYAzQDVAF4AZgDRANkA3gDmAOwA9AD8AAQBDAEUARoBIgGAAIgAJwEvATcBPwFFAU0BTAFUAVwBZAFsAXMBewGDATAAiwGTAZsBogGkAawBtAG8AcIBygHSAdoB4AHoAfAB+AH+AQYCDgIWAv4BHgImAi4CNgI+AkUCTQJTAlsCYwJrAnECeQKBAk0CiQKRApkCoQKoArACuALAAsQCzAIwANQC3ALkAjAA7AL0AvwCAQMJAxADGAMwACADJgMuAzYDPgOAAEYDSgNSA1IDUgNaA1oDYANiA2IDgACAAGoDgAByA3YDfgOAAIQDgACKA5IDmgOAAIAAogOqA4AAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAK8DtwOAAIAAvwPHA88D1wPfAyAD5wPsA/QD/AOAAIAABAQMBBIEgAAWBB4EJgQuBDMEIAM7BEEEXgBJBCADUQRZBGEEaQQwADAAcQQ+AXkEgQSJBJEEgACYBIAAoASoBK8EtwQwAL8ExQSAAIAAgACAAIAAgACgAM0EXgBeAF4AXgBeAF4AXgBeANUEXgDZBOEEXgDpBPEE+QQBBQkFEQUZBSEFKQUxBTUFPQVFBUwFVAVcBV4AYwVeAGsFcwV7BYMFiwWSBV4AmgWgBacFXgBeAF4AXgBeAKsFXgCyBbEFugW7BcIFwgXIBcIFwgXQBdQF3AXkBesF8wX7BQMGCwYTBhsGIwYrBjMGOwZeAD8GRwZNBl4AVAZbBl4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAGMGXgBqBnEGXgBeAF4AXgBeAF4AXgBeAF4AXgB5BoAG4wSGBo4GkwaAAIADHgR5AF4AXgBeAJsGgABGA4AAowarBrMGswagALsGwwbLBjAA0wbaBtoG3QbaBtoG2gbaBtoG2gblBusG8wb7BgMHCwcTBxsHCwcjBysHMAc1BzUHOgdCB9oGSgdSB1oHYAfaBloHaAfaBlIH2gbaBtoG2gbaBtoG2gbaBjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHbQdeAF4ANQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQd1B30HNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B4MH2gaKB68EgACAAIAAgACAAIAAgACAAI8HlwdeAJ8HpweAAIAArwe3B14AXgC/B8UHygcwANAH2AfgB4AA6AfwBz4B+AcACFwBCAgPCBcIogEYAR8IJwiAAC8INwg/CCADRwhPCFcIXwhnCEoDGgSAAIAAgABvCHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIhAiLCI4IMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAANQc1BzUHNQc1BzUHNQc1BzUHNQc1B54INQc1B6II2gaqCLIIugiAAIAAvgjGCIAAgACAAIAAgACAAIAAgACAAIAAywiHAYAA0wiAANkI3QjlCO0I9Aj8CIAAgACAAAIJCgkSCRoJIgknCTYHLwk3CZYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiAAIAAAAFAAXgBeAGAAcABeAHwAQACQAKAArQC9AJ4AXgBeAE0A3gBRAN4A7AD8AMwBGgEAAKcBNwEFAUwBXAF4QkhCmEKnArcCgAHHAsABz4LAAcABwAHAAd+C6ABoAG+C/4LAAcABwAHAAc+DF4MAAcAB54M3gweDV4Nng3eDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEeDqABVg6WDqABoQ6gAaABoAHXDvcONw/3DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DncPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB7cPPwlGCU4JMACAAIAAgABWCV4JYQmAAGkJcAl4CXwJgAkwADAAMAAwAIgJgACLCZMJgACZCZ8JowmrCYAAswkwAF4AXgB8AIAAuwkABMMJyQmAAM4JgADVCTAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAqwYWBNkIMAAwADAAMADdCeAJ6AnuCR4E9gkwAP4JBQoNCjAAMACAABUK0wiAAB0KJAosCjQKgAAwADwKQwqAAEsKvQmdCVMKWwowADAAgACAALcEMACAAGMKgABrCjAAMAAwADAAMAAwADAAMAAwADAAMAAeBDAAMAAwADAAMAAwADAAMAAwADAAMAAwAIkEPQFzCnoKiQSCCooKkAqJBJgKoAqkCokEGAGsCrQKvArBCjAAMADJCtEKFQHZCuEK/gHpCvEKMAAwADAAMACAAIwE+QowAIAAPwEBCzAAMAAwADAAMACAAAkLEQswAIAAPwEZCyELgAAOCCkLMAAxCzkLMAAwADAAMAAwADAAXgBeAEELMAAwADAAMAAwADAAMAAwAEkLTQtVC4AAXAtkC4AAiQkwADAAMAAwADAAMAAwADAAbAtxC3kLgAuFC4sLMAAwAJMLlwufCzAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAApwswADAAMACAAIAAgACvC4AAgACAAIAAgACAALcLMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAvwuAAMcLgACAAIAAgACAAIAAyguAAIAAgACAAIAA0QswADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAANkLgACAAIAA4AswADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACJCR4E6AswADAAhwHwC4AA+AsADAgMEAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMACAAIAAGAwdDCUMMAAwAC0MNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQw1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHPQwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADUHNQc1BzUHNQc1BzUHNQc2BzAAMAA5DDUHNQc1BzUHNQc1BzUHNQc1BzUHNQdFDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAATQxSDFoMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAF4AXgBeAF4AXgBeAF4AYgxeAGoMXgBxDHkMfwxeAIUMXgBeAI0MMAAwADAAMAAwAF4AXgCVDJ0MMAAwADAAMABeAF4ApQxeAKsMswy7DF4Awgy9DMoMXgBeAF4AXgBeAF4AXgBeAF4AXgDRDNkMeQBqCeAM3Ax8AOYM7Az0DPgMXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgCgAAANoAAHDQ4NFg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAeDSYNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAC4NMABeAF4ANg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAD4NRg1ODVYNXg1mDTAAbQ0wADAAMAAwADAAMAAwADAA2gbaBtoG2gbaBtoG2gbaBnUNeg3CBYANwgWFDdoGjA3aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gaUDZwNpA2oDdoG2gawDbcNvw3HDdoG2gbPDdYN3A3fDeYN2gbsDfMN2gbaBvoN/g3aBgYODg7aBl4AXgBeABYOXgBeACUG2gYeDl4AJA5eACwO2w3aBtoGMQ45DtoG2gbaBtoGQQ7aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B1EO2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQdZDjUHNQc1BzUHNQc1B2EONQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHaA41BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B3AO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B2EO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBkkOeA6gAKAAoAAwADAAMAAwAKAAoACgAKAAoACgAKAAgA4wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAD//wQABAAEAAQABAAEAAQABAAEAA0AAwABAAEAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAKABMAFwAeABsAGgAeABcAFgASAB4AGwAYAA8AGAAcAEsASwBLAEsASwBLAEsASwBLAEsAGAAYAB4AHgAeABMAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAFgAbABIAHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYADQARAB4ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkAFgAaABsAGwAbAB4AHQAdAB4ATwAXAB4ADQAeAB4AGgAbAE8ATwAOAFAAHQAdAB0ATwBPABcATwBPAE8AFgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwArAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAAQABAANAA0ASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAUAArACsAKwArACsAKwArACsABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAGgAaAFAAUABQAFAAUABMAB4AGwBQAB4AKwArACsABAAEAAQAKwBQAFAAUABQAFAAUAArACsAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUAArAFAAUAArACsABAArAAQABAAEAAQABAArACsAKwArAAQABAArACsABAAEAAQAKwArACsABAArACsAKwArACsAKwArAFAAUABQAFAAKwBQACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwAEAAQAUABQAFAABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQAKwArAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeABsAKwArACsAKwArACsAKwBQAAQABAAEAAQABAAEACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAKwArACsAKwArACsAKwArAAQABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwAEAFAAKwBQAFAAUABQAFAAUAArACsAKwBQAFAAUAArAFAAUABQAFAAKwArACsAUABQACsAUAArAFAAUAArACsAKwBQAFAAKwArACsAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQAKwArACsABAAEAAQAKwAEAAQABAAEACsAKwBQACsAKwArACsAKwArAAQAKwArACsAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAB4AHgAeAB4AHgAeABsAHgArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArAFAAUABQACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAB4AUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArACsAKwArACsAKwArAFAAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwArAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAKwBcAFwAKwBcACsAKwBcACsAKwArACsAKwArAFwAXABcAFwAKwBcAFwAXABcAFwAXABcACsAXABcAFwAKwBcACsAXAArACsAXABcACsAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgArACoAKgBcACsAKwBcAFwAXABcAFwAKwBcACsAKgAqACoAKgAqACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAFwAXABcAFwAUAAOAA4ADgAOAB4ADgAOAAkADgAOAA0ACQATABMAEwATABMACQAeABMAHgAeAB4ABAAEAB4AHgAeAB4AHgAeAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUAANAAQAHgAEAB4ABAAWABEAFgARAAQABABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAAQABAAEAAQABAANAAQABABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsADQANAB4AHgAeAB4AHgAeAAQAHgAeAB4AHgAeAB4AKwAeAB4ADgAOAA0ADgAeAB4AHgAeAB4ACQAJACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgAeAB4AHgBcAFwAXABcAFwAXAAqACoAKgAqAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAKgAqACoAKgAqACoAKgBcAFwAXAAqACoAKgAqAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAXAAqAEsASwBLAEsASwBLAEsASwBLAEsAKgAqACoAKgAqACoAUABQAFAAUABQAFAAKwBQACsAKwArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQACsAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwAEAAQABAAeAA0AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAEQArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAADQANAA0AUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAA0ADQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoADQANABUAXAANAB4ADQAbAFwAKgArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAB4AHgATABMADQANAA4AHgATABMAHgAEAAQABAAJACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAUABQAFAAUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwAeACsAKwArABMAEwBLAEsASwBLAEsASwBLAEsASwBLAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwBcAFwAXABcAFwAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcACsAKwArACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwAeAB4AXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsABABLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKgAqACoAKgAqACoAKgBcACoAKgAqACoAKgAqACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAUABQAFAAUABQAFAAUAArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4ADQANAA0ADQAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAHgAeAB4AHgBQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwANAA0ADQANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwBQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsABAAEAAQAHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAABABQAFAAUABQAAQABAAEAFAAUAAEAAQABAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAKwBQACsAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAKwArAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAKwAeAB4AHgAeAB4AHgAeAA4AHgArAA0ADQANAA0ADQANAA0ACQANAA0ADQAIAAQACwAEAAQADQAJAA0ADQAMAB0AHQAeABcAFwAWABcAFwAXABYAFwAdAB0AHgAeABQAFAAUAA0AAQABAAQABAAEAAQABAAJABoAGgAaABoAGgAaABoAGgAeABcAFwAdABUAFQAeAB4AHgAeAB4AHgAYABYAEQAVABUAFQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgANAB4ADQANAA0ADQAeAA0ADQANAAcAHgAeAB4AHgArAAQABAAEAAQABAAEAAQABAAEAAQAUABQACsAKwBPAFAAUABQAFAAUAAeAB4AHgAWABEATwBQAE8ATwBPAE8AUABQAFAAUABQAB4AHgAeABYAEQArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGgAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgBQABoAHgAdAB4AUAAeABoAHgAeAB4AHgAeAB4AHgAeAB4ATwAeAFAAGwAeAB4AUABQAFAAUABQAB4AHgAeAB0AHQAeAFAAHgBQAB4AUAAeAFAATwBQAFAAHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AUABQAFAAUABPAE8AUABQAFAAUABQAE8AUABQAE8AUABPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAE8ATwBPAE8ATwBPAE8ATwBPAE8AUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAATwAeAB4AKwArACsAKwAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB0AHQAeAB4AHgAdAB0AHgAeAB0AHgAeAB4AHQAeAB0AGwAbAB4AHQAeAB4AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB0AHgAdAB4AHQAdAB0AHQAdAB0AHgAdAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAdAB0AHQAdAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAlACUAHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB0AHQAeAB4AHgAeAB0AHQAdAB4AHgAdAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB0AHQAeAB4AHQAeAB4AHgAeAB0AHQAeAB4AHgAeACUAJQAdAB0AJQAeACUAJQAlACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHQAdAB0AHgAdACUAHQAdAB4AHQAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHQAdAB0AHQAlAB4AJQAlACUAHQAlACUAHQAdAB0AJQAlAB0AHQAlAB0AHQAlACUAJQAeAB0AHgAeAB4AHgAdAB0AJQAdAB0AHQAdAB0AHQAlACUAJQAlACUAHQAlACUAIAAlAB0AHQAlACUAJQAlACUAJQAlACUAHgAeAB4AJQAlACAAIAAgACAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeABcAFwAXABcAFwAXAB4AEwATACUAHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACUAJQBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwArACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAE8ATwBPAE8ATwBPAE8ATwAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeACsAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUAArACsAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQBQAFAAUABQACsAKwArACsAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAABAAEAAQAKwAEAAQAKwArACsAKwArAAQABAAEAAQAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsABAAEAAQAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsADQANAA0ADQANAA0ADQANAB4AKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAUABQAFAAUABQAA0ADQANAA0ADQANABQAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwANAA0ADQANAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAeAAQABAAEAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLACsADQArAB4AKwArAAQABAAEAAQAUABQAB4AUAArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwAEAAQABAAEAAQABAAEAAQABAAOAA0ADQATABMAHgAeAB4ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0AUABQAFAAUAAEAAQAKwArAAQADQANAB4AUAArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXABcAA0ADQANACoASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUAArACsAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANACsADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEcARwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwAeAAQABAANAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAEAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUAArACsAUAArACsAUABQACsAKwBQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAeAB4ADQANAA0ADQAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAArAAQABAArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAEAAQABAAEAAQABAAEACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAFgAWAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAKwBQACsAKwArACsAKwArAFAAKwArACsAKwBQACsAUAArAFAAKwBQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQACsAUAArAFAAKwBQACsAUABQACsAUAArACsAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAUABQAFAAUAArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUAArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAlACUAJQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeACUAJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeACUAJQAlACUAJQAeACUAJQAlACUAJQAgACAAIAAlACUAIAAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIQAhACEAIQAhACUAJQAgACAAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAIAAlACUAJQAlACAAJQAgACAAIAAgACAAIAAgACAAIAAlACUAJQAgACUAJQAlACUAIAAgACAAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeACUAHgAlAB4AJQAlACUAJQAlACAAJQAlACUAJQAeACUAHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAIAAgACAAIAAgAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFwAXABcAFQAVABUAHgAeAB4AHgAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAlACAAIAAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsA';
|
17464 |
+
|
17465 |
+
/***/ }),
|
17466 |
+
/* 50 */
|
17467 |
+
/***/ (function(module, exports, __webpack_require__) {
|
17468 |
+
|
17469 |
+
"use strict";
|
17470 |
+
|
17471 |
+
|
17472 |
+
Object.defineProperty(exports, "__esModule", {
|
17473 |
+
value: true
|
17474 |
+
});
|
17475 |
+
|
17476 |
+
var _Path = __webpack_require__(6);
|
17477 |
+
|
17478 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
17479 |
+
|
17480 |
+
var Circle = function Circle(x, y, radius) {
|
17481 |
+
_classCallCheck(this, Circle);
|
17482 |
+
|
17483 |
+
this.type = _Path.PATH.CIRCLE;
|
17484 |
+
this.x = x;
|
17485 |
+
this.y = y;
|
17486 |
+
this.radius = radius;
|
17487 |
+
if (true) {
|
17488 |
+
if (isNaN(x)) {
|
17489 |
+
console.error('Invalid x value given for Circle');
|
17490 |
+
}
|
17491 |
+
if (isNaN(y)) {
|
17492 |
+
console.error('Invalid y value given for Circle');
|
17493 |
+
}
|
17494 |
+
if (isNaN(radius)) {
|
17495 |
+
console.error('Invalid radius value given for Circle');
|
17496 |
+
}
|
17497 |
+
}
|
17498 |
+
};
|
17499 |
+
|
17500 |
+
exports.default = Circle;
|
17501 |
+
|
17502 |
+
/***/ }),
|
17503 |
+
/* 51 */
|
17504 |
+
/***/ (function(module, exports, __webpack_require__) {
|
17505 |
+
|
17506 |
+
"use strict";
|
17507 |
+
|
17508 |
+
|
17509 |
+
Object.defineProperty(exports, "__esModule", {
|
17510 |
+
value: true
|
17511 |
+
});
|
17512 |
+
|
17513 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
17514 |
+
|
17515 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
17516 |
+
|
17517 |
+
var _Bounds = __webpack_require__(1);
|
17518 |
+
|
17519 |
+
var _Font = __webpack_require__(25);
|
17520 |
+
|
17521 |
+
var _Gradient = __webpack_require__(52);
|
17522 |
+
|
17523 |
+
var _TextContainer = __webpack_require__(9);
|
17524 |
+
|
17525 |
+
var _TextContainer2 = _interopRequireDefault(_TextContainer);
|
17526 |
+
|
17527 |
+
var _background = __webpack_require__(5);
|
17528 |
+
|
17529 |
+
var _border = __webpack_require__(12);
|
17530 |
+
|
17531 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17532 |
+
|
17533 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
17534 |
+
|
17535 |
+
var Renderer = function () {
|
17536 |
+
function Renderer(target, options) {
|
17537 |
+
_classCallCheck(this, Renderer);
|
17538 |
+
|
17539 |
+
this.target = target;
|
17540 |
+
this.options = options;
|
17541 |
+
target.render(options);
|
17542 |
+
}
|
17543 |
+
|
17544 |
+
_createClass(Renderer, [{
|
17545 |
+
key: 'renderNode',
|
17546 |
+
value: function renderNode(container) {
|
17547 |
+
if (container.isVisible()) {
|
17548 |
+
this.renderNodeBackgroundAndBorders(container);
|
17549 |
+
this.renderNodeContent(container);
|
17550 |
+
}
|
17551 |
+
}
|
17552 |
+
}, {
|
17553 |
+
key: 'renderNodeContent',
|
17554 |
+
value: function renderNodeContent(container) {
|
17555 |
+
var _this = this;
|
17556 |
+
|
17557 |
+
var callback = function callback() {
|
17558 |
+
if (container.childNodes.length) {
|
17559 |
+
container.childNodes.forEach(function (child) {
|
17560 |
+
if (child instanceof _TextContainer2.default) {
|
17561 |
+
var style = child.parent.style;
|
17562 |
+
_this.target.renderTextNode(child.bounds, style.color, style.font, style.textDecoration, style.textShadow);
|
17563 |
+
} else {
|
17564 |
+
_this.target.drawShape(child, container.style.color);
|
17565 |
+
}
|
17566 |
+
});
|
17567 |
+
}
|
17568 |
+
|
17569 |
+
if (container.image) {
|
17570 |
+
var _image = _this.options.imageStore.get(container.image);
|
17571 |
+
if (_image) {
|
17572 |
+
var contentBox = (0, _Bounds.calculateContentBox)(container.bounds, container.style.padding, container.style.border);
|
17573 |
+
var _width = typeof _image.width === 'number' && _image.width > 0 ? _image.width : contentBox.width;
|
17574 |
+
var _height = typeof _image.height === 'number' && _image.height > 0 ? _image.height : contentBox.height;
|
17575 |
+
if (_width > 0 && _height > 0) {
|
17576 |
+
_this.target.clip([(0, _Bounds.calculatePaddingBoxPath)(container.curvedBounds)], function () {
|
17577 |
+
_this.target.drawImage(_image, new _Bounds.Bounds(0, 0, _width, _height), contentBox);
|
17578 |
+
});
|
17579 |
+
}
|
17580 |
+
}
|
17581 |
+
}
|
17582 |
+
};
|
17583 |
+
var paths = container.getClipPaths();
|
17584 |
+
if (paths.length) {
|
17585 |
+
this.target.clip(paths, callback);
|
17586 |
+
} else {
|
17587 |
+
callback();
|
17588 |
+
}
|
17589 |
+
}
|
17590 |
+
}, {
|
17591 |
+
key: 'renderNodeBackgroundAndBorders',
|
17592 |
+
value: function renderNodeBackgroundAndBorders(container) {
|
17593 |
+
var _this2 = this;
|
17594 |
+
|
17595 |
+
var HAS_BACKGROUND = !container.style.background.backgroundColor.isTransparent() || container.style.background.backgroundImage.length;
|
17596 |
+
|
17597 |
+
var hasRenderableBorders = container.style.border.some(function (border) {
|
17598 |
+
return border.borderStyle !== _border.BORDER_STYLE.NONE && !border.borderColor.isTransparent();
|
17599 |
+
});
|
17600 |
+
|
17601 |
+
var callback = function callback() {
|
17602 |
+
var backgroundPaintingArea = (0, _background.calculateBackgroungPaintingArea)(container.curvedBounds, container.style.background.backgroundClip);
|
17603 |
+
|
17604 |
+
if (HAS_BACKGROUND) {
|
17605 |
+
_this2.target.clip([backgroundPaintingArea], function () {
|
17606 |
+
if (!container.style.background.backgroundColor.isTransparent()) {
|
17607 |
+
_this2.target.fill(container.style.background.backgroundColor);
|
17608 |
+
}
|
17609 |
+
|
17610 |
+
_this2.renderBackgroundImage(container);
|
17611 |
+
});
|
17612 |
+
}
|
17613 |
+
|
17614 |
+
container.style.border.forEach(function (border, side) {
|
17615 |
+
if (border.borderStyle !== _border.BORDER_STYLE.NONE && !border.borderColor.isTransparent()) {
|
17616 |
+
_this2.renderBorder(border, side, container.curvedBounds);
|
17617 |
+
}
|
17618 |
+
});
|
17619 |
+
};
|
17620 |
+
|
17621 |
+
if (HAS_BACKGROUND || hasRenderableBorders) {
|
17622 |
+
var paths = container.parent ? container.parent.getClipPaths() : [];
|
17623 |
+
if (paths.length) {
|
17624 |
+
this.target.clip(paths, callback);
|
17625 |
+
} else {
|
17626 |
+
callback();
|
17627 |
+
}
|
17628 |
+
}
|
17629 |
+
}
|
17630 |
+
}, {
|
17631 |
+
key: 'renderBackgroundImage',
|
17632 |
+
value: function renderBackgroundImage(container) {
|
17633 |
+
var _this3 = this;
|
17634 |
+
|
17635 |
+
container.style.background.backgroundImage.slice(0).reverse().forEach(function (backgroundImage) {
|
17636 |
+
if (backgroundImage.source.method === 'url' && backgroundImage.source.args.length) {
|
17637 |
+
_this3.renderBackgroundRepeat(container, backgroundImage);
|
17638 |
+
} else if (/gradient/i.test(backgroundImage.source.method)) {
|
17639 |
+
_this3.renderBackgroundGradient(container, backgroundImage);
|
17640 |
+
}
|
17641 |
+
});
|
17642 |
+
}
|
17643 |
+
}, {
|
17644 |
+
key: 'renderBackgroundRepeat',
|
17645 |
+
value: function renderBackgroundRepeat(container, background) {
|
17646 |
+
var image = this.options.imageStore.get(background.source.args[0]);
|
17647 |
+
if (image) {
|
17648 |
+
var backgroundPositioningArea = (0, _background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin, container.bounds, container.style.padding, container.style.border);
|
17649 |
+
var backgroundImageSize = (0, _background.calculateBackgroundSize)(background, image, backgroundPositioningArea);
|
17650 |
+
var position = (0, _background.calculateBackgroundPosition)(background.position, backgroundImageSize, backgroundPositioningArea);
|
17651 |
+
var _path = (0, _background.calculateBackgroundRepeatPath)(background, position, backgroundImageSize, backgroundPositioningArea, container.bounds);
|
17652 |
+
|
17653 |
+
var _offsetX = Math.round(backgroundPositioningArea.left + position.x);
|
17654 |
+
var _offsetY = Math.round(backgroundPositioningArea.top + position.y);
|
17655 |
+
this.target.renderRepeat(_path, image, backgroundImageSize, _offsetX, _offsetY);
|
17656 |
+
}
|
17657 |
+
}
|
17658 |
+
}, {
|
17659 |
+
key: 'renderBackgroundGradient',
|
17660 |
+
value: function renderBackgroundGradient(container, background) {
|
17661 |
+
var backgroundPositioningArea = (0, _background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin, container.bounds, container.style.padding, container.style.border);
|
17662 |
+
var backgroundImageSize = (0, _background.calculateGradientBackgroundSize)(background, backgroundPositioningArea);
|
17663 |
+
var position = (0, _background.calculateBackgroundPosition)(background.position, backgroundImageSize, backgroundPositioningArea);
|
17664 |
+
var gradientBounds = new _Bounds.Bounds(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y), backgroundImageSize.width, backgroundImageSize.height);
|
17665 |
+
|
17666 |
+
var gradient = (0, _Gradient.parseGradient)(container, background.source, gradientBounds);
|
17667 |
+
if (gradient) {
|
17668 |
+
switch (gradient.type) {
|
17669 |
+
case _Gradient.GRADIENT_TYPE.LINEAR_GRADIENT:
|
17670 |
+
// $FlowFixMe
|
17671 |
+
this.target.renderLinearGradient(gradientBounds, gradient);
|
17672 |
+
break;
|
17673 |
+
case _Gradient.GRADIENT_TYPE.RADIAL_GRADIENT:
|
17674 |
+
// $FlowFixMe
|
17675 |
+
this.target.renderRadialGradient(gradientBounds, gradient);
|
17676 |
+
break;
|
17677 |
+
}
|
17678 |
+
}
|
17679 |
+
}
|
17680 |
+
}, {
|
17681 |
+
key: 'renderBorder',
|
17682 |
+
value: function renderBorder(border, side, curvePoints) {
|
17683 |
+
this.target.drawShape((0, _Bounds.parsePathForBorder)(curvePoints, side), border.borderColor);
|
17684 |
+
}
|
17685 |
+
}, {
|
17686 |
+
key: 'renderStack',
|
17687 |
+
value: function renderStack(stack) {
|
17688 |
+
var _this4 = this;
|
17689 |
+
|
17690 |
+
if (stack.container.isVisible()) {
|
17691 |
+
var _opacity = stack.getOpacity();
|
17692 |
+
if (_opacity !== this._opacity) {
|
17693 |
+
this.target.setOpacity(stack.getOpacity());
|
17694 |
+
this._opacity = _opacity;
|
17695 |
+
}
|
17696 |
+
|
17697 |
+
var _transform = stack.container.style.transform;
|
17698 |
+
if (_transform !== null) {
|
17699 |
+
this.target.transform(stack.container.bounds.left + _transform.transformOrigin[0].value, stack.container.bounds.top + _transform.transformOrigin[1].value, _transform.transform, function () {
|
17700 |
+
return _this4.renderStackContent(stack);
|
17701 |
+
});
|
17702 |
+
} else {
|
17703 |
+
this.renderStackContent(stack);
|
17704 |
+
}
|
17705 |
+
}
|
17706 |
+
}
|
17707 |
+
}, {
|
17708 |
+
key: 'renderStackContent',
|
17709 |
+
value: function renderStackContent(stack) {
|
17710 |
+
var _splitStackingContext = splitStackingContexts(stack),
|
17711 |
+
_splitStackingContext2 = _slicedToArray(_splitStackingContext, 5),
|
17712 |
+
negativeZIndex = _splitStackingContext2[0],
|
17713 |
+
zeroOrAutoZIndexOrTransformedOrOpacity = _splitStackingContext2[1],
|
17714 |
+
positiveZIndex = _splitStackingContext2[2],
|
17715 |
+
nonPositionedFloats = _splitStackingContext2[3],
|
17716 |
+
nonPositionedInlineLevel = _splitStackingContext2[4];
|
17717 |
+
|
17718 |
+
var _splitDescendants = splitDescendants(stack),
|
17719 |
+
_splitDescendants2 = _slicedToArray(_splitDescendants, 2),
|
17720 |
+
inlineLevel = _splitDescendants2[0],
|
17721 |
+
nonInlineLevel = _splitDescendants2[1];
|
17722 |
+
|
17723 |
+
// https://www.w3.org/TR/css-position-3/#painting-order
|
17724 |
+
// 1. the background and borders of the element forming the stacking context.
|
17725 |
+
|
17726 |
+
|
17727 |
+
this.renderNodeBackgroundAndBorders(stack.container);
|
17728 |
+
// 2. the child stacking contexts with negative stack levels (most negative first).
|
17729 |
+
negativeZIndex.sort(sortByZIndex).forEach(this.renderStack, this);
|
17730 |
+
// 3. For all its in-flow, non-positioned, block-level descendants in tree order:
|
17731 |
+
this.renderNodeContent(stack.container);
|
17732 |
+
nonInlineLevel.forEach(this.renderNode, this);
|
17733 |
+
// 4. All non-positioned floating descendants, in tree order. For each one of these,
|
17734 |
+
// treat the element as if it created a new stacking context, but any positioned descendants and descendants
|
17735 |
+
// which actually create a new stacking context should be considered part of the parent stacking context,
|
17736 |
+
// not this new one.
|
17737 |
+
nonPositionedFloats.forEach(this.renderStack, this);
|
17738 |
+
// 5. the in-flow, inline-level, non-positioned descendants, including inline tables and inline blocks.
|
17739 |
+
nonPositionedInlineLevel.forEach(this.renderStack, this);
|
17740 |
+
inlineLevel.forEach(this.renderNode, this);
|
17741 |
+
// 6. All positioned, opacity or transform descendants, in tree order that fall into the following categories:
|
17742 |
+
// All positioned descendants with 'z-index: auto' or 'z-index: 0', in tree order.
|
17743 |
+
// For those with 'z-index: auto', treat the element as if it created a new stacking context,
|
17744 |
+
// but any positioned descendants and descendants which actually create a new stacking context should be
|
17745 |
+
// considered part of the parent stacking context, not this new one. For those with 'z-index: 0',
|
17746 |
+
// treat the stacking context generated atomically.
|
17747 |
+
//
|
17748 |
+
// All opacity descendants with opacity less than 1
|
17749 |
+
//
|
17750 |
+
// All transform descendants with transform other than none
|
17751 |
+
zeroOrAutoZIndexOrTransformedOrOpacity.forEach(this.renderStack, this);
|
17752 |
+
// 7. Stacking contexts formed by positioned descendants with z-indices greater than or equal to 1 in z-index
|
17753 |
+
// order (smallest first) then tree order.
|
17754 |
+
positiveZIndex.sort(sortByZIndex).forEach(this.renderStack, this);
|
17755 |
+
}
|
17756 |
+
}, {
|
17757 |
+
key: 'render',
|
17758 |
+
value: function render(stack) {
|
17759 |
+
var _this5 = this;
|
17760 |
+
|
17761 |
+
if (this.options.backgroundColor) {
|
17762 |
+
this.target.rectangle(this.options.x, this.options.y, this.options.width, this.options.height, this.options.backgroundColor);
|
17763 |
+
}
|
17764 |
+
this.renderStack(stack);
|
17765 |
+
var target = this.target.getTarget();
|
17766 |
+
if (true) {
|
17767 |
+
return target.then(function (output) {
|
17768 |
+
_this5.options.logger.log('Render completed');
|
17769 |
+
return output;
|
17770 |
+
});
|
17771 |
+
}
|
17772 |
+
return target;
|
17773 |
+
}
|
17774 |
+
}]);
|
17775 |
+
|
17776 |
+
return Renderer;
|
17777 |
+
}();
|
17778 |
+
|
17779 |
+
exports.default = Renderer;
|
17780 |
+
|
17781 |
+
|
17782 |
+
var splitDescendants = function splitDescendants(stack) {
|
17783 |
+
var inlineLevel = [];
|
17784 |
+
var nonInlineLevel = [];
|
17785 |
+
|
17786 |
+
var length = stack.children.length;
|
17787 |
+
for (var i = 0; i < length; i++) {
|
17788 |
+
var child = stack.children[i];
|
17789 |
+
if (child.isInlineLevel()) {
|
17790 |
+
inlineLevel.push(child);
|
17791 |
+
} else {
|
17792 |
+
nonInlineLevel.push(child);
|
17793 |
+
}
|
17794 |
+
}
|
17795 |
+
return [inlineLevel, nonInlineLevel];
|
17796 |
+
};
|
17797 |
+
|
17798 |
+
var splitStackingContexts = function splitStackingContexts(stack) {
|
17799 |
+
var negativeZIndex = [];
|
17800 |
+
var zeroOrAutoZIndexOrTransformedOrOpacity = [];
|
17801 |
+
var positiveZIndex = [];
|
17802 |
+
var nonPositionedFloats = [];
|
17803 |
+
var nonPositionedInlineLevel = [];
|
17804 |
+
var length = stack.contexts.length;
|
17805 |
+
for (var i = 0; i < length; i++) {
|
17806 |
+
var child = stack.contexts[i];
|
17807 |
+
if (child.container.isPositioned() || child.container.style.opacity < 1 || child.container.isTransformed()) {
|
17808 |
+
if (child.container.style.zIndex.order < 0) {
|
17809 |
+
negativeZIndex.push(child);
|
17810 |
+
} else if (child.container.style.zIndex.order > 0) {
|
17811 |
+
positiveZIndex.push(child);
|
17812 |
+
} else {
|
17813 |
+
zeroOrAutoZIndexOrTransformedOrOpacity.push(child);
|
17814 |
+
}
|
17815 |
+
} else {
|
17816 |
+
if (child.container.isFloating()) {
|
17817 |
+
nonPositionedFloats.push(child);
|
17818 |
+
} else {
|
17819 |
+
nonPositionedInlineLevel.push(child);
|
17820 |
+
}
|
17821 |
+
}
|
17822 |
+
}
|
17823 |
+
return [negativeZIndex, zeroOrAutoZIndexOrTransformedOrOpacity, positiveZIndex, nonPositionedFloats, nonPositionedInlineLevel];
|
17824 |
+
};
|
17825 |
+
|
17826 |
+
var sortByZIndex = function sortByZIndex(a, b) {
|
17827 |
+
if (a.container.style.zIndex.order > b.container.style.zIndex.order) {
|
17828 |
+
return 1;
|
17829 |
+
} else if (a.container.style.zIndex.order < b.container.style.zIndex.order) {
|
17830 |
+
return -1;
|
17831 |
+
}
|
17832 |
+
|
17833 |
+
return a.container.index > b.container.index ? 1 : -1;
|
17834 |
+
};
|
17835 |
+
|
17836 |
+
/***/ }),
|
17837 |
+
/* 52 */
|
17838 |
+
/***/ (function(module, exports, __webpack_require__) {
|
17839 |
+
|
17840 |
+
"use strict";
|
17841 |
+
|
17842 |
+
|
17843 |
+
Object.defineProperty(exports, "__esModule", {
|
17844 |
+
value: true
|
17845 |
+
});
|
17846 |
+
exports.transformWebkitRadialGradientArgs = exports.parseGradient = exports.RadialGradient = exports.LinearGradient = exports.RADIAL_GRADIENT_SHAPE = exports.GRADIENT_TYPE = undefined;
|
17847 |
+
|
17848 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
17849 |
+
|
17850 |
+
var _NodeContainer = __webpack_require__(3);
|
17851 |
+
|
17852 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
17853 |
+
|
17854 |
+
var _Angle = __webpack_require__(53);
|
17855 |
+
|
17856 |
+
var _Color = __webpack_require__(0);
|
17857 |
+
|
17858 |
+
var _Color2 = _interopRequireDefault(_Color);
|
17859 |
+
|
17860 |
+
var _Length = __webpack_require__(2);
|
17861 |
+
|
17862 |
+
var _Length2 = _interopRequireDefault(_Length);
|
17863 |
+
|
17864 |
+
var _Util = __webpack_require__(4);
|
17865 |
+
|
17866 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
17867 |
+
|
17868 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
17869 |
+
|
17870 |
+
var SIDE_OR_CORNER = /^(to )?(left|top|right|bottom)( (left|top|right|bottom))?$/i;
|
17871 |
+
var PERCENTAGE_ANGLES = /^([+-]?\d*\.?\d+)% ([+-]?\d*\.?\d+)%$/i;
|
17872 |
+
var ENDS_WITH_LENGTH = /(px)|%|( 0)$/i;
|
17873 |
+
var FROM_TO_COLORSTOP = /^(from|to|color-stop)\((?:([\d.]+)(%)?,\s*)?(.+?)\)$/i;
|
17874 |
+
var RADIAL_SHAPE_DEFINITION = /^\s*(circle|ellipse)?\s*((?:([\d.]+)(px|r?em|%)\s*(?:([\d.]+)(px|r?em|%))?)|closest-side|closest-corner|farthest-side|farthest-corner)?\s*(?:at\s*(?:(left|center|right)|([\d.]+)(px|r?em|%))\s+(?:(top|center|bottom)|([\d.]+)(px|r?em|%)))?(?:\s|$)/i;
|
17875 |
+
|
17876 |
+
var GRADIENT_TYPE = exports.GRADIENT_TYPE = {
|
17877 |
+
LINEAR_GRADIENT: 0,
|
17878 |
+
RADIAL_GRADIENT: 1
|
17879 |
+
};
|
17880 |
+
|
17881 |
+
var RADIAL_GRADIENT_SHAPE = exports.RADIAL_GRADIENT_SHAPE = {
|
17882 |
+
CIRCLE: 0,
|
17883 |
+
ELLIPSE: 1
|
17884 |
+
};
|
17885 |
+
|
17886 |
+
var LENGTH_FOR_POSITION = {
|
17887 |
+
left: new _Length2.default('0%'),
|
17888 |
+
top: new _Length2.default('0%'),
|
17889 |
+
center: new _Length2.default('50%'),
|
17890 |
+
right: new _Length2.default('100%'),
|
17891 |
+
bottom: new _Length2.default('100%')
|
17892 |
+
};
|
17893 |
+
|
17894 |
+
var LinearGradient = exports.LinearGradient = function LinearGradient(colorStops, direction) {
|
17895 |
+
_classCallCheck(this, LinearGradient);
|
17896 |
+
|
17897 |
+
this.type = GRADIENT_TYPE.LINEAR_GRADIENT;
|
17898 |
+
this.colorStops = colorStops;
|
17899 |
+
this.direction = direction;
|
17900 |
+
};
|
17901 |
+
|
17902 |
+
var RadialGradient = exports.RadialGradient = function RadialGradient(colorStops, shape, center, radius) {
|
17903 |
+
_classCallCheck(this, RadialGradient);
|
17904 |
+
|
17905 |
+
this.type = GRADIENT_TYPE.RADIAL_GRADIENT;
|
17906 |
+
this.colorStops = colorStops;
|
17907 |
+
this.shape = shape;
|
17908 |
+
this.center = center;
|
17909 |
+
this.radius = radius;
|
17910 |
+
};
|
17911 |
+
|
17912 |
+
var parseGradient = exports.parseGradient = function parseGradient(container, _ref, bounds) {
|
17913 |
+
var args = _ref.args,
|
17914 |
+
method = _ref.method,
|
17915 |
+
prefix = _ref.prefix;
|
17916 |
+
|
17917 |
+
if (method === 'linear-gradient') {
|
17918 |
+
return parseLinearGradient(args, bounds, !!prefix);
|
17919 |
+
} else if (method === 'gradient' && args[0] === 'linear') {
|
17920 |
+
// TODO handle correct angle
|
17921 |
+
return parseLinearGradient(['to bottom'].concat(transformObsoleteColorStops(args.slice(3))), bounds, !!prefix);
|
17922 |
+
} else if (method === 'radial-gradient') {
|
17923 |
+
return parseRadialGradient(container, prefix === '-webkit-' ? transformWebkitRadialGradientArgs(args) : args, bounds);
|
17924 |
+
} else if (method === 'gradient' && args[0] === 'radial') {
|
17925 |
+
return parseRadialGradient(container, transformObsoleteColorStops(transformWebkitRadialGradientArgs(args.slice(1))), bounds);
|
17926 |
+
}
|
17927 |
+
};
|
17928 |
+
|
17929 |
+
var parseColorStops = function parseColorStops(args, firstColorStopIndex, lineLength) {
|
17930 |
+
var colorStops = [];
|
17931 |
+
|
17932 |
+
for (var i = firstColorStopIndex; i < args.length; i++) {
|
17933 |
+
var value = args[i];
|
17934 |
+
var HAS_LENGTH = ENDS_WITH_LENGTH.test(value);
|
17935 |
+
var lastSpaceIndex = value.lastIndexOf(' ');
|
17936 |
+
var _color = new _Color2.default(HAS_LENGTH ? value.substring(0, lastSpaceIndex) : value);
|
17937 |
+
var _stop = HAS_LENGTH ? new _Length2.default(value.substring(lastSpaceIndex + 1)) : i === firstColorStopIndex ? new _Length2.default('0%') : i === args.length - 1 ? new _Length2.default('100%') : null;
|
17938 |
+
colorStops.push({ color: _color, stop: _stop });
|
17939 |
+
}
|
17940 |
+
|
17941 |
+
var absoluteValuedColorStops = colorStops.map(function (_ref2) {
|
17942 |
+
var color = _ref2.color,
|
17943 |
+
stop = _ref2.stop;
|
17944 |
+
|
17945 |
+
var absoluteStop = lineLength === 0 ? 0 : stop ? stop.getAbsoluteValue(lineLength) / lineLength : null;
|
17946 |
+
|
17947 |
+
return {
|
17948 |
+
color: color,
|
17949 |
+
// $FlowFixMe
|
17950 |
+
stop: absoluteStop
|
17951 |
+
};
|
17952 |
+
});
|
17953 |
+
|
17954 |
+
var previousColorStop = absoluteValuedColorStops[0].stop;
|
17955 |
+
for (var _i = 0; _i < absoluteValuedColorStops.length; _i++) {
|
17956 |
+
if (previousColorStop !== null) {
|
17957 |
+
var _stop2 = absoluteValuedColorStops[_i].stop;
|
17958 |
+
if (_stop2 === null) {
|
17959 |
+
var n = _i;
|
17960 |
+
while (absoluteValuedColorStops[n].stop === null) {
|
17961 |
+
n++;
|
17962 |
+
}
|
17963 |
+
var steps = n - _i + 1;
|
17964 |
+
var nextColorStep = absoluteValuedColorStops[n].stop;
|
17965 |
+
var stepSize = (nextColorStep - previousColorStop) / steps;
|
17966 |
+
for (; _i < n; _i++) {
|
17967 |
+
previousColorStop = absoluteValuedColorStops[_i].stop = previousColorStop + stepSize;
|
17968 |
+
}
|
17969 |
+
} else {
|
17970 |
+
previousColorStop = _stop2;
|
17971 |
+
}
|
17972 |
+
}
|
17973 |
+
}
|
17974 |
+
|
17975 |
+
return absoluteValuedColorStops;
|
17976 |
+
};
|
17977 |
+
|
17978 |
+
var parseLinearGradient = function parseLinearGradient(args, bounds, hasPrefix) {
|
17979 |
+
var angle = (0, _Angle.parseAngle)(args[0]);
|
17980 |
+
var HAS_SIDE_OR_CORNER = SIDE_OR_CORNER.test(args[0]);
|
17981 |
+
var HAS_DIRECTION = HAS_SIDE_OR_CORNER || angle !== null || PERCENTAGE_ANGLES.test(args[0]);
|
17982 |
+
var direction = HAS_DIRECTION ? angle !== null ? calculateGradientDirection(
|
17983 |
+
// if there is a prefix, the 0° angle points due East (instead of North per W3C)
|
17984 |
+
hasPrefix ? angle - Math.PI * 0.5 : angle, bounds) : HAS_SIDE_OR_CORNER ? parseSideOrCorner(args[0], bounds) : parsePercentageAngle(args[0], bounds) : calculateGradientDirection(Math.PI, bounds);
|
17985 |
+
var firstColorStopIndex = HAS_DIRECTION ? 1 : 0;
|
17986 |
+
|
17987 |
+
// TODO: Fix some inaccuracy with color stops with px values
|
17988 |
+
var lineLength = Math.min((0, _Util.distance)(Math.abs(direction.x0) + Math.abs(direction.x1), Math.abs(direction.y0) + Math.abs(direction.y1)), bounds.width * 2, bounds.height * 2);
|
17989 |
+
|
17990 |
+
return new LinearGradient(parseColorStops(args, firstColorStopIndex, lineLength), direction);
|
17991 |
+
};
|
17992 |
+
|
17993 |
+
var parseRadialGradient = function parseRadialGradient(container, args, bounds) {
|
17994 |
+
var m = args[0].match(RADIAL_SHAPE_DEFINITION);
|
17995 |
+
var shape = m && (m[1] === 'circle' || // explicit shape specification
|
17996 |
+
m[3] !== undefined && m[5] === undefined) // only one radius coordinate
|
17997 |
+
? RADIAL_GRADIENT_SHAPE.CIRCLE : RADIAL_GRADIENT_SHAPE.ELLIPSE;
|
17998 |
+
var radius = {};
|
17999 |
+
var center = {};
|
18000 |
+
|
18001 |
+
if (m) {
|
18002 |
+
// Radius
|
18003 |
+
if (m[3] !== undefined) {
|
18004 |
+
radius.x = (0, _Length.calculateLengthFromValueWithUnit)(container, m[3], m[4]).getAbsoluteValue(bounds.width);
|
18005 |
+
}
|
18006 |
+
|
18007 |
+
if (m[5] !== undefined) {
|
18008 |
+
radius.y = (0, _Length.calculateLengthFromValueWithUnit)(container, m[5], m[6]).getAbsoluteValue(bounds.height);
|
18009 |
+
}
|
18010 |
+
|
18011 |
+
// Position
|
18012 |
+
if (m[7]) {
|
18013 |
+
center.x = LENGTH_FOR_POSITION[m[7].toLowerCase()];
|
18014 |
+
} else if (m[8] !== undefined) {
|
18015 |
+
center.x = (0, _Length.calculateLengthFromValueWithUnit)(container, m[8], m[9]);
|
18016 |
+
}
|
18017 |
+
|
18018 |
+
if (m[10]) {
|
18019 |
+
center.y = LENGTH_FOR_POSITION[m[10].toLowerCase()];
|
18020 |
+
} else if (m[11] !== undefined) {
|
18021 |
+
center.y = (0, _Length.calculateLengthFromValueWithUnit)(container, m[11], m[12]);
|
18022 |
+
}
|
18023 |
+
}
|
18024 |
+
|
18025 |
+
var gradientCenter = {
|
18026 |
+
x: center.x === undefined ? bounds.width / 2 : center.x.getAbsoluteValue(bounds.width),
|
18027 |
+
y: center.y === undefined ? bounds.height / 2 : center.y.getAbsoluteValue(bounds.height)
|
18028 |
+
};
|
18029 |
+
var gradientRadius = calculateRadius(m && m[2] || 'farthest-corner', shape, gradientCenter, radius, bounds);
|
18030 |
+
|
18031 |
+
return new RadialGradient(parseColorStops(args, m ? 1 : 0, Math.min(gradientRadius.x, gradientRadius.y)), shape, gradientCenter, gradientRadius);
|
18032 |
+
};
|
18033 |
+
|
18034 |
+
var calculateGradientDirection = function calculateGradientDirection(radian, bounds) {
|
18035 |
+
var width = bounds.width;
|
18036 |
+
var height = bounds.height;
|
18037 |
+
var HALF_WIDTH = width * 0.5;
|
18038 |
+
var HALF_HEIGHT = height * 0.5;
|
18039 |
+
var lineLength = Math.abs(width * Math.sin(radian)) + Math.abs(height * Math.cos(radian));
|
18040 |
+
var HALF_LINE_LENGTH = lineLength / 2;
|
18041 |
+
|
18042 |
+
var x0 = HALF_WIDTH + Math.sin(radian) * HALF_LINE_LENGTH;
|
18043 |
+
var y0 = HALF_HEIGHT - Math.cos(radian) * HALF_LINE_LENGTH;
|
18044 |
+
var x1 = width - x0;
|
18045 |
+
var y1 = height - y0;
|
18046 |
+
|
18047 |
+
return { x0: x0, x1: x1, y0: y0, y1: y1 };
|
18048 |
+
};
|
18049 |
+
|
18050 |
+
var parseTopRight = function parseTopRight(bounds) {
|
18051 |
+
return Math.acos(bounds.width / 2 / ((0, _Util.distance)(bounds.width, bounds.height) / 2));
|
18052 |
+
};
|
18053 |
+
|
18054 |
+
var parseSideOrCorner = function parseSideOrCorner(side, bounds) {
|
18055 |
+
switch (side) {
|
18056 |
+
case 'bottom':
|
18057 |
+
case 'to top':
|
18058 |
+
return calculateGradientDirection(0, bounds);
|
18059 |
+
case 'left':
|
18060 |
+
case 'to right':
|
18061 |
+
return calculateGradientDirection(Math.PI / 2, bounds);
|
18062 |
+
case 'right':
|
18063 |
+
case 'to left':
|
18064 |
+
return calculateGradientDirection(3 * Math.PI / 2, bounds);
|
18065 |
+
case 'top right':
|
18066 |
+
case 'right top':
|
18067 |
+
case 'to bottom left':
|
18068 |
+
case 'to left bottom':
|
18069 |
+
return calculateGradientDirection(Math.PI + parseTopRight(bounds), bounds);
|
18070 |
+
case 'top left':
|
18071 |
+
case 'left top':
|
18072 |
+
case 'to bottom right':
|
18073 |
+
case 'to right bottom':
|
18074 |
+
return calculateGradientDirection(Math.PI - parseTopRight(bounds), bounds);
|
18075 |
+
case 'bottom left':
|
18076 |
+
case 'left bottom':
|
18077 |
+
case 'to top right':
|
18078 |
+
case 'to right top':
|
18079 |
+
return calculateGradientDirection(parseTopRight(bounds), bounds);
|
18080 |
+
case 'bottom right':
|
18081 |
+
case 'right bottom':
|
18082 |
+
case 'to top left':
|
18083 |
+
case 'to left top':
|
18084 |
+
return calculateGradientDirection(2 * Math.PI - parseTopRight(bounds), bounds);
|
18085 |
+
case 'top':
|
18086 |
+
case 'to bottom':
|
18087 |
+
default:
|
18088 |
+
return calculateGradientDirection(Math.PI, bounds);
|
18089 |
+
}
|
18090 |
+
};
|
18091 |
+
|
18092 |
+
var parsePercentageAngle = function parsePercentageAngle(angle, bounds) {
|
18093 |
+
var _angle$split$map = angle.split(' ').map(parseFloat),
|
18094 |
+
_angle$split$map2 = _slicedToArray(_angle$split$map, 2),
|
18095 |
+
left = _angle$split$map2[0],
|
18096 |
+
top = _angle$split$map2[1];
|
18097 |
+
|
18098 |
+
var ratio = left / 100 * bounds.width / (top / 100 * bounds.height);
|
18099 |
+
|
18100 |
+
return calculateGradientDirection(Math.atan(isNaN(ratio) ? 1 : ratio) + Math.PI / 2, bounds);
|
18101 |
+
};
|
18102 |
+
|
18103 |
+
var findCorner = function findCorner(bounds, x, y, closest) {
|
18104 |
+
var corners = [{ x: 0, y: 0 }, { x: 0, y: bounds.height }, { x: bounds.width, y: 0 }, { x: bounds.width, y: bounds.height }];
|
18105 |
+
|
18106 |
+
// $FlowFixMe
|
18107 |
+
return corners.reduce(function (stat, corner) {
|
18108 |
+
var d = (0, _Util.distance)(x - corner.x, y - corner.y);
|
18109 |
+
if (closest ? d < stat.optimumDistance : d > stat.optimumDistance) {
|
18110 |
+
return {
|
18111 |
+
optimumCorner: corner,
|
18112 |
+
optimumDistance: d
|
18113 |
+
};
|
18114 |
+
}
|
18115 |
+
|
18116 |
+
return stat;
|
18117 |
+
}, {
|
18118 |
+
optimumDistance: closest ? Infinity : -Infinity,
|
18119 |
+
optimumCorner: null
|
18120 |
+
}).optimumCorner;
|
18121 |
+
};
|
18122 |
+
|
18123 |
+
var calculateRadius = function calculateRadius(extent, shape, center, radius, bounds) {
|
18124 |
+
var x = center.x;
|
18125 |
+
var y = center.y;
|
18126 |
+
var rx = 0;
|
18127 |
+
var ry = 0;
|
18128 |
+
|
18129 |
+
switch (extent) {
|
18130 |
+
case 'closest-side':
|
18131 |
+
// The ending shape is sized so that that it exactly meets the side of the gradient box closest to the gradient’s center.
|
18132 |
+
// If the shape is an ellipse, it exactly meets the closest side in each dimension.
|
18133 |
+
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
18134 |
+
rx = ry = Math.min(Math.abs(x), Math.abs(x - bounds.width), Math.abs(y), Math.abs(y - bounds.height));
|
18135 |
+
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
18136 |
+
rx = Math.min(Math.abs(x), Math.abs(x - bounds.width));
|
18137 |
+
ry = Math.min(Math.abs(y), Math.abs(y - bounds.height));
|
18138 |
+
}
|
18139 |
+
break;
|
18140 |
+
|
18141 |
+
case 'closest-corner':
|
18142 |
+
// The ending shape is sized so that that it passes through the corner of the gradient box closest to the gradient’s center.
|
18143 |
+
// If the shape is an ellipse, the ending shape is given the same aspect-ratio it would have if closest-side were specified.
|
18144 |
+
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
18145 |
+
rx = ry = Math.min((0, _Util.distance)(x, y), (0, _Util.distance)(x, y - bounds.height), (0, _Util.distance)(x - bounds.width, y), (0, _Util.distance)(x - bounds.width, y - bounds.height));
|
18146 |
+
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
18147 |
+
// Compute the ratio ry/rx (which is to be the same as for "closest-side")
|
18148 |
+
var c = Math.min(Math.abs(y), Math.abs(y - bounds.height)) / Math.min(Math.abs(x), Math.abs(x - bounds.width));
|
18149 |
+
var corner = findCorner(bounds, x, y, true);
|
18150 |
+
rx = (0, _Util.distance)(corner.x - x, (corner.y - y) / c);
|
18151 |
+
ry = c * rx;
|
18152 |
+
}
|
18153 |
+
break;
|
18154 |
+
|
18155 |
+
case 'farthest-side':
|
18156 |
+
// Same as closest-side, except the ending shape is sized based on the farthest side(s)
|
18157 |
+
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
18158 |
+
rx = ry = Math.max(Math.abs(x), Math.abs(x - bounds.width), Math.abs(y), Math.abs(y - bounds.height));
|
18159 |
+
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
18160 |
+
rx = Math.max(Math.abs(x), Math.abs(x - bounds.width));
|
18161 |
+
ry = Math.max(Math.abs(y), Math.abs(y - bounds.height));
|
18162 |
+
}
|
18163 |
+
break;
|
18164 |
+
|
18165 |
+
case 'farthest-corner':
|
18166 |
+
// Same as closest-corner, except the ending shape is sized based on the farthest corner.
|
18167 |
+
// If the shape is an ellipse, the ending shape is given the same aspect ratio it would have if farthest-side were specified.
|
18168 |
+
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
18169 |
+
rx = ry = Math.max((0, _Util.distance)(x, y), (0, _Util.distance)(x, y - bounds.height), (0, _Util.distance)(x - bounds.width, y), (0, _Util.distance)(x - bounds.width, y - bounds.height));
|
18170 |
+
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
18171 |
+
// Compute the ratio ry/rx (which is to be the same as for "farthest-side")
|
18172 |
+
var _c = Math.max(Math.abs(y), Math.abs(y - bounds.height)) / Math.max(Math.abs(x), Math.abs(x - bounds.width));
|
18173 |
+
var _corner = findCorner(bounds, x, y, false);
|
18174 |
+
rx = (0, _Util.distance)(_corner.x - x, (_corner.y - y) / _c);
|
18175 |
+
ry = _c * rx;
|
18176 |
+
}
|
18177 |
+
break;
|
18178 |
+
|
18179 |
+
default:
|
18180 |
+
// pixel or percentage values
|
18181 |
+
rx = radius.x || 0;
|
18182 |
+
ry = radius.y !== undefined ? radius.y : rx;
|
18183 |
+
break;
|
18184 |
+
}
|
18185 |
+
|
18186 |
+
return {
|
18187 |
+
x: rx,
|
18188 |
+
y: ry
|
18189 |
+
};
|
18190 |
+
};
|
18191 |
+
|
18192 |
+
var transformWebkitRadialGradientArgs = exports.transformWebkitRadialGradientArgs = function transformWebkitRadialGradientArgs(args) {
|
18193 |
+
var shape = '';
|
18194 |
+
var radius = '';
|
18195 |
+
var extent = '';
|
18196 |
+
var position = '';
|
18197 |
+
var idx = 0;
|
18198 |
+
|
18199 |
+
var POSITION = /^(left|center|right|\d+(?:px|r?em|%)?)(?:\s+(top|center|bottom|\d+(?:px|r?em|%)?))?$/i;
|
18200 |
+
var SHAPE_AND_EXTENT = /^(circle|ellipse)?\s*(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)?$/i;
|
18201 |
+
var RADIUS = /^\d+(px|r?em|%)?(?:\s+\d+(px|r?em|%)?)?$/i;
|
18202 |
+
|
18203 |
+
var matchStartPosition = args[idx].match(POSITION);
|
18204 |
+
if (matchStartPosition) {
|
18205 |
+
idx++;
|
18206 |
+
}
|
18207 |
+
|
18208 |
+
var matchShapeExtent = args[idx].match(SHAPE_AND_EXTENT);
|
18209 |
+
if (matchShapeExtent) {
|
18210 |
+
shape = matchShapeExtent[1] || '';
|
18211 |
+
extent = matchShapeExtent[2] || '';
|
18212 |
+
if (extent === 'contain') {
|
18213 |
+
extent = 'closest-side';
|
18214 |
+
} else if (extent === 'cover') {
|
18215 |
+
extent = 'farthest-corner';
|
18216 |
+
}
|
18217 |
+
idx++;
|
18218 |
+
}
|
18219 |
+
|
18220 |
+
var matchStartRadius = args[idx].match(RADIUS);
|
18221 |
+
if (matchStartRadius) {
|
18222 |
+
idx++;
|
18223 |
+
}
|
18224 |
+
|
18225 |
+
var matchEndPosition = args[idx].match(POSITION);
|
18226 |
+
if (matchEndPosition) {
|
18227 |
+
idx++;
|
18228 |
+
}
|
18229 |
+
|
18230 |
+
var matchEndRadius = args[idx].match(RADIUS);
|
18231 |
+
if (matchEndRadius) {
|
18232 |
+
idx++;
|
18233 |
+
}
|
18234 |
+
|
18235 |
+
var matchPosition = matchEndPosition || matchStartPosition;
|
18236 |
+
if (matchPosition && matchPosition[1]) {
|
18237 |
+
position = matchPosition[1] + (/^\d+$/.test(matchPosition[1]) ? 'px' : '');
|
18238 |
+
if (matchPosition[2]) {
|
18239 |
+
position += ' ' + matchPosition[2] + (/^\d+$/.test(matchPosition[2]) ? 'px' : '');
|
18240 |
+
}
|
18241 |
+
}
|
18242 |
+
|
18243 |
+
var matchRadius = matchEndRadius || matchStartRadius;
|
18244 |
+
if (matchRadius) {
|
18245 |
+
radius = matchRadius[0];
|
18246 |
+
if (!matchRadius[1]) {
|
18247 |
+
radius += 'px';
|
18248 |
+
}
|
18249 |
+
}
|
18250 |
+
|
18251 |
+
if (position && !shape && !radius && !extent) {
|
18252 |
+
radius = position;
|
18253 |
+
position = '';
|
18254 |
+
}
|
18255 |
+
|
18256 |
+
if (position) {
|
18257 |
+
position = 'at ' + position;
|
18258 |
+
}
|
18259 |
+
|
18260 |
+
return [[shape, extent, radius, position].filter(function (s) {
|
18261 |
+
return !!s;
|
18262 |
+
}).join(' ')].concat(args.slice(idx));
|
18263 |
+
};
|
18264 |
+
|
18265 |
+
var transformObsoleteColorStops = function transformObsoleteColorStops(args) {
|
18266 |
+
return args.map(function (color) {
|
18267 |
+
return color.match(FROM_TO_COLORSTOP);
|
18268 |
+
})
|
18269 |
+
// $FlowFixMe
|
18270 |
+
.map(function (v, index) {
|
18271 |
+
if (!v) {
|
18272 |
+
return args[index];
|
18273 |
+
}
|
18274 |
+
|
18275 |
+
switch (v[1]) {
|
18276 |
+
case 'from':
|
18277 |
+
return v[4] + ' 0%';
|
18278 |
+
case 'to':
|
18279 |
+
return v[4] + ' 100%';
|
18280 |
+
case 'color-stop':
|
18281 |
+
if (v[3] === '%') {
|
18282 |
+
return v[4] + ' ' + v[2];
|
18283 |
+
}
|
18284 |
+
return v[4] + ' ' + parseFloat(v[2]) * 100 + '%';
|
18285 |
+
}
|
18286 |
+
});
|
18287 |
+
};
|
18288 |
+
|
18289 |
+
/***/ }),
|
18290 |
+
/* 53 */
|
18291 |
+
/***/ (function(module, exports, __webpack_require__) {
|
18292 |
+
|
18293 |
+
"use strict";
|
18294 |
+
|
18295 |
+
|
18296 |
+
Object.defineProperty(exports, "__esModule", {
|
18297 |
+
value: true
|
18298 |
+
});
|
18299 |
+
var ANGLE = /([+-]?\d*\.?\d+)(deg|grad|rad|turn)/i;
|
18300 |
+
|
18301 |
+
var parseAngle = exports.parseAngle = function parseAngle(angle) {
|
18302 |
+
var match = angle.match(ANGLE);
|
18303 |
+
|
18304 |
+
if (match) {
|
18305 |
+
var value = parseFloat(match[1]);
|
18306 |
+
switch (match[2].toLowerCase()) {
|
18307 |
+
case 'deg':
|
18308 |
+
return Math.PI * value / 180;
|
18309 |
+
case 'grad':
|
18310 |
+
return Math.PI / 200 * value;
|
18311 |
+
case 'rad':
|
18312 |
+
return value;
|
18313 |
+
case 'turn':
|
18314 |
+
return Math.PI * 2 * value;
|
18315 |
+
}
|
18316 |
+
}
|
18317 |
+
|
18318 |
+
return null;
|
18319 |
+
};
|
18320 |
+
|
18321 |
+
/***/ }),
|
18322 |
+
/* 54 */
|
18323 |
+
/***/ (function(module, exports, __webpack_require__) {
|
18324 |
+
|
18325 |
+
"use strict";
|
18326 |
+
|
18327 |
+
|
18328 |
+
Object.defineProperty(exports, "__esModule", {
|
18329 |
+
value: true
|
18330 |
+
});
|
18331 |
+
exports.cloneWindow = exports.DocumentCloner = undefined;
|
18332 |
+
|
18333 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
18334 |
+
|
18335 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
18336 |
+
|
18337 |
+
var _Bounds = __webpack_require__(1);
|
18338 |
+
|
18339 |
+
var _Proxy = __webpack_require__(26);
|
18340 |
+
|
18341 |
+
var _ResourceLoader = __webpack_require__(55);
|
18342 |
+
|
18343 |
+
var _ResourceLoader2 = _interopRequireDefault(_ResourceLoader);
|
18344 |
+
|
18345 |
+
var _Util = __webpack_require__(4);
|
18346 |
+
|
18347 |
+
var _background = __webpack_require__(5);
|
18348 |
+
|
18349 |
+
var _CanvasRenderer = __webpack_require__(15);
|
18350 |
+
|
18351 |
+
var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer);
|
18352 |
+
|
18353 |
+
var _PseudoNodeContent = __webpack_require__(56);
|
18354 |
+
|
18355 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18356 |
+
|
18357 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
18358 |
+
|
18359 |
+
var IGNORE_ATTRIBUTE = 'data-html2canvas-ignore';
|
18360 |
+
|
18361 |
+
var DocumentCloner = exports.DocumentCloner = function () {
|
18362 |
+
function DocumentCloner(element, options, logger, copyInline, renderer) {
|
18363 |
+
_classCallCheck(this, DocumentCloner);
|
18364 |
+
|
18365 |
+
this.referenceElement = element;
|
18366 |
+
this.scrolledElements = [];
|
18367 |
+
this.copyStyles = copyInline;
|
18368 |
+
this.inlineImages = copyInline;
|
18369 |
+
this.logger = logger;
|
18370 |
+
this.options = options;
|
18371 |
+
this.renderer = renderer;
|
18372 |
+
this.resourceLoader = new _ResourceLoader2.default(options, logger, window);
|
18373 |
+
this.pseudoContentData = {
|
18374 |
+
counters: {},
|
18375 |
+
quoteDepth: 0
|
18376 |
+
};
|
18377 |
+
// $FlowFixMe
|
18378 |
+
this.documentElement = this.cloneNode(element.ownerDocument.documentElement);
|
18379 |
+
}
|
18380 |
+
|
18381 |
+
_createClass(DocumentCloner, [{
|
18382 |
+
key: 'inlineAllImages',
|
18383 |
+
value: function inlineAllImages(node) {
|
18384 |
+
var _this = this;
|
18385 |
+
|
18386 |
+
if (this.inlineImages && node) {
|
18387 |
+
var style = node.style;
|
18388 |
+
Promise.all((0, _background.parseBackgroundImage)(style.backgroundImage).map(function (backgroundImage) {
|
18389 |
+
if (backgroundImage.method === 'url') {
|
18390 |
+
return _this.resourceLoader.inlineImage(backgroundImage.args[0]).then(function (img) {
|
18391 |
+
return img && typeof img.src === 'string' ? 'url("' + img.src + '")' : 'none';
|
18392 |
+
}).catch(function (e) {
|
18393 |
+
if (true) {
|
18394 |
+
_this.logger.log('Unable to load image', e);
|
18395 |
+
}
|
18396 |
+
});
|
18397 |
+
}
|
18398 |
+
return Promise.resolve('' + backgroundImage.prefix + backgroundImage.method + '(' + backgroundImage.args.join(',') + ')');
|
18399 |
+
})).then(function (backgroundImages) {
|
18400 |
+
if (backgroundImages.length > 1) {
|
18401 |
+
// TODO Multiple backgrounds somehow broken in Chrome
|
18402 |
+
style.backgroundColor = '';
|
18403 |
+
}
|
18404 |
+
style.backgroundImage = backgroundImages.join(',');
|
18405 |
+
});
|
18406 |
+
|
18407 |
+
if (node instanceof HTMLImageElement) {
|
18408 |
+
this.resourceLoader.inlineImage(node.src).then(function (img) {
|
18409 |
+
if (img && node instanceof HTMLImageElement && node.parentNode) {
|
18410 |
+
var parentNode = node.parentNode;
|
18411 |
+
var clonedChild = (0, _Util.copyCSSStyles)(node.style, img.cloneNode(false));
|
18412 |
+
parentNode.replaceChild(clonedChild, node);
|
18413 |
+
}
|
18414 |
+
}).catch(function (e) {
|
18415 |
+
if (true) {
|
18416 |
+
_this.logger.log('Unable to load image', e);
|
18417 |
+
}
|
18418 |
+
});
|
18419 |
+
}
|
18420 |
+
}
|
18421 |
+
}
|
18422 |
+
}, {
|
18423 |
+
key: 'inlineFonts',
|
18424 |
+
value: function inlineFonts(document) {
|
18425 |
+
var _this2 = this;
|
18426 |
+
|
18427 |
+
return Promise.all(Array.from(document.styleSheets).map(function (sheet) {
|
18428 |
+
if (sheet.href) {
|
18429 |
+
return fetch(sheet.href).then(function (res) {
|
18430 |
+
return res.text();
|
18431 |
+
}).then(function (text) {
|
18432 |
+
return createStyleSheetFontsFromText(text, sheet.href);
|
18433 |
+
}).catch(function (e) {
|
18434 |
+
if (true) {
|
18435 |
+
_this2.logger.log('Unable to load stylesheet', e);
|
18436 |
+
}
|
18437 |
+
return [];
|
18438 |
+
});
|
18439 |
+
}
|
18440 |
+
return getSheetFonts(sheet, document);
|
18441 |
+
})).then(function (fonts) {
|
18442 |
+
return fonts.reduce(function (acc, font) {
|
18443 |
+
return acc.concat(font);
|
18444 |
+
}, []);
|
18445 |
+
}).then(function (fonts) {
|
18446 |
+
return Promise.all(fonts.map(function (font) {
|
18447 |
+
return fetch(font.formats[0].src).then(function (response) {
|
18448 |
+
return response.blob();
|
18449 |
+
}).then(function (blob) {
|
18450 |
+
return new Promise(function (resolve, reject) {
|
18451 |
+
var reader = new FileReader();
|
18452 |
+
reader.onerror = reject;
|
18453 |
+
reader.onload = function () {
|
18454 |
+
// $FlowFixMe
|
18455 |
+
var result = reader.result;
|
18456 |
+
resolve(result);
|
18457 |
+
};
|
18458 |
+
reader.readAsDataURL(blob);
|
18459 |
+
});
|
18460 |
+
}).then(function (dataUri) {
|
18461 |
+
font.fontFace.setProperty('src', 'url("' + dataUri + '")');
|
18462 |
+
return '@font-face {' + font.fontFace.cssText + ' ';
|
18463 |
+
});
|
18464 |
+
}));
|
18465 |
+
}).then(function (fontCss) {
|
18466 |
+
var style = document.createElement('style');
|
18467 |
+
style.textContent = fontCss.join('\n');
|
18468 |
+
_this2.documentElement.appendChild(style);
|
18469 |
+
});
|
18470 |
+
}
|
18471 |
+
}, {
|
18472 |
+
key: 'createElementClone',
|
18473 |
+
value: function createElementClone(node) {
|
18474 |
+
var _this3 = this;
|
18475 |
+
|
18476 |
+
if (this.copyStyles && node instanceof HTMLCanvasElement) {
|
18477 |
+
var img = node.ownerDocument.createElement('img');
|
18478 |
+
try {
|
18479 |
+
img.src = node.toDataURL();
|
18480 |
+
return img;
|
18481 |
+
} catch (e) {
|
18482 |
+
if (true) {
|
18483 |
+
this.logger.log('Unable to clone canvas contents, canvas is tainted');
|
18484 |
+
}
|
18485 |
+
}
|
18486 |
+
}
|
18487 |
+
|
18488 |
+
if (node instanceof HTMLIFrameElement) {
|
18489 |
+
var tempIframe = node.cloneNode(false);
|
18490 |
+
var iframeKey = generateIframeKey();
|
18491 |
+
tempIframe.setAttribute('data-html2canvas-internal-iframe-key', iframeKey);
|
18492 |
+
|
18493 |
+
var _parseBounds = (0, _Bounds.parseBounds)(node, 0, 0),
|
18494 |
+
width = _parseBounds.width,
|
18495 |
+
height = _parseBounds.height;
|
18496 |
+
|
18497 |
+
this.resourceLoader.cache[iframeKey] = getIframeDocumentElement(node, this.options).then(function (documentElement) {
|
18498 |
+
return _this3.renderer(documentElement, {
|
18499 |
+
async: _this3.options.async,
|
18500 |
+
allowTaint: _this3.options.allowTaint,
|
18501 |
+
backgroundColor: '#ffffff',
|
18502 |
+
canvas: null,
|
18503 |
+
imageTimeout: _this3.options.imageTimeout,
|
18504 |
+
logging: _this3.options.logging,
|
18505 |
+
proxy: _this3.options.proxy,
|
18506 |
+
removeContainer: _this3.options.removeContainer,
|
18507 |
+
scale: _this3.options.scale,
|
18508 |
+
foreignObjectRendering: _this3.options.foreignObjectRendering,
|
18509 |
+
useCORS: _this3.options.useCORS,
|
18510 |
+
target: new _CanvasRenderer2.default(),
|
18511 |
+
width: width,
|
18512 |
+
height: height,
|
18513 |
+
x: 0,
|
18514 |
+
y: 0,
|
18515 |
+
windowWidth: documentElement.ownerDocument.defaultView.innerWidth,
|
18516 |
+
windowHeight: documentElement.ownerDocument.defaultView.innerHeight,
|
18517 |
+
scrollX: documentElement.ownerDocument.defaultView.pageXOffset,
|
18518 |
+
scrollY: documentElement.ownerDocument.defaultView.pageYOffset
|
18519 |
+
}, _this3.logger.child(iframeKey));
|
18520 |
+
}).then(function (canvas) {
|
18521 |
+
return new Promise(function (resolve, reject) {
|
18522 |
+
var iframeCanvas = document.createElement('img');
|
18523 |
+
iframeCanvas.onload = function () {
|
18524 |
+
return resolve(canvas);
|
18525 |
+
};
|
18526 |
+
iframeCanvas.onerror = reject;
|
18527 |
+
iframeCanvas.src = canvas.toDataURL();
|
18528 |
+
if (tempIframe.parentNode) {
|
18529 |
+
tempIframe.parentNode.replaceChild((0, _Util.copyCSSStyles)(node.ownerDocument.defaultView.getComputedStyle(node), iframeCanvas), tempIframe);
|
18530 |
+
}
|
18531 |
+
});
|
18532 |
+
});
|
18533 |
+
return tempIframe;
|
18534 |
+
}
|
18535 |
+
|
18536 |
+
if (node instanceof HTMLStyleElement && node.sheet && node.sheet.cssRules) {
|
18537 |
+
var css = [].slice.call(node.sheet.cssRules, 0).reduce(function (css, rule) {
|
18538 |
+
return css + rule.cssText;
|
18539 |
+
}, '');
|
18540 |
+
var style = node.cloneNode(false);
|
18541 |
+
style.textContent = css;
|
18542 |
+
return style;
|
18543 |
+
}
|
18544 |
+
|
18545 |
+
return node.cloneNode(false);
|
18546 |
+
}
|
18547 |
+
}, {
|
18548 |
+
key: 'cloneNode',
|
18549 |
+
value: function cloneNode(node) {
|
18550 |
+
var clone = node.nodeType === Node.TEXT_NODE ? document.createTextNode(node.nodeValue) : this.createElementClone(node);
|
18551 |
+
|
18552 |
+
var window = node.ownerDocument.defaultView;
|
18553 |
+
var style = node instanceof window.HTMLElement ? window.getComputedStyle(node) : null;
|
18554 |
+
var styleBefore = node instanceof window.HTMLElement ? window.getComputedStyle(node, ':before') : null;
|
18555 |
+
var styleAfter = node instanceof window.HTMLElement ? window.getComputedStyle(node, ':after') : null;
|
18556 |
+
|
18557 |
+
if (this.referenceElement === node && clone instanceof window.HTMLElement) {
|
18558 |
+
this.clonedReferenceElement = clone;
|
18559 |
+
}
|
18560 |
+
|
18561 |
+
if (clone instanceof window.HTMLBodyElement) {
|
18562 |
+
createPseudoHideStyles(clone);
|
18563 |
+
}
|
18564 |
+
|
18565 |
+
var counters = (0, _PseudoNodeContent.parseCounterReset)(style, this.pseudoContentData);
|
18566 |
+
var contentBefore = (0, _PseudoNodeContent.resolvePseudoContent)(node, styleBefore, this.pseudoContentData);
|
18567 |
+
|
18568 |
+
for (var child = node.firstChild; child; child = child.nextSibling) {
|
18569 |
+
if (child.nodeType !== Node.ELEMENT_NODE || child.nodeName !== 'SCRIPT' &&
|
18570 |
+
// $FlowFixMe
|
18571 |
+
!child.hasAttribute(IGNORE_ATTRIBUTE) && (typeof this.options.ignoreElements !== 'function' ||
|
18572 |
+
// $FlowFixMe
|
18573 |
+
!this.options.ignoreElements(child))) {
|
18574 |
+
if (!this.copyStyles || child.nodeName !== 'STYLE') {
|
18575 |
+
clone.appendChild(this.cloneNode(child));
|
18576 |
+
}
|
18577 |
+
}
|
18578 |
+
}
|
18579 |
+
|
18580 |
+
var contentAfter = (0, _PseudoNodeContent.resolvePseudoContent)(node, styleAfter, this.pseudoContentData);
|
18581 |
+
(0, _PseudoNodeContent.popCounters)(counters, this.pseudoContentData);
|
18582 |
+
|
18583 |
+
if (node instanceof window.HTMLElement && clone instanceof window.HTMLElement) {
|
18584 |
+
if (styleBefore) {
|
18585 |
+
this.inlineAllImages(inlinePseudoElement(node, clone, styleBefore, contentBefore, PSEUDO_BEFORE));
|
18586 |
+
}
|
18587 |
+
if (styleAfter) {
|
18588 |
+
this.inlineAllImages(inlinePseudoElement(node, clone, styleAfter, contentAfter, PSEUDO_AFTER));
|
18589 |
+
}
|
18590 |
+
if (style && this.copyStyles && !(node instanceof HTMLIFrameElement)) {
|
18591 |
+
(0, _Util.copyCSSStyles)(style, clone);
|
18592 |
+
}
|
18593 |
+
this.inlineAllImages(clone);
|
18594 |
+
if (node.scrollTop !== 0 || node.scrollLeft !== 0) {
|
18595 |
+
this.scrolledElements.push([clone, node.scrollLeft, node.scrollTop]);
|
18596 |
+
}
|
18597 |
+
switch (node.nodeName) {
|
18598 |
+
case 'CANVAS':
|
18599 |
+
if (!this.copyStyles) {
|
18600 |
+
cloneCanvasContents(node, clone);
|
18601 |
+
}
|
18602 |
+
break;
|
18603 |
+
case 'TEXTAREA':
|
18604 |
+
case 'SELECT':
|
18605 |
+
clone.value = node.value;
|
18606 |
+
break;
|
18607 |
+
}
|
18608 |
+
}
|
18609 |
+
return clone;
|
18610 |
+
}
|
18611 |
+
}]);
|
18612 |
+
|
18613 |
+
return DocumentCloner;
|
18614 |
+
}();
|
18615 |
+
|
18616 |
+
var getSheetFonts = function getSheetFonts(sheet, document) {
|
18617 |
+
// $FlowFixMe
|
18618 |
+
return (sheet.cssRules ? Array.from(sheet.cssRules) : []).filter(function (rule) {
|
18619 |
+
return rule.type === CSSRule.FONT_FACE_RULE;
|
18620 |
+
}).map(function (rule) {
|
18621 |
+
var src = (0, _background.parseBackgroundImage)(rule.style.getPropertyValue('src'));
|
18622 |
+
var formats = [];
|
18623 |
+
for (var i = 0; i < src.length; i++) {
|
18624 |
+
if (src[i].method === 'url' && src[i + 1] && src[i + 1].method === 'format') {
|
18625 |
+
var a = document.createElement('a');
|
18626 |
+
a.href = src[i].args[0];
|
18627 |
+
if (document.body) {
|
18628 |
+
document.body.appendChild(a);
|
18629 |
+
}
|
18630 |
+
|
18631 |
+
var font = {
|
18632 |
+
src: a.href,
|
18633 |
+
format: src[i + 1].args[0]
|
18634 |
+
};
|
18635 |
+
formats.push(font);
|
18636 |
+
}
|
18637 |
+
}
|
18638 |
+
|
18639 |
+
return {
|
18640 |
+
// TODO select correct format for browser),
|
18641 |
+
|
18642 |
+
formats: formats.filter(function (font) {
|
18643 |
+
return (/^woff/i.test(font.format)
|
18644 |
+
);
|
18645 |
+
}),
|
18646 |
+
fontFace: rule.style
|
18647 |
+
};
|
18648 |
+
}).filter(function (font) {
|
18649 |
+
return font.formats.length;
|
18650 |
+
});
|
18651 |
+
};
|
18652 |
+
|
18653 |
+
var createStyleSheetFontsFromText = function createStyleSheetFontsFromText(text, baseHref) {
|
18654 |
+
var doc = document.implementation.createHTMLDocument('');
|
18655 |
+
var base = document.createElement('base');
|
18656 |
+
// $FlowFixMe
|
18657 |
+
base.href = baseHref;
|
18658 |
+
var style = document.createElement('style');
|
18659 |
+
|
18660 |
+
style.textContent = text;
|
18661 |
+
if (doc.head) {
|
18662 |
+
doc.head.appendChild(base);
|
18663 |
+
}
|
18664 |
+
if (doc.body) {
|
18665 |
+
doc.body.appendChild(style);
|
18666 |
+
}
|
18667 |
+
|
18668 |
+
return style.sheet ? getSheetFonts(style.sheet, doc) : [];
|
18669 |
+
};
|
18670 |
+
|
18671 |
+
var restoreOwnerScroll = function restoreOwnerScroll(ownerDocument, x, y) {
|
18672 |
+
if (ownerDocument.defaultView && (x !== ownerDocument.defaultView.pageXOffset || y !== ownerDocument.defaultView.pageYOffset)) {
|
18673 |
+
ownerDocument.defaultView.scrollTo(x, y);
|
18674 |
+
}
|
18675 |
+
};
|
18676 |
+
|
18677 |
+
var cloneCanvasContents = function cloneCanvasContents(canvas, clonedCanvas) {
|
18678 |
+
try {
|
18679 |
+
if (clonedCanvas) {
|
18680 |
+
clonedCanvas.width = canvas.width;
|
18681 |
+
clonedCanvas.height = canvas.height;
|
18682 |
+
var ctx = canvas.getContext('2d');
|
18683 |
+
var clonedCtx = clonedCanvas.getContext('2d');
|
18684 |
+
if (ctx) {
|
18685 |
+
clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);
|
18686 |
+
} else {
|
18687 |
+
clonedCtx.drawImage(canvas, 0, 0);
|
18688 |
+
}
|
18689 |
+
}
|
18690 |
+
} catch (e) {}
|
18691 |
+
};
|
18692 |
+
|
18693 |
+
var inlinePseudoElement = function inlinePseudoElement(node, clone, style, contentItems, pseudoElt) {
|
18694 |
+
if (!style || !style.content || style.content === 'none' || style.content === '-moz-alt-content' || style.display === 'none') {
|
18695 |
+
return;
|
18696 |
+
}
|
18697 |
+
|
18698 |
+
var anonymousReplacedElement = clone.ownerDocument.createElement('html2canvaspseudoelement');
|
18699 |
+
(0, _Util.copyCSSStyles)(style, anonymousReplacedElement);
|
18700 |
+
|
18701 |
+
if (contentItems) {
|
18702 |
+
var len = contentItems.length;
|
18703 |
+
for (var i = 0; i < len; i++) {
|
18704 |
+
var item = contentItems[i];
|
18705 |
+
switch (item.type) {
|
18706 |
+
case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.IMAGE:
|
18707 |
+
var img = clone.ownerDocument.createElement('img');
|
18708 |
+
img.src = (0, _background.parseBackgroundImage)('url(' + item.value + ')')[0].args[0];
|
18709 |
+
img.style.opacity = '1';
|
18710 |
+
anonymousReplacedElement.appendChild(img);
|
18711 |
+
break;
|
18712 |
+
case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.TEXT:
|
18713 |
+
anonymousReplacedElement.appendChild(clone.ownerDocument.createTextNode(item.value));
|
18714 |
+
break;
|
18715 |
+
}
|
18716 |
+
}
|
18717 |
+
}
|
18718 |
+
|
18719 |
+
anonymousReplacedElement.className = PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + ' ' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
18720 |
+
clone.className += pseudoElt === PSEUDO_BEFORE ? ' ' + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE : ' ' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
18721 |
+
if (pseudoElt === PSEUDO_BEFORE) {
|
18722 |
+
clone.insertBefore(anonymousReplacedElement, clone.firstChild);
|
18723 |
+
} else {
|
18724 |
+
clone.appendChild(anonymousReplacedElement);
|
18725 |
+
}
|
18726 |
+
|
18727 |
+
return anonymousReplacedElement;
|
18728 |
+
};
|
18729 |
+
|
18730 |
+
var URL_REGEXP = /^url\((.+)\)$/i;
|
18731 |
+
var PSEUDO_BEFORE = ':before';
|
18732 |
+
var PSEUDO_AFTER = ':after';
|
18733 |
+
var PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = '___html2canvas___pseudoelement_before';
|
18734 |
+
var PSEUDO_HIDE_ELEMENT_CLASS_AFTER = '___html2canvas___pseudoelement_after';
|
18735 |
+
|
18736 |
+
var PSEUDO_HIDE_ELEMENT_STYLE = '{\n content: "" !important;\n display: none !important;\n}';
|
18737 |
+
|
18738 |
+
var createPseudoHideStyles = function createPseudoHideStyles(body) {
|
18739 |
+
createStyles(body, '.' + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + PSEUDO_BEFORE + PSEUDO_HIDE_ELEMENT_STYLE + '\n .' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER + PSEUDO_AFTER + PSEUDO_HIDE_ELEMENT_STYLE);
|
18740 |
+
};
|
18741 |
+
|
18742 |
+
var createStyles = function createStyles(body, styles) {
|
18743 |
+
var style = body.ownerDocument.createElement('style');
|
18744 |
+
style.innerHTML = styles;
|
18745 |
+
body.appendChild(style);
|
18746 |
+
};
|
18747 |
+
|
18748 |
+
var initNode = function initNode(_ref) {
|
18749 |
+
var _ref2 = _slicedToArray(_ref, 3),
|
18750 |
+
element = _ref2[0],
|
18751 |
+
x = _ref2[1],
|
18752 |
+
y = _ref2[2];
|
18753 |
+
|
18754 |
+
element.scrollLeft = x;
|
18755 |
+
element.scrollTop = y;
|
18756 |
+
};
|
18757 |
+
|
18758 |
+
var generateIframeKey = function generateIframeKey() {
|
18759 |
+
return Math.ceil(Date.now() + Math.random() * 10000000).toString(16);
|
18760 |
+
};
|
18761 |
+
|
18762 |
+
var DATA_URI_REGEXP = /^data:text\/(.+);(base64)?,(.*)$/i;
|
18763 |
+
|
18764 |
+
var getIframeDocumentElement = function getIframeDocumentElement(node, options) {
|
18765 |
+
try {
|
18766 |
+
return Promise.resolve(node.contentWindow.document.documentElement);
|
18767 |
+
} catch (e) {
|
18768 |
+
return options.proxy ? (0, _Proxy.Proxy)(node.src, options).then(function (html) {
|
18769 |
+
var match = html.match(DATA_URI_REGEXP);
|
18770 |
+
if (!match) {
|
18771 |
+
return Promise.reject();
|
18772 |
+
}
|
18773 |
+
|
18774 |
+
return match[2] === 'base64' ? window.atob(decodeURIComponent(match[3])) : decodeURIComponent(match[3]);
|
18775 |
+
}).then(function (html) {
|
18776 |
+
return createIframeContainer(node.ownerDocument, (0, _Bounds.parseBounds)(node, 0, 0)).then(function (cloneIframeContainer) {
|
18777 |
+
var cloneWindow = cloneIframeContainer.contentWindow;
|
18778 |
+
var documentClone = cloneWindow.document;
|
18779 |
+
|
18780 |
+
documentClone.open();
|
18781 |
+
documentClone.write(html);
|
18782 |
+
var iframeLoad = iframeLoader(cloneIframeContainer).then(function () {
|
18783 |
+
return documentClone.documentElement;
|
18784 |
+
});
|
18785 |
+
|
18786 |
+
documentClone.close();
|
18787 |
+
return iframeLoad;
|
18788 |
+
});
|
18789 |
+
}) : Promise.reject();
|
18790 |
+
}
|
18791 |
+
};
|
18792 |
+
|
18793 |
+
var createIframeContainer = function createIframeContainer(ownerDocument, bounds) {
|
18794 |
+
var cloneIframeContainer = ownerDocument.createElement('iframe');
|
18795 |
+
|
18796 |
+
cloneIframeContainer.className = 'html2canvas-container';
|
18797 |
+
cloneIframeContainer.style.visibility = 'hidden';
|
18798 |
+
cloneIframeContainer.style.position = 'fixed';
|
18799 |
+
cloneIframeContainer.style.left = '-10000px';
|
18800 |
+
cloneIframeContainer.style.top = '0px';
|
18801 |
+
cloneIframeContainer.style.border = '0';
|
18802 |
+
cloneIframeContainer.width = bounds.width.toString();
|
18803 |
+
cloneIframeContainer.height = bounds.height.toString();
|
18804 |
+
cloneIframeContainer.scrolling = 'no'; // ios won't scroll without it
|
18805 |
+
cloneIframeContainer.setAttribute(IGNORE_ATTRIBUTE, 'true');
|
18806 |
+
if (!ownerDocument.body) {
|
18807 |
+
return Promise.reject( true ? 'Body element not found in Document that is getting rendered' : '');
|
18808 |
+
}
|
18809 |
+
|
18810 |
+
ownerDocument.body.appendChild(cloneIframeContainer);
|
18811 |
+
|
18812 |
+
return Promise.resolve(cloneIframeContainer);
|
18813 |
+
};
|
18814 |
+
|
18815 |
+
var iframeLoader = function iframeLoader(cloneIframeContainer) {
|
18816 |
+
var cloneWindow = cloneIframeContainer.contentWindow;
|
18817 |
+
var documentClone = cloneWindow.document;
|
18818 |
+
|
18819 |
+
return new Promise(function (resolve, reject) {
|
18820 |
+
cloneWindow.onload = cloneIframeContainer.onload = documentClone.onreadystatechange = function () {
|
18821 |
+
var interval = setInterval(function () {
|
18822 |
+
if (documentClone.body.childNodes.length > 0 && documentClone.readyState === 'complete') {
|
18823 |
+
clearInterval(interval);
|
18824 |
+
resolve(cloneIframeContainer);
|
18825 |
+
}
|
18826 |
+
}, 50);
|
18827 |
+
};
|
18828 |
+
});
|
18829 |
+
};
|
18830 |
+
|
18831 |
+
var cloneWindow = exports.cloneWindow = function cloneWindow(ownerDocument, bounds, referenceElement, options, logger, renderer) {
|
18832 |
+
var cloner = new DocumentCloner(referenceElement, options, logger, false, renderer);
|
18833 |
+
var scrollX = ownerDocument.defaultView.pageXOffset;
|
18834 |
+
var scrollY = ownerDocument.defaultView.pageYOffset;
|
18835 |
+
|
18836 |
+
return createIframeContainer(ownerDocument, bounds).then(function (cloneIframeContainer) {
|
18837 |
+
var cloneWindow = cloneIframeContainer.contentWindow;
|
18838 |
+
var documentClone = cloneWindow.document;
|
18839 |
+
|
18840 |
+
/* Chrome doesn't detect relative background-images assigned in inline <style> sheets when fetched through getComputedStyle
|
18841 |
+
if window url is about:blank, we can assign the url to current by writing onto the document
|
18842 |
+
*/
|
18843 |
+
|
18844 |
+
var iframeLoad = iframeLoader(cloneIframeContainer).then(function () {
|
18845 |
+
cloner.scrolledElements.forEach(initNode);
|
18846 |
+
cloneWindow.scrollTo(bounds.left, bounds.top);
|
18847 |
+
if (/(iPad|iPhone|iPod)/g.test(navigator.userAgent) && (cloneWindow.scrollY !== bounds.top || cloneWindow.scrollX !== bounds.left)) {
|
18848 |
+
documentClone.documentElement.style.top = -bounds.top + 'px';
|
18849 |
+
documentClone.documentElement.style.left = -bounds.left + 'px';
|
18850 |
+
documentClone.documentElement.style.position = 'absolute';
|
18851 |
+
}
|
18852 |
+
|
18853 |
+
var result = Promise.resolve([cloneIframeContainer, cloner.clonedReferenceElement, cloner.resourceLoader]);
|
18854 |
+
|
18855 |
+
var onclone = options.onclone;
|
18856 |
+
|
18857 |
+
return cloner.clonedReferenceElement instanceof cloneWindow.HTMLElement || cloner.clonedReferenceElement instanceof ownerDocument.defaultView.HTMLElement || cloner.clonedReferenceElement instanceof HTMLElement ? typeof onclone === 'function' ? Promise.resolve().then(function () {
|
18858 |
+
return onclone(documentClone);
|
18859 |
+
}).then(function () {
|
18860 |
+
return result;
|
18861 |
+
}) : result : Promise.reject( true ? 'Error finding the ' + referenceElement.nodeName + ' in the cloned document' : '');
|
18862 |
+
});
|
18863 |
+
|
18864 |
+
documentClone.open();
|
18865 |
+
documentClone.write(serializeDoctype(document.doctype) + '<html></html>');
|
18866 |
+
// Chrome scrolls the parent document for some reason after the write to the cloned window???
|
18867 |
+
restoreOwnerScroll(referenceElement.ownerDocument, scrollX, scrollY);
|
18868 |
+
documentClone.replaceChild(documentClone.adoptNode(cloner.documentElement), documentClone.documentElement);
|
18869 |
+
documentClone.close();
|
18870 |
+
|
18871 |
+
return iframeLoad;
|
18872 |
+
});
|
18873 |
+
};
|
18874 |
+
|
18875 |
+
var serializeDoctype = function serializeDoctype(doctype) {
|
18876 |
+
var str = '';
|
18877 |
+
if (doctype) {
|
18878 |
+
str += '<!DOCTYPE ';
|
18879 |
+
if (doctype.name) {
|
18880 |
+
str += doctype.name;
|
18881 |
+
}
|
18882 |
+
|
18883 |
+
if (doctype.internalSubset) {
|
18884 |
+
str += doctype.internalSubset;
|
18885 |
+
}
|
18886 |
+
|
18887 |
+
if (doctype.publicId) {
|
18888 |
+
str += '"' + doctype.publicId + '"';
|
18889 |
+
}
|
18890 |
+
|
18891 |
+
if (doctype.systemId) {
|
18892 |
+
str += '"' + doctype.systemId + '"';
|
18893 |
+
}
|
18894 |
+
|
18895 |
+
str += '>';
|
18896 |
+
}
|
18897 |
+
|
18898 |
+
return str;
|
18899 |
+
};
|
18900 |
+
|
18901 |
+
/***/ }),
|
18902 |
+
/* 55 */
|
18903 |
+
/***/ (function(module, exports, __webpack_require__) {
|
18904 |
+
|
18905 |
+
"use strict";
|
18906 |
+
|
18907 |
+
|
18908 |
+
Object.defineProperty(exports, "__esModule", {
|
18909 |
+
value: true
|
18910 |
+
});
|
18911 |
+
exports.ResourceStore = undefined;
|
18912 |
+
|
18913 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
18914 |
+
|
18915 |
+
var _Feature = __webpack_require__(10);
|
18916 |
+
|
18917 |
+
var _Feature2 = _interopRequireDefault(_Feature);
|
18918 |
+
|
18919 |
+
var _Proxy = __webpack_require__(26);
|
18920 |
+
|
18921 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18922 |
+
|
18923 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
18924 |
+
|
18925 |
+
var ResourceLoader = function () {
|
18926 |
+
function ResourceLoader(options, logger, window) {
|
18927 |
+
_classCallCheck(this, ResourceLoader);
|
18928 |
+
|
18929 |
+
this.options = options;
|
18930 |
+
this._window = window;
|
18931 |
+
this.origin = this.getOrigin(window.location.href);
|
18932 |
+
this.cache = {};
|
18933 |
+
this.logger = logger;
|
18934 |
+
this._index = 0;
|
18935 |
+
}
|
18936 |
+
|
18937 |
+
_createClass(ResourceLoader, [{
|
18938 |
+
key: 'loadImage',
|
18939 |
+
value: function loadImage(src) {
|
18940 |
+
var _this = this;
|
18941 |
+
|
18942 |
+
if (this.hasResourceInCache(src)) {
|
18943 |
+
return src;
|
18944 |
+
}
|
18945 |
+
|
18946 |
+
if (!isSVG(src) || _Feature2.default.SUPPORT_SVG_DRAWING) {
|
18947 |
+
if (this.options.allowTaint === true || isInlineImage(src) || this.isSameOrigin(src)) {
|
18948 |
+
return this.addImage(src, src, false);
|
18949 |
+
} else if (!this.isSameOrigin(src)) {
|
18950 |
+
if (typeof this.options.proxy === 'string') {
|
18951 |
+
this.cache[src] = (0, _Proxy.Proxy)(src, this.options).then(function (src) {
|
18952 |
+
return _loadImage(src, _this.options.imageTimeout || 0);
|
18953 |
+
});
|
18954 |
+
return src;
|
18955 |
+
} else if (this.options.useCORS === true && _Feature2.default.SUPPORT_CORS_IMAGES) {
|
18956 |
+
return this.addImage(src, src, true);
|
18957 |
+
}
|
18958 |
+
}
|
18959 |
+
}
|
18960 |
+
}
|
18961 |
+
}, {
|
18962 |
+
key: 'inlineImage',
|
18963 |
+
value: function inlineImage(src) {
|
18964 |
+
var _this2 = this;
|
18965 |
+
|
18966 |
+
if (isInlineImage(src)) {
|
18967 |
+
return _loadImage(src, this.options.imageTimeout || 0);
|
18968 |
+
}
|
18969 |
+
if (this.hasResourceInCache(src)) {
|
18970 |
+
return this.cache[src];
|
18971 |
+
}
|
18972 |
+
if (!this.isSameOrigin(src) && typeof this.options.proxy === 'string') {
|
18973 |
+
return this.cache[src] = (0, _Proxy.Proxy)(src, this.options).then(function (src) {
|
18974 |
+
return _loadImage(src, _this2.options.imageTimeout || 0);
|
18975 |
+
});
|
18976 |
+
}
|
18977 |
+
|
18978 |
+
return this.xhrImage(src);
|
18979 |
+
}
|
18980 |
+
}, {
|
18981 |
+
key: 'xhrImage',
|
18982 |
+
value: function xhrImage(src) {
|
18983 |
+
var _this3 = this;
|
18984 |
+
|
18985 |
+
this.cache[src] = new Promise(function (resolve, reject) {
|
18986 |
+
var xhr = new XMLHttpRequest();
|
18987 |
+
xhr.onreadystatechange = function () {
|
18988 |
+
if (xhr.readyState === 4) {
|
18989 |
+
if (xhr.status !== 200) {
|
18990 |
+
reject('Failed to fetch image ' + src.substring(0, 256) + ' with status code ' + xhr.status);
|
18991 |
+
} else {
|
18992 |
+
var reader = new FileReader();
|
18993 |
+
reader.addEventListener('load', function () {
|
18994 |
+
// $FlowFixMe
|
18995 |
+
var result = reader.result;
|
18996 |
+
resolve(result);
|
18997 |
+
}, false);
|
18998 |
+
reader.addEventListener('error', function (e) {
|
18999 |
+
return reject(e);
|
19000 |
+
}, false);
|
19001 |
+
reader.readAsDataURL(xhr.response);
|
19002 |
+
}
|
19003 |
+
}
|
19004 |
+
};
|
19005 |
+
xhr.responseType = 'blob';
|
19006 |
+
if (_this3.options.imageTimeout) {
|
19007 |
+
var timeout = _this3.options.imageTimeout;
|
19008 |
+
xhr.timeout = timeout;
|
19009 |
+
xhr.ontimeout = function () {
|
19010 |
+
return reject( true ? 'Timed out (' + timeout + 'ms) fetching ' + src.substring(0, 256) : '');
|
19011 |
+
};
|
19012 |
+
}
|
19013 |
+
xhr.open('GET', src, true);
|
19014 |
+
xhr.send();
|
19015 |
+
}).then(function (src) {
|
19016 |
+
return _loadImage(src, _this3.options.imageTimeout || 0);
|
19017 |
+
});
|
19018 |
+
|
19019 |
+
return this.cache[src];
|
19020 |
+
}
|
19021 |
+
}, {
|
19022 |
+
key: 'loadCanvas',
|
19023 |
+
value: function loadCanvas(node) {
|
19024 |
+
var key = String(this._index++);
|
19025 |
+
this.cache[key] = Promise.resolve(node);
|
19026 |
+
return key;
|
19027 |
+
}
|
19028 |
+
}, {
|
19029 |
+
key: 'hasResourceInCache',
|
19030 |
+
value: function hasResourceInCache(key) {
|
19031 |
+
return typeof this.cache[key] !== 'undefined';
|
19032 |
+
}
|
19033 |
+
}, {
|
19034 |
+
key: 'addImage',
|
19035 |
+
value: function addImage(key, src, useCORS) {
|
19036 |
+
var _this4 = this;
|
19037 |
+
|
19038 |
+
if (true) {
|
19039 |
+
this.logger.log('Added image ' + key.substring(0, 256));
|
19040 |
+
}
|
19041 |
+
|
19042 |
+
var imageLoadHandler = function imageLoadHandler(supportsDataImages) {
|
19043 |
+
return new Promise(function (resolve, reject) {
|
19044 |
+
var img = new Image();
|
19045 |
+
img.onload = function () {
|
19046 |
+
return resolve(img);
|
19047 |
+
};
|
19048 |
+
//ios safari 10.3 taints canvas with data urls unless crossOrigin is set to anonymous
|
19049 |
+
if (!supportsDataImages || useCORS) {
|
19050 |
+
img.crossOrigin = 'anonymous';
|
19051 |
+
}
|
19052 |
+
|
19053 |
+
img.onerror = reject;
|
19054 |
+
img.src = src;
|
19055 |
+
if (img.complete === true) {
|
19056 |
+
// Inline XML images may fail to parse, throwing an Error later on
|
19057 |
+
setTimeout(function () {
|
19058 |
+
resolve(img);
|
19059 |
+
}, 500);
|
19060 |
+
}
|
19061 |
+
if (_this4.options.imageTimeout) {
|
19062 |
+
var timeout = _this4.options.imageTimeout;
|
19063 |
+
setTimeout(function () {
|
19064 |
+
return reject( true ? 'Timed out (' + timeout + 'ms) fetching ' + src.substring(0, 256) : '');
|
19065 |
+
}, timeout);
|
19066 |
+
}
|
19067 |
+
});
|
19068 |
+
};
|
19069 |
+
|
19070 |
+
this.cache[key] = isInlineBase64Image(src) && !isSVG(src) ? // $FlowFixMe
|
19071 |
+
_Feature2.default.SUPPORT_BASE64_DRAWING(src).then(imageLoadHandler) : imageLoadHandler(true);
|
19072 |
+
return key;
|
19073 |
+
}
|
19074 |
+
}, {
|
19075 |
+
key: 'isSameOrigin',
|
19076 |
+
value: function isSameOrigin(url) {
|
19077 |
+
return this.getOrigin(url) === this.origin;
|
19078 |
+
}
|
19079 |
+
}, {
|
19080 |
+
key: 'getOrigin',
|
19081 |
+
value: function getOrigin(url) {
|
19082 |
+
var link = this._link || (this._link = this._window.document.createElement('a'));
|
19083 |
+
link.href = url;
|
19084 |
+
link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/
|
19085 |
+
return link.protocol + link.hostname + link.port;
|
19086 |
+
}
|
19087 |
+
}, {
|
19088 |
+
key: 'ready',
|
19089 |
+
value: function ready() {
|
19090 |
+
var _this5 = this;
|
19091 |
+
|
19092 |
+
var keys = Object.keys(this.cache);
|
19093 |
+
var values = keys.map(function (str) {
|
19094 |
+
return _this5.cache[str].catch(function (e) {
|
19095 |
+
if (true) {
|
19096 |
+
_this5.logger.log('Unable to load image', e);
|
19097 |
+
}
|
19098 |
+
return null;
|
19099 |
+
});
|
19100 |
+
});
|
19101 |
+
return Promise.all(values).then(function (images) {
|
19102 |
+
if (true) {
|
19103 |
+
_this5.logger.log('Finished loading ' + images.length + ' images', images);
|
19104 |
+
}
|
19105 |
+
return new ResourceStore(keys, images);
|
19106 |
+
});
|
19107 |
+
}
|
19108 |
+
}]);
|
19109 |
+
|
19110 |
+
return ResourceLoader;
|
19111 |
+
}();
|
19112 |
+
|
19113 |
+
exports.default = ResourceLoader;
|
19114 |
+
|
19115 |
+
var ResourceStore = exports.ResourceStore = function () {
|
19116 |
+
function ResourceStore(keys, resources) {
|
19117 |
+
_classCallCheck(this, ResourceStore);
|
19118 |
+
|
19119 |
+
this._keys = keys;
|
19120 |
+
this._resources = resources;
|
19121 |
+
}
|
19122 |
+
|
19123 |
+
_createClass(ResourceStore, [{
|
19124 |
+
key: 'get',
|
19125 |
+
value: function get(key) {
|
19126 |
+
var index = this._keys.indexOf(key);
|
19127 |
+
return index === -1 ? null : this._resources[index];
|
19128 |
+
}
|
19129 |
+
}]);
|
19130 |
+
|
19131 |
+
return ResourceStore;
|
19132 |
+
}();
|
19133 |
+
|
19134 |
+
var INLINE_SVG = /^data:image\/svg\+xml/i;
|
19135 |
+
var INLINE_BASE64 = /^data:image\/.*;base64,/i;
|
19136 |
+
var INLINE_IMG = /^data:image\/.*/i;
|
19137 |
+
|
19138 |
+
var isInlineImage = function isInlineImage(src) {
|
19139 |
+
return INLINE_IMG.test(src);
|
19140 |
+
};
|
19141 |
+
var isInlineBase64Image = function isInlineBase64Image(src) {
|
19142 |
+
return INLINE_BASE64.test(src);
|
19143 |
+
};
|
19144 |
+
|
19145 |
+
var isSVG = function isSVG(src) {
|
19146 |
+
return src.substr(-3).toLowerCase() === 'svg' || INLINE_SVG.test(src);
|
19147 |
+
};
|
19148 |
+
|
19149 |
+
var _loadImage = function _loadImage(src, timeout) {
|
19150 |
+
return new Promise(function (resolve, reject) {
|
19151 |
+
var img = new Image();
|
19152 |
+
img.onload = function () {
|
19153 |
+
return resolve(img);
|
19154 |
+
};
|
19155 |
+
img.onerror = reject;
|
19156 |
+
img.src = src;
|
19157 |
+
if (img.complete === true) {
|
19158 |
+
// Inline XML images may fail to parse, throwing an Error later on
|
19159 |
+
setTimeout(function () {
|
19160 |
+
resolve(img);
|
19161 |
+
}, 500);
|
19162 |
+
}
|
19163 |
+
if (timeout) {
|
19164 |
+
setTimeout(function () {
|
19165 |
+
return reject( true ? 'Timed out (' + timeout + 'ms) loading image' : '');
|
19166 |
+
}, timeout);
|
19167 |
+
}
|
19168 |
+
});
|
19169 |
+
};
|
19170 |
+
|
19171 |
+
/***/ }),
|
19172 |
+
/* 56 */
|
19173 |
+
/***/ (function(module, exports, __webpack_require__) {
|
19174 |
+
|
19175 |
+
"use strict";
|
19176 |
+
|
19177 |
+
|
19178 |
+
Object.defineProperty(exports, "__esModule", {
|
19179 |
+
value: true
|
19180 |
+
});
|
19181 |
+
exports.parseContent = exports.resolvePseudoContent = exports.popCounters = exports.parseCounterReset = exports.TOKEN_TYPE = exports.PSEUDO_CONTENT_ITEM_TYPE = undefined;
|
19182 |
+
|
19183 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
19184 |
+
|
19185 |
+
var _ListItem = __webpack_require__(14);
|
19186 |
+
|
19187 |
+
var _listStyle = __webpack_require__(8);
|
19188 |
+
|
19189 |
+
var PSEUDO_CONTENT_ITEM_TYPE = exports.PSEUDO_CONTENT_ITEM_TYPE = {
|
19190 |
+
TEXT: 0,
|
19191 |
+
IMAGE: 1
|
19192 |
+
};
|
19193 |
+
|
19194 |
+
var TOKEN_TYPE = exports.TOKEN_TYPE = {
|
19195 |
+
STRING: 0,
|
19196 |
+
ATTRIBUTE: 1,
|
19197 |
+
URL: 2,
|
19198 |
+
COUNTER: 3,
|
19199 |
+
COUNTERS: 4,
|
19200 |
+
OPENQUOTE: 5,
|
19201 |
+
CLOSEQUOTE: 6
|
19202 |
+
};
|
19203 |
+
|
19204 |
+
var parseCounterReset = exports.parseCounterReset = function parseCounterReset(style, data) {
|
19205 |
+
if (!style || !style.counterReset || style.counterReset === 'none') {
|
19206 |
+
return [];
|
19207 |
+
}
|
19208 |
+
|
19209 |
+
var counterNames = [];
|
19210 |
+
var counterResets = style.counterReset.split(/\s*,\s*/);
|
19211 |
+
var lenCounterResets = counterResets.length;
|
19212 |
+
|
19213 |
+
for (var i = 0; i < lenCounterResets; i++) {
|
19214 |
+
var _counterResets$i$spli = counterResets[i].split(/\s+/),
|
19215 |
+
_counterResets$i$spli2 = _slicedToArray(_counterResets$i$spli, 2),
|
19216 |
+
counterName = _counterResets$i$spli2[0],
|
19217 |
+
initialValue = _counterResets$i$spli2[1];
|
19218 |
+
|
19219 |
+
counterNames.push(counterName);
|
19220 |
+
var counter = data.counters[counterName];
|
19221 |
+
if (!counter) {
|
19222 |
+
counter = data.counters[counterName] = [];
|
19223 |
+
}
|
19224 |
+
counter.push(parseInt(initialValue || 0, 10));
|
19225 |
+
}
|
19226 |
+
|
19227 |
+
return counterNames;
|
19228 |
+
};
|
19229 |
+
|
19230 |
+
var popCounters = exports.popCounters = function popCounters(counterNames, data) {
|
19231 |
+
var lenCounters = counterNames.length;
|
19232 |
+
for (var i = 0; i < lenCounters; i++) {
|
19233 |
+
data.counters[counterNames[i]].pop();
|
19234 |
+
}
|
19235 |
+
};
|
19236 |
+
|
19237 |
+
var resolvePseudoContent = exports.resolvePseudoContent = function resolvePseudoContent(node, style, data) {
|
19238 |
+
if (!style || !style.content || style.content === 'none' || style.content === '-moz-alt-content' || style.display === 'none') {
|
19239 |
+
return null;
|
19240 |
+
}
|
19241 |
+
|
19242 |
+
var tokens = parseContent(style.content);
|
19243 |
+
|
19244 |
+
var len = tokens.length;
|
19245 |
+
var contentItems = [];
|
19246 |
+
var s = '';
|
19247 |
+
|
19248 |
+
// increment the counter (if there is a "counter-increment" declaration)
|
19249 |
+
var counterIncrement = style.counterIncrement;
|
19250 |
+
if (counterIncrement && counterIncrement !== 'none') {
|
19251 |
+
var _counterIncrement$spl = counterIncrement.split(/\s+/),
|
19252 |
+
_counterIncrement$spl2 = _slicedToArray(_counterIncrement$spl, 2),
|
19253 |
+
counterName = _counterIncrement$spl2[0],
|
19254 |
+
incrementValue = _counterIncrement$spl2[1];
|
19255 |
+
|
19256 |
+
var counter = data.counters[counterName];
|
19257 |
+
if (counter) {
|
19258 |
+
counter[counter.length - 1] += incrementValue === undefined ? 1 : parseInt(incrementValue, 10);
|
19259 |
+
}
|
19260 |
+
}
|
19261 |
+
|
19262 |
+
// build the content string
|
19263 |
+
for (var i = 0; i < len; i++) {
|
19264 |
+
var token = tokens[i];
|
19265 |
+
switch (token.type) {
|
19266 |
+
case TOKEN_TYPE.STRING:
|
19267 |
+
s += token.value || '';
|
19268 |
+
break;
|
19269 |
+
|
19270 |
+
case TOKEN_TYPE.ATTRIBUTE:
|
19271 |
+
if (node instanceof HTMLElement && token.value) {
|
19272 |
+
s += node.getAttribute(token.value) || '';
|
19273 |
+
}
|
19274 |
+
break;
|
19275 |
+
|
19276 |
+
case TOKEN_TYPE.COUNTER:
|
19277 |
+
var _counter = data.counters[token.name || ''];
|
19278 |
+
if (_counter) {
|
19279 |
+
s += formatCounterValue([_counter[_counter.length - 1]], '', token.format);
|
19280 |
+
}
|
19281 |
+
break;
|
19282 |
+
|
19283 |
+
case TOKEN_TYPE.COUNTERS:
|
19284 |
+
var _counters = data.counters[token.name || ''];
|
19285 |
+
if (_counters) {
|
19286 |
+
s += formatCounterValue(_counters, token.glue, token.format);
|
19287 |
+
}
|
19288 |
+
break;
|
19289 |
+
|
19290 |
+
case TOKEN_TYPE.OPENQUOTE:
|
19291 |
+
s += getQuote(style, true, data.quoteDepth);
|
19292 |
+
data.quoteDepth++;
|
19293 |
+
break;
|
19294 |
+
|
19295 |
+
case TOKEN_TYPE.CLOSEQUOTE:
|
19296 |
+
data.quoteDepth--;
|
19297 |
+
s += getQuote(style, false, data.quoteDepth);
|
19298 |
+
break;
|
19299 |
+
|
19300 |
+
case TOKEN_TYPE.URL:
|
19301 |
+
if (s) {
|
19302 |
+
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.TEXT, value: s });
|
19303 |
+
s = '';
|
19304 |
+
}
|
19305 |
+
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.IMAGE, value: token.value || '' });
|
19306 |
+
break;
|
19307 |
+
}
|
19308 |
+
}
|
19309 |
+
|
19310 |
+
if (s) {
|
19311 |
+
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.TEXT, value: s });
|
19312 |
+
}
|
19313 |
+
|
19314 |
+
return contentItems;
|
19315 |
+
};
|
19316 |
+
|
19317 |
+
var parseContent = exports.parseContent = function parseContent(content, cache) {
|
19318 |
+
if (cache && cache[content]) {
|
19319 |
+
return cache[content];
|
19320 |
+
}
|
19321 |
+
|
19322 |
+
var tokens = [];
|
19323 |
+
var len = content.length;
|
19324 |
+
|
19325 |
+
var isString = false;
|
19326 |
+
var isEscaped = false;
|
19327 |
+
var isFunction = false;
|
19328 |
+
var str = '';
|
19329 |
+
var functionName = '';
|
19330 |
+
var args = [];
|
19331 |
+
|
19332 |
+
for (var i = 0; i < len; i++) {
|
19333 |
+
var c = content.charAt(i);
|
19334 |
+
|
19335 |
+
switch (c) {
|
19336 |
+
case "'":
|
19337 |
+
case '"':
|
19338 |
+
if (isEscaped) {
|
19339 |
+
str += c;
|
19340 |
+
} else {
|
19341 |
+
isString = !isString;
|
19342 |
+
if (!isFunction && !isString) {
|
19343 |
+
tokens.push({ type: TOKEN_TYPE.STRING, value: str });
|
19344 |
+
str = '';
|
19345 |
+
}
|
19346 |
+
}
|
19347 |
+
break;
|
19348 |
+
|
19349 |
+
case '\\':
|
19350 |
+
if (isEscaped) {
|
19351 |
+
str += c;
|
19352 |
+
isEscaped = false;
|
19353 |
+
} else {
|
19354 |
+
isEscaped = true;
|
19355 |
+
}
|
19356 |
+
break;
|
19357 |
+
|
19358 |
+
case '(':
|
19359 |
+
if (isString) {
|
19360 |
+
str += c;
|
19361 |
+
} else {
|
19362 |
+
isFunction = true;
|
19363 |
+
functionName = str;
|
19364 |
+
str = '';
|
19365 |
+
args = [];
|
19366 |
+
}
|
19367 |
+
break;
|
19368 |
+
|
19369 |
+
case ')':
|
19370 |
+
if (isString) {
|
19371 |
+
str += c;
|
19372 |
+
} else if (isFunction) {
|
19373 |
+
if (str) {
|
19374 |
+
args.push(str);
|
19375 |
+
}
|
19376 |
+
|
19377 |
+
switch (functionName) {
|
19378 |
+
case 'attr':
|
19379 |
+
if (args.length > 0) {
|
19380 |
+
tokens.push({ type: TOKEN_TYPE.ATTRIBUTE, value: args[0] });
|
19381 |
+
}
|
19382 |
+
break;
|
19383 |
+
|
19384 |
+
case 'counter':
|
19385 |
+
if (args.length > 0) {
|
19386 |
+
var counter = {
|
19387 |
+
type: TOKEN_TYPE.COUNTER,
|
19388 |
+
name: args[0]
|
19389 |
+
};
|
19390 |
+
if (args.length > 1) {
|
19391 |
+
counter.format = args[1];
|
19392 |
+
}
|
19393 |
+
tokens.push(counter);
|
19394 |
+
}
|
19395 |
+
break;
|
19396 |
+
|
19397 |
+
case 'counters':
|
19398 |
+
if (args.length > 0) {
|
19399 |
+
var _counters2 = {
|
19400 |
+
type: TOKEN_TYPE.COUNTERS,
|
19401 |
+
name: args[0]
|
19402 |
+
};
|
19403 |
+
if (args.length > 1) {
|
19404 |
+
_counters2.glue = args[1];
|
19405 |
+
}
|
19406 |
+
if (args.length > 2) {
|
19407 |
+
_counters2.format = args[2];
|
19408 |
+
}
|
19409 |
+
tokens.push(_counters2);
|
19410 |
+
}
|
19411 |
+
break;
|
19412 |
+
|
19413 |
+
case 'url':
|
19414 |
+
if (args.length > 0) {
|
19415 |
+
tokens.push({ type: TOKEN_TYPE.URL, value: args[0] });
|
19416 |
+
}
|
19417 |
+
break;
|
19418 |
+
}
|
19419 |
+
|
19420 |
+
isFunction = false;
|
19421 |
+
str = '';
|
19422 |
+
}
|
19423 |
+
break;
|
19424 |
+
|
19425 |
+
case ',':
|
19426 |
+
if (isString) {
|
19427 |
+
str += c;
|
19428 |
+
} else if (isFunction) {
|
19429 |
+
args.push(str);
|
19430 |
+
str = '';
|
19431 |
+
}
|
19432 |
+
break;
|
19433 |
+
|
19434 |
+
case ' ':
|
19435 |
+
case '\t':
|
19436 |
+
if (isString) {
|
19437 |
+
str += c;
|
19438 |
+
} else if (str) {
|
19439 |
+
addOtherToken(tokens, str);
|
19440 |
+
str = '';
|
19441 |
+
}
|
19442 |
+
break;
|
19443 |
+
|
19444 |
+
default:
|
19445 |
+
str += c;
|
19446 |
+
}
|
19447 |
+
|
19448 |
+
if (c !== '\\') {
|
19449 |
+
isEscaped = false;
|
19450 |
+
}
|
19451 |
+
}
|
19452 |
+
|
19453 |
+
if (str) {
|
19454 |
+
addOtherToken(tokens, str);
|
19455 |
+
}
|
19456 |
+
|
19457 |
+
if (cache) {
|
19458 |
+
cache[content] = tokens;
|
19459 |
+
}
|
19460 |
+
|
19461 |
+
return tokens;
|
19462 |
+
};
|
19463 |
+
|
19464 |
+
var addOtherToken = function addOtherToken(tokens, identifier) {
|
19465 |
+
switch (identifier) {
|
19466 |
+
case 'open-quote':
|
19467 |
+
tokens.push({ type: TOKEN_TYPE.OPENQUOTE });
|
19468 |
+
break;
|
19469 |
+
case 'close-quote':
|
19470 |
+
tokens.push({ type: TOKEN_TYPE.CLOSEQUOTE });
|
19471 |
+
break;
|
19472 |
+
}
|
19473 |
+
};
|
19474 |
+
|
19475 |
+
var getQuote = function getQuote(style, isOpening, quoteDepth) {
|
19476 |
+
var quotes = style.quotes ? style.quotes.split(/\s+/) : ["'\"'", "'\"'"];
|
19477 |
+
var idx = quoteDepth * 2;
|
19478 |
+
if (idx >= quotes.length) {
|
19479 |
+
idx = quotes.length - 2;
|
19480 |
+
}
|
19481 |
+
if (!isOpening) {
|
19482 |
+
++idx;
|
19483 |
+
}
|
19484 |
+
return quotes[idx].replace(/^["']|["']$/g, '');
|
19485 |
+
};
|
19486 |
+
|
19487 |
+
var formatCounterValue = function formatCounterValue(counter, glue, format) {
|
19488 |
+
var len = counter.length;
|
19489 |
+
var result = '';
|
19490 |
+
|
19491 |
+
for (var i = 0; i < len; i++) {
|
19492 |
+
if (i > 0) {
|
19493 |
+
result += glue || '';
|
19494 |
+
}
|
19495 |
+
result += (0, _ListItem.createCounterText)(counter[i], (0, _listStyle.parseListStyleType)(format || 'decimal'), false);
|
19496 |
+
}
|
19497 |
+
|
19498 |
+
return result;
|
19499 |
+
};
|
19500 |
+
|
19501 |
+
/***/ })
|
19502 |
+
/******/ ]);
|
19503 |
});
|
|
|
19504 |
|
19505 |
/***/ },
|
19506 |
|
assets/js/{admin_vendor.6cfde572.js → admin_vendor.e4568802.js}
RENAMED
@@ -34398,8 +34398,7 @@ webpackJsonp([1],[
|
|
34398 |
key: 'option-' + item.id,
|
34399 |
className: 'default',
|
34400 |
value: value,
|
34401 |
-
title: searchLabel
|
34402 |
-
selected: value === selectedValues
|
34403 |
},
|
34404 |
label
|
34405 |
);
|
@@ -40763,7 +40762,7 @@ webpackJsonp([1],[
|
|
40763 |
if (this.props.onValueChange instanceof Function) {
|
40764 |
value = item[this.props.field.name];
|
40765 |
// set value to defaultValue if available
|
40766 |
-
value = value === undefined
|
40767 |
}
|
40768 |
// defaultValue should only be set only when value is not set
|
40769 |
if (!value && this.props.field.defaultValue) {
|
34398 |
key: 'option-' + item.id,
|
34399 |
className: 'default',
|
34400 |
value: value,
|
34401 |
+
title: searchLabel
|
|
|
34402 |
},
|
34403 |
label
|
34404 |
);
|
40762 |
if (this.props.onValueChange instanceof Function) {
|
40763 |
value = item[this.props.field.name];
|
40764 |
// set value to defaultValue if available
|
40765 |
+
value = value === undefined ? this.props.field.defaultValue || '' : value;
|
40766 |
}
|
40767 |
// defaultValue should only be set only when value is not set
|
40768 |
if (!value && this.props.field.defaultValue) {
|
assets/js/lib/mailpoet_shortcodes/plugin.js
CHANGED
@@ -8,33 +8,34 @@
|
|
8 |
* its placeholder into editor text.
|
9 |
*/
|
10 |
|
11 |
-
/*jshint unused:false */
|
12 |
-
/*global tinymce:true */
|
13 |
-
tinymce.PluginManager.add('mailpoet_shortcodes', function(editor
|
14 |
-
var appendLabelAndClose = function(shortcode) {
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
};
|
22 |
};
|
|
|
23 |
|
24 |
editor.addButton('mailpoet_shortcodes', {
|
25 |
icon: 'mailpoet_shortcodes',
|
26 |
-
onclick: function() {
|
27 |
-
var shortcodes = []
|
28 |
-
|
|
|
29 |
|
30 |
-
|
31 |
-
if (
|
32 |
shortcodes.push({
|
33 |
type: 'label',
|
34 |
text: segment
|
35 |
});
|
36 |
|
37 |
-
for (
|
38 |
shortcodes.push({
|
39 |
type: 'button',
|
40 |
text: configShortcodes[segment][i].text,
|
@@ -42,12 +43,12 @@ tinymce.PluginManager.add('mailpoet_shortcodes', function(editor, url) {
|
|
42 |
});
|
43 |
}
|
44 |
}
|
45 |
-
}
|
46 |
|
47 |
// Open window
|
48 |
editor.windowManager.open({
|
49 |
-
height: parseInt(editor.getParam('plugin_mailpoet_shortcodes_height', 400)),
|
50 |
-
width: parseInt(editor.getParam('plugin_mailpoet_shortcodes_width', 450)),
|
51 |
autoScroll: true,
|
52 |
title: editor.settings.mailpoet_shortcodes_window_title,
|
53 |
body: shortcodes,
|
8 |
* its placeholder into editor text.
|
9 |
*/
|
10 |
|
11 |
+
/* jshint unused:false */
|
12 |
+
/* global tinymce:true */
|
13 |
+
tinymce.PluginManager.add('mailpoet_shortcodes', function tinyMceAdd(editor) {
|
14 |
+
var appendLabelAndClose = function appendLabelAndCLose(shortcode) {
|
15 |
+
editor.insertContent(shortcode);
|
16 |
+
editor.windowManager.close();
|
17 |
+
};
|
18 |
+
var generateOnClickFunc = function generateOnClickFunc(shortcode) {
|
19 |
+
return function appendAndClose() {
|
20 |
+
appendLabelAndClose(shortcode);
|
|
|
21 |
};
|
22 |
+
};
|
23 |
|
24 |
editor.addButton('mailpoet_shortcodes', {
|
25 |
icon: 'mailpoet_shortcodes',
|
26 |
+
onclick: function onClick() {
|
27 |
+
var shortcodes = [];
|
28 |
+
var configShortcodes = editor.settings.mailpoet_shortcodes;
|
29 |
+
var i;
|
30 |
|
31 |
+
Object.keys(configShortcodes).forEach(function configShortcodesLoop(segment) {
|
32 |
+
if (Object.prototype.hasOwnProperty.call(configShortcodes, segment)) {
|
33 |
shortcodes.push({
|
34 |
type: 'label',
|
35 |
text: segment
|
36 |
});
|
37 |
|
38 |
+
for (i = 0; i < configShortcodes[segment].length; i += 1) {
|
39 |
shortcodes.push({
|
40 |
type: 'button',
|
41 |
text: configShortcodes[segment][i].text,
|
43 |
});
|
44 |
}
|
45 |
}
|
46 |
+
});
|
47 |
|
48 |
// Open window
|
49 |
editor.windowManager.open({
|
50 |
+
height: parseInt(editor.getParam('plugin_mailpoet_shortcodes_height', 400), 10),
|
51 |
+
width: parseInt(editor.getParam('plugin_mailpoet_shortcodes_width', 450), 10),
|
52 |
autoScroll: true,
|
53 |
title: editor.settings.mailpoet_shortcodes_window_title,
|
54 |
body: shortcodes,
|
assets/js/{mailpoet.77838a7f.js → mailpoet.5d4557f5.js}
RENAMED
File without changes
|
assets/js/manifest.json
CHANGED
@@ -1,10 +1,10 @@
|
|
1 |
{
|
2 |
"mp2migrator.js": "mp2migrator.b51cde67.js",
|
3 |
"public.js": "public.e7370e60.js",
|
4 |
-
"admin.js": "admin.
|
5 |
-
"admin_vendor.js": "admin_vendor.
|
6 |
"form_editor.js": "form_editor.ba96f4f2.js",
|
7 |
-
"mailpoet.js": "mailpoet.
|
8 |
-
"newsletter_editor.js": "newsletter_editor.
|
9 |
-
"vendor.js": "vendor.
|
10 |
}
|
1 |
{
|
2 |
"mp2migrator.js": "mp2migrator.b51cde67.js",
|
3 |
"public.js": "public.e7370e60.js",
|
4 |
+
"admin.js": "admin.c5e75f6d.js",
|
5 |
+
"admin_vendor.js": "admin_vendor.e4568802.js",
|
6 |
"form_editor.js": "form_editor.ba96f4f2.js",
|
7 |
+
"mailpoet.js": "mailpoet.5d4557f5.js",
|
8 |
+
"newsletter_editor.js": "newsletter_editor.637e880e.js",
|
9 |
+
"vendor.js": "vendor.e6d02f27.js"
|
10 |
}
|
assets/js/{newsletter_editor.47a32ce9.js → newsletter_editor.637e880e.js}
RENAMED
@@ -7595,4541 +7595,7256 @@ webpackJsonp([4],{
|
|
7595 |
/***/ 537:
|
7596 |
/***/ function(module, exports, __webpack_require__) {
|
7597 |
|
7598 |
-
var require;var require;/* WEBPACK VAR INJECTION */(function(global) {/*
|
7599 |
-
html2canvas 0.5.0-alpha2 <http://html2canvas.hertzen.com>
|
7600 |
-
Copyright (c) 2015 Niklas von Hertzen
|
7601 |
-
|
7602 |
-
Released under MIT License
|
7603 |
-
*/
|
7604 |
-
|
7605 |
-
!function(e){if(true)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.html2canvas=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return require(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
|
7606 |
-
(function (process,global){
|
7607 |
/*!
|
7608 |
-
*
|
7609 |
-
*
|
7610 |
-
*
|
7611 |
-
* See https://raw.githubusercontent.com/jakearchibald/es6-promise/master/LICENSE
|
7612 |
-
* @version 2.0.1
|
7613 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7614 |
|
7615 |
-
(function() {
|
7616 |
-
"use strict";
|
7617 |
|
7618 |
-
|
7619 |
-
return typeof x === 'function' || (typeof x === 'object' && x !== null);
|
7620 |
-
}
|
7621 |
|
7622 |
-
|
7623 |
-
|
|
|
|
|
|
|
|
|
|
|
7624 |
}
|
|
|
|
|
7625 |
|
7626 |
-
|
7627 |
-
|
|
|
|
|
|
|
7628 |
}
|
|
|
|
|
7629 |
|
7630 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7631 |
|
7632 |
-
|
7633 |
-
|
7634 |
-
|
7635 |
-
|
7636 |
-
|
7637 |
-
$$utils$$_isArray = Array.isArray;
|
7638 |
}
|
|
|
|
|
7639 |
|
7640 |
-
|
7641 |
-
|
7642 |
-
|
7643 |
|
7644 |
-
|
7645 |
-
|
7646 |
-
|
7647 |
-
|
7648 |
-
if (typeof o !== 'object') {
|
7649 |
-
throw new TypeError('Argument must be an object');
|
7650 |
-
}
|
7651 |
-
$$utils$$F.prototype = o;
|
7652 |
-
return new $$utils$$F();
|
7653 |
-
});
|
7654 |
|
7655 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7656 |
|
7657 |
-
|
7658 |
-
$$asap$$queue[$$asap$$len] = callback;
|
7659 |
-
$$asap$$queue[$$asap$$len + 1] = arg;
|
7660 |
-
$$asap$$len += 2;
|
7661 |
-
if ($$asap$$len === 2) {
|
7662 |
-
// If len is 1, that means that we need to schedule an async flush.
|
7663 |
-
// If additional callbacks are queued before the queue is flushed, they
|
7664 |
-
// will be processed by this flush that we are scheduling.
|
7665 |
-
$$asap$$scheduleFlush();
|
7666 |
-
}
|
7667 |
-
};
|
7668 |
|
7669 |
-
|
7670 |
-
|
|
|
7671 |
|
7672 |
-
|
7673 |
-
var $$asap$$isWorker = typeof Uint8ClampedArray !== 'undefined' &&
|
7674 |
-
typeof importScripts !== 'undefined' &&
|
7675 |
-
typeof MessageChannel !== 'undefined';
|
7676 |
|
7677 |
-
// node
|
7678 |
-
function $$asap$$useNextTick() {
|
7679 |
-
return function() {
|
7680 |
-
process.nextTick($$asap$$flush);
|
7681 |
-
};
|
7682 |
-
}
|
7683 |
|
7684 |
-
|
7685 |
-
|
7686 |
-
|
7687 |
-
|
7688 |
-
observer.observe(node, { characterData: true });
|
7689 |
|
7690 |
-
|
7691 |
-
node.data = (iterations = ++iterations % 2);
|
7692 |
-
};
|
7693 |
-
}
|
7694 |
|
7695 |
-
|
7696 |
-
function $$asap$$useMessageChannel() {
|
7697 |
-
var channel = new MessageChannel();
|
7698 |
-
channel.port1.onmessage = $$asap$$flush;
|
7699 |
-
return function () {
|
7700 |
-
channel.port2.postMessage(0);
|
7701 |
-
};
|
7702 |
-
}
|
7703 |
|
7704 |
-
|
7705 |
-
return function() {
|
7706 |
-
setTimeout($$asap$$flush, 1);
|
7707 |
-
};
|
7708 |
-
}
|
7709 |
|
7710 |
-
|
7711 |
|
7712 |
-
|
7713 |
-
for (var i = 0; i < $$asap$$len; i+=2) {
|
7714 |
-
var callback = $$asap$$queue[i];
|
7715 |
-
var arg = $$asap$$queue[i+1];
|
7716 |
|
7717 |
-
|
7718 |
|
7719 |
-
|
7720 |
-
$$asap$$queue[i+1] = undefined;
|
7721 |
-
}
|
7722 |
|
7723 |
-
|
7724 |
-
|
|
|
|
|
7725 |
|
7726 |
-
|
|
|
7727 |
|
7728 |
-
|
7729 |
-
|
7730 |
-
|
7731 |
-
|
7732 |
-
|
7733 |
-
|
7734 |
-
|
7735 |
-
|
7736 |
-
$$asap$$scheduleFlush = $$asap$$useSetTimeout();
|
7737 |
}
|
7738 |
|
7739 |
-
|
7740 |
-
|
7741 |
-
|
7742 |
-
|
7743 |
-
|
|
|
7744 |
|
7745 |
-
|
7746 |
-
|
7747 |
-
}
|
7748 |
|
7749 |
-
|
7750 |
-
|
7751 |
-
|
7752 |
|
7753 |
-
|
7754 |
-
|
7755 |
-
|
7756 |
-
} catch(error) {
|
7757 |
-
$$$internal$$GET_THEN_ERROR.error = error;
|
7758 |
-
return $$$internal$$GET_THEN_ERROR;
|
7759 |
-
}
|
7760 |
-
}
|
7761 |
|
7762 |
-
|
7763 |
-
|
7764 |
-
|
7765 |
-
|
7766 |
-
|
7767 |
-
|
7768 |
-
}
|
7769 |
|
7770 |
-
|
7771 |
-
|
7772 |
-
var sealed = false;
|
7773 |
-
var error = $$$internal$$tryThen(then, thenable, function(value) {
|
7774 |
-
if (sealed) { return; }
|
7775 |
-
sealed = true;
|
7776 |
-
if (thenable !== value) {
|
7777 |
-
$$$internal$$resolve(promise, value);
|
7778 |
-
} else {
|
7779 |
-
$$$internal$$fulfill(promise, value);
|
7780 |
-
}
|
7781 |
-
}, function(reason) {
|
7782 |
-
if (sealed) { return; }
|
7783 |
-
sealed = true;
|
7784 |
|
7785 |
-
|
7786 |
-
|
|
|
7787 |
|
7788 |
-
|
7789 |
-
|
7790 |
-
$$$internal$$reject(promise, error);
|
7791 |
-
}
|
7792 |
-
}, promise);
|
7793 |
}
|
|
|
7794 |
|
7795 |
-
|
7796 |
-
if (thenable._state === $$$internal$$FULFILLED) {
|
7797 |
-
$$$internal$$fulfill(promise, thenable._result);
|
7798 |
-
} else if (promise._state === $$$internal$$REJECTED) {
|
7799 |
-
$$$internal$$reject(promise, thenable._result);
|
7800 |
-
} else {
|
7801 |
-
$$$internal$$subscribe(thenable, undefined, function(value) {
|
7802 |
-
$$$internal$$resolve(promise, value);
|
7803 |
-
}, function(reason) {
|
7804 |
-
$$$internal$$reject(promise, reason);
|
7805 |
-
});
|
7806 |
-
}
|
7807 |
-
}
|
7808 |
|
7809 |
-
|
7810 |
-
|
7811 |
-
$$$internal$$handleOwnThenable(promise, maybeThenable);
|
7812 |
-
} else {
|
7813 |
-
var then = $$$internal$$getThen(maybeThenable);
|
7814 |
-
|
7815 |
-
if (then === $$$internal$$GET_THEN_ERROR) {
|
7816 |
-
$$$internal$$reject(promise, $$$internal$$GET_THEN_ERROR.error);
|
7817 |
-
} else if (then === undefined) {
|
7818 |
-
$$$internal$$fulfill(promise, maybeThenable);
|
7819 |
-
} else if ($$utils$$isFunction(then)) {
|
7820 |
-
$$$internal$$handleForeignThenable(promise, maybeThenable, then);
|
7821 |
-
} else {
|
7822 |
-
$$$internal$$fulfill(promise, maybeThenable);
|
7823 |
-
}
|
7824 |
-
}
|
7825 |
-
}
|
7826 |
|
7827 |
-
|
7828 |
-
|
7829 |
-
|
7830 |
-
|
7831 |
-
|
7832 |
-
|
7833 |
-
|
7834 |
-
|
|
|
|
|
|
|
7835 |
}
|
|
|
7836 |
|
7837 |
-
|
7838 |
-
|
7839 |
-
|
7840 |
-
|
7841 |
-
|
7842 |
-
|
7843 |
}
|
7844 |
|
7845 |
-
|
7846 |
-
|
|
|
|
|
|
|
7847 |
|
7848 |
-
|
7849 |
-
|
|
|
|
|
|
|
7850 |
|
7851 |
-
|
7852 |
-
|
7853 |
-
|
7854 |
-
|
7855 |
}
|
7856 |
|
7857 |
-
|
7858 |
-
|
7859 |
-
|
7860 |
-
|
|
|
|
|
7861 |
|
7862 |
-
|
7863 |
-
|
|
|
7864 |
|
7865 |
-
|
7866 |
-
|
7867 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7868 |
|
7869 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7870 |
|
7871 |
-
|
7872 |
-
|
7873 |
-
|
|
|
|
|
|
|
7874 |
|
7875 |
-
|
7876 |
-
|
7877 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7878 |
}
|
|
|
7879 |
|
7880 |
-
|
7881 |
-
|
7882 |
-
|
7883 |
|
7884 |
-
|
7885 |
|
7886 |
-
var child, callback, detail = promise._result;
|
7887 |
|
7888 |
-
|
7889 |
-
|
7890 |
-
|
|
|
7891 |
|
7892 |
-
|
7893 |
-
$$$internal$$invokeCallback(settled, child, callback, detail);
|
7894 |
-
} else {
|
7895 |
-
callback(detail);
|
7896 |
-
}
|
7897 |
-
}
|
7898 |
|
7899 |
-
|
7900 |
-
}
|
7901 |
|
7902 |
-
|
7903 |
-
this.error = null;
|
7904 |
-
}
|
7905 |
|
7906 |
-
|
7907 |
|
7908 |
-
|
7909 |
-
try {
|
7910 |
-
return callback(detail);
|
7911 |
-
} catch(e) {
|
7912 |
-
$$$internal$$TRY_CATCH_ERROR.error = e;
|
7913 |
-
return $$$internal$$TRY_CATCH_ERROR;
|
7914 |
-
}
|
7915 |
-
}
|
7916 |
|
7917 |
-
|
7918 |
-
var hasCallback = $$utils$$isFunction(callback),
|
7919 |
-
value, error, succeeded, failed;
|
7920 |
|
7921 |
-
|
7922 |
-
|
|
|
|
|
7923 |
|
7924 |
-
|
7925 |
-
|
7926 |
-
|
7927 |
-
value = null;
|
7928 |
-
} else {
|
7929 |
-
succeeded = true;
|
7930 |
-
}
|
7931 |
|
7932 |
-
|
7933 |
-
|
7934 |
-
|
|
|
7935 |
}
|
7936 |
-
|
7937 |
-
} else {
|
7938 |
-
value = detail;
|
7939 |
-
succeeded = true;
|
7940 |
-
}
|
7941 |
-
|
7942 |
-
if (promise._state !== $$$internal$$PENDING) {
|
7943 |
-
// noop
|
7944 |
-
} else if (hasCallback && succeeded) {
|
7945 |
-
$$$internal$$resolve(promise, value);
|
7946 |
-
} else if (failed) {
|
7947 |
-
$$$internal$$reject(promise, error);
|
7948 |
-
} else if (settled === $$$internal$$FULFILLED) {
|
7949 |
-
$$$internal$$fulfill(promise, value);
|
7950 |
-
} else if (settled === $$$internal$$REJECTED) {
|
7951 |
-
$$$internal$$reject(promise, value);
|
7952 |
-
}
|
7953 |
}
|
7954 |
|
7955 |
-
|
7956 |
-
|
7957 |
-
|
7958 |
-
|
7959 |
-
}
|
7960 |
-
|
7961 |
-
|
7962 |
-
|
7963 |
-
|
7964 |
-
|
7965 |
-
}
|
|
|
|
|
|
|
|
|
|
|
7966 |
|
7967 |
-
|
7968 |
-
|
7969 |
-
return {
|
7970 |
-
state: 'fulfilled',
|
7971 |
-
value: value
|
7972 |
-
};
|
7973 |
-
} else {
|
7974 |
-
return {
|
7975 |
-
state: 'rejected',
|
7976 |
-
reason: value
|
7977 |
-
};
|
7978 |
-
}
|
7979 |
-
}
|
7980 |
|
7981 |
-
|
7982 |
-
this._instanceConstructor = Constructor;
|
7983 |
-
this.promise = new Constructor($$$internal$$noop, label);
|
7984 |
-
this._abortOnReject = abortOnReject;
|
7985 |
|
7986 |
-
if (this._validateInput(input)) {
|
7987 |
-
this._input = input;
|
7988 |
-
this.length = input.length;
|
7989 |
-
this._remaining = input.length;
|
7990 |
|
7991 |
-
|
|
|
|
|
|
|
7992 |
|
7993 |
-
|
7994 |
-
|
7995 |
-
|
7996 |
-
|
7997 |
-
|
7998 |
-
|
7999 |
-
|
8000 |
-
|
8001 |
-
|
8002 |
-
|
8003 |
-
|
8004 |
-
|
|
|
8005 |
}
|
|
|
8006 |
|
8007 |
-
|
8008 |
-
|
8009 |
-
|
8010 |
-
|
8011 |
-
$$$enumerator$$Enumerator.prototype._validationError = function() {
|
8012 |
-
return new Error('Array Methods must be provided an Array');
|
8013 |
-
};
|
8014 |
-
|
8015 |
-
$$$enumerator$$Enumerator.prototype._init = function() {
|
8016 |
-
this._result = new Array(this.length);
|
8017 |
-
};
|
8018 |
-
|
8019 |
-
var $$$enumerator$$default = $$$enumerator$$Enumerator;
|
8020 |
|
8021 |
-
|
8022 |
-
var length = this.length;
|
8023 |
-
var promise = this.promise;
|
8024 |
-
var input = this._input;
|
8025 |
|
8026 |
-
for (var i = 0; promise._state === $$$internal$$PENDING && i < length; i++) {
|
8027 |
-
this._eachEntry(input[i], i);
|
8028 |
-
}
|
8029 |
-
};
|
8030 |
|
8031 |
-
|
8032 |
-
|
8033 |
-
|
8034 |
-
if (entry.constructor === c && entry._state !== $$$internal$$PENDING) {
|
8035 |
-
entry._onerror = null;
|
8036 |
-
this._settledAt(entry._state, i, entry._result);
|
8037 |
-
} else {
|
8038 |
-
this._willSettleAt(c.resolve(entry), i);
|
8039 |
-
}
|
8040 |
-
} else {
|
8041 |
-
this._remaining--;
|
8042 |
-
this._result[i] = this._makeResult($$$internal$$FULFILLED, i, entry);
|
8043 |
-
}
|
8044 |
-
};
|
8045 |
|
8046 |
-
|
8047 |
-
var promise = this.promise;
|
8048 |
|
8049 |
-
|
8050 |
-
this._remaining--;
|
8051 |
|
8052 |
-
|
8053 |
-
$$$internal$$reject(promise, value);
|
8054 |
-
} else {
|
8055 |
-
this._result[i] = this._makeResult(state, i, value);
|
8056 |
-
}
|
8057 |
-
}
|
8058 |
|
8059 |
-
|
8060 |
-
$$$internal$$fulfill(promise, this._result);
|
8061 |
-
}
|
8062 |
-
};
|
8063 |
|
8064 |
-
|
8065 |
-
return value;
|
8066 |
-
};
|
8067 |
|
8068 |
-
|
8069 |
-
var enumerator = this;
|
8070 |
|
8071 |
-
|
8072 |
-
enumerator._settledAt($$$internal$$FULFILLED, i, value);
|
8073 |
-
}, function(reason) {
|
8074 |
-
enumerator._settledAt($$$internal$$REJECTED, i, reason);
|
8075 |
-
});
|
8076 |
-
};
|
8077 |
|
8078 |
-
|
8079 |
-
return new $$$enumerator$$default(this, entries, true /* abort on reject */, label).promise;
|
8080 |
-
};
|
8081 |
|
8082 |
-
|
8083 |
-
/*jshint validthis:true */
|
8084 |
-
var Constructor = this;
|
8085 |
|
8086 |
-
|
8087 |
|
8088 |
-
|
8089 |
-
$$$internal$$reject(promise, new TypeError('You must pass an array to race.'));
|
8090 |
-
return promise;
|
8091 |
-
}
|
8092 |
|
8093 |
-
|
8094 |
|
8095 |
-
|
8096 |
-
$$$internal$$resolve(promise, value);
|
8097 |
-
}
|
8098 |
|
8099 |
-
|
8100 |
-
$$$internal$$reject(promise, reason);
|
8101 |
-
}
|
8102 |
|
8103 |
-
|
8104 |
-
$$$internal$$subscribe(Constructor.resolve(entries[i]), undefined, onFulfillment, onRejection);
|
8105 |
-
}
|
8106 |
|
8107 |
-
|
8108 |
-
};
|
8109 |
|
8110 |
-
|
8111 |
-
/*jshint validthis:true */
|
8112 |
-
var Constructor = this;
|
8113 |
|
8114 |
-
|
8115 |
-
return object;
|
8116 |
-
}
|
8117 |
|
8118 |
-
|
8119 |
-
$$$internal$$resolve(promise, object);
|
8120 |
-
return promise;
|
8121 |
-
};
|
8122 |
|
8123 |
-
|
8124 |
-
/*jshint validthis:true */
|
8125 |
-
var Constructor = this;
|
8126 |
-
var promise = new Constructor($$$internal$$noop, label);
|
8127 |
-
$$$internal$$reject(promise, reason);
|
8128 |
-
return promise;
|
8129 |
-
};
|
8130 |
|
8131 |
-
|
8132 |
|
8133 |
-
|
8134 |
-
throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');
|
8135 |
-
}
|
8136 |
|
8137 |
-
|
8138 |
-
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.");
|
8139 |
-
}
|
8140 |
|
8141 |
-
|
8142 |
|
8143 |
-
|
8144 |
-
Promise objects represent the eventual result of an asynchronous operation. The
|
8145 |
-
primary way of interacting with a promise is through its `then` method, which
|
8146 |
-
registers callbacks to receive either a promise’s eventual value or the reason
|
8147 |
-
why the promise cannot be fulfilled.
|
8148 |
|
8149 |
-
|
8150 |
-
-----------
|
8151 |
|
8152 |
-
|
8153 |
-
- `thenable` is an object or function that defines a `then` method.
|
8154 |
-
- `value` is any legal JavaScript value (including undefined, a thenable, or a promise).
|
8155 |
-
- `exception` is a value that is thrown using the throw statement.
|
8156 |
-
- `reason` is a value that indicates why a promise was rejected.
|
8157 |
-
- `settled` the final resting state of a promise, fulfilled or rejected.
|
8158 |
|
8159 |
-
|
8160 |
|
8161 |
-
|
8162 |
-
state. Promises that are rejected have a rejection reason and are in the
|
8163 |
-
rejected state. A fulfillment value is never a thenable.
|
8164 |
|
8165 |
-
|
8166 |
-
promise, then the original promise's settled state will match the value's
|
8167 |
-
settled state. So a promise that *resolves* a promise that rejects will
|
8168 |
-
itself reject, and a promise that *resolves* a promise that fulfills will
|
8169 |
-
itself fulfill.
|
8170 |
|
|
|
8171 |
|
8172 |
-
|
8173 |
-
|
|
|
8174 |
|
8175 |
-
|
8176 |
-
var promise = new Promise(function(resolve, reject) {
|
8177 |
-
// on success
|
8178 |
-
resolve(value);
|
8179 |
|
8180 |
-
|
8181 |
-
|
8182 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8183 |
|
8184 |
-
|
8185 |
-
// on fulfillment
|
8186 |
-
}, function(reason) {
|
8187 |
-
// on rejection
|
8188 |
-
});
|
8189 |
-
```
|
8190 |
|
8191 |
-
|
8192 |
-
---------------
|
8193 |
|
8194 |
-
|
8195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8196 |
|
8197 |
-
|
8198 |
-
|
8199 |
-
|
8200 |
-
|
8201 |
|
8202 |
-
|
8203 |
-
|
8204 |
-
|
8205 |
-
|
8206 |
-
|
|
|
|
|
|
|
8207 |
|
8208 |
-
|
8209 |
-
|
8210 |
-
|
8211 |
-
|
8212 |
-
|
8213 |
-
|
8214 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8215 |
}
|
8216 |
-
|
8217 |
-
|
8218 |
-
}
|
8219 |
|
8220 |
-
|
8221 |
-
|
8222 |
-
}, function(reason) {
|
8223 |
-
// on rejection
|
8224 |
-
});
|
8225 |
-
```
|
8226 |
|
8227 |
-
|
|
|
|
|
8228 |
|
8229 |
-
|
8230 |
-
Promise.all([
|
8231 |
-
getJSON('/posts'),
|
8232 |
-
getJSON('/comments')
|
8233 |
-
]).then(function(values){
|
8234 |
-
values[0] // => postsJSON
|
8235 |
-
values[1] // => commentsJSON
|
8236 |
|
8237 |
-
return values;
|
8238 |
-
});
|
8239 |
-
```
|
8240 |
|
8241 |
-
|
8242 |
-
|
8243 |
-
|
8244 |
-
|
8245 |
-
|
8246 |
-
|
8247 |
-
this._id = $$es6$promise$promise$$counter++;
|
8248 |
-
this._state = undefined;
|
8249 |
-
this._result = undefined;
|
8250 |
-
this._subscribers = [];
|
8251 |
|
8252 |
-
|
8253 |
-
|
8254 |
-
|
8255 |
-
}
|
8256 |
|
8257 |
-
|
8258 |
-
|
|
|
|
|
|
|
|
|
|
|
8259 |
}
|
8260 |
-
|
8261 |
-
$$$internal$$initializePromise(this, resolver);
|
8262 |
-
}
|
8263 |
}
|
|
|
|
|
8264 |
|
8265 |
-
|
8266 |
-
$$es6$promise$promise$$Promise.race = $$promise$race$$default;
|
8267 |
-
$$es6$promise$promise$$Promise.resolve = $$promise$resolve$$default;
|
8268 |
-
$$es6$promise$promise$$Promise.reject = $$promise$reject$$default;
|
8269 |
-
|
8270 |
-
$$es6$promise$promise$$Promise.prototype = {
|
8271 |
-
constructor: $$es6$promise$promise$$Promise,
|
8272 |
|
8273 |
-
|
8274 |
-
|
8275 |
-
|
8276 |
-
reason why the promise cannot be fulfilled.
|
8277 |
-
|
8278 |
-
```js
|
8279 |
-
findUser().then(function(user){
|
8280 |
-
// user is available
|
8281 |
-
}, function(reason){
|
8282 |
-
// user is unavailable, and you are given the reason why
|
8283 |
-
});
|
8284 |
-
```
|
8285 |
-
|
8286 |
-
Chaining
|
8287 |
-
--------
|
8288 |
-
|
8289 |
-
The return value of `then` is itself a promise. This second, 'downstream'
|
8290 |
-
promise is resolved with the return value of the first promise's fulfillment
|
8291 |
-
or rejection handler, or rejected if the handler throws an exception.
|
8292 |
-
|
8293 |
-
```js
|
8294 |
-
findUser().then(function (user) {
|
8295 |
-
return user.name;
|
8296 |
-
}, function (reason) {
|
8297 |
-
return 'default name';
|
8298 |
-
}).then(function (userName) {
|
8299 |
-
// If `findUser` fulfilled, `userName` will be the user's name, otherwise it
|
8300 |
-
// will be `'default name'`
|
8301 |
-
});
|
8302 |
|
8303 |
-
|
8304 |
-
throw new Error('Found user, but still unhappy');
|
8305 |
-
}, function (reason) {
|
8306 |
-
throw new Error('`findUser` rejected and we're unhappy');
|
8307 |
-
}).then(function (value) {
|
8308 |
-
// never reached
|
8309 |
-
}, function (reason) {
|
8310 |
-
// if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.
|
8311 |
-
// If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.
|
8312 |
-
});
|
8313 |
-
```
|
8314 |
-
If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.
|
8315 |
-
|
8316 |
-
```js
|
8317 |
-
findUser().then(function (user) {
|
8318 |
-
throw new PedagogicalException('Upstream error');
|
8319 |
-
}).then(function (value) {
|
8320 |
-
// never reached
|
8321 |
-
}).then(function (value) {
|
8322 |
-
// never reached
|
8323 |
-
}, function (reason) {
|
8324 |
-
// The `PedgagocialException` is propagated all the way down to here
|
8325 |
-
});
|
8326 |
-
```
|
8327 |
|
8328 |
-
Assimilation
|
8329 |
-
------------
|
8330 |
|
8331 |
-
|
8332 |
-
|
8333 |
-
|
8334 |
-
|
8335 |
|
8336 |
-
|
8337 |
-
findUser().then(function (user) {
|
8338 |
-
return findCommentsByAuthor(user);
|
8339 |
-
}).then(function (comments) {
|
8340 |
-
// The user's comments are now available
|
8341 |
-
});
|
8342 |
-
```
|
8343 |
|
8344 |
-
|
8345 |
|
8346 |
-
|
8347 |
-
findUser().then(function (user) {
|
8348 |
-
return findCommentsByAuthor(user);
|
8349 |
-
}).then(function (comments) {
|
8350 |
-
// If `findCommentsByAuthor` fulfills, we'll have the value here
|
8351 |
-
}, function (reason) {
|
8352 |
-
// If `findCommentsByAuthor` rejects, we'll have the reason here
|
8353 |
-
});
|
8354 |
-
```
|
8355 |
|
8356 |
-
|
8357 |
-
--------------
|
8358 |
|
8359 |
-
|
8360 |
|
8361 |
-
|
8362 |
-
var result;
|
8363 |
|
8364 |
-
|
8365 |
-
result = findResult();
|
8366 |
-
// success
|
8367 |
-
} catch(reason) {
|
8368 |
-
// failure
|
8369 |
-
}
|
8370 |
-
```
|
8371 |
|
8372 |
-
|
8373 |
|
8374 |
-
|
8375 |
-
findResult(function(result, err){
|
8376 |
-
if (err) {
|
8377 |
-
// failure
|
8378 |
-
} else {
|
8379 |
-
// success
|
8380 |
-
}
|
8381 |
-
});
|
8382 |
-
```
|
8383 |
|
8384 |
-
|
8385 |
|
8386 |
-
|
8387 |
-
findResult().then(function(result){
|
8388 |
-
// success
|
8389 |
-
}, function(reason){
|
8390 |
-
// failure
|
8391 |
-
});
|
8392 |
-
```
|
8393 |
|
8394 |
-
|
8395 |
-
--------------
|
8396 |
|
8397 |
-
|
|
|
|
|
|
|
|
|
|
|
8398 |
|
8399 |
-
|
8400 |
-
|
|
|
|
|
|
|
|
|
8401 |
|
8402 |
-
|
8403 |
-
|
8404 |
-
|
8405 |
-
|
8406 |
-
|
8407 |
-
// failure
|
8408 |
-
}
|
8409 |
-
```
|
8410 |
|
8411 |
-
|
8412 |
|
8413 |
-
|
8414 |
|
8415 |
-
|
|
|
8416 |
|
8417 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8418 |
|
8419 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8420 |
|
8421 |
-
|
|
|
|
|
8422 |
|
8423 |
-
|
8424 |
-
|
8425 |
-
|
8426 |
-
|
8427 |
-
|
8428 |
-
|
8429 |
-
|
8430 |
-
if (err) {
|
8431 |
-
failure(err);
|
8432 |
-
} else {
|
8433 |
-
try {
|
8434 |
-
foundBooks(books);
|
8435 |
-
} catch(reason) {
|
8436 |
-
failure(reason);
|
8437 |
-
}
|
8438 |
-
}
|
8439 |
-
});
|
8440 |
-
} catch(error) {
|
8441 |
-
failure(err);
|
8442 |
-
}
|
8443 |
-
// success
|
8444 |
-
}
|
8445 |
-
});
|
8446 |
-
```
|
8447 |
|
8448 |
-
|
|
|
|
|
8449 |
|
8450 |
-
|
8451 |
-
|
8452 |
-
then(findBooksByAuthor).
|
8453 |
-
then(function(books){
|
8454 |
-
// found books
|
8455 |
-
}).catch(function(reason){
|
8456 |
-
// something went wrong
|
8457 |
-
});
|
8458 |
-
```
|
8459 |
|
8460 |
-
|
8461 |
-
|
8462 |
-
|
8463 |
-
|
8464 |
-
@return {Promise}
|
8465 |
-
*/
|
8466 |
-
then: function(onFulfillment, onRejection) {
|
8467 |
-
var parent = this;
|
8468 |
-
var state = parent._state;
|
8469 |
|
8470 |
-
|
8471 |
-
|
8472 |
-
}
|
8473 |
|
8474 |
-
|
8475 |
-
var result = parent._result;
|
8476 |
|
8477 |
-
|
8478 |
-
|
8479 |
-
|
8480 |
-
|
8481 |
-
|
8482 |
-
|
8483 |
-
|
8484 |
-
|
|
|
8485 |
|
8486 |
-
|
8487 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8488 |
|
8489 |
-
|
8490 |
-
|
8491 |
-
|
8492 |
|
8493 |
-
|
8494 |
-
|
8495 |
-
|
8496 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8497 |
|
8498 |
-
|
8499 |
-
|
8500 |
-
|
8501 |
-
|
8502 |
-
|
8503 |
-
|
|
|
|
|
8504 |
|
8505 |
-
|
8506 |
-
|
8507 |
-
|
8508 |
-
|
8509 |
-
|
|
|
|
|
|
|
|
|
8510 |
|
8511 |
-
|
8512 |
-
|
8513 |
-
|
8514 |
-
|
8515 |
-
|
8516 |
-
|
8517 |
-
|
8518 |
-
|
8519 |
-
|
8520 |
|
8521 |
-
|
8522 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8523 |
|
8524 |
-
|
8525 |
-
|
8526 |
-
|
8527 |
-
local = window;
|
8528 |
-
} else {
|
8529 |
-
local = self;
|
8530 |
-
}
|
8531 |
-
|
8532 |
-
var es6PromiseSupport =
|
8533 |
-
"Promise" in local &&
|
8534 |
-
// Some of these methods are missing from
|
8535 |
-
// Firefox/Chrome experimental implementations
|
8536 |
-
"resolve" in local.Promise &&
|
8537 |
-
"reject" in local.Promise &&
|
8538 |
-
"all" in local.Promise &&
|
8539 |
-
"race" in local.Promise &&
|
8540 |
-
// Older version of the spec had a resolver object
|
8541 |
-
// as the arg rather than a function
|
8542 |
-
(function() {
|
8543 |
-
var resolve;
|
8544 |
-
new local.Promise(function(r) { resolve = r; });
|
8545 |
-
return $$utils$$isFunction(resolve);
|
8546 |
-
}());
|
8547 |
|
8548 |
-
|
8549 |
-
|
8550 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8551 |
};
|
8552 |
|
8553 |
-
|
8554 |
-
|
8555 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8556 |
};
|
|
|
8557 |
|
8558 |
-
|
8559 |
-
|
8560 |
-
|
8561 |
-
|
8562 |
-
|
8563 |
-
|
8564 |
-
|
8565 |
}
|
8566 |
-
}
|
8567 |
-
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
8568 |
-
},{"_process":2}],2:[function(require,module,exports){
|
8569 |
-
// shim for using process in browser
|
8570 |
|
8571 |
-
|
8572 |
-
|
8573 |
-
|
8574 |
|
8575 |
-
|
8576 |
-
|
8577 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8578 |
}
|
8579 |
-
|
8580 |
-
|
8581 |
-
|
8582 |
-
|
8583 |
-
|
8584 |
-
|
8585 |
-
var i = -1;
|
8586 |
-
while (++i < len) {
|
8587 |
-
currentQueue[i]();
|
8588 |
}
|
8589 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8590 |
}
|
8591 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8592 |
}
|
8593 |
-
|
8594 |
-
|
8595 |
-
|
8596 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8597 |
}
|
|
|
|
|
8598 |
};
|
8599 |
|
8600 |
-
|
8601 |
-
|
8602 |
-
|
8603 |
-
|
8604 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8605 |
|
8606 |
-
|
|
|
8607 |
|
8608 |
-
|
8609 |
-
|
8610 |
-
|
8611 |
-
|
8612 |
-
process.removeListener = noop;
|
8613 |
-
process.removeAllListeners = noop;
|
8614 |
-
process.emit = noop;
|
8615 |
|
8616 |
-
|
8617 |
-
|
|
|
|
|
|
|
|
|
8618 |
};
|
8619 |
|
8620 |
-
|
8621 |
-
|
8622 |
-
process.chdir = function (dir) {
|
8623 |
-
throw new Error('process.chdir is not supported');
|
8624 |
};
|
8625 |
-
process.umask = function() { return 0; };
|
8626 |
-
|
8627 |
-
},{}],3:[function(require,module,exports){
|
8628 |
-
(function (global){
|
8629 |
-
/*! http://mths.be/punycode v1.2.4 by @mathias */
|
8630 |
-
;(function(root) {
|
8631 |
-
|
8632 |
-
/** Detect free variables */
|
8633 |
-
var freeExports = typeof exports == 'object' && exports;
|
8634 |
-
var freeModule = typeof module == 'object' && module &&
|
8635 |
-
module.exports == freeExports && module;
|
8636 |
-
var freeGlobal = typeof global == 'object' && global;
|
8637 |
-
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
|
8638 |
-
root = freeGlobal;
|
8639 |
-
}
|
8640 |
|
8641 |
-
|
8642 |
-
|
8643 |
-
|
8644 |
-
* @type Object
|
8645 |
-
*/
|
8646 |
-
var punycode,
|
8647 |
-
|
8648 |
-
/** Highest positive signed 32-bit float value */
|
8649 |
-
maxInt = 2147483647, // aka. 0x7FFFFFFF or 2^31-1
|
8650 |
-
|
8651 |
-
/** Bootstring parameters */
|
8652 |
-
base = 36,
|
8653 |
-
tMin = 1,
|
8654 |
-
tMax = 26,
|
8655 |
-
skew = 38,
|
8656 |
-
damp = 700,
|
8657 |
-
initialBias = 72,
|
8658 |
-
initialN = 128, // 0x80
|
8659 |
-
delimiter = '-', // '\x2D'
|
8660 |
-
|
8661 |
-
/** Regular expressions */
|
8662 |
-
regexPunycode = /^xn--/,
|
8663 |
-
regexNonASCII = /[^ -~]/, // unprintable ASCII chars + non-ASCII chars
|
8664 |
-
regexSeparators = /\x2E|\u3002|\uFF0E|\uFF61/g, // RFC 3490 separators
|
8665 |
-
|
8666 |
-
/** Error messages */
|
8667 |
-
errors = {
|
8668 |
-
'overflow': 'Overflow: input needs wider integers to process',
|
8669 |
-
'not-basic': 'Illegal input >= 0x80 (not a basic code point)',
|
8670 |
-
'invalid-input': 'Invalid input'
|
8671 |
-
},
|
8672 |
-
|
8673 |
-
/** Convenience shortcuts */
|
8674 |
-
baseMinusTMin = base - tMin,
|
8675 |
-
floor = Math.floor,
|
8676 |
-
stringFromCharCode = String.fromCharCode,
|
8677 |
-
|
8678 |
-
/** Temporary variable */
|
8679 |
-
key;
|
8680 |
-
|
8681 |
-
/*--------------------------------------------------------------------------*/
|
8682 |
-
|
8683 |
-
/**
|
8684 |
-
* A generic error utility function.
|
8685 |
-
* @private
|
8686 |
-
* @param {String} type The error type.
|
8687 |
-
* @returns {Error} Throws a `RangeError` with the applicable error message.
|
8688 |
-
*/
|
8689 |
-
function error(type) {
|
8690 |
-
throw RangeError(errors[type]);
|
8691 |
-
}
|
8692 |
|
8693 |
-
|
8694 |
-
|
8695 |
-
|
8696 |
-
|
8697 |
-
|
8698 |
-
* item.
|
8699 |
-
* @returns {Array} A new array of values returned by the callback function.
|
8700 |
-
*/
|
8701 |
-
function map(array, fn) {
|
8702 |
-
var length = array.length;
|
8703 |
-
while (length--) {
|
8704 |
-
array[length] = fn(array[length]);
|
8705 |
-
}
|
8706 |
-
return array;
|
8707 |
-
}
|
8708 |
|
8709 |
-
|
8710 |
-
|
8711 |
-
|
8712 |
-
|
8713 |
-
|
8714 |
-
|
8715 |
-
|
8716 |
-
|
8717 |
-
*/
|
8718 |
-
function mapDomain(string, fn) {
|
8719 |
-
return map(string.split(regexSeparators), fn).join('.');
|
8720 |
-
}
|
8721 |
|
8722 |
-
|
8723 |
-
|
8724 |
-
|
8725 |
-
* this function will convert a pair of surrogate halves (each of which
|
8726 |
-
* UCS-2 exposes as separate characters) into a single code point,
|
8727 |
-
* matching UTF-16.
|
8728 |
-
* @see `punycode.ucs2.encode`
|
8729 |
-
* @see <http://mathiasbynens.be/notes/javascript-encoding>
|
8730 |
-
* @memberOf punycode.ucs2
|
8731 |
-
* @name decode
|
8732 |
-
* @param {String} string The Unicode input string (UCS-2).
|
8733 |
-
* @returns {Array} The new array of code points.
|
8734 |
-
*/
|
8735 |
-
function ucs2decode(string) {
|
8736 |
-
var output = [],
|
8737 |
-
counter = 0,
|
8738 |
-
length = string.length,
|
8739 |
-
value,
|
8740 |
-
extra;
|
8741 |
-
while (counter < length) {
|
8742 |
-
value = string.charCodeAt(counter++);
|
8743 |
-
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
|
8744 |
-
// high surrogate, and there is a next character
|
8745 |
-
extra = string.charCodeAt(counter++);
|
8746 |
-
if ((extra & 0xFC00) == 0xDC00) { // low surrogate
|
8747 |
-
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
|
8748 |
-
} else {
|
8749 |
-
// unmatched surrogate; only append this code unit, in case the next
|
8750 |
-
// code unit is the high surrogate of a surrogate pair
|
8751 |
-
output.push(value);
|
8752 |
-
counter--;
|
8753 |
-
}
|
8754 |
-
} else {
|
8755 |
-
output.push(value);
|
8756 |
-
}
|
8757 |
-
}
|
8758 |
-
return output;
|
8759 |
-
}
|
8760 |
|
8761 |
-
|
8762 |
-
|
8763 |
-
|
8764 |
-
|
8765 |
-
|
8766 |
-
|
8767 |
-
|
8768 |
-
|
8769 |
-
|
8770 |
-
|
8771 |
-
|
8772 |
-
|
8773 |
-
|
8774 |
-
|
8775 |
-
|
8776 |
-
|
8777 |
-
|
8778 |
-
|
8779 |
-
|
8780 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8781 |
|
8782 |
-
|
8783 |
-
|
8784 |
-
|
8785 |
-
|
8786 |
-
* @param {Number} codePoint The basic numeric code point value.
|
8787 |
-
* @returns {Number} The numeric value of a basic code point (for use in
|
8788 |
-
* representing integers) in the range `0` to `base - 1`, or `base` if
|
8789 |
-
* the code point does not represent a value.
|
8790 |
-
*/
|
8791 |
-
function basicToDigit(codePoint) {
|
8792 |
-
if (codePoint - 48 < 10) {
|
8793 |
-
return codePoint - 22;
|
8794 |
-
}
|
8795 |
-
if (codePoint - 65 < 26) {
|
8796 |
-
return codePoint - 65;
|
8797 |
-
}
|
8798 |
-
if (codePoint - 97 < 26) {
|
8799 |
-
return codePoint - 97;
|
8800 |
-
}
|
8801 |
-
return base;
|
8802 |
-
}
|
8803 |
|
8804 |
-
|
8805 |
-
|
8806 |
-
|
8807 |
-
|
8808 |
-
|
8809 |
-
|
8810 |
-
|
8811 |
-
* `0` to `base - 1`. If `flag` is non-zero, the uppercase form is
|
8812 |
-
* used; else, the lowercase form is used. The behavior is undefined
|
8813 |
-
* if `flag` is non-zero and `digit` has no uppercase form.
|
8814 |
-
*/
|
8815 |
-
function digitToBasic(digit, flag) {
|
8816 |
-
// 0..25 map to ASCII a..z or A..Z
|
8817 |
-
// 26..35 map to ASCII 0..9
|
8818 |
-
return digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);
|
8819 |
-
}
|
8820 |
|
8821 |
-
|
8822 |
-
|
8823 |
-
|
8824 |
-
|
8825 |
-
|
8826 |
-
|
8827 |
-
|
8828 |
-
delta = firstTime ? floor(delta / damp) : delta >> 1;
|
8829 |
-
delta += floor(delta / numPoints);
|
8830 |
-
for (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {
|
8831 |
-
delta = floor(delta / baseMinusTMin);
|
8832 |
-
}
|
8833 |
-
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
|
8834 |
-
}
|
8835 |
|
8836 |
-
|
8837 |
-
|
8838 |
-
|
8839 |
-
|
8840 |
-
|
8841 |
-
|
8842 |
-
|
8843 |
-
|
8844 |
-
|
8845 |
-
|
8846 |
-
|
8847 |
-
out,
|
8848 |
-
i = 0,
|
8849 |
-
n = initialN,
|
8850 |
-
bias = initialBias,
|
8851 |
-
basic,
|
8852 |
-
j,
|
8853 |
-
index,
|
8854 |
-
oldi,
|
8855 |
-
w,
|
8856 |
-
k,
|
8857 |
-
digit,
|
8858 |
-
t,
|
8859 |
-
/** Cached calculation results */
|
8860 |
-
baseMinusT;
|
8861 |
-
|
8862 |
-
// Handle the basic code points: let `basic` be the number of input code
|
8863 |
-
// points before the last delimiter, or `0` if there is none, then copy
|
8864 |
-
// the first basic code points to the output.
|
8865 |
-
|
8866 |
-
basic = input.lastIndexOf(delimiter);
|
8867 |
-
if (basic < 0) {
|
8868 |
-
basic = 0;
|
8869 |
-
}
|
8870 |
|
8871 |
-
|
8872 |
-
|
8873 |
-
|
8874 |
-
|
8875 |
-
|
8876 |
-
|
8877 |
-
|
8878 |
|
8879 |
-
|
8880 |
-
|
|
|
|
|
|
|
|
|
|
|
8881 |
|
8882 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
8883 |
|
8884 |
-
|
8885 |
-
|
8886 |
-
|
8887 |
-
|
8888 |
-
|
8889 |
-
for (oldi = i, w = 1, k = base; /* no condition */; k += base) {
|
8890 |
|
8891 |
-
|
8892 |
-
error('invalid-input');
|
8893 |
-
}
|
8894 |
|
8895 |
-
|
|
|
|
|
8896 |
|
8897 |
-
|
8898 |
-
error('overflow');
|
8899 |
-
}
|
8900 |
|
8901 |
-
i += digit * w;
|
8902 |
-
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
8903 |
|
8904 |
-
|
8905 |
-
|
8906 |
-
|
|
|
8907 |
|
8908 |
-
|
8909 |
-
if (w > floor(maxInt / baseMinusT)) {
|
8910 |
-
error('overflow');
|
8911 |
-
}
|
8912 |
|
8913 |
-
|
8914 |
|
8915 |
-
|
8916 |
|
8917 |
-
|
8918 |
-
|
|
|
|
|
|
|
|
|
|
|
8919 |
|
8920 |
-
|
8921 |
-
|
8922 |
-
|
8923 |
-
error('overflow');
|
8924 |
-
}
|
8925 |
|
8926 |
-
|
8927 |
-
|
|
|
|
|
|
|
|
|
8928 |
|
8929 |
-
|
8930 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8931 |
|
8932 |
-
|
|
|
|
|
|
|
8933 |
|
8934 |
-
|
8935 |
-
|
8936 |
|
8937 |
-
|
8938 |
-
|
8939 |
-
|
8940 |
-
|
8941 |
-
|
8942 |
-
|
8943 |
-
|
8944 |
-
|
8945 |
-
|
8946 |
-
|
8947 |
-
|
8948 |
-
|
8949 |
-
|
8950 |
-
j,
|
8951 |
-
m,
|
8952 |
-
q,
|
8953 |
-
k,
|
8954 |
-
t,
|
8955 |
-
currentValue,
|
8956 |
-
output = [],
|
8957 |
-
/** `inputLength` will hold the number of code points in `input`. */
|
8958 |
-
inputLength,
|
8959 |
-
/** Cached calculation results */
|
8960 |
-
handledCPCountPlusOne,
|
8961 |
-
baseMinusT,
|
8962 |
-
qMinusT;
|
8963 |
-
|
8964 |
-
// Convert the input in UCS-2 to Unicode
|
8965 |
-
input = ucs2decode(input);
|
8966 |
-
|
8967 |
-
// Cache the length
|
8968 |
-
inputLength = input.length;
|
8969 |
-
|
8970 |
-
// Initialize the state
|
8971 |
-
n = initialN;
|
8972 |
-
delta = 0;
|
8973 |
-
bias = initialBias;
|
8974 |
-
|
8975 |
-
// Handle the basic code points
|
8976 |
-
for (j = 0; j < inputLength; ++j) {
|
8977 |
-
currentValue = input[j];
|
8978 |
-
if (currentValue < 0x80) {
|
8979 |
-
output.push(stringFromCharCode(currentValue));
|
8980 |
-
}
|
8981 |
-
}
|
8982 |
|
8983 |
-
|
|
|
|
|
|
|
|
|
8984 |
|
8985 |
-
|
8986 |
-
|
8987 |
|
8988 |
-
|
8989 |
-
|
8990 |
-
|
8991 |
-
|
|
|
|
|
8992 |
|
8993 |
-
|
8994 |
-
|
|
|
8995 |
|
8996 |
-
|
8997 |
-
// larger one:
|
8998 |
-
for (m = maxInt, j = 0; j < inputLength; ++j) {
|
8999 |
-
currentValue = input[j];
|
9000 |
-
if (currentValue >= n && currentValue < m) {
|
9001 |
-
m = currentValue;
|
9002 |
-
}
|
9003 |
-
}
|
9004 |
|
9005 |
-
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,
|
9006 |
-
// but guard against overflow
|
9007 |
-
handledCPCountPlusOne = handledCPCount + 1;
|
9008 |
-
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
|
9009 |
-
error('overflow');
|
9010 |
-
}
|
9011 |
|
9012 |
-
|
9013 |
-
|
|
|
|
|
9014 |
|
9015 |
-
|
9016 |
-
currentValue = input[j];
|
9017 |
|
9018 |
-
|
9019 |
-
error('overflow');
|
9020 |
-
}
|
9021 |
|
9022 |
-
|
9023 |
-
// Represent delta as a generalized variable-length integer
|
9024 |
-
for (q = delta, k = base; /* no condition */; k += base) {
|
9025 |
-
t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
|
9026 |
-
if (q < t) {
|
9027 |
-
break;
|
9028 |
-
}
|
9029 |
-
qMinusT = q - t;
|
9030 |
-
baseMinusT = base - t;
|
9031 |
-
output.push(
|
9032 |
-
stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))
|
9033 |
-
);
|
9034 |
-
q = floor(qMinusT / baseMinusT);
|
9035 |
-
}
|
9036 |
|
9037 |
-
|
9038 |
-
|
9039 |
-
|
9040 |
-
|
9041 |
-
|
9042 |
-
|
|
|
|
|
|
|
|
|
|
|
9043 |
|
9044 |
-
|
9045 |
-
|
|
|
9046 |
|
9047 |
-
|
9048 |
-
|
9049 |
-
|
|
|
|
|
|
|
|
|
9050 |
|
9051 |
-
|
9052 |
-
|
9053 |
-
|
9054 |
-
|
9055 |
-
|
9056 |
-
|
9057 |
-
|
9058 |
-
|
9059 |
-
|
9060 |
-
|
9061 |
-
|
9062 |
-
|
9063 |
-
return regexPunycode.test(string)
|
9064 |
-
? decode(string.slice(4).toLowerCase())
|
9065 |
-
: string;
|
9066 |
-
});
|
9067 |
-
}
|
9068 |
|
9069 |
-
|
9070 |
-
|
9071 |
-
|
9072 |
-
* matter if you call it with a domain that's already in ASCII.
|
9073 |
-
* @memberOf punycode
|
9074 |
-
* @param {String} domain The domain name to convert, as a Unicode string.
|
9075 |
-
* @returns {String} The Punycode representation of the given domain name.
|
9076 |
-
*/
|
9077 |
-
function toASCII(domain) {
|
9078 |
-
return mapDomain(domain, function(string) {
|
9079 |
-
return regexNonASCII.test(string)
|
9080 |
-
? 'xn--' + encode(string)
|
9081 |
-
: string;
|
9082 |
-
});
|
9083 |
-
}
|
9084 |
|
9085 |
-
|
9086 |
-
|
9087 |
-
/** Define the public API */
|
9088 |
-
punycode = {
|
9089 |
-
/**
|
9090 |
-
* A string representing the current Punycode.js version number.
|
9091 |
-
* @memberOf punycode
|
9092 |
-
* @type String
|
9093 |
-
*/
|
9094 |
-
'version': '1.2.4',
|
9095 |
-
/**
|
9096 |
-
* An object of methods to convert from JavaScript's internal character
|
9097 |
-
* representation (UCS-2) to Unicode code points, and back.
|
9098 |
-
* @see <http://mathiasbynens.be/notes/javascript-encoding>
|
9099 |
-
* @memberOf punycode
|
9100 |
-
* @type Object
|
9101 |
-
*/
|
9102 |
-
'ucs2': {
|
9103 |
-
'decode': ucs2decode,
|
9104 |
-
'encode': ucs2encode
|
9105 |
-
},
|
9106 |
-
'decode': decode,
|
9107 |
-
'encode': encode,
|
9108 |
-
'toASCII': toASCII,
|
9109 |
-
'toUnicode': toUnicode
|
9110 |
-
};
|
9111 |
|
9112 |
-
/** Expose `punycode` */
|
9113 |
-
// Some AMD build optimizers, like r.js, check for specific condition patterns
|
9114 |
-
// like the following:
|
9115 |
-
if (
|
9116 |
-
typeof define == 'function' &&
|
9117 |
-
typeof define.amd == 'object' &&
|
9118 |
-
define.amd
|
9119 |
-
) {
|
9120 |
-
define('punycode', function() {
|
9121 |
-
return punycode;
|
9122 |
-
});
|
9123 |
-
} else if (freeExports && !freeExports.nodeType) {
|
9124 |
-
if (freeModule) { // in Node.js or RingoJS v0.8.0+
|
9125 |
-
freeModule.exports = punycode;
|
9126 |
-
} else { // in Narwhal or RingoJS v0.7.0-
|
9127 |
-
for (key in punycode) {
|
9128 |
-
punycode.hasOwnProperty(key) && (freeExports[key] = punycode[key]);
|
9129 |
-
}
|
9130 |
-
}
|
9131 |
-
} else { // in Rhino or a web browser
|
9132 |
-
root.punycode = punycode;
|
9133 |
-
}
|
9134 |
|
9135 |
-
|
9136 |
-
|
9137 |
-
})
|
9138 |
-
|
9139 |
-
|
9140 |
-
|
9141 |
-
|
9142 |
-
|
9143 |
-
|
9144 |
-
|
9145 |
-
|
9146 |
-
|
9147 |
-
|
9148 |
-
|
9149 |
-
|
9150 |
-
|
9151 |
-
|
9152 |
-
|
9153 |
-
|
9154 |
-
|
9155 |
-
|
9156 |
-
|
9157 |
-
|
9158 |
-
|
9159 |
-
|
9160 |
-
|
9161 |
-
|
9162 |
-
|
9163 |
-
|
9164 |
-
|
9165 |
-
|
9166 |
-
|
9167 |
-
|
9168 |
-
|
9169 |
-
|
9170 |
-
|
9171 |
-
|
9172 |
-
|
9173 |
-
|
9174 |
-
|
9175 |
-
|
9176 |
-
|
9177 |
-
}
|
9178 |
-
|
9179 |
-
|
9180 |
-
|
9181 |
-
|
9182 |
-
|
9183 |
-
|
9184 |
-
|
9185 |
-
|
9186 |
-
|
9187 |
-
|
9188 |
-
|
9189 |
-
|
9190 |
-
|
9191 |
-
|
9192 |
-
|
9193 |
-
|
9194 |
-
|
9195 |
-
}
|
9196 |
-
|
9197 |
-
|
9198 |
-
|
9199 |
-
|
9200 |
-
|
9201 |
-
|
9202 |
-
|
9203 |
-
|
9204 |
-
|
9205 |
-
|
9206 |
-
|
9207 |
-
|
9208 |
-
|
9209 |
-
|
9210 |
-
|
9211 |
-
|
9212 |
-
|
9213 |
-
|
9214 |
-
|
9215 |
-
|
9216 |
-
|
9217 |
-
|
9218 |
-
|
9219 |
-
|
9220 |
-
|
9221 |
-
|
9222 |
-
|
9223 |
-
|
9224 |
-
|
9225 |
-
|
9226 |
-
|
9227 |
-
|
9228 |
-
|
9229 |
-
|
9230 |
-
|
9231 |
-
|
9232 |
-
|
9233 |
-
|
9234 |
-
|
9235 |
-
|
9236 |
-
|
9237 |
-
|
9238 |
-
|
9239 |
-
|
9240 |
-
|
9241 |
-
|
9242 |
-
|
9243 |
-
|
9244 |
-
|
9245 |
-
|
9246 |
-
|
9247 |
-
|
9248 |
-
|
9249 |
-
|
9250 |
-
|
9251 |
-
|
9252 |
-
|
9253 |
-
|
9254 |
-
|
9255 |
-
|
9256 |
-
|
9257 |
-
|
9258 |
-
|
9259 |
-
|
9260 |
-
|
9261 |
-
|
9262 |
-
|
9263 |
-
|
9264 |
-
|
9265 |
-
|
9266 |
-
|
9267 |
-
|
9268 |
-
|
9269 |
-
|
9270 |
-
|
9271 |
-
|
9272 |
-
|
9273 |
-
|
9274 |
-
|
9275 |
-
|
9276 |
-
|
9277 |
-
|
9278 |
-
|
9279 |
-
|
9280 |
-
|
9281 |
-
|
9282 |
-
|
9283 |
-
|
9284 |
-
|
9285 |
-
|
9286 |
-
|
9287 |
-
|
9288 |
-
|
9289 |
-
|
9290 |
-
|
9291 |
-
|
9292 |
-
|
9293 |
-
|
9294 |
-
|
9295 |
-
|
9296 |
-
return
|
9297 |
-
};
|
9298 |
-
|
9299 |
-
|
9300 |
-
|
9301 |
-
|
9302 |
-
|
9303 |
-
|
9304 |
-
|
9305 |
-
|
9306 |
-
|
9307 |
-
|
9308 |
-
|
9309 |
-
|
9310 |
-
|
9311 |
-
|
9312 |
-
|
9313 |
-
|
9314 |
-
|
9315 |
-
|
9316 |
-
|
9317 |
-
|
9318 |
-
|
9319 |
-
|
9320 |
-
|
9321 |
-
|
9322 |
-
|
9323 |
-
|
9324 |
-
|
9325 |
-
|
9326 |
-
|
9327 |
-
|
9328 |
-
|
9329 |
-
|
9330 |
-
|
9331 |
-
|
9332 |
-
|
9333 |
-
|
9334 |
-
|
9335 |
-
|
9336 |
-
|
9337 |
-
|
9338 |
-
|
9339 |
-
|
9340 |
-
|
9341 |
-
|
9342 |
-
|
9343 |
-
|
9344 |
-
|
9345 |
-
|
9346 |
-
|
9347 |
-
|
9348 |
-
|
9349 |
-
|
9350 |
-
|
9351 |
-
|
9352 |
-
|
9353 |
-
|
9354 |
-
|
9355 |
-
|
9356 |
-
|
9357 |
-
|
9358 |
-
|
9359 |
-
|
9360 |
-
|
9361 |
-
|
9362 |
-
|
9363 |
-
|
9364 |
-
|
9365 |
-
|
9366 |
-
|
9367 |
-
|
9368 |
-
|
9369 |
-
|
9370 |
-
|
9371 |
-
|
9372 |
-
|
9373 |
-
|
9374 |
-
|
9375 |
-
|
9376 |
-
|
9377 |
-
|
9378 |
-
|
9379 |
-
|
9380 |
-
|
9381 |
-
|
9382 |
-
|
9383 |
-
|
9384 |
-
|
9385 |
-
var
|
9386 |
-
|
9387 |
-
|
9388 |
-
|
9389 |
-
|
9390 |
-
|
9391 |
-
|
9392 |
-
|
9393 |
-
|
9394 |
-
|
9395 |
-
|
9396 |
-
|
9397 |
-
|
9398 |
-
|
9399 |
-
|
9400 |
-
|
9401 |
-
|
9402 |
-
|
9403 |
-
|
9404 |
-
|
9405 |
-
|
9406 |
-
|
9407 |
-
|
9408 |
-
|
9409 |
-
|
9410 |
-
|
9411 |
-
|
9412 |
-
|
9413 |
-
|
9414 |
-
|
9415 |
-
|
9416 |
-
|
9417 |
-
|
9418 |
-
|
9419 |
-
|
9420 |
-
|
9421 |
-
|
9422 |
-
|
9423 |
-
|
9424 |
-
|
9425 |
-
|
9426 |
-
|
9427 |
-
|
9428 |
-
|
9429 |
-
|
9430 |
-
|
9431 |
-
|
9432 |
-
|
9433 |
-
|
9434 |
-
|
9435 |
-
|
9436 |
-
|
9437 |
-
|
9438 |
-
|
9439 |
-
|
9440 |
-
|
9441 |
-
|
9442 |
-
|
9443 |
-
|
9444 |
-
|
9445 |
-
|
9446 |
-
|
9447 |
-
|
9448 |
-
|
9449 |
-
|
9450 |
-
|
9451 |
-
|
9452 |
-
|
9453 |
-
|
9454 |
-
|
9455 |
-
|
9456 |
-
|
9457 |
-
|
9458 |
-
|
9459 |
-
|
9460 |
-
|
9461 |
-
|
9462 |
-
|
9463 |
-
|
9464 |
-
|
9465 |
-
|
9466 |
-
|
9467 |
-
|
9468 |
-
|
9469 |
-
|
9470 |
-
|
9471 |
-
|
9472 |
-
|
9473 |
-
|
9474 |
-
|
9475 |
-
|
9476 |
-
|
9477 |
-
|
9478 |
-
|
9479 |
-
|
9480 |
-
|
9481 |
-
|
9482 |
-
|
9483 |
-
|
9484 |
-
|
9485 |
-
|
9486 |
-
|
9487 |
-
|
9488 |
-
|
9489 |
-
|
9490 |
-
|
9491 |
-
|
9492 |
-
|
9493 |
-
|
9494 |
-
|
9495 |
-
|
9496 |
-
|
9497 |
-
|
9498 |
-
|
9499 |
-
|
9500 |
-
|
9501 |
-
|
9502 |
-
|
9503 |
-
|
9504 |
-
|
9505 |
-
|
9506 |
-
|
9507 |
-
|
9508 |
-
|
9509 |
-
|
9510 |
-
|
9511 |
-
|
9512 |
-
|
9513 |
-
|
9514 |
-
|
9515 |
-
|
9516 |
-
|
9517 |
-
|
9518 |
-
|
9519 |
-
|
9520 |
-
|
9521 |
-
|
9522 |
-
|
9523 |
-
|
9524 |
-
|
9525 |
-
|
9526 |
-
|
9527 |
-
|
9528 |
-
|
9529 |
-
|
9530 |
-
|
9531 |
-
|
9532 |
-
|
9533 |
-
|
9534 |
-
|
9535 |
-
|
9536 |
-
|
9537 |
-
|
9538 |
-
|
9539 |
-
|
9540 |
-
|
9541 |
-
|
9542 |
-
|
9543 |
-
|
9544 |
-
|
9545 |
-
|
9546 |
-
|
9547 |
-
|
9548 |
-
|
9549 |
-
|
9550 |
-
|
9551 |
-
|
9552 |
-
|
9553 |
-
|
9554 |
-
|
9555 |
-
|
9556 |
-
|
9557 |
-
|
9558 |
-
|
9559 |
-
|
9560 |
-
|
9561 |
-
|
9562 |
-
|
9563 |
-
|
9564 |
-
|
9565 |
-
|
9566 |
-
|
9567 |
-
|
9568 |
-
|
9569 |
-
|
9570 |
-
|
9571 |
-
|
9572 |
-
|
9573 |
-
|
9574 |
-
|
9575 |
-
|
9576 |
-
|
9577 |
-
|
9578 |
-
|
9579 |
-
|
9580 |
-
|
9581 |
-
|
9582 |
-
|
9583 |
-
|
9584 |
-
|
9585 |
-
|
9586 |
-
|
9587 |
-
|
9588 |
-
|
9589 |
-
|
9590 |
-
|
9591 |
-
|
9592 |
-
|
9593 |
-
|
9594 |
-
|
9595 |
-
|
9596 |
-
|
9597 |
-
|
9598 |
-
|
9599 |
-
|
9600 |
-
|
9601 |
-
|
9602 |
-
|
9603 |
-
|
9604 |
-
|
9605 |
-
|
9606 |
-
|
9607 |
-
|
9608 |
-
|
9609 |
-
|
9610 |
-
|
9611 |
-
|
9612 |
-
|
9613 |
-
|
9614 |
-
|
9615 |
-
|
9616 |
-
|
9617 |
-
|
9618 |
-
|
9619 |
-
|
9620 |
-
|
9621 |
-
|
9622 |
-
|
9623 |
-
|
9624 |
-
|
9625 |
-
|
9626 |
-
|
9627 |
-
|
9628 |
-
|
9629 |
-
|
9630 |
-
|
9631 |
-
|
9632 |
-
|
9633 |
-
|
9634 |
-
|
9635 |
-
|
9636 |
-
|
9637 |
-
|
9638 |
-
|
9639 |
-
|
9640 |
-
|
9641 |
-
|
9642 |
-
|
9643 |
-
|
9644 |
-
|
9645 |
-
|
9646 |
-
|
9647 |
-
}
|
9648 |
-
|
9649 |
-
|
9650 |
-
|
9651 |
-
|
9652 |
-
|
9653 |
-
|
9654 |
-
|
9655 |
-
|
9656 |
-
|
9657 |
-
|
9658 |
-
|
9659 |
-
|
9660 |
-
|
9661 |
-
|
9662 |
-
|
9663 |
-
|
9664 |
-
|
9665 |
-
|
9666 |
-
|
9667 |
-
|
9668 |
-
|
9669 |
-
|
9670 |
-
|
9671 |
-
|
9672 |
-
|
9673 |
-
|
9674 |
-
|
9675 |
-
|
9676 |
-
|
9677 |
-
|
9678 |
-
|
9679 |
-
|
9680 |
-
|
9681 |
-
|
9682 |
-
|
9683 |
-
|
9684 |
-
|
9685 |
-
|
9686 |
-
|
9687 |
-
|
9688 |
-
|
9689 |
-
|
9690 |
-
|
9691 |
-
|
9692 |
-
|
9693 |
-
|
9694 |
-
|
9695 |
-
|
9696 |
-
|
9697 |
-
|
9698 |
-
|
9699 |
-
|
9700 |
-
|
9701 |
-
|
9702 |
-
|
9703 |
-
|
9704 |
-
|
9705 |
-
|
9706 |
-
|
9707 |
-
|
9708 |
-
|
9709 |
-
|
9710 |
-
|
9711 |
-
|
9712 |
-
|
9713 |
-
|
9714 |
-
|
9715 |
-
|
9716 |
-
|
9717 |
-
|
9718 |
-
|
9719 |
-
|
9720 |
-
|
9721 |
-
|
9722 |
-
|
9723 |
-
|
9724 |
-
|
9725 |
-
|
9726 |
-
|
9727 |
-
|
9728 |
-
|
9729 |
-
|
9730 |
-
|
9731 |
-
|
9732 |
-
|
9733 |
-
|
9734 |
-
|
9735 |
-
|
9736 |
-
|
9737 |
-
|
9738 |
-
|
9739 |
-
|
9740 |
-
|
9741 |
-
|
9742 |
-
|
9743 |
-
|
9744 |
-
|
9745 |
-
|
9746 |
-
|
9747 |
-
|
9748 |
-
|
9749 |
-
|
9750 |
-
|
9751 |
-
|
9752 |
-
|
9753 |
-
|
9754 |
-
|
9755 |
-
|
9756 |
-
|
9757 |
-
|
9758 |
-
|
9759 |
-
|
9760 |
-
|
9761 |
-
|
9762 |
-
|
9763 |
-
|
9764 |
-
|
9765 |
-
|
9766 |
-
|
9767 |
-
|
9768 |
-
|
9769 |
-
|
9770 |
-
|
9771 |
-
|
9772 |
-
|
9773 |
-
|
9774 |
-
|
9775 |
-
|
9776 |
-
|
9777 |
-
|
9778 |
-
|
9779 |
-
|
9780 |
-
|
9781 |
-
|
9782 |
-
|
9783 |
-
|
9784 |
-
|
9785 |
-
|
9786 |
-
|
9787 |
-
|
9788 |
-
|
9789 |
-
|
9790 |
-
|
9791 |
-
|
9792 |
-
|
9793 |
-
|
9794 |
-
|
9795 |
-
|
9796 |
-
|
9797 |
-
|
9798 |
-
|
9799 |
-
|
9800 |
-
|
9801 |
-
|
9802 |
-
|
9803 |
-
|
9804 |
-
|
9805 |
-
|
9806 |
-
|
9807 |
-
|
9808 |
-
|
9809 |
-
|
9810 |
-
|
9811 |
-
|
9812 |
-
|
9813 |
-
|
9814 |
-
|
9815 |
-
|
9816 |
-
|
9817 |
-
|
9818 |
-
|
9819 |
-
|
9820 |
-
|
9821 |
-
|
9822 |
-
|
9823 |
-
|
9824 |
-
|
9825 |
-
|
9826 |
-
|
9827 |
-
|
9828 |
-
}
|
9829 |
-
|
9830 |
-
|
9831 |
-
|
9832 |
-
|
9833 |
-
|
9834 |
-
|
9835 |
-
|
9836 |
-
|
9837 |
-
|
9838 |
-
|
9839 |
-
|
9840 |
-
|
9841 |
-
|
9842 |
-
|
9843 |
-
|
9844 |
-
|
9845 |
-
|
9846 |
-
|
9847 |
-
|
9848 |
-
|
9849 |
-
|
9850 |
-
|
9851 |
-
|
9852 |
-
|
9853 |
-
|
9854 |
-
|
9855 |
-
|
9856 |
-
|
9857 |
-
|
9858 |
-
|
9859 |
-
|
9860 |
-
|
9861 |
-
|
9862 |
-
|
9863 |
-
|
9864 |
-
|
9865 |
-
|
9866 |
-
|
9867 |
-
|
9868 |
-
|
9869 |
-
|
9870 |
-
|
9871 |
-
|
9872 |
-
|
9873 |
-
|
9874 |
-
|
9875 |
-
|
9876 |
-
|
9877 |
-
|
9878 |
-
|
9879 |
-
|
9880 |
-
|
9881 |
-
|
9882 |
-
|
9883 |
-
|
9884 |
-
|
9885 |
-
|
9886 |
-
|
9887 |
-
|
9888 |
-
|
9889 |
-
|
9890 |
-
|
9891 |
-
|
9892 |
-
|
9893 |
-
|
9894 |
-
|
9895 |
-
|
9896 |
-
|
9897 |
-
|
9898 |
-
|
9899 |
-
|
9900 |
-
|
9901 |
-
|
9902 |
-
|
9903 |
-
|
9904 |
-
|
9905 |
-
|
9906 |
-
|
9907 |
-
|
9908 |
-
|
9909 |
-
|
9910 |
-
|
9911 |
-
|
9912 |
-
|
9913 |
-
|
9914 |
-
|
9915 |
-
|
9916 |
-
|
9917 |
-
|
9918 |
-
|
9919 |
-
};
|
9920 |
-
|
9921 |
-
|
9922 |
-
|
9923 |
-
|
9924 |
-
|
9925 |
-
|
9926 |
-
|
9927 |
-
|
9928 |
-
|
9929 |
-
|
9930 |
-
|
9931 |
-
|
9932 |
-
|
9933 |
-
|
9934 |
-
|
9935 |
-
|
9936 |
-
|
9937 |
-
|
9938 |
-
|
9939 |
-
|
9940 |
-
|
9941 |
-
|
9942 |
-
|
9943 |
-
|
9944 |
-
|
9945 |
-
|
9946 |
-
|
9947 |
-
|
9948 |
-
|
9949 |
-
|
9950 |
-
|
9951 |
-
|
9952 |
-
};
|
9953 |
-
|
9954 |
-
|
9955 |
-
|
9956 |
-
|
9957 |
-
|
9958 |
-
|
9959 |
-
|
9960 |
-
|
9961 |
-
|
9962 |
-
|
9963 |
-
|
9964 |
-
|
9965 |
-
|
9966 |
-
|
9967 |
-
|
9968 |
-
|
9969 |
-
|
9970 |
-
|
9971 |
-
|
9972 |
-
|
9973 |
-
|
9974 |
-
|
9975 |
-
|
9976 |
-
|
9977 |
-
|
9978 |
-
|
9979 |
-
|
9980 |
-
|
9981 |
-
|
9982 |
-
|
9983 |
-
|
9984 |
-
|
9985 |
-
};
|
9986 |
-
|
9987 |
-
|
9988 |
-
|
9989 |
-
|
9990 |
-
|
9991 |
-
|
9992 |
-
|
9993 |
-
|
9994 |
-
|
9995 |
-
|
9996 |
-
|
9997 |
-
|
9998 |
-
|
9999 |
-
|
10000 |
-
|
10001 |
-
|
10002 |
-
|
10003 |
-
|
10004 |
-
|
10005 |
-
|
10006 |
-
|
10007 |
-
|
10008 |
-
|
10009 |
-
|
10010 |
-
|
10011 |
-
|
10012 |
-
|
10013 |
-
|
10014 |
-
|
10015 |
-
|
10016 |
-
|
10017 |
-
|
10018 |
-
|
10019 |
-
|
10020 |
-
|
10021 |
-
|
10022 |
-
|
10023 |
-
|
10024 |
-
|
10025 |
-
|
10026 |
-
|
10027 |
-
|
10028 |
-
|
10029 |
-
|
10030 |
-
|
10031 |
-
|
10032 |
-
|
10033 |
-
|
10034 |
-
|
10035 |
-
|
10036 |
-
|
10037 |
-
|
10038 |
-
|
10039 |
-
|
10040 |
-
|
10041 |
-
|
10042 |
-
|
10043 |
-
|
10044 |
-
|
10045 |
-
|
10046 |
-
|
10047 |
-
|
10048 |
-
|
10049 |
-
|
10050 |
-
|
10051 |
-
|
10052 |
-
|
10053 |
-
|
10054 |
-
|
10055 |
-
|
10056 |
-
|
10057 |
-
|
10058 |
-
|
10059 |
-
|
10060 |
-
|
10061 |
-
|
10062 |
-
|
10063 |
-
|
10064 |
-
|
10065 |
-
|
10066 |
-
|
10067 |
-
|
10068 |
-
|
10069 |
-
|
10070 |
-
|
10071 |
-
|
10072 |
-
|
10073 |
-
|
10074 |
-
|
10075 |
-
|
10076 |
-
|
10077 |
-
|
10078 |
-
|
10079 |
-
|
10080 |
-
|
10081 |
-
|
10082 |
-
|
10083 |
-
|
10084 |
-
|
10085 |
-
|
10086 |
-
|
10087 |
-
|
10088 |
-
|
10089 |
-
|
10090 |
-
|
10091 |
-
|
10092 |
-
|
10093 |
-
|
10094 |
-
|
10095 |
-
|
10096 |
-
|
10097 |
-
|
10098 |
-
|
10099 |
-
|
10100 |
-
|
10101 |
-
|
10102 |
-
|
10103 |
-
|
10104 |
-
|
10105 |
-
|
10106 |
-
|
10107 |
-
}
|
10108 |
-
|
10109 |
-
var
|
10110 |
-
|
10111 |
-
|
10112 |
-
|
10113 |
-
|
10114 |
-
|
10115 |
-
|
10116 |
-
|
10117 |
-
|
10118 |
-
|
10119 |
-
|
10120 |
-
|
10121 |
-
|
10122 |
-
|
10123 |
-
|
10124 |
-
|
10125 |
-
|
10126 |
-
|
10127 |
-
|
10128 |
-
|
10129 |
-
|
10130 |
-
|
10131 |
-
|
10132 |
-
|
10133 |
-
|
10134 |
-
|
10135 |
-
|
10136 |
-
|
10137 |
-
|
10138 |
-
|
10139 |
-
|
10140 |
-
|
10141 |
-
|
10142 |
-
|
10143 |
-
|
10144 |
-
|
10145 |
-
|
10146 |
-
|
10147 |
-
|
10148 |
-
|
10149 |
-
|
10150 |
-
|
10151 |
-
|
10152 |
-
|
10153 |
-
|
10154 |
-
|
10155 |
-
|
10156 |
-
|
10157 |
-
|
10158 |
-
|
10159 |
-
|
10160 |
-
|
10161 |
-
|
10162 |
-
|
10163 |
-
|
10164 |
-
|
10165 |
-
|
10166 |
-
|
10167 |
-
|
10168 |
-
|
10169 |
-
|
10170 |
-
|
10171 |
-
|
10172 |
-
|
10173 |
-
|
10174 |
-
|
10175 |
-
|
10176 |
-
|
10177 |
-
|
10178 |
-
|
10179 |
-
|
10180 |
-
|
10181 |
-
|
10182 |
-
|
10183 |
-
|
10184 |
-
|
10185 |
-
|
10186 |
-
|
10187 |
-
|
10188 |
-
|
10189 |
-
var
|
10190 |
-
|
10191 |
-
|
10192 |
-
|
10193 |
-
|
10194 |
-
|
10195 |
-
|
10196 |
-
|
10197 |
-
|
10198 |
-
|
10199 |
-
|
10200 |
-
|
10201 |
-
|
10202 |
-
|
10203 |
-
|
10204 |
-
|
10205 |
-
|
10206 |
-
|
10207 |
-
|
10208 |
-
|
10209 |
-
|
10210 |
-
|
10211 |
-
|
10212 |
-
|
10213 |
-
|
10214 |
-
|
10215 |
-
|
10216 |
-
|
10217 |
-
|
10218 |
-
|
10219 |
-
|
10220 |
-
|
10221 |
-
|
10222 |
-
|
10223 |
-
|
10224 |
-
|
10225 |
-
|
10226 |
-
|
10227 |
-
|
10228 |
-
|
10229 |
-
|
10230 |
-
|
10231 |
-
|
10232 |
-
|
10233 |
-
|
10234 |
-
|
10235 |
-
|
10236 |
-
|
10237 |
-
|
10238 |
-
|
10239 |
-
|
10240 |
-
};
|
10241 |
-
|
10242 |
-
|
10243 |
-
|
10244 |
-
|
10245 |
-
|
10246 |
-
|
10247 |
-
|
10248 |
-
|
10249 |
-
|
10250 |
-
|
10251 |
-
|
10252 |
-
|
10253 |
-
|
10254 |
-
|
10255 |
-
|
10256 |
-
|
10257 |
-
|
10258 |
-
|
10259 |
-
|
10260 |
-
|
10261 |
-
|
10262 |
-
|
10263 |
-
|
10264 |
-
|
10265 |
-
|
10266 |
-
|
10267 |
-
|
10268 |
-
|
10269 |
-
|
10270 |
-
|
10271 |
-
|
10272 |
-
|
10273 |
-
|
10274 |
-
|
10275 |
-
|
10276 |
-
|
10277 |
-
|
10278 |
-
|
10279 |
-
|
10280 |
-
|
10281 |
-
|
10282 |
-
|
10283 |
-
|
10284 |
-
|
10285 |
-
|
10286 |
-
|
10287 |
-
|
10288 |
-
|
10289 |
-
|
10290 |
-
|
10291 |
-
|
10292 |
-
|
10293 |
-
|
10294 |
-
|
10295 |
-
|
10296 |
-
|
10297 |
-
|
10298 |
-
|
10299 |
-
|
10300 |
-
|
10301 |
-
|
10302 |
-
|
10303 |
-
|
10304 |
-
|
10305 |
-
|
10306 |
-
|
10307 |
-
|
10308 |
-
|
10309 |
-
|
10310 |
-
|
10311 |
-
|
10312 |
-
|
10313 |
-
|
10314 |
-
|
10315 |
-
|
10316 |
-
|
10317 |
-
|
10318 |
-
|
10319 |
-
|
10320 |
-
|
10321 |
-
|
10322 |
-
|
10323 |
-
|
10324 |
-
|
10325 |
-
|
10326 |
-
|
10327 |
-
|
10328 |
-
|
10329 |
-
|
10330 |
-
|
10331 |
-
|
10332 |
-
|
10333 |
-
|
10334 |
-
|
10335 |
-
|
10336 |
-
|
10337 |
-
|
10338 |
-
|
10339 |
-
};
|
10340 |
-
|
10341 |
-
|
10342 |
-
|
10343 |
-
|
10344 |
-
|
10345 |
-
|
10346 |
-
|
10347 |
-
|
10348 |
-
|
10349 |
-
|
10350 |
-
|
10351 |
-
|
10352 |
-
|
10353 |
-
|
10354 |
-
|
10355 |
-
|
10356 |
-
|
10357 |
-
|
10358 |
-
|
10359 |
-
|
10360 |
-
|
10361 |
-
|
10362 |
-
|
10363 |
-
|
10364 |
-
|
10365 |
-
|
10366 |
-
|
10367 |
-
|
10368 |
-
|
10369 |
-
|
10370 |
-
|
10371 |
-
|
10372 |
-
|
10373 |
-
|
10374 |
-
|
10375 |
-
|
10376 |
-
|
10377 |
-
|
10378 |
-
|
10379 |
-
|
10380 |
-
|
10381 |
-
|
10382 |
-
|
10383 |
-
|
10384 |
-
|
10385 |
-
|
10386 |
-
|
10387 |
-
|
10388 |
-
|
10389 |
-
|
10390 |
-
|
10391 |
-
|
10392 |
-
|
10393 |
-
|
10394 |
-
|
10395 |
-
|
10396 |
-
|
10397 |
-
|
10398 |
-
|
10399 |
-
|
10400 |
-
|
10401 |
-
|
10402 |
-
|
10403 |
-
|
10404 |
-
|
10405 |
-
|
10406 |
-
|
10407 |
-
|
10408 |
-
|
10409 |
-
|
10410 |
-
|
10411 |
-
|
10412 |
-
|
10413 |
-
|
10414 |
-
|
10415 |
-
|
10416 |
-
|
10417 |
-
|
10418 |
-
|
10419 |
-
|
10420 |
-
|
10421 |
-
|
10422 |
-
|
10423 |
-
|
10424 |
-
|
10425 |
-
|
10426 |
-
|
10427 |
-
|
10428 |
-
|
10429 |
-
|
10430 |
-
|
10431 |
-
|
10432 |
-
|
10433 |
-
|
10434 |
-
|
10435 |
-
|
10436 |
-
|
10437 |
-
|
10438 |
-
|
10439 |
-
|
10440 |
-
|
10441 |
-
|
10442 |
-
|
10443 |
-
|
10444 |
-
|
10445 |
-
|
10446 |
-
|
10447 |
-
|
10448 |
-
|
10449 |
-
|
10450 |
-
|
10451 |
-
|
10452 |
-
|
10453 |
-
|
10454 |
-
|
10455 |
-
|
10456 |
-
|
10457 |
-
|
10458 |
-
|
10459 |
-
|
10460 |
-
|
10461 |
-
|
10462 |
-
|
10463 |
-
|
10464 |
-
|
10465 |
-
|
10466 |
-
|
10467 |
-
}
|
10468 |
-
|
10469 |
-
|
10470 |
-
|
10471 |
-
|
10472 |
-
|
10473 |
-
|
10474 |
-
|
10475 |
-
|
10476 |
-
|
10477 |
-
|
10478 |
-
|
10479 |
-
|
10480 |
-
|
10481 |
-
|
10482 |
-
|
10483 |
-
|
10484 |
-
|
10485 |
-
|
10486 |
-
|
10487 |
-
|
10488 |
-
|
10489 |
-
|
10490 |
-
|
10491 |
-
|
10492 |
-
|
10493 |
-
|
10494 |
-
|
10495 |
-
|
10496 |
-
|
10497 |
-
|
10498 |
-
|
10499 |
-
|
10500 |
-
|
10501 |
-
|
10502 |
-
|
10503 |
-
|
10504 |
-
|
10505 |
-
|
10506 |
-
|
10507 |
-
|
10508 |
-
|
10509 |
-
|
10510 |
-
|
10511 |
-
|
10512 |
-
|
10513 |
-
|
10514 |
-
|
10515 |
-
|
10516 |
-
|
10517 |
-
|
10518 |
-
|
10519 |
-
|
10520 |
-
|
10521 |
-
|
10522 |
-
|
10523 |
-
|
10524 |
-
|
10525 |
-
|
10526 |
-
|
10527 |
-
|
10528 |
-
|
10529 |
-
|
10530 |
-
|
10531 |
-
|
10532 |
-
|
10533 |
-
|
10534 |
-
|
10535 |
-
|
10536 |
-
|
10537 |
-
|
10538 |
-
|
10539 |
-
|
10540 |
-
|
10541 |
-
|
10542 |
-
|
10543 |
-
|
10544 |
-
|
10545 |
-
|
10546 |
-
|
10547 |
-
|
10548 |
-
|
10549 |
-
|
10550 |
-
|
10551 |
-
|
10552 |
-
|
10553 |
-
|
10554 |
-
|
10555 |
-
|
10556 |
-
|
10557 |
-
|
10558 |
-
|
10559 |
-
|
10560 |
-
|
10561 |
-
|
10562 |
-
|
10563 |
-
|
10564 |
-
|
10565 |
-
var
|
10566 |
-
|
10567 |
-
|
10568 |
-
|
10569 |
-
|
10570 |
-
|
10571 |
-
|
10572 |
-
|
10573 |
-
|
10574 |
-
|
10575 |
-
|
10576 |
-
|
10577 |
-
|
10578 |
-
|
10579 |
-
|
10580 |
-
|
10581 |
-
|
10582 |
-
|
10583 |
-
|
10584 |
-
|
10585 |
-
|
10586 |
-
|
10587 |
-
|
10588 |
-
|
10589 |
-
|
10590 |
-
|
10591 |
-
|
10592 |
-
|
10593 |
-
|
10594 |
-
|
10595 |
-
|
10596 |
-
|
10597 |
-
|
10598 |
-
|
10599 |
-
|
10600 |
-
|
10601 |
-
|
10602 |
-
|
10603 |
-
|
10604 |
-
|
10605 |
-
|
10606 |
-
|
10607 |
-
|
10608 |
-
|
10609 |
-
|
10610 |
-
|
10611 |
-
|
10612 |
-
|
10613 |
-
|
10614 |
-
|
10615 |
-
}
|
10616 |
-
|
10617 |
-
|
10618 |
-
|
10619 |
-
|
10620 |
-
|
10621 |
-
|
10622 |
-
|
10623 |
-
|
10624 |
-
};
|
10625 |
-
|
10626 |
-
|
10627 |
-
|
10628 |
-
|
10629 |
-
|
10630 |
-
|
10631 |
-
|
10632 |
-
|
10633 |
-
|
10634 |
-
|
10635 |
-
|
10636 |
-
|
10637 |
-
|
10638 |
-
|
10639 |
-
|
10640 |
-
|
10641 |
-
|
10642 |
-
|
10643 |
-
|
10644 |
-
|
10645 |
-
|
10646 |
-
|
10647 |
-
|
10648 |
-
|
10649 |
-
|
10650 |
-
|
10651 |
-
|
10652 |
-
|
10653 |
-
|
10654 |
-
|
10655 |
-
|
10656 |
-
|
10657 |
-
|
10658 |
-
|
10659 |
-
|
10660 |
-
|
10661 |
-
|
10662 |
-
|
10663 |
-
|
10664 |
-
|
10665 |
-
|
10666 |
-
|
10667 |
-
|
10668 |
-
var
|
10669 |
-
|
10670 |
-
|
10671 |
-
|
10672 |
-
|
10673 |
-
|
10674 |
-
|
10675 |
-
|
10676 |
-
|
10677 |
-
|
10678 |
-
|
10679 |
-
|
10680 |
-
|
10681 |
-
|
10682 |
-
|
10683 |
-
|
10684 |
-
|
10685 |
-
|
10686 |
-
|
10687 |
-
|
10688 |
-
|
10689 |
-
|
10690 |
-
|
10691 |
-
|
10692 |
-
|
10693 |
-
|
10694 |
-
}
|
10695 |
-
|
10696 |
-
|
10697 |
-
container
|
10698 |
-
|
10699 |
-
|
10700 |
-
|
10701 |
-
|
10702 |
-
|
10703 |
-
|
10704 |
-
|
10705 |
-
|
10706 |
-
|
10707 |
-
|
10708 |
-
|
10709 |
-
|
10710 |
-
|
10711 |
-
|
10712 |
-
|
10713 |
-
|
10714 |
-
|
10715 |
-
|
10716 |
-
|
10717 |
-
|
10718 |
-
|
10719 |
-
|
10720 |
-
|
10721 |
-
|
10722 |
-
|
10723 |
-
|
10724 |
-
|
10725 |
-
|
10726 |
-
|
10727 |
-
|
10728 |
-
|
10729 |
-
|
10730 |
-
|
10731 |
-
|
10732 |
-
|
10733 |
-
|
10734 |
-
|
10735 |
-
|
10736 |
-
|
10737 |
-
|
10738 |
-
|
10739 |
-
|
10740 |
-
|
10741 |
-
|
10742 |
-
|
10743 |
-
|
10744 |
-
|
10745 |
-
|
10746 |
-
|
10747 |
-
|
10748 |
-
|
10749 |
-
|
10750 |
-
|
10751 |
-
|
10752 |
-
|
10753 |
-
|
10754 |
-
|
10755 |
-
|
10756 |
-
|
10757 |
-
|
10758 |
-
|
10759 |
-
|
10760 |
-
|
10761 |
-
|
10762 |
-
|
10763 |
-
|
10764 |
-
|
10765 |
-
|
10766 |
-
|
10767 |
-
|
10768 |
-
|
10769 |
-
|
10770 |
-
|
10771 |
-
|
10772 |
-
|
10773 |
-
|
10774 |
-
|
10775 |
-
|
10776 |
-
|
10777 |
-
|
10778 |
-
|
10779 |
-
|
10780 |
-
|
10781 |
-
|
10782 |
-
|
10783 |
-
|
10784 |
-
|
10785 |
-
|
10786 |
-
|
10787 |
-
|
10788 |
-
|
10789 |
-
|
10790 |
-
|
10791 |
-
|
10792 |
-
|
10793 |
-
var
|
10794 |
-
|
10795 |
-
|
10796 |
-
|
10797 |
-
|
10798 |
-
|
10799 |
-
|
10800 |
-
|
10801 |
-
|
10802 |
-
|
10803 |
-
|
10804 |
-
|
10805 |
-
|
10806 |
-
|
10807 |
-
if (
|
10808 |
-
|
10809 |
-
|
10810 |
-
|
10811 |
-
|
10812 |
-
|
10813 |
-
|
10814 |
-
|
10815 |
-
|
10816 |
-
|
10817 |
-
|
10818 |
-
|
10819 |
-
|
10820 |
-
|
10821 |
-
|
10822 |
-
|
10823 |
-
|
10824 |
-
|
10825 |
-
|
10826 |
-
|
10827 |
-
|
10828 |
-
|
10829 |
-
|
10830 |
-
|
10831 |
-
|
10832 |
-
|
10833 |
-
|
10834 |
-
|
10835 |
-
|
10836 |
-
|
10837 |
-
|
10838 |
-
|
10839 |
-
|
10840 |
-
|
10841 |
-
|
10842 |
-
|
10843 |
-
|
10844 |
-
|
10845 |
-
|
10846 |
-
|
10847 |
-
|
10848 |
-
|
10849 |
-
|
10850 |
-
|
10851 |
-
|
10852 |
-
|
10853 |
-
|
10854 |
-
|
10855 |
-
|
10856 |
-
|
10857 |
-
|
10858 |
-
|
10859 |
-
|
10860 |
-
|
10861 |
-
|
10862 |
-
|
10863 |
-
|
10864 |
-
|
10865 |
-
|
10866 |
-
|
10867 |
-
|
10868 |
-
|
10869 |
-
|
10870 |
-
|
10871 |
-
|
10872 |
-
|
10873 |
-
|
10874 |
-
|
10875 |
-
|
10876 |
-
|
10877 |
-
|
10878 |
-
|
10879 |
-
|
10880 |
-
|
10881 |
-
|
10882 |
-
|
10883 |
-
|
10884 |
-
|
10885 |
-
|
10886 |
-
|
10887 |
-
|
10888 |
-
|
10889 |
-
|
10890 |
-
|
10891 |
-
|
10892 |
-
|
10893 |
-
|
10894 |
-
|
10895 |
-
|
10896 |
-
|
10897 |
-
|
10898 |
-
|
10899 |
-
|
10900 |
-
|
10901 |
-
|
10902 |
-
|
10903 |
-
|
10904 |
-
|
10905 |
-
|
10906 |
-
|
10907 |
-
|
10908 |
-
|
10909 |
-
|
10910 |
-
|
10911 |
-
|
10912 |
-
|
10913 |
-
|
10914 |
-
|
10915 |
-
|
10916 |
-
|
10917 |
-
|
10918 |
-
|
10919 |
-
|
10920 |
-
|
10921 |
-
|
10922 |
-
|
10923 |
-
|
10924 |
-
|
10925 |
-
|
10926 |
-
|
10927 |
-
|
10928 |
-
|
10929 |
-
|
10930 |
-
|
10931 |
-
|
10932 |
-
|
10933 |
-
|
10934 |
-
|
10935 |
-
|
10936 |
-
|
10937 |
-
|
10938 |
-
|
10939 |
-
|
10940 |
-
|
10941 |
-
|
10942 |
-
|
10943 |
-
|
10944 |
-
|
10945 |
-
|
10946 |
-
|
10947 |
-
|
10948 |
-
|
10949 |
-
|
10950 |
-
|
10951 |
-
|
10952 |
-
|
10953 |
-
|
10954 |
-
|
10955 |
-
|
10956 |
-
|
10957 |
-
|
10958 |
-
|
10959 |
-
|
10960 |
-
|
10961 |
-
|
10962 |
-
|
10963 |
-
|
10964 |
-
|
10965 |
-
|
10966 |
-
|
10967 |
-
|
10968 |
-
|
10969 |
-
|
10970 |
-
|
10971 |
-
|
10972 |
-
|
10973 |
-
|
10974 |
-
}
|
10975 |
-
|
10976 |
-
|
10977 |
-
|
10978 |
-
|
10979 |
-
|
10980 |
-
|
10981 |
-
|
10982 |
-
|
10983 |
-
|
10984 |
-
|
10985 |
-
|
10986 |
-
|
10987 |
-
|
10988 |
-
|
10989 |
-
|
10990 |
-
|
10991 |
-
|
10992 |
-
|
10993 |
-
|
10994 |
-
|
10995 |
-
|
10996 |
-
|
10997 |
-
|
10998 |
-
|
10999 |
-
|
11000 |
-
|
11001 |
-
|
11002 |
-
|
11003 |
-
|
11004 |
-
|
11005 |
-
|
11006 |
-
|
11007 |
-
|
11008 |
-
|
11009 |
-
|
11010 |
-
|
11011 |
-
|
11012 |
-
}
|
11013 |
-
|
11014 |
-
|
11015 |
-
|
11016 |
-
|
11017 |
-
|
11018 |
-
|
11019 |
-
|
11020 |
-
|
11021 |
-
|
11022 |
-
|
11023 |
-
|
11024 |
-
|
11025 |
-
|
11026 |
-
|
11027 |
-
|
11028 |
-
|
11029 |
-
|
11030 |
-
|
11031 |
-
|
11032 |
-
|
11033 |
-
|
11034 |
-
|
11035 |
-
|
11036 |
-
|
11037 |
-
|
11038 |
-
|
11039 |
-
|
11040 |
-
|
11041 |
-
|
11042 |
-
|
11043 |
-
|
11044 |
-
|
11045 |
-
|
11046 |
-
|
11047 |
-
|
11048 |
-
|
11049 |
-
|
11050 |
-
|
11051 |
-
|
11052 |
-
|
11053 |
-
|
11054 |
-
|
11055 |
-
|
11056 |
-
|
11057 |
-
|
11058 |
-
|
11059 |
-
|
11060 |
-
|
11061 |
-
|
11062 |
-
|
11063 |
-
|
11064 |
-
|
11065 |
-
|
11066 |
-
|
11067 |
-
|
11068 |
-
|
11069 |
-
|
11070 |
-
|
11071 |
-
|
11072 |
-
|
11073 |
-
|
11074 |
-
|
11075 |
-
|
11076 |
-
|
11077 |
-
|
11078 |
-
|
11079 |
-
|
11080 |
-
|
11081 |
-
|
11082 |
-
|
11083 |
-
|
11084 |
-
|
11085 |
-
|
11086 |
-
|
11087 |
-
|
11088 |
-
|
11089 |
-
|
11090 |
-
|
11091 |
-
|
11092 |
-
|
11093 |
-
|
11094 |
-
|
11095 |
-
|
11096 |
-
|
11097 |
-
|
11098 |
-
|
11099 |
-
|
11100 |
-
|
11101 |
-
|
11102 |
-
|
11103 |
-
|
11104 |
-
|
11105 |
-
|
11106 |
-
|
11107 |
-
|
11108 |
-
|
11109 |
-
|
11110 |
-
|
11111 |
-
|
11112 |
-
|
11113 |
-
|
11114 |
-
|
11115 |
-
|
11116 |
-
|
11117 |
-
|
11118 |
-
|
11119 |
-
|
11120 |
-
|
11121 |
-
|
11122 |
-
|
11123 |
-
|
11124 |
-
|
11125 |
-
|
11126 |
-
|
11127 |
-
|
11128 |
-
|
11129 |
-
|
11130 |
-
|
11131 |
-
|
11132 |
-
|
11133 |
-
|
11134 |
-
|
11135 |
-
|
11136 |
-
|
11137 |
-
|
11138 |
-
|
11139 |
-
|
11140 |
-
|
11141 |
-
|
11142 |
-
|
11143 |
-
|
11144 |
-
|
11145 |
-
|
11146 |
-
|
11147 |
-
|
11148 |
-
|
11149 |
-
|
11150 |
-
|
11151 |
-
|
11152 |
-
|
11153 |
-
|
11154 |
-
|
11155 |
-
|
11156 |
-
|
11157 |
-
|
11158 |
-
|
11159 |
-
|
11160 |
-
|
11161 |
-
|
11162 |
-
|
11163 |
-
|
11164 |
-
|
11165 |
-
|
11166 |
-
|
11167 |
-
|
11168 |
-
|
11169 |
-
|
11170 |
-
|
11171 |
-
|
11172 |
-
|
11173 |
-
|
11174 |
-
|
11175 |
-
|
11176 |
-
}
|
11177 |
-
|
11178 |
-
|
11179 |
-
|
11180 |
-
|
11181 |
-
|
11182 |
-
|
11183 |
-
|
11184 |
-
|
11185 |
-
|
11186 |
-
|
11187 |
-
|
11188 |
-
|
11189 |
-
|
11190 |
-
|
11191 |
-
|
11192 |
-
|
11193 |
-
|
11194 |
-
|
11195 |
-
|
11196 |
-
|
11197 |
-
|
11198 |
-
|
11199 |
-
}
|
11200 |
-
|
11201 |
-
function
|
11202 |
-
|
11203 |
-
|
11204 |
-
|
11205 |
-
|
11206 |
-
|
11207 |
-
|
11208 |
-
|
11209 |
-
|
11210 |
-
|
11211 |
-
function
|
11212 |
-
|
11213 |
-
|
11214 |
-
|
11215 |
-
|
11216 |
-
|
11217 |
-
|
11218 |
-
|
11219 |
-
|
11220 |
-
return (
|
11221 |
-
}
|
11222 |
-
|
11223 |
-
function
|
11224 |
-
|
11225 |
-
|
11226 |
-
|
11227 |
-
|
11228 |
-
var
|
11229 |
-
|
11230 |
-
|
11231 |
-
|
11232 |
-
|
11233 |
-
|
11234 |
-
|
11235 |
-
|
11236 |
-
|
11237 |
-
|
11238 |
-
|
11239 |
-
|
11240 |
-
|
11241 |
-
|
11242 |
-
|
11243 |
-
|
11244 |
-
|
11245 |
-
|
11246 |
-
|
11247 |
-
|
11248 |
-
|
11249 |
-
|
11250 |
-
|
11251 |
-
|
11252 |
-
}
|
11253 |
-
|
11254 |
-
|
11255 |
-
|
11256 |
-
|
11257 |
-
|
11258 |
-
|
11259 |
-
|
11260 |
-
|
11261 |
-
|
11262 |
-
|
11263 |
-
|
11264 |
-
|
11265 |
-
|
11266 |
-
|
11267 |
-
|
11268 |
-
|
11269 |
-
|
11270 |
-
|
11271 |
-
|
11272 |
-
|
11273 |
-
|
11274 |
-
|
11275 |
-
|
11276 |
-
|
11277 |
-
|
11278 |
-
|
11279 |
-
|
11280 |
-
|
11281 |
-
|
11282 |
-
|
11283 |
-
|
11284 |
-
|
11285 |
-
|
11286 |
-
|
11287 |
-
|
11288 |
-
|
11289 |
-
|
11290 |
-
|
11291 |
-
|
11292 |
-
|
11293 |
-
|
11294 |
-
|
11295 |
-
|
11296 |
-
|
11297 |
-
|
11298 |
-
|
11299 |
-
|
11300 |
-
|
11301 |
-
|
11302 |
-
|
11303 |
-
|
11304 |
-
|
11305 |
-
|
11306 |
-
|
11307 |
-
|
11308 |
-
|
11309 |
-
|
11310 |
-
|
11311 |
-
|
11312 |
-
|
11313 |
-
|
11314 |
-
|
11315 |
-
|
11316 |
-
|
11317 |
-
|
11318 |
-
|
11319 |
-
|
11320 |
-
|
11321 |
-
|
11322 |
-
|
11323 |
-
|
11324 |
-
|
11325 |
-
|
11326 |
-
|
11327 |
-
|
11328 |
-
|
11329 |
-
|
11330 |
-
|
11331 |
-
|
11332 |
-
|
11333 |
-
|
11334 |
-
|
11335 |
-
|
11336 |
-
|
11337 |
-
|
11338 |
-
|
11339 |
-
|
11340 |
-
|
11341 |
-
|
11342 |
-
|
11343 |
-
|
11344 |
-
|
11345 |
-
|
11346 |
-
|
11347 |
-
|
11348 |
-
|
11349 |
-
|
11350 |
-
|
11351 |
-
|
11352 |
-
|
11353 |
-
|
11354 |
-
|
11355 |
-
|
11356 |
-
|
11357 |
-
|
11358 |
-
|
11359 |
-
|
11360 |
-
|
11361 |
-
|
11362 |
-
|
11363 |
-
|
11364 |
-
|
11365 |
-
|
11366 |
-
|
11367 |
-
|
11368 |
-
|
11369 |
-
|
11370 |
-
|
11371 |
-
|
11372 |
-
|
11373 |
-
|
11374 |
-
|
11375 |
-
|
11376 |
-
|
11377 |
-
|
11378 |
-
|
11379 |
-
|
11380 |
-
|
11381 |
-
|
11382 |
-
|
11383 |
-
var
|
11384 |
-
|
11385 |
-
|
11386 |
-
|
11387 |
-
|
11388 |
-
|
11389 |
-
|
11390 |
-
|
11391 |
-
}
|
11392 |
-
|
11393 |
-
|
11394 |
-
|
11395 |
-
|
11396 |
-
|
11397 |
-
|
11398 |
-
|
11399 |
-
|
11400 |
-
|
11401 |
-
|
11402 |
-
|
11403 |
-
|
11404 |
-
|
11405 |
-
|
11406 |
-
|
11407 |
-
|
11408 |
-
|
11409 |
-
|
11410 |
-
|
11411 |
-
|
11412 |
-
|
11413 |
-
|
11414 |
-
|
11415 |
-
|
11416 |
-
|
11417 |
-
|
11418 |
-
|
11419 |
-
|
11420 |
-
|
11421 |
-
|
11422 |
-
|
11423 |
-
|
11424 |
-
|
11425 |
-
|
11426 |
-
|
11427 |
-
|
11428 |
-
|
11429 |
-
|
11430 |
-
|
11431 |
-
|
11432 |
-
|
11433 |
-
|
11434 |
-
|
11435 |
-
|
11436 |
-
|
11437 |
-
|
11438 |
-
|
11439 |
-
|
11440 |
-
|
11441 |
-
|
11442 |
-
|
11443 |
-
|
11444 |
-
|
11445 |
-
|
11446 |
-
|
11447 |
-
|
11448 |
-
|
11449 |
-
|
11450 |
-
|
11451 |
-
|
11452 |
-
|
11453 |
-
|
11454 |
-
|
11455 |
-
|
11456 |
-
|
11457 |
-
|
11458 |
-
|
11459 |
-
|
11460 |
-
|
11461 |
-
|
11462 |
-
|
11463 |
-
|
11464 |
-
|
11465 |
-
|
11466 |
-
|
11467 |
-
|
11468 |
-
|
11469 |
-
|
11470 |
-
|
11471 |
-
|
11472 |
-
|
11473 |
-
|
11474 |
-
|
11475 |
-
|
11476 |
-
|
11477 |
-
|
11478 |
-
|
11479 |
-
|
11480 |
-
|
11481 |
-
}
|
11482 |
-
};
|
11483 |
-
|
11484 |
-
|
11485 |
-
|
11486 |
-
|
11487 |
-
|
11488 |
-
|
11489 |
-
|
11490 |
-
|
11491 |
-
|
11492 |
-
};
|
11493 |
-
|
11494 |
-
|
11495 |
-
|
11496 |
-
|
11497 |
-
|
11498 |
-
|
11499 |
-
|
11500 |
-
|
11501 |
-
|
11502 |
-
|
11503 |
-
|
11504 |
-
|
11505 |
-
|
11506 |
-
|
11507 |
-
|
11508 |
-
|
11509 |
-
|
11510 |
-
|
11511 |
-
|
11512 |
-
|
11513 |
-
|
11514 |
-
|
11515 |
-
|
11516 |
-
|
11517 |
-
|
11518 |
-
|
11519 |
-
|
11520 |
-
|
11521 |
-
|
11522 |
-
|
11523 |
-
|
11524 |
-
|
11525 |
-
|
11526 |
-
|
11527 |
-
|
11528 |
-
|
11529 |
-
|
11530 |
-
|
11531 |
-
|
11532 |
-
|
11533 |
-
|
11534 |
-
|
11535 |
-
|
11536 |
-
|
11537 |
-
|
11538 |
-
|
11539 |
-
|
11540 |
-
|
11541 |
-
|
11542 |
-
|
11543 |
-
|
11544 |
-
|
11545 |
-
|
11546 |
-
|
11547 |
-
|
11548 |
-
|
11549 |
-
|
11550 |
-
|
11551 |
-
|
11552 |
-
|
11553 |
-
|
11554 |
-
|
11555 |
-
|
11556 |
-
|
11557 |
-
|
11558 |
-
|
11559 |
-
|
11560 |
-
|
11561 |
-
|
11562 |
-
|
11563 |
-
|
11564 |
-
|
11565 |
-
|
11566 |
-
|
11567 |
-
|
11568 |
-
|
11569 |
-
|
11570 |
-
|
11571 |
-
|
11572 |
-
|
11573 |
-
|
11574 |
-
|
11575 |
-
|
11576 |
-
|
11577 |
-
|
11578 |
-
|
11579 |
-
|
11580 |
-
|
11581 |
-
|
11582 |
-
|
11583 |
-
|
11584 |
-
|
11585 |
-
|
11586 |
-
|
11587 |
-
|
11588 |
-
|
11589 |
-
|
11590 |
-
|
11591 |
-
|
11592 |
-
|
11593 |
-
|
11594 |
-
|
11595 |
-
|
11596 |
-
|
11597 |
-
|
11598 |
-
|
11599 |
-
|
11600 |
-
|
11601 |
-
|
11602 |
-
|
11603 |
-
|
11604 |
-
|
11605 |
-
|
11606 |
-
|
11607 |
-
|
11608 |
-
|
11609 |
-
|
11610 |
-
|
11611 |
-
|
11612 |
-
|
11613 |
-
|
11614 |
-
|
11615 |
-
|
11616 |
-
|
11617 |
-
|
11618 |
-
|
11619 |
-
|
11620 |
-
|
11621 |
-
|
11622 |
-
|
11623 |
-
|
11624 |
-
|
11625 |
-
|
11626 |
-
|
11627 |
-
|
11628 |
-
|
11629 |
-
|
11630 |
-
|
11631 |
-
|
11632 |
-
|
11633 |
-
|
11634 |
-
|
11635 |
-
|
11636 |
-
|
11637 |
-
|
11638 |
-
|
11639 |
-
|
11640 |
-
|
11641 |
-
|
11642 |
-
|
11643 |
-
|
11644 |
-
|
11645 |
-
|
11646 |
-
|
11647 |
-
|
11648 |
-
};
|
11649 |
-
|
11650 |
-
|
11651 |
-
|
11652 |
-
|
11653 |
-
|
11654 |
-
|
11655 |
-
|
11656 |
-
|
11657 |
-
|
11658 |
-
|
11659 |
-
|
11660 |
-
|
11661 |
-
|
11662 |
-
|
11663 |
-
|
11664 |
-
|
11665 |
-
|
11666 |
-
|
11667 |
-
|
11668 |
-
|
11669 |
-
|
11670 |
-
|
11671 |
-
|
11672 |
-
|
11673 |
-
|
11674 |
-
|
11675 |
-
|
11676 |
-
|
11677 |
-
|
11678 |
-
|
11679 |
-
|
11680 |
-
|
11681 |
-
|
11682 |
-
|
11683 |
-
|
11684 |
-
|
11685 |
-
|
11686 |
-
|
11687 |
-
|
11688 |
-
|
11689 |
-
|
11690 |
-
|
11691 |
-
|
11692 |
-
|
11693 |
-
|
11694 |
-
|
11695 |
-
|
11696 |
-
|
11697 |
-
|
11698 |
-
|
11699 |
-
|
11700 |
-
|
11701 |
-
|
11702 |
-
|
11703 |
-
|
11704 |
-
|
11705 |
-
|
11706 |
-
|
11707 |
-
|
11708 |
-
|
11709 |
-
|
11710 |
-
|
11711 |
-
|
11712 |
-
|
11713 |
-
|
11714 |
-
|
11715 |
-
|
11716 |
-
|
11717 |
-
|
11718 |
-
|
11719 |
-
|
11720 |
-
|
11721 |
-
|
11722 |
-
|
11723 |
-
|
11724 |
-
|
11725 |
-
|
11726 |
-
|
11727 |
-
|
11728 |
-
|
11729 |
-
|
11730 |
-
|
11731 |
-
|
11732 |
-
|
11733 |
-
|
11734 |
-
|
11735 |
-
|
11736 |
-
|
11737 |
-
|
11738 |
-
|
11739 |
-
|
11740 |
-
|
11741 |
-
|
11742 |
-
|
11743 |
-
|
11744 |
-
|
11745 |
-
|
11746 |
-
|
11747 |
-
|
11748 |
-
|
11749 |
-
|
11750 |
-
|
11751 |
-
|
11752 |
-
|
11753 |
-
|
11754 |
-
|
11755 |
-
|
11756 |
-
|
11757 |
-
|
11758 |
-
|
11759 |
-
|
11760 |
-
|
11761 |
-
|
11762 |
-
|
11763 |
-
|
11764 |
-
|
11765 |
-
|
11766 |
-
|
11767 |
-
|
11768 |
-
|
11769 |
-
|
11770 |
-
|
11771 |
-
|
11772 |
-
|
11773 |
-
|
11774 |
-
|
11775 |
-
|
11776 |
-
|
11777 |
-
|
11778 |
-
|
11779 |
-
|
11780 |
-
|
11781 |
-
|
11782 |
-
|
11783 |
-
|
11784 |
-
|
11785 |
-
|
11786 |
-
|
11787 |
-
|
11788 |
-
|
11789 |
-
|
11790 |
-
|
11791 |
-
|
11792 |
-
|
11793 |
-
|
11794 |
-
|
11795 |
-
|
11796 |
-
|
11797 |
-
|
11798 |
-
|
11799 |
-
|
11800 |
-
|
11801 |
-
|
11802 |
-
|
11803 |
-
|
11804 |
-
|
11805 |
-
|
11806 |
-
|
11807 |
-
|
11808 |
-
|
11809 |
-
|
11810 |
-
|
11811 |
-
|
11812 |
-
|
11813 |
-
|
11814 |
-
|
11815 |
-
|
11816 |
-
|
11817 |
-
|
11818 |
-
|
11819 |
-
|
11820 |
-
|
11821 |
-
|
11822 |
-
|
11823 |
-
|
11824 |
-
|
11825 |
-
|
11826 |
-
|
11827 |
-
|
11828 |
-
|
11829 |
-
|
11830 |
-
|
11831 |
-
return
|
11832 |
-
};
|
11833 |
-
|
11834 |
-
|
11835 |
-
|
11836 |
-
|
11837 |
-
|
11838 |
-
|
11839 |
-
|
11840 |
-
|
11841 |
-
|
11842 |
-
|
11843 |
-
|
11844 |
-
|
11845 |
-
|
11846 |
-
|
11847 |
-
|
11848 |
-
|
11849 |
-
|
11850 |
-
|
11851 |
-
|
11852 |
-
|
11853 |
-
|
11854 |
-
|
11855 |
-
|
11856 |
-
|
11857 |
-
|
11858 |
-
|
11859 |
-
|
11860 |
-
|
11861 |
-
|
11862 |
-
|
11863 |
-
|
11864 |
-
|
11865 |
-
|
11866 |
-
|
11867 |
-
|
11868 |
-
|
11869 |
-
|
11870 |
-
|
11871 |
-
|
11872 |
-
|
11873 |
-
|
11874 |
-
|
11875 |
-
|
11876 |
-
|
11877 |
-
|
11878 |
-
}
|
11879 |
-
}
|
11880 |
-
|
11881 |
-
|
11882 |
-
|
11883 |
-
|
11884 |
-
|
11885 |
-
|
11886 |
-
|
11887 |
-
|
11888 |
-
|
11889 |
-
|
11890 |
-
|
11891 |
-
|
11892 |
-
|
11893 |
-
|
11894 |
-
|
11895 |
-
|
11896 |
-
|
11897 |
-
|
11898 |
-
|
11899 |
-
|
11900 |
-
|
11901 |
-
|
11902 |
-
|
11903 |
-
|
11904 |
-
|
11905 |
-
|
11906 |
-
|
11907 |
-
|
11908 |
-
|
11909 |
-
|
11910 |
-
|
11911 |
-
|
11912 |
-
|
11913 |
-
|
11914 |
-
|
11915 |
-
|
11916 |
-
|
11917 |
-
|
11918 |
-
|
11919 |
-
|
11920 |
-
|
11921 |
-
|
11922 |
-
|
11923 |
-
|
11924 |
-
|
11925 |
-
|
11926 |
-
|
11927 |
-
|
11928 |
-
|
11929 |
-
|
11930 |
-
|
11931 |
-
|
11932 |
-
|
11933 |
-
|
11934 |
-
|
11935 |
-
|
11936 |
-
|
11937 |
-
|
11938 |
-
|
11939 |
-
|
11940 |
-
|
11941 |
-
|
11942 |
-
|
11943 |
-
|
11944 |
-
|
11945 |
-
|
11946 |
-
|
11947 |
-
|
11948 |
-
|
11949 |
-
|
11950 |
-
|
11951 |
-
|
11952 |
-
|
11953 |
-
|
11954 |
-
|
11955 |
-
|
11956 |
-
|
11957 |
-
|
11958 |
-
|
11959 |
-
|
11960 |
-
|
11961 |
-
|
11962 |
-
|
11963 |
-
|
11964 |
-
|
11965 |
-
|
11966 |
-
|
11967 |
-
|
11968 |
-
|
11969 |
-
|
11970 |
-
|
11971 |
-
|
11972 |
-
|
11973 |
-
|
11974 |
-
|
11975 |
-
|
11976 |
-
|
11977 |
-
|
11978 |
-
|
11979 |
-
|
11980 |
-
|
11981 |
-
|
11982 |
-
|
11983 |
-
|
11984 |
-
|
11985 |
-
|
11986 |
-
|
11987 |
-
|
11988 |
-
|
11989 |
-
|
11990 |
-
|
11991 |
-
|
11992 |
-
|
11993 |
-
|
11994 |
-
|
11995 |
-
|
11996 |
-
|
11997 |
-
|
11998 |
-
|
11999 |
-
|
12000 |
-
|
12001 |
-
|
12002 |
-
|
12003 |
-
|
12004 |
-
|
12005 |
-
|
12006 |
-
|
12007 |
-
|
12008 |
-
|
12009 |
-
|
12010 |
-
|
12011 |
-
|
12012 |
-
|
12013 |
-
|
12014 |
-
|
12015 |
-
|
12016 |
-
|
12017 |
-
|
12018 |
-
|
12019 |
-
|
12020 |
-
|
12021 |
-
|
12022 |
-
|
12023 |
-
|
12024 |
-
|
12025 |
-
|
12026 |
-
|
12027 |
-
|
12028 |
-
|
12029 |
-
|
12030 |
-
|
12031 |
-
|
12032 |
-
|
12033 |
-
|
12034 |
-
|
12035 |
-
|
12036 |
-
|
12037 |
-
|
12038 |
-
|
12039 |
-
|
12040 |
-
|
12041 |
-
|
12042 |
-
|
12043 |
-
|
12044 |
-
|
12045 |
-
|
12046 |
-
|
12047 |
-
|
12048 |
-
|
12049 |
-
if (
|
12050 |
-
|
12051 |
-
} else if(
|
12052 |
-
|
12053 |
-
|
12054 |
-
|
12055 |
-
|
12056 |
-
|
12057 |
-
|
12058 |
-
|
12059 |
-
|
12060 |
-
|
12061 |
-
|
12062 |
-
|
12063 |
-
|
12064 |
-
if (
|
12065 |
-
|
12066 |
-
} else if(
|
12067 |
-
|
12068 |
-
|
12069 |
-
|
12070 |
-
|
12071 |
-
|
12072 |
-
|
12073 |
-
|
12074 |
-
|
12075 |
-
|
12076 |
-
|
12077 |
-
|
12078 |
-
|
12079 |
-
|
12080 |
-
|
12081 |
-
|
12082 |
-
|
12083 |
-
|
12084 |
-
|
12085 |
-
|
12086 |
-
|
12087 |
-
|
12088 |
-
|
12089 |
-
|
12090 |
-
|
12091 |
-
|
12092 |
-
|
12093 |
-
|
12094 |
-
|
12095 |
-
|
12096 |
-
|
12097 |
-
|
12098 |
-
|
12099 |
-
|
12100 |
-
|
12101 |
-
|
12102 |
-
|
12103 |
-
|
12104 |
-
|
12105 |
-
|
12106 |
-
|
12107 |
-
|
12108 |
-
|
12109 |
-
|
12110 |
-
|
12111 |
-
|
12112 |
-
|
12113 |
-
|
12114 |
-
|
12115 |
-
|
12116 |
-
|
12117 |
-
|
12118 |
-
|
12119 |
-
|
12120 |
-
|
12121 |
-
|
12122 |
-
|
12123 |
-
|
12124 |
-
|
12125 |
-
|
12126 |
-
|
12127 |
-
|
12128 |
-
|
12129 |
-
|
12130 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12131 |
});
|
12132 |
-
/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
|
12133 |
|
12134 |
/***/ },
|
12135 |
|
7595 |
/***/ 537:
|
7596 |
/***/ function(module, exports, __webpack_require__) {
|
7597 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7598 |
/*!
|
7599 |
+
* html2canvas 1.0.0-alpha.10 <https://html2canvas.hertzen.com>
|
7600 |
+
* Copyright (c) 2018 Niklas von Hertzen <https://hertzen.com>
|
7601 |
+
* Released under MIT License
|
|
|
|
|
7602 |
*/
|
7603 |
+
(function webpackUniversalModuleDefinition(root, factory) {
|
7604 |
+
if(true)
|
7605 |
+
module.exports = factory();
|
7606 |
+
else if(typeof define === 'function' && define.amd)
|
7607 |
+
define([], factory);
|
7608 |
+
else if(typeof exports === 'object')
|
7609 |
+
exports["html2canvas"] = factory();
|
7610 |
+
else
|
7611 |
+
root["html2canvas"] = factory();
|
7612 |
+
})(this, function() {
|
7613 |
+
return /******/ (function(modules) { // webpackBootstrap
|
7614 |
+
/******/ // The module cache
|
7615 |
+
/******/ var installedModules = {};
|
7616 |
+
/******/
|
7617 |
+
/******/ // The require function
|
7618 |
+
/******/ function __webpack_require__(moduleId) {
|
7619 |
+
/******/
|
7620 |
+
/******/ // Check if module is in cache
|
7621 |
+
/******/ if(installedModules[moduleId]) {
|
7622 |
+
/******/ return installedModules[moduleId].exports;
|
7623 |
+
/******/ }
|
7624 |
+
/******/ // Create a new module (and put it into the cache)
|
7625 |
+
/******/ var module = installedModules[moduleId] = {
|
7626 |
+
/******/ i: moduleId,
|
7627 |
+
/******/ l: false,
|
7628 |
+
/******/ exports: {}
|
7629 |
+
/******/ };
|
7630 |
+
/******/
|
7631 |
+
/******/ // Execute the module function
|
7632 |
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
7633 |
+
/******/
|
7634 |
+
/******/ // Flag the module as loaded
|
7635 |
+
/******/ module.l = true;
|
7636 |
+
/******/
|
7637 |
+
/******/ // Return the exports of the module
|
7638 |
+
/******/ return module.exports;
|
7639 |
+
/******/ }
|
7640 |
+
/******/
|
7641 |
+
/******/
|
7642 |
+
/******/ // expose the modules object (__webpack_modules__)
|
7643 |
+
/******/ __webpack_require__.m = modules;
|
7644 |
+
/******/
|
7645 |
+
/******/ // expose the module cache
|
7646 |
+
/******/ __webpack_require__.c = installedModules;
|
7647 |
+
/******/
|
7648 |
+
/******/ // define getter function for harmony exports
|
7649 |
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
7650 |
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
7651 |
+
/******/ Object.defineProperty(exports, name, {
|
7652 |
+
/******/ configurable: false,
|
7653 |
+
/******/ enumerable: true,
|
7654 |
+
/******/ get: getter
|
7655 |
+
/******/ });
|
7656 |
+
/******/ }
|
7657 |
+
/******/ };
|
7658 |
+
/******/
|
7659 |
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
7660 |
+
/******/ __webpack_require__.n = function(module) {
|
7661 |
+
/******/ var getter = module && module.__esModule ?
|
7662 |
+
/******/ function getDefault() { return module['default']; } :
|
7663 |
+
/******/ function getModuleExports() { return module; };
|
7664 |
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
7665 |
+
/******/ return getter;
|
7666 |
+
/******/ };
|
7667 |
+
/******/
|
7668 |
+
/******/ // Object.prototype.hasOwnProperty.call
|
7669 |
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
7670 |
+
/******/
|
7671 |
+
/******/ // __webpack_public_path__
|
7672 |
+
/******/ __webpack_require__.p = "";
|
7673 |
+
/******/
|
7674 |
+
/******/ // Load entry module and return exports
|
7675 |
+
/******/ return __webpack_require__(__webpack_require__.s = 27);
|
7676 |
+
/******/ })
|
7677 |
+
/************************************************************************/
|
7678 |
+
/******/ ([
|
7679 |
+
/* 0 */
|
7680 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7681 |
+
|
7682 |
+
"use strict";
|
7683 |
+
|
7684 |
+
|
7685 |
+
// http://dev.w3.org/csswg/css-color/
|
7686 |
+
|
7687 |
+
Object.defineProperty(exports, "__esModule", {
|
7688 |
+
value: true
|
7689 |
+
});
|
7690 |
|
7691 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
|
|
7692 |
|
7693 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
7694 |
|
7695 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
7696 |
+
|
7697 |
+
var HEX3 = /^#([a-f0-9]{3})$/i;
|
7698 |
+
var hex3 = function hex3(value) {
|
7699 |
+
var match = value.match(HEX3);
|
7700 |
+
if (match) {
|
7701 |
+
return [parseInt(match[1][0] + match[1][0], 16), parseInt(match[1][1] + match[1][1], 16), parseInt(match[1][2] + match[1][2], 16), null];
|
7702 |
}
|
7703 |
+
return false;
|
7704 |
+
};
|
7705 |
|
7706 |
+
var HEX6 = /^#([a-f0-9]{6})$/i;
|
7707 |
+
var hex6 = function hex6(value) {
|
7708 |
+
var match = value.match(HEX6);
|
7709 |
+
if (match) {
|
7710 |
+
return [parseInt(match[1].substring(0, 2), 16), parseInt(match[1].substring(2, 4), 16), parseInt(match[1].substring(4, 6), 16), null];
|
7711 |
}
|
7712 |
+
return false;
|
7713 |
+
};
|
7714 |
|
7715 |
+
var RGB = /^rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)$/;
|
7716 |
+
var rgb = function rgb(value) {
|
7717 |
+
var match = value.match(RGB);
|
7718 |
+
if (match) {
|
7719 |
+
return [Number(match[1]), Number(match[2]), Number(match[3]), null];
|
7720 |
+
}
|
7721 |
+
return false;
|
7722 |
+
};
|
7723 |
|
7724 |
+
var RGBA = /^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d?\.?\d+)\s*\)$/;
|
7725 |
+
var rgba = function rgba(value) {
|
7726 |
+
var match = value.match(RGBA);
|
7727 |
+
if (match && match.length > 4) {
|
7728 |
+
return [Number(match[1]), Number(match[2]), Number(match[3]), Number(match[4])];
|
|
|
7729 |
}
|
7730 |
+
return false;
|
7731 |
+
};
|
7732 |
|
7733 |
+
var fromArray = function fromArray(array) {
|
7734 |
+
return [Math.min(array[0], 255), Math.min(array[1], 255), Math.min(array[2], 255), array.length > 3 ? array[3] : null];
|
7735 |
+
};
|
7736 |
|
7737 |
+
var namedColor = function namedColor(name) {
|
7738 |
+
var color = NAMED_COLORS[name.toLowerCase()];
|
7739 |
+
return color ? color : false;
|
7740 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
7741 |
|
7742 |
+
var Color = function () {
|
7743 |
+
function Color(value) {
|
7744 |
+
_classCallCheck(this, Color);
|
7745 |
+
|
7746 |
+
var _ref = Array.isArray(value) ? fromArray(value) : hex3(value) || rgb(value) || rgba(value) || namedColor(value) || hex6(value) || [0, 0, 0, null],
|
7747 |
+
_ref2 = _slicedToArray(_ref, 4),
|
7748 |
+
r = _ref2[0],
|
7749 |
+
g = _ref2[1],
|
7750 |
+
b = _ref2[2],
|
7751 |
+
a = _ref2[3];
|
7752 |
+
|
7753 |
+
this.r = r;
|
7754 |
+
this.g = g;
|
7755 |
+
this.b = b;
|
7756 |
+
this.a = a;
|
7757 |
+
}
|
7758 |
+
|
7759 |
+
_createClass(Color, [{
|
7760 |
+
key: 'isTransparent',
|
7761 |
+
value: function isTransparent() {
|
7762 |
+
return this.a === 0;
|
7763 |
+
}
|
7764 |
+
}, {
|
7765 |
+
key: 'toString',
|
7766 |
+
value: function toString() {
|
7767 |
+
return this.a !== null && this.a !== 1 ? 'rgba(' + this.r + ',' + this.g + ',' + this.b + ',' + this.a + ')' : 'rgb(' + this.r + ',' + this.g + ',' + this.b + ')';
|
7768 |
+
}
|
7769 |
+
}]);
|
7770 |
+
|
7771 |
+
return Color;
|
7772 |
+
}();
|
7773 |
+
|
7774 |
+
exports.default = Color;
|
7775 |
+
|
7776 |
+
|
7777 |
+
var NAMED_COLORS = {
|
7778 |
+
transparent: [0, 0, 0, 0],
|
7779 |
+
aliceblue: [240, 248, 255, null],
|
7780 |
+
antiquewhite: [250, 235, 215, null],
|
7781 |
+
aqua: [0, 255, 255, null],
|
7782 |
+
aquamarine: [127, 255, 212, null],
|
7783 |
+
azure: [240, 255, 255, null],
|
7784 |
+
beige: [245, 245, 220, null],
|
7785 |
+
bisque: [255, 228, 196, null],
|
7786 |
+
black: [0, 0, 0, null],
|
7787 |
+
blanchedalmond: [255, 235, 205, null],
|
7788 |
+
blue: [0, 0, 255, null],
|
7789 |
+
blueviolet: [138, 43, 226, null],
|
7790 |
+
brown: [165, 42, 42, null],
|
7791 |
+
burlywood: [222, 184, 135, null],
|
7792 |
+
cadetblue: [95, 158, 160, null],
|
7793 |
+
chartreuse: [127, 255, 0, null],
|
7794 |
+
chocolate: [210, 105, 30, null],
|
7795 |
+
coral: [255, 127, 80, null],
|
7796 |
+
cornflowerblue: [100, 149, 237, null],
|
7797 |
+
cornsilk: [255, 248, 220, null],
|
7798 |
+
crimson: [220, 20, 60, null],
|
7799 |
+
cyan: [0, 255, 255, null],
|
7800 |
+
darkblue: [0, 0, 139, null],
|
7801 |
+
darkcyan: [0, 139, 139, null],
|
7802 |
+
darkgoldenrod: [184, 134, 11, null],
|
7803 |
+
darkgray: [169, 169, 169, null],
|
7804 |
+
darkgreen: [0, 100, 0, null],
|
7805 |
+
darkgrey: [169, 169, 169, null],
|
7806 |
+
darkkhaki: [189, 183, 107, null],
|
7807 |
+
darkmagenta: [139, 0, 139, null],
|
7808 |
+
darkolivegreen: [85, 107, 47, null],
|
7809 |
+
darkorange: [255, 140, 0, null],
|
7810 |
+
darkorchid: [153, 50, 204, null],
|
7811 |
+
darkred: [139, 0, 0, null],
|
7812 |
+
darksalmon: [233, 150, 122, null],
|
7813 |
+
darkseagreen: [143, 188, 143, null],
|
7814 |
+
darkslateblue: [72, 61, 139, null],
|
7815 |
+
darkslategray: [47, 79, 79, null],
|
7816 |
+
darkslategrey: [47, 79, 79, null],
|
7817 |
+
darkturquoise: [0, 206, 209, null],
|
7818 |
+
darkviolet: [148, 0, 211, null],
|
7819 |
+
deeppink: [255, 20, 147, null],
|
7820 |
+
deepskyblue: [0, 191, 255, null],
|
7821 |
+
dimgray: [105, 105, 105, null],
|
7822 |
+
dimgrey: [105, 105, 105, null],
|
7823 |
+
dodgerblue: [30, 144, 255, null],
|
7824 |
+
firebrick: [178, 34, 34, null],
|
7825 |
+
floralwhite: [255, 250, 240, null],
|
7826 |
+
forestgreen: [34, 139, 34, null],
|
7827 |
+
fuchsia: [255, 0, 255, null],
|
7828 |
+
gainsboro: [220, 220, 220, null],
|
7829 |
+
ghostwhite: [248, 248, 255, null],
|
7830 |
+
gold: [255, 215, 0, null],
|
7831 |
+
goldenrod: [218, 165, 32, null],
|
7832 |
+
gray: [128, 128, 128, null],
|
7833 |
+
green: [0, 128, 0, null],
|
7834 |
+
greenyellow: [173, 255, 47, null],
|
7835 |
+
grey: [128, 128, 128, null],
|
7836 |
+
honeydew: [240, 255, 240, null],
|
7837 |
+
hotpink: [255, 105, 180, null],
|
7838 |
+
indianred: [205, 92, 92, null],
|
7839 |
+
indigo: [75, 0, 130, null],
|
7840 |
+
ivory: [255, 255, 240, null],
|
7841 |
+
khaki: [240, 230, 140, null],
|
7842 |
+
lavender: [230, 230, 250, null],
|
7843 |
+
lavenderblush: [255, 240, 245, null],
|
7844 |
+
lawngreen: [124, 252, 0, null],
|
7845 |
+
lemonchiffon: [255, 250, 205, null],
|
7846 |
+
lightblue: [173, 216, 230, null],
|
7847 |
+
lightcoral: [240, 128, 128, null],
|
7848 |
+
lightcyan: [224, 255, 255, null],
|
7849 |
+
lightgoldenrodyellow: [250, 250, 210, null],
|
7850 |
+
lightgray: [211, 211, 211, null],
|
7851 |
+
lightgreen: [144, 238, 144, null],
|
7852 |
+
lightgrey: [211, 211, 211, null],
|
7853 |
+
lightpink: [255, 182, 193, null],
|
7854 |
+
lightsalmon: [255, 160, 122, null],
|
7855 |
+
lightseagreen: [32, 178, 170, null],
|
7856 |
+
lightskyblue: [135, 206, 250, null],
|
7857 |
+
lightslategray: [119, 136, 153, null],
|
7858 |
+
lightslategrey: [119, 136, 153, null],
|
7859 |
+
lightsteelblue: [176, 196, 222, null],
|
7860 |
+
lightyellow: [255, 255, 224, null],
|
7861 |
+
lime: [0, 255, 0, null],
|
7862 |
+
limegreen: [50, 205, 50, null],
|
7863 |
+
linen: [250, 240, 230, null],
|
7864 |
+
magenta: [255, 0, 255, null],
|
7865 |
+
maroon: [128, 0, 0, null],
|
7866 |
+
mediumaquamarine: [102, 205, 170, null],
|
7867 |
+
mediumblue: [0, 0, 205, null],
|
7868 |
+
mediumorchid: [186, 85, 211, null],
|
7869 |
+
mediumpurple: [147, 112, 219, null],
|
7870 |
+
mediumseagreen: [60, 179, 113, null],
|
7871 |
+
mediumslateblue: [123, 104, 238, null],
|
7872 |
+
mediumspringgreen: [0, 250, 154, null],
|
7873 |
+
mediumturquoise: [72, 209, 204, null],
|
7874 |
+
mediumvioletred: [199, 21, 133, null],
|
7875 |
+
midnightblue: [25, 25, 112, null],
|
7876 |
+
mintcream: [245, 255, 250, null],
|
7877 |
+
mistyrose: [255, 228, 225, null],
|
7878 |
+
moccasin: [255, 228, 181, null],
|
7879 |
+
navajowhite: [255, 222, 173, null],
|
7880 |
+
navy: [0, 0, 128, null],
|
7881 |
+
oldlace: [253, 245, 230, null],
|
7882 |
+
olive: [128, 128, 0, null],
|
7883 |
+
olivedrab: [107, 142, 35, null],
|
7884 |
+
orange: [255, 165, 0, null],
|
7885 |
+
orangered: [255, 69, 0, null],
|
7886 |
+
orchid: [218, 112, 214, null],
|
7887 |
+
palegoldenrod: [238, 232, 170, null],
|
7888 |
+
palegreen: [152, 251, 152, null],
|
7889 |
+
paleturquoise: [175, 238, 238, null],
|
7890 |
+
palevioletred: [219, 112, 147, null],
|
7891 |
+
papayawhip: [255, 239, 213, null],
|
7892 |
+
peachpuff: [255, 218, 185, null],
|
7893 |
+
peru: [205, 133, 63, null],
|
7894 |
+
pink: [255, 192, 203, null],
|
7895 |
+
plum: [221, 160, 221, null],
|
7896 |
+
powderblue: [176, 224, 230, null],
|
7897 |
+
purple: [128, 0, 128, null],
|
7898 |
+
rebeccapurple: [102, 51, 153, null],
|
7899 |
+
red: [255, 0, 0, null],
|
7900 |
+
rosybrown: [188, 143, 143, null],
|
7901 |
+
royalblue: [65, 105, 225, null],
|
7902 |
+
saddlebrown: [139, 69, 19, null],
|
7903 |
+
salmon: [250, 128, 114, null],
|
7904 |
+
sandybrown: [244, 164, 96, null],
|
7905 |
+
seagreen: [46, 139, 87, null],
|
7906 |
+
seashell: [255, 245, 238, null],
|
7907 |
+
sienna: [160, 82, 45, null],
|
7908 |
+
silver: [192, 192, 192, null],
|
7909 |
+
skyblue: [135, 206, 235, null],
|
7910 |
+
slateblue: [106, 90, 205, null],
|
7911 |
+
slategray: [112, 128, 144, null],
|
7912 |
+
slategrey: [112, 128, 144, null],
|
7913 |
+
snow: [255, 250, 250, null],
|
7914 |
+
springgreen: [0, 255, 127, null],
|
7915 |
+
steelblue: [70, 130, 180, null],
|
7916 |
+
tan: [210, 180, 140, null],
|
7917 |
+
teal: [0, 128, 128, null],
|
7918 |
+
thistle: [216, 191, 216, null],
|
7919 |
+
tomato: [255, 99, 71, null],
|
7920 |
+
turquoise: [64, 224, 208, null],
|
7921 |
+
violet: [238, 130, 238, null],
|
7922 |
+
wheat: [245, 222, 179, null],
|
7923 |
+
white: [255, 255, 255, null],
|
7924 |
+
whitesmoke: [245, 245, 245, null],
|
7925 |
+
yellow: [255, 255, 0, null],
|
7926 |
+
yellowgreen: [154, 205, 50, null]
|
7927 |
+
};
|
7928 |
|
7929 |
+
var TRANSPARENT = exports.TRANSPARENT = new Color([0, 0, 0, 0]);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7930 |
|
7931 |
+
/***/ }),
|
7932 |
+
/* 1 */
|
7933 |
+
/***/ (function(module, exports, __webpack_require__) {
|
7934 |
|
7935 |
+
"use strict";
|
|
|
|
|
|
|
7936 |
|
|
|
|
|
|
|
|
|
|
|
|
|
7937 |
|
7938 |
+
Object.defineProperty(exports, "__esModule", {
|
7939 |
+
value: true
|
7940 |
+
});
|
7941 |
+
exports.parseBoundCurves = exports.calculatePaddingBoxPath = exports.calculateBorderBoxPath = exports.parsePathForBorder = exports.parseDocumentSize = exports.calculateContentBox = exports.calculatePaddingBox = exports.parseBounds = exports.Bounds = undefined;
|
|
|
7942 |
|
7943 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
|
|
7944 |
|
7945 |
+
var _Vector = __webpack_require__(7);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7946 |
|
7947 |
+
var _Vector2 = _interopRequireDefault(_Vector);
|
|
|
|
|
|
|
|
|
7948 |
|
7949 |
+
var _BezierCurve = __webpack_require__(32);
|
7950 |
|
7951 |
+
var _BezierCurve2 = _interopRequireDefault(_BezierCurve);
|
|
|
|
|
|
|
7952 |
|
7953 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
7954 |
|
7955 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
7956 |
|
7957 |
+
var TOP = 0;
|
7958 |
+
var RIGHT = 1;
|
7959 |
+
var BOTTOM = 2;
|
7960 |
+
var LEFT = 3;
|
7961 |
|
7962 |
+
var H = 0;
|
7963 |
+
var V = 1;
|
7964 |
|
7965 |
+
var Bounds = exports.Bounds = function () {
|
7966 |
+
function Bounds(x, y, w, h) {
|
7967 |
+
_classCallCheck(this, Bounds);
|
7968 |
+
|
7969 |
+
this.left = x;
|
7970 |
+
this.top = y;
|
7971 |
+
this.width = w;
|
7972 |
+
this.height = h;
|
|
|
7973 |
}
|
7974 |
|
7975 |
+
_createClass(Bounds, null, [{
|
7976 |
+
key: 'fromClientRect',
|
7977 |
+
value: function fromClientRect(clientRect, scrollX, scrollY) {
|
7978 |
+
return new Bounds(clientRect.left + scrollX, clientRect.top + scrollY, clientRect.width, clientRect.height);
|
7979 |
+
}
|
7980 |
+
}]);
|
7981 |
|
7982 |
+
return Bounds;
|
7983 |
+
}();
|
|
|
7984 |
|
7985 |
+
var parseBounds = exports.parseBounds = function parseBounds(node, scrollX, scrollY) {
|
7986 |
+
return Bounds.fromClientRect(node.getBoundingClientRect(), scrollX, scrollY);
|
7987 |
+
};
|
7988 |
|
7989 |
+
var calculatePaddingBox = exports.calculatePaddingBox = function calculatePaddingBox(bounds, borders) {
|
7990 |
+
return new Bounds(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth, bounds.width - (borders[RIGHT].borderWidth + borders[LEFT].borderWidth), bounds.height - (borders[TOP].borderWidth + borders[BOTTOM].borderWidth));
|
7991 |
+
};
|
|
|
|
|
|
|
|
|
|
|
7992 |
|
7993 |
+
var calculateContentBox = exports.calculateContentBox = function calculateContentBox(bounds, padding, borders) {
|
7994 |
+
// TODO support percentage paddings
|
7995 |
+
var paddingTop = padding[TOP].value;
|
7996 |
+
var paddingRight = padding[RIGHT].value;
|
7997 |
+
var paddingBottom = padding[BOTTOM].value;
|
7998 |
+
var paddingLeft = padding[LEFT].value;
|
|
|
7999 |
|
8000 |
+
return new Bounds(bounds.left + paddingLeft + borders[LEFT].borderWidth, bounds.top + paddingTop + borders[TOP].borderWidth, bounds.width - (borders[RIGHT].borderWidth + borders[LEFT].borderWidth + paddingLeft + paddingRight), bounds.height - (borders[TOP].borderWidth + borders[BOTTOM].borderWidth + paddingTop + paddingBottom));
|
8001 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8002 |
|
8003 |
+
var parseDocumentSize = exports.parseDocumentSize = function parseDocumentSize(document) {
|
8004 |
+
var body = document.body;
|
8005 |
+
var documentElement = document.documentElement;
|
8006 |
|
8007 |
+
if (!body || !documentElement) {
|
8008 |
+
throw new Error( true ? 'Unable to get document size' : '');
|
|
|
|
|
|
|
8009 |
}
|
8010 |
+
var width = Math.max(Math.max(body.scrollWidth, documentElement.scrollWidth), Math.max(body.offsetWidth, documentElement.offsetWidth), Math.max(body.clientWidth, documentElement.clientWidth));
|
8011 |
|
8012 |
+
var height = Math.max(Math.max(body.scrollHeight, documentElement.scrollHeight), Math.max(body.offsetHeight, documentElement.offsetHeight), Math.max(body.clientHeight, documentElement.clientHeight));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8013 |
|
8014 |
+
return new Bounds(0, 0, width, height);
|
8015 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8016 |
|
8017 |
+
var parsePathForBorder = exports.parsePathForBorder = function parsePathForBorder(curves, borderSide) {
|
8018 |
+
switch (borderSide) {
|
8019 |
+
case TOP:
|
8020 |
+
return createPathFromCurves(curves.topLeftOuter, curves.topLeftInner, curves.topRightOuter, curves.topRightInner);
|
8021 |
+
case RIGHT:
|
8022 |
+
return createPathFromCurves(curves.topRightOuter, curves.topRightInner, curves.bottomRightOuter, curves.bottomRightInner);
|
8023 |
+
case BOTTOM:
|
8024 |
+
return createPathFromCurves(curves.bottomRightOuter, curves.bottomRightInner, curves.bottomLeftOuter, curves.bottomLeftInner);
|
8025 |
+
case LEFT:
|
8026 |
+
default:
|
8027 |
+
return createPathFromCurves(curves.bottomLeftOuter, curves.bottomLeftInner, curves.topLeftOuter, curves.topLeftInner);
|
8028 |
}
|
8029 |
+
};
|
8030 |
|
8031 |
+
var createPathFromCurves = function createPathFromCurves(outer1, inner1, outer2, inner2) {
|
8032 |
+
var path = [];
|
8033 |
+
if (outer1 instanceof _BezierCurve2.default) {
|
8034 |
+
path.push(outer1.subdivide(0.5, false));
|
8035 |
+
} else {
|
8036 |
+
path.push(outer1);
|
8037 |
}
|
8038 |
|
8039 |
+
if (outer2 instanceof _BezierCurve2.default) {
|
8040 |
+
path.push(outer2.subdivide(0.5, true));
|
8041 |
+
} else {
|
8042 |
+
path.push(outer2);
|
8043 |
+
}
|
8044 |
|
8045 |
+
if (inner2 instanceof _BezierCurve2.default) {
|
8046 |
+
path.push(inner2.subdivide(0.5, true).reverse());
|
8047 |
+
} else {
|
8048 |
+
path.push(inner2);
|
8049 |
+
}
|
8050 |
|
8051 |
+
if (inner1 instanceof _BezierCurve2.default) {
|
8052 |
+
path.push(inner1.subdivide(0.5, false).reverse());
|
8053 |
+
} else {
|
8054 |
+
path.push(inner1);
|
8055 |
}
|
8056 |
|
8057 |
+
return path;
|
8058 |
+
};
|
8059 |
+
|
8060 |
+
var calculateBorderBoxPath = exports.calculateBorderBoxPath = function calculateBorderBoxPath(curves) {
|
8061 |
+
return [curves.topLeftOuter, curves.topRightOuter, curves.bottomRightOuter, curves.bottomLeftOuter];
|
8062 |
+
};
|
8063 |
|
8064 |
+
var calculatePaddingBoxPath = exports.calculatePaddingBoxPath = function calculatePaddingBoxPath(curves) {
|
8065 |
+
return [curves.topLeftInner, curves.topRightInner, curves.bottomRightInner, curves.bottomLeftInner];
|
8066 |
+
};
|
8067 |
|
8068 |
+
var parseBoundCurves = exports.parseBoundCurves = function parseBoundCurves(bounds, borders, borderRadius) {
|
8069 |
+
var tlh = borderRadius[CORNER.TOP_LEFT][H].getAbsoluteValue(bounds.width);
|
8070 |
+
var tlv = borderRadius[CORNER.TOP_LEFT][V].getAbsoluteValue(bounds.height);
|
8071 |
+
var trh = borderRadius[CORNER.TOP_RIGHT][H].getAbsoluteValue(bounds.width);
|
8072 |
+
var trv = borderRadius[CORNER.TOP_RIGHT][V].getAbsoluteValue(bounds.height);
|
8073 |
+
var brh = borderRadius[CORNER.BOTTOM_RIGHT][H].getAbsoluteValue(bounds.width);
|
8074 |
+
var brv = borderRadius[CORNER.BOTTOM_RIGHT][V].getAbsoluteValue(bounds.height);
|
8075 |
+
var blh = borderRadius[CORNER.BOTTOM_LEFT][H].getAbsoluteValue(bounds.width);
|
8076 |
+
var blv = borderRadius[CORNER.BOTTOM_LEFT][V].getAbsoluteValue(bounds.height);
|
8077 |
+
|
8078 |
+
var factors = [];
|
8079 |
+
factors.push((tlh + trh) / bounds.width);
|
8080 |
+
factors.push((blh + brh) / bounds.width);
|
8081 |
+
factors.push((tlv + blv) / bounds.height);
|
8082 |
+
factors.push((trv + brv) / bounds.height);
|
8083 |
+
var maxFactor = Math.max.apply(Math, factors);
|
8084 |
+
|
8085 |
+
if (maxFactor > 1) {
|
8086 |
+
tlh /= maxFactor;
|
8087 |
+
tlv /= maxFactor;
|
8088 |
+
trh /= maxFactor;
|
8089 |
+
trv /= maxFactor;
|
8090 |
+
brh /= maxFactor;
|
8091 |
+
brv /= maxFactor;
|
8092 |
+
blh /= maxFactor;
|
8093 |
+
blv /= maxFactor;
|
8094 |
+
}
|
8095 |
+
|
8096 |
+
var topWidth = bounds.width - trh;
|
8097 |
+
var rightHeight = bounds.height - brv;
|
8098 |
+
var bottomWidth = bounds.width - brh;
|
8099 |
+
var leftHeight = bounds.height - blv;
|
8100 |
|
8101 |
+
return {
|
8102 |
+
topLeftOuter: tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left, bounds.top, tlh, tlv, CORNER.TOP_LEFT) : new _Vector2.default(bounds.left, bounds.top),
|
8103 |
+
topLeftInner: tlh > 0 || tlv > 0 ? getCurvePoints(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth, Math.max(0, tlh - borders[LEFT].borderWidth), Math.max(0, tlv - borders[TOP].borderWidth), CORNER.TOP_LEFT) : new _Vector2.default(bounds.left + borders[LEFT].borderWidth, bounds.top + borders[TOP].borderWidth),
|
8104 |
+
topRightOuter: trh > 0 || trv > 0 ? getCurvePoints(bounds.left + topWidth, bounds.top, trh, trv, CORNER.TOP_RIGHT) : new _Vector2.default(bounds.left + bounds.width, bounds.top),
|
8105 |
+
topRightInner: trh > 0 || trv > 0 ? getCurvePoints(bounds.left + Math.min(topWidth, bounds.width + borders[LEFT].borderWidth), bounds.top + borders[TOP].borderWidth, topWidth > bounds.width + borders[LEFT].borderWidth ? 0 : trh - borders[LEFT].borderWidth, trv - borders[TOP].borderWidth, CORNER.TOP_RIGHT) : new _Vector2.default(bounds.left + bounds.width - borders[RIGHT].borderWidth, bounds.top + borders[TOP].borderWidth),
|
8106 |
+
bottomRightOuter: brh > 0 || brv > 0 ? getCurvePoints(bounds.left + bottomWidth, bounds.top + rightHeight, brh, brv, CORNER.BOTTOM_RIGHT) : new _Vector2.default(bounds.left + bounds.width, bounds.top + bounds.height),
|
8107 |
+
bottomRightInner: brh > 0 || brv > 0 ? getCurvePoints(bounds.left + Math.min(bottomWidth, bounds.width - borders[LEFT].borderWidth), bounds.top + Math.min(rightHeight, bounds.height + borders[TOP].borderWidth), Math.max(0, brh - borders[RIGHT].borderWidth), brv - borders[BOTTOM].borderWidth, CORNER.BOTTOM_RIGHT) : new _Vector2.default(bounds.left + bounds.width - borders[RIGHT].borderWidth, bounds.top + bounds.height - borders[BOTTOM].borderWidth),
|
8108 |
+
bottomLeftOuter: blh > 0 || blv > 0 ? getCurvePoints(bounds.left, bounds.top + leftHeight, blh, blv, CORNER.BOTTOM_LEFT) : new _Vector2.default(bounds.left, bounds.top + bounds.height),
|
8109 |
+
bottomLeftInner: blh > 0 || blv > 0 ? getCurvePoints(bounds.left + borders[LEFT].borderWidth, bounds.top + leftHeight, Math.max(0, blh - borders[LEFT].borderWidth), blv - borders[BOTTOM].borderWidth, CORNER.BOTTOM_LEFT) : new _Vector2.default(bounds.left + borders[LEFT].borderWidth, bounds.top + bounds.height - borders[BOTTOM].borderWidth)
|
8110 |
+
};
|
8111 |
+
};
|
8112 |
|
8113 |
+
var CORNER = {
|
8114 |
+
TOP_LEFT: 0,
|
8115 |
+
TOP_RIGHT: 1,
|
8116 |
+
BOTTOM_RIGHT: 2,
|
8117 |
+
BOTTOM_LEFT: 3
|
8118 |
+
};
|
8119 |
|
8120 |
+
var getCurvePoints = function getCurvePoints(x, y, r1, r2, position) {
|
8121 |
+
var kappa = 4 * ((Math.sqrt(2) - 1) / 3);
|
8122 |
+
var ox = r1 * kappa; // control point offset horizontal
|
8123 |
+
var oy = r2 * kappa; // control point offset vertical
|
8124 |
+
var xm = x + r1; // x-middle
|
8125 |
+
var ym = y + r2; // y-middle
|
8126 |
+
|
8127 |
+
switch (position) {
|
8128 |
+
case CORNER.TOP_LEFT:
|
8129 |
+
return new _BezierCurve2.default(new _Vector2.default(x, ym), new _Vector2.default(x, ym - oy), new _Vector2.default(xm - ox, y), new _Vector2.default(xm, y));
|
8130 |
+
case CORNER.TOP_RIGHT:
|
8131 |
+
return new _BezierCurve2.default(new _Vector2.default(x, y), new _Vector2.default(x + ox, y), new _Vector2.default(xm, ym - oy), new _Vector2.default(xm, ym));
|
8132 |
+
case CORNER.BOTTOM_RIGHT:
|
8133 |
+
return new _BezierCurve2.default(new _Vector2.default(xm, y), new _Vector2.default(xm, y + oy), new _Vector2.default(x + ox, ym), new _Vector2.default(x, ym));
|
8134 |
+
case CORNER.BOTTOM_LEFT:
|
8135 |
+
default:
|
8136 |
+
return new _BezierCurve2.default(new _Vector2.default(xm, ym), new _Vector2.default(xm - ox, ym), new _Vector2.default(x, y + oy), new _Vector2.default(x, y));
|
8137 |
}
|
8138 |
+
};
|
8139 |
|
8140 |
+
/***/ }),
|
8141 |
+
/* 2 */
|
8142 |
+
/***/ (function(module, exports, __webpack_require__) {
|
8143 |
|
8144 |
+
"use strict";
|
8145 |
|
|
|
8146 |
|
8147 |
+
Object.defineProperty(exports, "__esModule", {
|
8148 |
+
value: true
|
8149 |
+
});
|
8150 |
+
exports.calculateLengthFromValueWithUnit = exports.LENGTH_TYPE = undefined;
|
8151 |
|
8152 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
|
|
|
|
|
|
|
|
8153 |
|
8154 |
+
var _NodeContainer = __webpack_require__(3);
|
|
|
8155 |
|
8156 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
|
|
|
|
8157 |
|
8158 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
8159 |
|
8160 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8161 |
|
8162 |
+
var LENGTH_WITH_UNIT = /([\d.]+)(px|r?em|%)/i;
|
|
|
|
|
8163 |
|
8164 |
+
var LENGTH_TYPE = exports.LENGTH_TYPE = {
|
8165 |
+
PX: 0,
|
8166 |
+
PERCENTAGE: 1
|
8167 |
+
};
|
8168 |
|
8169 |
+
var Length = function () {
|
8170 |
+
function Length(value) {
|
8171 |
+
_classCallCheck(this, Length);
|
|
|
|
|
|
|
|
|
8172 |
|
8173 |
+
this.type = value.substr(value.length - 1) === '%' ? LENGTH_TYPE.PERCENTAGE : LENGTH_TYPE.PX;
|
8174 |
+
var parsedValue = parseFloat(value);
|
8175 |
+
if (true && isNaN(parsedValue)) {
|
8176 |
+
console.error('Invalid value given for Length: "' + value + '"');
|
8177 |
}
|
8178 |
+
this.value = isNaN(parsedValue) ? 0 : parsedValue;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8179 |
}
|
8180 |
|
8181 |
+
_createClass(Length, [{
|
8182 |
+
key: 'isPercentage',
|
8183 |
+
value: function isPercentage() {
|
8184 |
+
return this.type === LENGTH_TYPE.PERCENTAGE;
|
8185 |
+
}
|
8186 |
+
}, {
|
8187 |
+
key: 'getAbsoluteValue',
|
8188 |
+
value: function getAbsoluteValue(parentLength) {
|
8189 |
+
return this.isPercentage() ? parentLength * (this.value / 100) : this.value;
|
8190 |
+
}
|
8191 |
+
}], [{
|
8192 |
+
key: 'create',
|
8193 |
+
value: function create(v) {
|
8194 |
+
return new Length(v);
|
8195 |
+
}
|
8196 |
+
}]);
|
8197 |
|
8198 |
+
return Length;
|
8199 |
+
}();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8200 |
|
8201 |
+
exports.default = Length;
|
|
|
|
|
|
|
8202 |
|
|
|
|
|
|
|
|
|
8203 |
|
8204 |
+
var getRootFontSize = function getRootFontSize(container) {
|
8205 |
+
var parent = container.parent;
|
8206 |
+
return parent ? getRootFontSize(parent) : parseFloat(container.style.font.fontSize);
|
8207 |
+
};
|
8208 |
|
8209 |
+
var calculateLengthFromValueWithUnit = exports.calculateLengthFromValueWithUnit = function calculateLengthFromValueWithUnit(container, value, unit) {
|
8210 |
+
switch (unit) {
|
8211 |
+
case 'px':
|
8212 |
+
case '%':
|
8213 |
+
return new Length(value + unit);
|
8214 |
+
case 'em':
|
8215 |
+
case 'rem':
|
8216 |
+
var length = new Length(value);
|
8217 |
+
length.value *= unit === 'em' ? parseFloat(container.style.font.fontSize) : getRootFontSize(container);
|
8218 |
+
return length;
|
8219 |
+
default:
|
8220 |
+
// TODO: handle correctly if unknown unit is used
|
8221 |
+
return new Length('0');
|
8222 |
}
|
8223 |
+
};
|
8224 |
|
8225 |
+
/***/ }),
|
8226 |
+
/* 3 */
|
8227 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8228 |
|
8229 |
+
"use strict";
|
|
|
|
|
|
|
8230 |
|
|
|
|
|
|
|
|
|
8231 |
|
8232 |
+
Object.defineProperty(exports, "__esModule", {
|
8233 |
+
value: true
|
8234 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8235 |
|
8236 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
|
8237 |
|
8238 |
+
var _Color = __webpack_require__(0);
|
|
|
8239 |
|
8240 |
+
var _Color2 = _interopRequireDefault(_Color);
|
|
|
|
|
|
|
|
|
|
|
8241 |
|
8242 |
+
var _Util = __webpack_require__(4);
|
|
|
|
|
|
|
8243 |
|
8244 |
+
var _background = __webpack_require__(5);
|
|
|
|
|
8245 |
|
8246 |
+
var _border = __webpack_require__(12);
|
|
|
8247 |
|
8248 |
+
var _borderRadius = __webpack_require__(33);
|
|
|
|
|
|
|
|
|
|
|
8249 |
|
8250 |
+
var _display = __webpack_require__(34);
|
|
|
|
|
8251 |
|
8252 |
+
var _float = __webpack_require__(35);
|
|
|
|
|
8253 |
|
8254 |
+
var _font = __webpack_require__(36);
|
8255 |
|
8256 |
+
var _letterSpacing = __webpack_require__(37);
|
|
|
|
|
|
|
8257 |
|
8258 |
+
var _lineBreak = __webpack_require__(38);
|
8259 |
|
8260 |
+
var _listStyle = __webpack_require__(8);
|
|
|
|
|
8261 |
|
8262 |
+
var _margin = __webpack_require__(39);
|
|
|
|
|
8263 |
|
8264 |
+
var _overflow = __webpack_require__(40);
|
|
|
|
|
8265 |
|
8266 |
+
var _overflowWrap = __webpack_require__(18);
|
|
|
8267 |
|
8268 |
+
var _padding = __webpack_require__(17);
|
|
|
|
|
8269 |
|
8270 |
+
var _position = __webpack_require__(19);
|
|
|
|
|
8271 |
|
8272 |
+
var _textDecoration = __webpack_require__(11);
|
|
|
|
|
|
|
8273 |
|
8274 |
+
var _textShadow = __webpack_require__(41);
|
|
|
|
|
|
|
|
|
|
|
|
|
8275 |
|
8276 |
+
var _textTransform = __webpack_require__(20);
|
8277 |
|
8278 |
+
var _transform = __webpack_require__(42);
|
|
|
|
|
8279 |
|
8280 |
+
var _visibility = __webpack_require__(43);
|
|
|
|
|
8281 |
|
8282 |
+
var _wordBreak = __webpack_require__(44);
|
8283 |
|
8284 |
+
var _zIndex = __webpack_require__(45);
|
|
|
|
|
|
|
|
|
8285 |
|
8286 |
+
var _Bounds = __webpack_require__(1);
|
|
|
8287 |
|
8288 |
+
var _Input = __webpack_require__(21);
|
|
|
|
|
|
|
|
|
|
|
8289 |
|
8290 |
+
var _ListItem = __webpack_require__(14);
|
8291 |
|
8292 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
|
8293 |
|
8294 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
|
|
|
|
|
|
8295 |
|
8296 |
+
var INPUT_TAGS = ['INPUT', 'TEXTAREA', 'SELECT'];
|
8297 |
|
8298 |
+
var NodeContainer = function () {
|
8299 |
+
function NodeContainer(node, parent, resourceLoader, index) {
|
8300 |
+
var _this = this;
|
8301 |
|
8302 |
+
_classCallCheck(this, NodeContainer);
|
|
|
|
|
|
|
8303 |
|
8304 |
+
this.parent = parent;
|
8305 |
+
this.tagName = node.tagName;
|
8306 |
+
this.index = index;
|
8307 |
+
this.childNodes = [];
|
8308 |
+
this.listItems = [];
|
8309 |
+
if (typeof node.start === 'number') {
|
8310 |
+
this.listStart = node.start;
|
8311 |
+
}
|
8312 |
+
var defaultView = node.ownerDocument.defaultView;
|
8313 |
+
var scrollX = defaultView.pageXOffset;
|
8314 |
+
var scrollY = defaultView.pageYOffset;
|
8315 |
+
var style = defaultView.getComputedStyle(node, null);
|
8316 |
+
var display = (0, _display.parseDisplay)(style.display);
|
8317 |
|
8318 |
+
var IS_INPUT = node.type === 'radio' || node.type === 'checkbox';
|
|
|
|
|
|
|
|
|
|
|
8319 |
|
8320 |
+
var position = (0, _position.parsePosition)(style.position);
|
|
|
8321 |
|
8322 |
+
this.style = {
|
8323 |
+
background: IS_INPUT ? _Input.INPUT_BACKGROUND : (0, _background.parseBackground)(style, resourceLoader),
|
8324 |
+
border: IS_INPUT ? _Input.INPUT_BORDERS : (0, _border.parseBorder)(style),
|
8325 |
+
borderRadius: (node instanceof defaultView.HTMLInputElement || node instanceof HTMLInputElement) && IS_INPUT ? (0, _Input.getInputBorderRadius)(node) : (0, _borderRadius.parseBorderRadius)(style),
|
8326 |
+
color: IS_INPUT ? _Input.INPUT_COLOR : new _Color2.default(style.color),
|
8327 |
+
display: display,
|
8328 |
+
float: (0, _float.parseCSSFloat)(style.float),
|
8329 |
+
font: (0, _font.parseFont)(style),
|
8330 |
+
letterSpacing: (0, _letterSpacing.parseLetterSpacing)(style.letterSpacing),
|
8331 |
+
listStyle: display === _display.DISPLAY.LIST_ITEM ? (0, _listStyle.parseListStyle)(style) : null,
|
8332 |
+
lineBreak: (0, _lineBreak.parseLineBreak)(style.lineBreak),
|
8333 |
+
margin: (0, _margin.parseMargin)(style),
|
8334 |
+
opacity: parseFloat(style.opacity),
|
8335 |
+
overflow: INPUT_TAGS.indexOf(node.tagName) === -1 ? (0, _overflow.parseOverflow)(style.overflow) : _overflow.OVERFLOW.HIDDEN,
|
8336 |
+
overflowWrap: (0, _overflowWrap.parseOverflowWrap)(style.overflowWrap ? style.overflowWrap : style.wordWrap),
|
8337 |
+
padding: (0, _padding.parsePadding)(style),
|
8338 |
+
position: position,
|
8339 |
+
textDecoration: (0, _textDecoration.parseTextDecoration)(style),
|
8340 |
+
textShadow: (0, _textShadow.parseTextShadow)(style.textShadow),
|
8341 |
+
textTransform: (0, _textTransform.parseTextTransform)(style.textTransform),
|
8342 |
+
transform: (0, _transform.parseTransform)(style),
|
8343 |
+
visibility: (0, _visibility.parseVisibility)(style.visibility),
|
8344 |
+
wordBreak: (0, _wordBreak.parseWordBreak)(style.wordBreak),
|
8345 |
+
zIndex: (0, _zIndex.parseZIndex)(position !== _position.POSITION.STATIC ? style.zIndex : 'auto')
|
8346 |
+
};
|
8347 |
|
8348 |
+
if (this.isTransformed()) {
|
8349 |
+
// getBoundingClientRect provides values post-transform, we want them without the transformation
|
8350 |
+
node.style.transform = 'matrix(1,0,0,1,0,0)';
|
8351 |
+
}
|
8352 |
|
8353 |
+
if (display === _display.DISPLAY.LIST_ITEM) {
|
8354 |
+
var listOwner = (0, _ListItem.getListOwner)(this);
|
8355 |
+
if (listOwner) {
|
8356 |
+
var listIndex = listOwner.listItems.length;
|
8357 |
+
listOwner.listItems.push(this);
|
8358 |
+
this.listIndex = node.hasAttribute('value') && typeof node.value === 'number' ? node.value : listIndex === 0 ? typeof listOwner.listStart === 'number' ? listOwner.listStart : 1 : listOwner.listItems[listIndex - 1].listIndex + 1;
|
8359 |
+
}
|
8360 |
+
}
|
8361 |
|
8362 |
+
// TODO move bound retrieval for all nodes to a later stage?
|
8363 |
+
if (node.tagName === 'IMG') {
|
8364 |
+
node.addEventListener('load', function () {
|
8365 |
+
_this.bounds = (0, _Bounds.parseBounds)(node, scrollX, scrollY);
|
8366 |
+
_this.curvedBounds = (0, _Bounds.parseBoundCurves)(_this.bounds, _this.style.border, _this.style.borderRadius);
|
8367 |
+
});
|
8368 |
+
}
|
8369 |
+
this.image = getImage(node, resourceLoader);
|
8370 |
+
this.bounds = IS_INPUT ? (0, _Input.reformatInputBounds)((0, _Bounds.parseBounds)(node, scrollX, scrollY)) : (0, _Bounds.parseBounds)(node, scrollX, scrollY);
|
8371 |
+
this.curvedBounds = (0, _Bounds.parseBoundCurves)(this.bounds, this.style.border, this.style.borderRadius);
|
8372 |
+
|
8373 |
+
if (true) {
|
8374 |
+
this.name = '' + node.tagName.toLowerCase() + (node.id ? '#' + node.id : '') + node.className.toString().split(' ').map(function (s) {
|
8375 |
+
return s.length ? '.' + s : '';
|
8376 |
+
}).join('');
|
8377 |
+
}
|
8378 |
+
}
|
8379 |
+
|
8380 |
+
_createClass(NodeContainer, [{
|
8381 |
+
key: 'getClipPaths',
|
8382 |
+
value: function getClipPaths() {
|
8383 |
+
var parentClips = this.parent ? this.parent.getClipPaths() : [];
|
8384 |
+
var isClipped = this.style.overflow !== _overflow.OVERFLOW.VISIBLE;
|
8385 |
+
|
8386 |
+
return isClipped ? parentClips.concat([(0, _Bounds.calculatePaddingBoxPath)(this.curvedBounds)]) : parentClips;
|
8387 |
+
}
|
8388 |
+
}, {
|
8389 |
+
key: 'isInFlow',
|
8390 |
+
value: function isInFlow() {
|
8391 |
+
return this.isRootElement() && !this.isFloating() && !this.isAbsolutelyPositioned();
|
8392 |
+
}
|
8393 |
+
}, {
|
8394 |
+
key: 'isVisible',
|
8395 |
+
value: function isVisible() {
|
8396 |
+
return !(0, _Util.contains)(this.style.display, _display.DISPLAY.NONE) && this.style.opacity > 0 && this.style.visibility === _visibility.VISIBILITY.VISIBLE;
|
8397 |
+
}
|
8398 |
+
}, {
|
8399 |
+
key: 'isAbsolutelyPositioned',
|
8400 |
+
value: function isAbsolutelyPositioned() {
|
8401 |
+
return this.style.position !== _position.POSITION.STATIC && this.style.position !== _position.POSITION.RELATIVE;
|
8402 |
+
}
|
8403 |
+
}, {
|
8404 |
+
key: 'isPositioned',
|
8405 |
+
value: function isPositioned() {
|
8406 |
+
return this.style.position !== _position.POSITION.STATIC;
|
8407 |
+
}
|
8408 |
+
}, {
|
8409 |
+
key: 'isFloating',
|
8410 |
+
value: function isFloating() {
|
8411 |
+
return this.style.float !== _float.FLOAT.NONE;
|
8412 |
+
}
|
8413 |
+
}, {
|
8414 |
+
key: 'isRootElement',
|
8415 |
+
value: function isRootElement() {
|
8416 |
+
return this.parent === null;
|
8417 |
+
}
|
8418 |
+
}, {
|
8419 |
+
key: 'isTransformed',
|
8420 |
+
value: function isTransformed() {
|
8421 |
+
return this.style.transform !== null;
|
8422 |
+
}
|
8423 |
+
}, {
|
8424 |
+
key: 'isPositionedWithZIndex',
|
8425 |
+
value: function isPositionedWithZIndex() {
|
8426 |
+
return this.isPositioned() && !this.style.zIndex.auto;
|
8427 |
+
}
|
8428 |
+
}, {
|
8429 |
+
key: 'isInlineLevel',
|
8430 |
+
value: function isInlineLevel() {
|
8431 |
+
return (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_BLOCK) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_FLEX) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_GRID) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_LIST_ITEM) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_TABLE);
|
8432 |
+
}
|
8433 |
+
}, {
|
8434 |
+
key: 'isInlineBlockOrInlineTable',
|
8435 |
+
value: function isInlineBlockOrInlineTable() {
|
8436 |
+
return (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_BLOCK) || (0, _Util.contains)(this.style.display, _display.DISPLAY.INLINE_TABLE);
|
8437 |
+
}
|
8438 |
+
}]);
|
8439 |
+
|
8440 |
+
return NodeContainer;
|
8441 |
+
}();
|
8442 |
+
|
8443 |
+
exports.default = NodeContainer;
|
8444 |
+
|
8445 |
+
|
8446 |
+
var getImage = function getImage(node, resourceLoader) {
|
8447 |
+
if (node instanceof node.ownerDocument.defaultView.SVGSVGElement || node instanceof SVGSVGElement) {
|
8448 |
+
var s = new XMLSerializer();
|
8449 |
+
return resourceLoader.loadImage('data:image/svg+xml,' + encodeURIComponent(s.serializeToString(node)));
|
8450 |
+
}
|
8451 |
+
switch (node.tagName) {
|
8452 |
+
case 'IMG':
|
8453 |
+
// $FlowFixMe
|
8454 |
+
var img = node;
|
8455 |
+
return resourceLoader.loadImage(img.currentSrc || img.src);
|
8456 |
+
case 'CANVAS':
|
8457 |
+
// $FlowFixMe
|
8458 |
+
var canvas = node;
|
8459 |
+
return resourceLoader.loadCanvas(canvas);
|
8460 |
+
case 'IFRAME':
|
8461 |
+
var iframeKey = node.getAttribute('data-html2canvas-internal-iframe-key');
|
8462 |
+
if (iframeKey) {
|
8463 |
+
return iframeKey;
|
8464 |
}
|
8465 |
+
break;
|
8466 |
+
}
|
|
|
8467 |
|
8468 |
+
return null;
|
8469 |
+
};
|
|
|
|
|
|
|
|
|
8470 |
|
8471 |
+
/***/ }),
|
8472 |
+
/* 4 */
|
8473 |
+
/***/ (function(module, exports, __webpack_require__) {
|
8474 |
|
8475 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
8476 |
|
|
|
|
|
|
|
8477 |
|
8478 |
+
Object.defineProperty(exports, "__esModule", {
|
8479 |
+
value: true
|
8480 |
+
});
|
8481 |
+
var contains = exports.contains = function contains(bit, value) {
|
8482 |
+
return (bit & value) !== 0;
|
8483 |
+
};
|
|
|
|
|
|
|
|
|
8484 |
|
8485 |
+
var distance = exports.distance = function distance(a, b) {
|
8486 |
+
return Math.sqrt(a * a + b * b);
|
8487 |
+
};
|
|
|
8488 |
|
8489 |
+
var copyCSSStyles = exports.copyCSSStyles = function copyCSSStyles(style, target) {
|
8490 |
+
// Edge does not provide value for cssText
|
8491 |
+
for (var i = style.length - 1; i >= 0; i--) {
|
8492 |
+
var property = style.item(i);
|
8493 |
+
// Safari shows pseudoelements if content is set
|
8494 |
+
if (property !== 'content') {
|
8495 |
+
target.style.setProperty(property, style.getPropertyValue(property));
|
8496 |
}
|
|
|
|
|
|
|
8497 |
}
|
8498 |
+
return target;
|
8499 |
+
};
|
8500 |
|
8501 |
+
var SMALL_IMAGE = exports.SMALL_IMAGE = 'data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7';
|
|
|
|
|
|
|
|
|
|
|
|
|
8502 |
|
8503 |
+
/***/ }),
|
8504 |
+
/* 5 */
|
8505 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8506 |
|
8507 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8508 |
|
|
|
|
|
8509 |
|
8510 |
+
Object.defineProperty(exports, "__esModule", {
|
8511 |
+
value: true
|
8512 |
+
});
|
8513 |
+
exports.parseBackgroundImage = exports.parseBackground = exports.calculateBackgroundRepeatPath = exports.calculateBackgroundPosition = exports.calculateBackgroungPositioningArea = exports.calculateBackgroungPaintingArea = exports.calculateGradientBackgroundSize = exports.calculateBackgroundSize = exports.BACKGROUND_ORIGIN = exports.BACKGROUND_CLIP = exports.BACKGROUND_SIZE = exports.BACKGROUND_REPEAT = undefined;
|
8514 |
|
8515 |
+
var _Color = __webpack_require__(0);
|
|
|
|
|
|
|
|
|
|
|
|
|
8516 |
|
8517 |
+
var _Color2 = _interopRequireDefault(_Color);
|
8518 |
|
8519 |
+
var _Length = __webpack_require__(2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8520 |
|
8521 |
+
var _Length2 = _interopRequireDefault(_Length);
|
|
|
8522 |
|
8523 |
+
var _Size = __webpack_require__(31);
|
8524 |
|
8525 |
+
var _Size2 = _interopRequireDefault(_Size);
|
|
|
8526 |
|
8527 |
+
var _Vector = __webpack_require__(7);
|
|
|
|
|
|
|
|
|
|
|
|
|
8528 |
|
8529 |
+
var _Vector2 = _interopRequireDefault(_Vector);
|
8530 |
|
8531 |
+
var _Bounds = __webpack_require__(1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8532 |
|
8533 |
+
var _padding = __webpack_require__(17);
|
8534 |
|
8535 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
8536 |
|
8537 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
|
8538 |
|
8539 |
+
var BACKGROUND_REPEAT = exports.BACKGROUND_REPEAT = {
|
8540 |
+
REPEAT: 0,
|
8541 |
+
NO_REPEAT: 1,
|
8542 |
+
REPEAT_X: 2,
|
8543 |
+
REPEAT_Y: 3
|
8544 |
+
};
|
8545 |
|
8546 |
+
var BACKGROUND_SIZE = exports.BACKGROUND_SIZE = {
|
8547 |
+
AUTO: 0,
|
8548 |
+
CONTAIN: 1,
|
8549 |
+
COVER: 2,
|
8550 |
+
LENGTH: 3
|
8551 |
+
};
|
8552 |
|
8553 |
+
var BACKGROUND_CLIP = exports.BACKGROUND_CLIP = {
|
8554 |
+
BORDER_BOX: 0,
|
8555 |
+
PADDING_BOX: 1,
|
8556 |
+
CONTENT_BOX: 2
|
8557 |
+
};
|
|
|
|
|
|
|
8558 |
|
8559 |
+
var BACKGROUND_ORIGIN = exports.BACKGROUND_ORIGIN = BACKGROUND_CLIP;
|
8560 |
|
8561 |
+
var AUTO = 'auto';
|
8562 |
|
8563 |
+
var BackgroundSize = function BackgroundSize(size) {
|
8564 |
+
_classCallCheck(this, BackgroundSize);
|
8565 |
|
8566 |
+
switch (size) {
|
8567 |
+
case 'contain':
|
8568 |
+
this.size = BACKGROUND_SIZE.CONTAIN;
|
8569 |
+
break;
|
8570 |
+
case 'cover':
|
8571 |
+
this.size = BACKGROUND_SIZE.COVER;
|
8572 |
+
break;
|
8573 |
+
case 'auto':
|
8574 |
+
this.size = BACKGROUND_SIZE.AUTO;
|
8575 |
+
break;
|
8576 |
+
default:
|
8577 |
+
this.value = new _Length2.default(size);
|
8578 |
+
}
|
8579 |
+
};
|
8580 |
|
8581 |
+
var calculateBackgroundSize = exports.calculateBackgroundSize = function calculateBackgroundSize(backgroundImage, image, bounds) {
|
8582 |
+
var width = 0;
|
8583 |
+
var height = 0;
|
8584 |
+
var size = backgroundImage.size;
|
8585 |
+
if (size[0].size === BACKGROUND_SIZE.CONTAIN || size[0].size === BACKGROUND_SIZE.COVER) {
|
8586 |
+
var targetRatio = bounds.width / bounds.height;
|
8587 |
+
var currentRatio = image.width / image.height;
|
8588 |
+
return targetRatio < currentRatio !== (size[0].size === BACKGROUND_SIZE.COVER) ? new _Size2.default(bounds.width, bounds.width / currentRatio) : new _Size2.default(bounds.height * currentRatio, bounds.height);
|
8589 |
+
}
|
8590 |
|
8591 |
+
if (size[0].value) {
|
8592 |
+
width = size[0].value.getAbsoluteValue(bounds.width);
|
8593 |
+
}
|
8594 |
|
8595 |
+
if (size[0].size === BACKGROUND_SIZE.AUTO && size[1].size === BACKGROUND_SIZE.AUTO) {
|
8596 |
+
height = image.height;
|
8597 |
+
} else if (size[1].size === BACKGROUND_SIZE.AUTO) {
|
8598 |
+
height = width / image.width * image.height;
|
8599 |
+
} else if (size[1].value) {
|
8600 |
+
height = size[1].value.getAbsoluteValue(bounds.height);
|
8601 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8602 |
|
8603 |
+
if (size[0].size === BACKGROUND_SIZE.AUTO) {
|
8604 |
+
width = height / image.height * image.width;
|
8605 |
+
}
|
8606 |
|
8607 |
+
return new _Size2.default(width, height);
|
8608 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8609 |
|
8610 |
+
var calculateGradientBackgroundSize = exports.calculateGradientBackgroundSize = function calculateGradientBackgroundSize(backgroundImage, bounds) {
|
8611 |
+
var size = backgroundImage.size;
|
8612 |
+
var width = size[0].value ? size[0].value.getAbsoluteValue(bounds.width) : bounds.width;
|
8613 |
+
var height = size[1].value ? size[1].value.getAbsoluteValue(bounds.height) : size[0].value ? width : bounds.height;
|
|
|
|
|
|
|
|
|
|
|
8614 |
|
8615 |
+
return new _Size2.default(width, height);
|
8616 |
+
};
|
|
|
8617 |
|
8618 |
+
var AUTO_SIZE = new BackgroundSize(AUTO);
|
|
|
8619 |
|
8620 |
+
var calculateBackgroungPaintingArea = exports.calculateBackgroungPaintingArea = function calculateBackgroungPaintingArea(curves, clip) {
|
8621 |
+
switch (clip) {
|
8622 |
+
case BACKGROUND_CLIP.BORDER_BOX:
|
8623 |
+
return (0, _Bounds.calculateBorderBoxPath)(curves);
|
8624 |
+
case BACKGROUND_CLIP.PADDING_BOX:
|
8625 |
+
default:
|
8626 |
+
return (0, _Bounds.calculatePaddingBoxPath)(curves);
|
8627 |
+
}
|
8628 |
+
};
|
8629 |
|
8630 |
+
var calculateBackgroungPositioningArea = exports.calculateBackgroungPositioningArea = function calculateBackgroungPositioningArea(backgroundOrigin, bounds, padding, border) {
|
8631 |
+
var paddingBox = (0, _Bounds.calculatePaddingBox)(bounds, border);
|
8632 |
+
|
8633 |
+
switch (backgroundOrigin) {
|
8634 |
+
case BACKGROUND_ORIGIN.BORDER_BOX:
|
8635 |
+
return bounds;
|
8636 |
+
case BACKGROUND_ORIGIN.CONTENT_BOX:
|
8637 |
+
var paddingLeft = padding[_padding.PADDING_SIDES.LEFT].getAbsoluteValue(bounds.width);
|
8638 |
+
var paddingRight = padding[_padding.PADDING_SIDES.RIGHT].getAbsoluteValue(bounds.width);
|
8639 |
+
var paddingTop = padding[_padding.PADDING_SIDES.TOP].getAbsoluteValue(bounds.width);
|
8640 |
+
var paddingBottom = padding[_padding.PADDING_SIDES.BOTTOM].getAbsoluteValue(bounds.width);
|
8641 |
+
return new _Bounds.Bounds(paddingBox.left + paddingLeft, paddingBox.top + paddingTop, paddingBox.width - paddingLeft - paddingRight, paddingBox.height - paddingTop - paddingBottom);
|
8642 |
+
case BACKGROUND_ORIGIN.PADDING_BOX:
|
8643 |
+
default:
|
8644 |
+
return paddingBox;
|
8645 |
+
}
|
8646 |
+
};
|
8647 |
|
8648 |
+
var calculateBackgroundPosition = exports.calculateBackgroundPosition = function calculateBackgroundPosition(position, size, bounds) {
|
8649 |
+
return new _Vector2.default(position[0].getAbsoluteValue(bounds.width - size.width), position[1].getAbsoluteValue(bounds.height - size.height));
|
8650 |
+
};
|
8651 |
|
8652 |
+
var calculateBackgroundRepeatPath = exports.calculateBackgroundRepeatPath = function calculateBackgroundRepeatPath(background, position, size, backgroundPositioningArea, bounds) {
|
8653 |
+
var repeat = background.repeat;
|
8654 |
+
switch (repeat) {
|
8655 |
+
case BACKGROUND_REPEAT.REPEAT_X:
|
8656 |
+
return [new _Vector2.default(Math.round(bounds.left), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(size.height + backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(bounds.left), Math.round(size.height + backgroundPositioningArea.top + position.y))];
|
8657 |
+
case BACKGROUND_REPEAT.REPEAT_Y:
|
8658 |
+
return [new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(bounds.height + bounds.top)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(bounds.height + bounds.top))];
|
8659 |
+
case BACKGROUND_REPEAT.NO_REPEAT:
|
8660 |
+
return [new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(backgroundPositioningArea.top + position.y)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x + size.width), Math.round(backgroundPositioningArea.top + position.y + size.height)), new _Vector2.default(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y + size.height))];
|
8661 |
+
default:
|
8662 |
+
return [new _Vector2.default(Math.round(bounds.left), Math.round(bounds.top)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(bounds.top)), new _Vector2.default(Math.round(bounds.left + bounds.width), Math.round(bounds.height + bounds.top)), new _Vector2.default(Math.round(bounds.left), Math.round(bounds.height + bounds.top))];
|
8663 |
+
}
|
8664 |
+
};
|
8665 |
|
8666 |
+
var parseBackground = exports.parseBackground = function parseBackground(style, resourceLoader) {
|
8667 |
+
return {
|
8668 |
+
backgroundColor: new _Color2.default(style.backgroundColor),
|
8669 |
+
backgroundImage: parseBackgroundImages(style, resourceLoader),
|
8670 |
+
backgroundClip: parseBackgroundClip(style.backgroundClip),
|
8671 |
+
backgroundOrigin: parseBackgroundOrigin(style.backgroundOrigin)
|
8672 |
+
};
|
8673 |
+
};
|
8674 |
|
8675 |
+
var parseBackgroundClip = function parseBackgroundClip(backgroundClip) {
|
8676 |
+
switch (backgroundClip) {
|
8677 |
+
case 'padding-box':
|
8678 |
+
return BACKGROUND_CLIP.PADDING_BOX;
|
8679 |
+
case 'content-box':
|
8680 |
+
return BACKGROUND_CLIP.CONTENT_BOX;
|
8681 |
+
}
|
8682 |
+
return BACKGROUND_CLIP.BORDER_BOX;
|
8683 |
+
};
|
8684 |
|
8685 |
+
var parseBackgroundOrigin = function parseBackgroundOrigin(backgroundOrigin) {
|
8686 |
+
switch (backgroundOrigin) {
|
8687 |
+
case 'padding-box':
|
8688 |
+
return BACKGROUND_ORIGIN.PADDING_BOX;
|
8689 |
+
case 'content-box':
|
8690 |
+
return BACKGROUND_ORIGIN.CONTENT_BOX;
|
8691 |
+
}
|
8692 |
+
return BACKGROUND_ORIGIN.BORDER_BOX;
|
8693 |
+
};
|
8694 |
|
8695 |
+
var parseBackgroundRepeat = function parseBackgroundRepeat(backgroundRepeat) {
|
8696 |
+
switch (backgroundRepeat.trim()) {
|
8697 |
+
case 'no-repeat':
|
8698 |
+
return BACKGROUND_REPEAT.NO_REPEAT;
|
8699 |
+
case 'repeat-x':
|
8700 |
+
case 'repeat no-repeat':
|
8701 |
+
return BACKGROUND_REPEAT.REPEAT_X;
|
8702 |
+
case 'repeat-y':
|
8703 |
+
case 'no-repeat repeat':
|
8704 |
+
return BACKGROUND_REPEAT.REPEAT_Y;
|
8705 |
+
case 'repeat':
|
8706 |
+
return BACKGROUND_REPEAT.REPEAT;
|
8707 |
+
}
|
8708 |
|
8709 |
+
if (true) {
|
8710 |
+
console.error('Invalid background-repeat value "' + backgroundRepeat + '"');
|
8711 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
8712 |
|
8713 |
+
return BACKGROUND_REPEAT.REPEAT;
|
8714 |
+
};
|
8715 |
+
|
8716 |
+
var parseBackgroundImages = function parseBackgroundImages(style, resourceLoader) {
|
8717 |
+
var sources = parseBackgroundImage(style.backgroundImage).map(function (backgroundImage) {
|
8718 |
+
if (backgroundImage.method === 'url') {
|
8719 |
+
var key = resourceLoader.loadImage(backgroundImage.args[0]);
|
8720 |
+
backgroundImage.args = key ? [key] : [];
|
8721 |
+
}
|
8722 |
+
return backgroundImage;
|
8723 |
+
});
|
8724 |
+
var positions = style.backgroundPosition.split(',');
|
8725 |
+
var repeats = style.backgroundRepeat.split(',');
|
8726 |
+
var sizes = style.backgroundSize.split(',');
|
8727 |
+
|
8728 |
+
return sources.map(function (source, index) {
|
8729 |
+
var size = (sizes[index] || AUTO).trim().split(' ').map(parseBackgroundSize);
|
8730 |
+
var position = (positions[index] || AUTO).trim().split(' ').map(parseBackgoundPosition);
|
8731 |
+
|
8732 |
+
return {
|
8733 |
+
source: source,
|
8734 |
+
repeat: parseBackgroundRepeat(typeof repeats[index] === 'string' ? repeats[index] : repeats[0]),
|
8735 |
+
size: size.length < 2 ? [size[0], AUTO_SIZE] : [size[0], size[1]],
|
8736 |
+
position: position.length < 2 ? [position[0], position[0]] : [position[0], position[1]]
|
8737 |
+
};
|
8738 |
+
});
|
8739 |
+
};
|
8740 |
+
|
8741 |
+
var parseBackgroundSize = function parseBackgroundSize(size) {
|
8742 |
+
return size === 'auto' ? AUTO_SIZE : new BackgroundSize(size);
|
8743 |
+
};
|
8744 |
+
|
8745 |
+
var parseBackgoundPosition = function parseBackgoundPosition(position) {
|
8746 |
+
switch (position) {
|
8747 |
+
case 'bottom':
|
8748 |
+
case 'right':
|
8749 |
+
return new _Length2.default('100%');
|
8750 |
+
case 'left':
|
8751 |
+
case 'top':
|
8752 |
+
return new _Length2.default('0%');
|
8753 |
+
case 'auto':
|
8754 |
+
return new _Length2.default('0');
|
8755 |
+
}
|
8756 |
+
return new _Length2.default(position);
|
8757 |
+
};
|
8758 |
+
|
8759 |
+
var parseBackgroundImage = exports.parseBackgroundImage = function parseBackgroundImage(image) {
|
8760 |
+
var whitespace = /^\s$/;
|
8761 |
+
var results = [];
|
8762 |
+
|
8763 |
+
var args = [];
|
8764 |
+
var method = '';
|
8765 |
+
var quote = null;
|
8766 |
+
var definition = '';
|
8767 |
+
var mode = 0;
|
8768 |
+
var numParen = 0;
|
8769 |
+
|
8770 |
+
var appendResult = function appendResult() {
|
8771 |
+
var prefix = '';
|
8772 |
+
if (method) {
|
8773 |
+
if (definition.substr(0, 1) === '"') {
|
8774 |
+
definition = definition.substr(1, definition.length - 2);
|
8775 |
+
}
|
8776 |
+
|
8777 |
+
if (definition) {
|
8778 |
+
args.push(definition.trim());
|
8779 |
+
}
|
8780 |
+
|
8781 |
+
var prefix_i = method.indexOf('-', 1) + 1;
|
8782 |
+
if (method.substr(0, 1) === '-' && prefix_i > 0) {
|
8783 |
+
prefix = method.substr(0, prefix_i).toLowerCase();
|
8784 |
+
method = method.substr(prefix_i);
|
8785 |
+
}
|
8786 |
+
method = method.toLowerCase();
|
8787 |
+
if (method !== 'none') {
|
8788 |
+
results.push({
|
8789 |
+
prefix: prefix,
|
8790 |
+
method: method,
|
8791 |
+
args: args
|
8792 |
+
});
|
8793 |
+
}
|
8794 |
+
}
|
8795 |
+
args = [];
|
8796 |
+
method = definition = '';
|
8797 |
};
|
8798 |
|
8799 |
+
image.split('').forEach(function (c) {
|
8800 |
+
if (mode === 0 && whitespace.test(c)) {
|
8801 |
+
return;
|
8802 |
+
}
|
8803 |
+
switch (c) {
|
8804 |
+
case '"':
|
8805 |
+
if (!quote) {
|
8806 |
+
quote = c;
|
8807 |
+
} else if (quote === c) {
|
8808 |
+
quote = null;
|
8809 |
+
}
|
8810 |
+
break;
|
8811 |
+
case '(':
|
8812 |
+
if (quote) {
|
8813 |
+
break;
|
8814 |
+
} else if (mode === 0) {
|
8815 |
+
mode = 1;
|
8816 |
+
return;
|
8817 |
+
} else {
|
8818 |
+
numParen++;
|
8819 |
+
}
|
8820 |
+
break;
|
8821 |
+
case ')':
|
8822 |
+
if (quote) {
|
8823 |
+
break;
|
8824 |
+
} else if (mode === 1) {
|
8825 |
+
if (numParen === 0) {
|
8826 |
+
mode = 0;
|
8827 |
+
appendResult();
|
8828 |
+
return;
|
8829 |
+
} else {
|
8830 |
+
numParen--;
|
8831 |
+
}
|
8832 |
+
}
|
8833 |
+
break;
|
8834 |
+
|
8835 |
+
case ',':
|
8836 |
+
if (quote) {
|
8837 |
+
break;
|
8838 |
+
} else if (mode === 0) {
|
8839 |
+
appendResult();
|
8840 |
+
return;
|
8841 |
+
} else if (mode === 1) {
|
8842 |
+
if (numParen === 0 && !method.match(/^url$/i)) {
|
8843 |
+
args.push(definition.trim());
|
8844 |
+
definition = '';
|
8845 |
+
return;
|
8846 |
+
}
|
8847 |
+
}
|
8848 |
+
break;
|
8849 |
+
}
|
8850 |
+
|
8851 |
+
if (mode === 0) {
|
8852 |
+
method += c;
|
8853 |
+
} else {
|
8854 |
+
definition += c;
|
8855 |
+
}
|
8856 |
+
});
|
8857 |
+
|
8858 |
+
appendResult();
|
8859 |
+
return results;
|
8860 |
+
};
|
8861 |
+
|
8862 |
+
/***/ }),
|
8863 |
+
/* 6 */
|
8864 |
+
/***/ (function(module, exports, __webpack_require__) {
|
8865 |
+
|
8866 |
+
"use strict";
|
8867 |
+
|
8868 |
+
|
8869 |
+
Object.defineProperty(exports, "__esModule", {
|
8870 |
+
value: true
|
8871 |
+
});
|
8872 |
+
var PATH = exports.PATH = {
|
8873 |
+
VECTOR: 0,
|
8874 |
+
BEZIER_CURVE: 1,
|
8875 |
+
CIRCLE: 2
|
8876 |
+
};
|
8877 |
+
|
8878 |
+
/***/ }),
|
8879 |
+
/* 7 */
|
8880 |
+
/***/ (function(module, exports, __webpack_require__) {
|
8881 |
+
|
8882 |
+
"use strict";
|
8883 |
+
|
8884 |
+
|
8885 |
+
Object.defineProperty(exports, "__esModule", {
|
8886 |
+
value: true
|
8887 |
+
});
|
8888 |
+
|
8889 |
+
var _Path = __webpack_require__(6);
|
8890 |
+
|
8891 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
8892 |
+
|
8893 |
+
var Vector = function Vector(x, y) {
|
8894 |
+
_classCallCheck(this, Vector);
|
8895 |
+
|
8896 |
+
this.type = _Path.PATH.VECTOR;
|
8897 |
+
this.x = x;
|
8898 |
+
this.y = y;
|
8899 |
+
if (true) {
|
8900 |
+
if (isNaN(x)) {
|
8901 |
+
console.error('Invalid x value given for Vector');
|
8902 |
+
}
|
8903 |
+
if (isNaN(y)) {
|
8904 |
+
console.error('Invalid y value given for Vector');
|
8905 |
+
}
|
8906 |
+
}
|
8907 |
+
};
|
8908 |
+
|
8909 |
+
exports.default = Vector;
|
8910 |
+
|
8911 |
+
/***/ }),
|
8912 |
+
/* 8 */
|
8913 |
+
/***/ (function(module, exports, __webpack_require__) {
|
8914 |
+
|
8915 |
+
"use strict";
|
8916 |
+
|
8917 |
+
|
8918 |
+
Object.defineProperty(exports, "__esModule", {
|
8919 |
+
value: true
|
8920 |
+
});
|
8921 |
+
exports.parseListStyle = exports.parseListStyleType = exports.LIST_STYLE_TYPE = exports.LIST_STYLE_POSITION = undefined;
|
8922 |
+
|
8923 |
+
var _background = __webpack_require__(5);
|
8924 |
+
|
8925 |
+
var LIST_STYLE_POSITION = exports.LIST_STYLE_POSITION = {
|
8926 |
+
INSIDE: 0,
|
8927 |
+
OUTSIDE: 1
|
8928 |
+
};
|
8929 |
+
|
8930 |
+
var LIST_STYLE_TYPE = exports.LIST_STYLE_TYPE = {
|
8931 |
+
NONE: -1,
|
8932 |
+
DISC: 0,
|
8933 |
+
CIRCLE: 1,
|
8934 |
+
SQUARE: 2,
|
8935 |
+
DECIMAL: 3,
|
8936 |
+
CJK_DECIMAL: 4,
|
8937 |
+
DECIMAL_LEADING_ZERO: 5,
|
8938 |
+
LOWER_ROMAN: 6,
|
8939 |
+
UPPER_ROMAN: 7,
|
8940 |
+
LOWER_GREEK: 8,
|
8941 |
+
LOWER_ALPHA: 9,
|
8942 |
+
UPPER_ALPHA: 10,
|
8943 |
+
ARABIC_INDIC: 11,
|
8944 |
+
ARMENIAN: 12,
|
8945 |
+
BENGALI: 13,
|
8946 |
+
CAMBODIAN: 14,
|
8947 |
+
CJK_EARTHLY_BRANCH: 15,
|
8948 |
+
CJK_HEAVENLY_STEM: 16,
|
8949 |
+
CJK_IDEOGRAPHIC: 17,
|
8950 |
+
DEVANAGARI: 18,
|
8951 |
+
ETHIOPIC_NUMERIC: 19,
|
8952 |
+
GEORGIAN: 20,
|
8953 |
+
GUJARATI: 21,
|
8954 |
+
GURMUKHI: 22,
|
8955 |
+
HEBREW: 22,
|
8956 |
+
HIRAGANA: 23,
|
8957 |
+
HIRAGANA_IROHA: 24,
|
8958 |
+
JAPANESE_FORMAL: 25,
|
8959 |
+
JAPANESE_INFORMAL: 26,
|
8960 |
+
KANNADA: 27,
|
8961 |
+
KATAKANA: 28,
|
8962 |
+
KATAKANA_IROHA: 29,
|
8963 |
+
KHMER: 30,
|
8964 |
+
KOREAN_HANGUL_FORMAL: 31,
|
8965 |
+
KOREAN_HANJA_FORMAL: 32,
|
8966 |
+
KOREAN_HANJA_INFORMAL: 33,
|
8967 |
+
LAO: 34,
|
8968 |
+
LOWER_ARMENIAN: 35,
|
8969 |
+
MALAYALAM: 36,
|
8970 |
+
MONGOLIAN: 37,
|
8971 |
+
MYANMAR: 38,
|
8972 |
+
ORIYA: 39,
|
8973 |
+
PERSIAN: 40,
|
8974 |
+
SIMP_CHINESE_FORMAL: 41,
|
8975 |
+
SIMP_CHINESE_INFORMAL: 42,
|
8976 |
+
TAMIL: 43,
|
8977 |
+
TELUGU: 44,
|
8978 |
+
THAI: 45,
|
8979 |
+
TIBETAN: 46,
|
8980 |
+
TRAD_CHINESE_FORMAL: 47,
|
8981 |
+
TRAD_CHINESE_INFORMAL: 48,
|
8982 |
+
UPPER_ARMENIAN: 49,
|
8983 |
+
DISCLOSURE_OPEN: 50,
|
8984 |
+
DISCLOSURE_CLOSED: 51
|
8985 |
+
};
|
8986 |
+
|
8987 |
+
var parseListStyleType = exports.parseListStyleType = function parseListStyleType(type) {
|
8988 |
+
switch (type) {
|
8989 |
+
case 'disc':
|
8990 |
+
return LIST_STYLE_TYPE.DISC;
|
8991 |
+
case 'circle':
|
8992 |
+
return LIST_STYLE_TYPE.CIRCLE;
|
8993 |
+
case 'square':
|
8994 |
+
return LIST_STYLE_TYPE.SQUARE;
|
8995 |
+
case 'decimal':
|
8996 |
+
return LIST_STYLE_TYPE.DECIMAL;
|
8997 |
+
case 'cjk-decimal':
|
8998 |
+
return LIST_STYLE_TYPE.CJK_DECIMAL;
|
8999 |
+
case 'decimal-leading-zero':
|
9000 |
+
return LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO;
|
9001 |
+
case 'lower-roman':
|
9002 |
+
return LIST_STYLE_TYPE.LOWER_ROMAN;
|
9003 |
+
case 'upper-roman':
|
9004 |
+
return LIST_STYLE_TYPE.UPPER_ROMAN;
|
9005 |
+
case 'lower-greek':
|
9006 |
+
return LIST_STYLE_TYPE.LOWER_GREEK;
|
9007 |
+
case 'lower-alpha':
|
9008 |
+
return LIST_STYLE_TYPE.LOWER_ALPHA;
|
9009 |
+
case 'upper-alpha':
|
9010 |
+
return LIST_STYLE_TYPE.UPPER_ALPHA;
|
9011 |
+
case 'arabic-indic':
|
9012 |
+
return LIST_STYLE_TYPE.ARABIC_INDIC;
|
9013 |
+
case 'armenian':
|
9014 |
+
return LIST_STYLE_TYPE.ARMENIAN;
|
9015 |
+
case 'bengali':
|
9016 |
+
return LIST_STYLE_TYPE.BENGALI;
|
9017 |
+
case 'cambodian':
|
9018 |
+
return LIST_STYLE_TYPE.CAMBODIAN;
|
9019 |
+
case 'cjk-earthly-branch':
|
9020 |
+
return LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH;
|
9021 |
+
case 'cjk-heavenly-stem':
|
9022 |
+
return LIST_STYLE_TYPE.CJK_HEAVENLY_STEM;
|
9023 |
+
case 'cjk-ideographic':
|
9024 |
+
return LIST_STYLE_TYPE.CJK_IDEOGRAPHIC;
|
9025 |
+
case 'devanagari':
|
9026 |
+
return LIST_STYLE_TYPE.DEVANAGARI;
|
9027 |
+
case 'ethiopic-numeric':
|
9028 |
+
return LIST_STYLE_TYPE.ETHIOPIC_NUMERIC;
|
9029 |
+
case 'georgian':
|
9030 |
+
return LIST_STYLE_TYPE.GEORGIAN;
|
9031 |
+
case 'gujarati':
|
9032 |
+
return LIST_STYLE_TYPE.GUJARATI;
|
9033 |
+
case 'gurmukhi':
|
9034 |
+
return LIST_STYLE_TYPE.GURMUKHI;
|
9035 |
+
case 'hebrew':
|
9036 |
+
return LIST_STYLE_TYPE.HEBREW;
|
9037 |
+
case 'hiragana':
|
9038 |
+
return LIST_STYLE_TYPE.HIRAGANA;
|
9039 |
+
case 'hiragana-iroha':
|
9040 |
+
return LIST_STYLE_TYPE.HIRAGANA_IROHA;
|
9041 |
+
case 'japanese-formal':
|
9042 |
+
return LIST_STYLE_TYPE.JAPANESE_FORMAL;
|
9043 |
+
case 'japanese-informal':
|
9044 |
+
return LIST_STYLE_TYPE.JAPANESE_INFORMAL;
|
9045 |
+
case 'kannada':
|
9046 |
+
return LIST_STYLE_TYPE.KANNADA;
|
9047 |
+
case 'katakana':
|
9048 |
+
return LIST_STYLE_TYPE.KATAKANA;
|
9049 |
+
case 'katakana-iroha':
|
9050 |
+
return LIST_STYLE_TYPE.KATAKANA_IROHA;
|
9051 |
+
case 'khmer':
|
9052 |
+
return LIST_STYLE_TYPE.KHMER;
|
9053 |
+
case 'korean-hangul-formal':
|
9054 |
+
return LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL;
|
9055 |
+
case 'korean-hanja-formal':
|
9056 |
+
return LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL;
|
9057 |
+
case 'korean-hanja-informal':
|
9058 |
+
return LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL;
|
9059 |
+
case 'lao':
|
9060 |
+
return LIST_STYLE_TYPE.LAO;
|
9061 |
+
case 'lower-armenian':
|
9062 |
+
return LIST_STYLE_TYPE.LOWER_ARMENIAN;
|
9063 |
+
case 'malayalam':
|
9064 |
+
return LIST_STYLE_TYPE.MALAYALAM;
|
9065 |
+
case 'mongolian':
|
9066 |
+
return LIST_STYLE_TYPE.MONGOLIAN;
|
9067 |
+
case 'myanmar':
|
9068 |
+
return LIST_STYLE_TYPE.MYANMAR;
|
9069 |
+
case 'oriya':
|
9070 |
+
return LIST_STYLE_TYPE.ORIYA;
|
9071 |
+
case 'persian':
|
9072 |
+
return LIST_STYLE_TYPE.PERSIAN;
|
9073 |
+
case 'simp-chinese-formal':
|
9074 |
+
return LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL;
|
9075 |
+
case 'simp-chinese-informal':
|
9076 |
+
return LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL;
|
9077 |
+
case 'tamil':
|
9078 |
+
return LIST_STYLE_TYPE.TAMIL;
|
9079 |
+
case 'telugu':
|
9080 |
+
return LIST_STYLE_TYPE.TELUGU;
|
9081 |
+
case 'thai':
|
9082 |
+
return LIST_STYLE_TYPE.THAI;
|
9083 |
+
case 'tibetan':
|
9084 |
+
return LIST_STYLE_TYPE.TIBETAN;
|
9085 |
+
case 'trad-chinese-formal':
|
9086 |
+
return LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL;
|
9087 |
+
case 'trad-chinese-informal':
|
9088 |
+
return LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL;
|
9089 |
+
case 'upper-armenian':
|
9090 |
+
return LIST_STYLE_TYPE.UPPER_ARMENIAN;
|
9091 |
+
case 'disclosure-open':
|
9092 |
+
return LIST_STYLE_TYPE.DISCLOSURE_OPEN;
|
9093 |
+
case 'disclosure-closed':
|
9094 |
+
return LIST_STYLE_TYPE.DISCLOSURE_CLOSED;
|
9095 |
+
case 'none':
|
9096 |
+
default:
|
9097 |
+
return LIST_STYLE_TYPE.NONE;
|
9098 |
+
}
|
9099 |
+
};
|
9100 |
+
|
9101 |
+
var parseListStyle = exports.parseListStyle = function parseListStyle(style) {
|
9102 |
+
var listStyleImage = (0, _background.parseBackgroundImage)(style.getPropertyValue('list-style-image'));
|
9103 |
+
return {
|
9104 |
+
listStyleType: parseListStyleType(style.getPropertyValue('list-style-type')),
|
9105 |
+
listStyleImage: listStyleImage.length ? listStyleImage[0] : null,
|
9106 |
+
listStylePosition: parseListStylePosition(style.getPropertyValue('list-style-position'))
|
9107 |
};
|
9108 |
+
};
|
9109 |
|
9110 |
+
var parseListStylePosition = function parseListStylePosition(position) {
|
9111 |
+
switch (position) {
|
9112 |
+
case 'inside':
|
9113 |
+
return LIST_STYLE_POSITION.INSIDE;
|
9114 |
+
case 'outside':
|
9115 |
+
default:
|
9116 |
+
return LIST_STYLE_POSITION.OUTSIDE;
|
9117 |
}
|
9118 |
+
};
|
|
|
|
|
|
|
9119 |
|
9120 |
+
/***/ }),
|
9121 |
+
/* 9 */
|
9122 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9123 |
|
9124 |
+
"use strict";
|
9125 |
+
|
9126 |
+
|
9127 |
+
Object.defineProperty(exports, "__esModule", {
|
9128 |
+
value: true
|
9129 |
+
});
|
9130 |
+
|
9131 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9132 |
+
|
9133 |
+
var _textTransform = __webpack_require__(20);
|
9134 |
+
|
9135 |
+
var _TextBounds = __webpack_require__(22);
|
9136 |
+
|
9137 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9138 |
+
|
9139 |
+
var TextContainer = function () {
|
9140 |
+
function TextContainer(text, parent, bounds) {
|
9141 |
+
_classCallCheck(this, TextContainer);
|
9142 |
+
|
9143 |
+
this.text = text;
|
9144 |
+
this.parent = parent;
|
9145 |
+
this.bounds = bounds;
|
9146 |
}
|
9147 |
+
|
9148 |
+
_createClass(TextContainer, null, [{
|
9149 |
+
key: 'fromTextNode',
|
9150 |
+
value: function fromTextNode(node, parent) {
|
9151 |
+
var text = transform(node.data, parent.style.textTransform);
|
9152 |
+
return new TextContainer(text, parent, (0, _TextBounds.parseTextBounds)(text, parent, node));
|
|
|
|
|
|
|
9153 |
}
|
9154 |
+
}]);
|
9155 |
+
|
9156 |
+
return TextContainer;
|
9157 |
+
}();
|
9158 |
+
|
9159 |
+
exports.default = TextContainer;
|
9160 |
+
|
9161 |
+
|
9162 |
+
var CAPITALIZE = /(^|\s|:|-|\(|\))([a-z])/g;
|
9163 |
+
|
9164 |
+
var transform = function transform(text, _transform) {
|
9165 |
+
switch (_transform) {
|
9166 |
+
case _textTransform.TEXT_TRANSFORM.LOWERCASE:
|
9167 |
+
return text.toLowerCase();
|
9168 |
+
case _textTransform.TEXT_TRANSFORM.CAPITALIZE:
|
9169 |
+
return text.replace(CAPITALIZE, capitalize);
|
9170 |
+
case _textTransform.TEXT_TRANSFORM.UPPERCASE:
|
9171 |
+
return text.toUpperCase();
|
9172 |
+
default:
|
9173 |
+
return text;
|
9174 |
}
|
9175 |
+
};
|
9176 |
+
|
9177 |
+
function capitalize(m, p1, p2) {
|
9178 |
+
if (m.length > 0) {
|
9179 |
+
return p1 + p2.toUpperCase();
|
9180 |
+
}
|
9181 |
+
|
9182 |
+
return m;
|
9183 |
}
|
9184 |
+
|
9185 |
+
/***/ }),
|
9186 |
+
/* 10 */
|
9187 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9188 |
+
|
9189 |
+
"use strict";
|
9190 |
+
|
9191 |
+
|
9192 |
+
Object.defineProperty(exports, "__esModule", {
|
9193 |
+
value: true
|
9194 |
+
});
|
9195 |
+
|
9196 |
+
var _ForeignObjectRenderer = __webpack_require__(23);
|
9197 |
+
|
9198 |
+
var testRangeBounds = function testRangeBounds(document) {
|
9199 |
+
var TEST_HEIGHT = 123;
|
9200 |
+
|
9201 |
+
if (document.createRange) {
|
9202 |
+
var range = document.createRange();
|
9203 |
+
if (range.getBoundingClientRect) {
|
9204 |
+
var testElement = document.createElement('boundtest');
|
9205 |
+
testElement.style.height = TEST_HEIGHT + 'px';
|
9206 |
+
testElement.style.display = 'block';
|
9207 |
+
document.body.appendChild(testElement);
|
9208 |
+
|
9209 |
+
range.selectNode(testElement);
|
9210 |
+
var rangeBounds = range.getBoundingClientRect();
|
9211 |
+
var rangeHeight = Math.round(rangeBounds.height);
|
9212 |
+
document.body.removeChild(testElement);
|
9213 |
+
if (rangeHeight === TEST_HEIGHT) {
|
9214 |
+
return true;
|
9215 |
+
}
|
9216 |
+
}
|
9217 |
}
|
9218 |
+
|
9219 |
+
return false;
|
9220 |
};
|
9221 |
|
9222 |
+
// iOS 10.3 taints canvas with base64 images unless crossOrigin = 'anonymous'
|
9223 |
+
var testBase64 = function testBase64(document, src) {
|
9224 |
+
var img = new Image();
|
9225 |
+
var canvas = document.createElement('canvas');
|
9226 |
+
var ctx = canvas.getContext('2d');
|
9227 |
+
|
9228 |
+
return new Promise(function (resolve) {
|
9229 |
+
// Single pixel base64 image renders fine on iOS 10.3???
|
9230 |
+
img.src = src;
|
9231 |
+
|
9232 |
+
var onload = function onload() {
|
9233 |
+
try {
|
9234 |
+
ctx.drawImage(img, 0, 0);
|
9235 |
+
canvas.toDataURL();
|
9236 |
+
} catch (e) {
|
9237 |
+
return resolve(false);
|
9238 |
+
}
|
9239 |
|
9240 |
+
return resolve(true);
|
9241 |
+
};
|
9242 |
|
9243 |
+
img.onload = onload;
|
9244 |
+
img.onerror = function () {
|
9245 |
+
return resolve(false);
|
9246 |
+
};
|
|
|
|
|
|
|
9247 |
|
9248 |
+
if (img.complete === true) {
|
9249 |
+
setTimeout(function () {
|
9250 |
+
onload();
|
9251 |
+
}, 500);
|
9252 |
+
}
|
9253 |
+
});
|
9254 |
};
|
9255 |
|
9256 |
+
var testCORS = function testCORS() {
|
9257 |
+
return typeof new Image().crossOrigin !== 'undefined';
|
|
|
|
|
9258 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9259 |
|
9260 |
+
var testResponseType = function testResponseType() {
|
9261 |
+
return typeof new XMLHttpRequest().responseType === 'string';
|
9262 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9263 |
|
9264 |
+
var testSVG = function testSVG(document) {
|
9265 |
+
var img = new Image();
|
9266 |
+
var canvas = document.createElement('canvas');
|
9267 |
+
var ctx = canvas.getContext('2d');
|
9268 |
+
img.src = 'data:image/svg+xml,<svg xmlns=\'http://www.w3.org/2000/svg\'></svg>';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9269 |
|
9270 |
+
try {
|
9271 |
+
ctx.drawImage(img, 0, 0);
|
9272 |
+
canvas.toDataURL();
|
9273 |
+
} catch (e) {
|
9274 |
+
return false;
|
9275 |
+
}
|
9276 |
+
return true;
|
9277 |
+
};
|
|
|
|
|
|
|
|
|
9278 |
|
9279 |
+
var isGreenPixel = function isGreenPixel(data) {
|
9280 |
+
return data[0] === 0 && data[1] === 255 && data[2] === 0 && data[3] === 255;
|
9281 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9282 |
|
9283 |
+
var testForeignObject = function testForeignObject(document) {
|
9284 |
+
var canvas = document.createElement('canvas');
|
9285 |
+
var size = 100;
|
9286 |
+
canvas.width = size;
|
9287 |
+
canvas.height = size;
|
9288 |
+
var ctx = canvas.getContext('2d');
|
9289 |
+
ctx.fillStyle = 'rgb(0, 255, 0)';
|
9290 |
+
ctx.fillRect(0, 0, size, size);
|
9291 |
+
|
9292 |
+
var img = new Image();
|
9293 |
+
var greenImageSrc = canvas.toDataURL();
|
9294 |
+
img.src = greenImageSrc;
|
9295 |
+
var svg = (0, _ForeignObjectRenderer.createForeignObjectSVG)(size, size, 0, 0, img);
|
9296 |
+
ctx.fillStyle = 'red';
|
9297 |
+
ctx.fillRect(0, 0, size, size);
|
9298 |
+
|
9299 |
+
return (0, _ForeignObjectRenderer.loadSerializedSVG)(svg).then(function (img) {
|
9300 |
+
ctx.drawImage(img, 0, 0);
|
9301 |
+
var data = ctx.getImageData(0, 0, size, size).data;
|
9302 |
+
ctx.fillStyle = 'red';
|
9303 |
+
ctx.fillRect(0, 0, size, size);
|
9304 |
+
|
9305 |
+
var node = document.createElement('div');
|
9306 |
+
node.style.backgroundImage = 'url(' + greenImageSrc + ')';
|
9307 |
+
node.style.height = size + 'px';
|
9308 |
+
// Firefox 55 does not render inline <img /> tags
|
9309 |
+
return isGreenPixel(data) ? (0, _ForeignObjectRenderer.loadSerializedSVG)((0, _ForeignObjectRenderer.createForeignObjectSVG)(size, size, 0, 0, node)) : Promise.reject(false);
|
9310 |
+
}).then(function (img) {
|
9311 |
+
ctx.drawImage(img, 0, 0);
|
9312 |
+
// Edge does not render background-images
|
9313 |
+
return isGreenPixel(ctx.getImageData(0, 0, size, size).data);
|
9314 |
+
}).catch(function (e) {
|
9315 |
+
return false;
|
9316 |
+
});
|
9317 |
+
};
|
9318 |
|
9319 |
+
var FEATURES = {
|
9320 |
+
// $FlowFixMe - get/set properties not yet supported
|
9321 |
+
get SUPPORT_RANGE_BOUNDS() {
|
9322 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9323 |
|
9324 |
+
var value = testRangeBounds(document);
|
9325 |
+
Object.defineProperty(FEATURES, 'SUPPORT_RANGE_BOUNDS', { value: value });
|
9326 |
+
return value;
|
9327 |
+
},
|
9328 |
+
// $FlowFixMe - get/set properties not yet supported
|
9329 |
+
get SUPPORT_SVG_DRAWING() {
|
9330 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9331 |
|
9332 |
+
var value = testSVG(document);
|
9333 |
+
Object.defineProperty(FEATURES, 'SUPPORT_SVG_DRAWING', { value: value });
|
9334 |
+
return value;
|
9335 |
+
},
|
9336 |
+
// $FlowFixMe - get/set properties not yet supported
|
9337 |
+
get SUPPORT_BASE64_DRAWING() {
|
9338 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9339 |
|
9340 |
+
return function (src) {
|
9341 |
+
var _value = testBase64(document, src);
|
9342 |
+
Object.defineProperty(FEATURES, 'SUPPORT_BASE64_DRAWING', { value: function value() {
|
9343 |
+
return _value;
|
9344 |
+
} });
|
9345 |
+
return _value;
|
9346 |
+
};
|
9347 |
+
},
|
9348 |
+
// $FlowFixMe - get/set properties not yet supported
|
9349 |
+
get SUPPORT_FOREIGNOBJECT_DRAWING() {
|
9350 |
+
'use strict';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9351 |
|
9352 |
+
var value = typeof Array.from === 'function' && typeof window.fetch === 'function' ? testForeignObject(document) : Promise.resolve(false);
|
9353 |
+
Object.defineProperty(FEATURES, 'SUPPORT_FOREIGNOBJECT_DRAWING', { value: value });
|
9354 |
+
return value;
|
9355 |
+
},
|
9356 |
+
// $FlowFixMe - get/set properties not yet supported
|
9357 |
+
get SUPPORT_CORS_IMAGES() {
|
9358 |
+
'use strict';
|
9359 |
|
9360 |
+
var value = testCORS();
|
9361 |
+
Object.defineProperty(FEATURES, 'SUPPORT_CORS_IMAGES', { value: value });
|
9362 |
+
return value;
|
9363 |
+
},
|
9364 |
+
// $FlowFixMe - get/set properties not yet supported
|
9365 |
+
get SUPPORT_RESPONSE_TYPE() {
|
9366 |
+
'use strict';
|
9367 |
|
9368 |
+
var value = testResponseType();
|
9369 |
+
Object.defineProperty(FEATURES, 'SUPPORT_RESPONSE_TYPE', { value: value });
|
9370 |
+
return value;
|
9371 |
+
},
|
9372 |
+
// $FlowFixMe - get/set properties not yet supported
|
9373 |
+
get SUPPORT_CORS_XHR() {
|
9374 |
+
'use strict';
|
9375 |
|
9376 |
+
var value = 'withCredentials' in new XMLHttpRequest();
|
9377 |
+
Object.defineProperty(FEATURES, 'SUPPORT_CORS_XHR', { value: value });
|
9378 |
+
return value;
|
9379 |
+
}
|
9380 |
+
};
|
|
|
9381 |
|
9382 |
+
exports.default = FEATURES;
|
|
|
|
|
9383 |
|
9384 |
+
/***/ }),
|
9385 |
+
/* 11 */
|
9386 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9387 |
|
9388 |
+
"use strict";
|
|
|
|
|
9389 |
|
|
|
|
|
9390 |
|
9391 |
+
Object.defineProperty(exports, "__esModule", {
|
9392 |
+
value: true
|
9393 |
+
});
|
9394 |
+
exports.parseTextDecoration = exports.TEXT_DECORATION_LINE = exports.TEXT_DECORATION = exports.TEXT_DECORATION_STYLE = undefined;
|
9395 |
|
9396 |
+
var _Color = __webpack_require__(0);
|
|
|
|
|
|
|
9397 |
|
9398 |
+
var _Color2 = _interopRequireDefault(_Color);
|
9399 |
|
9400 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9401 |
|
9402 |
+
var TEXT_DECORATION_STYLE = exports.TEXT_DECORATION_STYLE = {
|
9403 |
+
SOLID: 0,
|
9404 |
+
DOUBLE: 1,
|
9405 |
+
DOTTED: 2,
|
9406 |
+
DASHED: 3,
|
9407 |
+
WAVY: 4
|
9408 |
+
};
|
9409 |
|
9410 |
+
var TEXT_DECORATION = exports.TEXT_DECORATION = {
|
9411 |
+
NONE: null
|
9412 |
+
};
|
|
|
|
|
9413 |
|
9414 |
+
var TEXT_DECORATION_LINE = exports.TEXT_DECORATION_LINE = {
|
9415 |
+
UNDERLINE: 1,
|
9416 |
+
OVERLINE: 2,
|
9417 |
+
LINE_THROUGH: 3,
|
9418 |
+
BLINK: 4
|
9419 |
+
};
|
9420 |
|
9421 |
+
var parseLine = function parseLine(line) {
|
9422 |
+
switch (line) {
|
9423 |
+
case 'underline':
|
9424 |
+
return TEXT_DECORATION_LINE.UNDERLINE;
|
9425 |
+
case 'overline':
|
9426 |
+
return TEXT_DECORATION_LINE.OVERLINE;
|
9427 |
+
case 'line-through':
|
9428 |
+
return TEXT_DECORATION_LINE.LINE_THROUGH;
|
9429 |
+
}
|
9430 |
+
return TEXT_DECORATION_LINE.BLINK;
|
9431 |
+
};
|
9432 |
|
9433 |
+
var parseTextDecorationLine = function parseTextDecorationLine(line) {
|
9434 |
+
if (line === 'none') {
|
9435 |
+
return null;
|
9436 |
+
}
|
9437 |
|
9438 |
+
return line.split(' ').map(parseLine);
|
9439 |
+
};
|
9440 |
|
9441 |
+
var parseTextDecorationStyle = function parseTextDecorationStyle(style) {
|
9442 |
+
switch (style) {
|
9443 |
+
case 'double':
|
9444 |
+
return TEXT_DECORATION_STYLE.DOUBLE;
|
9445 |
+
case 'dotted':
|
9446 |
+
return TEXT_DECORATION_STYLE.DOTTED;
|
9447 |
+
case 'dashed':
|
9448 |
+
return TEXT_DECORATION_STYLE.DASHED;
|
9449 |
+
case 'wavy':
|
9450 |
+
return TEXT_DECORATION_STYLE.WAVY;
|
9451 |
+
}
|
9452 |
+
return TEXT_DECORATION_STYLE.SOLID;
|
9453 |
+
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9454 |
|
9455 |
+
var parseTextDecoration = exports.parseTextDecoration = function parseTextDecoration(style) {
|
9456 |
+
var textDecorationLine = parseTextDecorationLine(style.textDecorationLine ? style.textDecorationLine : style.textDecoration);
|
9457 |
+
if (textDecorationLine === null) {
|
9458 |
+
return TEXT_DECORATION.NONE;
|
9459 |
+
}
|
9460 |
|
9461 |
+
var textDecorationColor = style.textDecorationColor ? new _Color2.default(style.textDecorationColor) : null;
|
9462 |
+
var textDecorationStyle = parseTextDecorationStyle(style.textDecorationStyle);
|
9463 |
|
9464 |
+
return {
|
9465 |
+
textDecorationLine: textDecorationLine,
|
9466 |
+
textDecorationColor: textDecorationColor,
|
9467 |
+
textDecorationStyle: textDecorationStyle
|
9468 |
+
};
|
9469 |
+
};
|
9470 |
|
9471 |
+
/***/ }),
|
9472 |
+
/* 12 */
|
9473 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9474 |
|
9475 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9476 |
|
|
|
|
|
|
|
|
|
|
|
|
|
9477 |
|
9478 |
+
Object.defineProperty(exports, "__esModule", {
|
9479 |
+
value: true
|
9480 |
+
});
|
9481 |
+
exports.parseBorder = exports.BORDER_SIDES = exports.BORDER_STYLE = undefined;
|
9482 |
|
9483 |
+
var _Color = __webpack_require__(0);
|
|
|
9484 |
|
9485 |
+
var _Color2 = _interopRequireDefault(_Color);
|
|
|
|
|
9486 |
|
9487 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9488 |
|
9489 |
+
var BORDER_STYLE = exports.BORDER_STYLE = {
|
9490 |
+
NONE: 0,
|
9491 |
+
SOLID: 1
|
9492 |
+
};
|
9493 |
+
|
9494 |
+
var BORDER_SIDES = exports.BORDER_SIDES = {
|
9495 |
+
TOP: 0,
|
9496 |
+
RIGHT: 1,
|
9497 |
+
BOTTOM: 2,
|
9498 |
+
LEFT: 3
|
9499 |
+
};
|
9500 |
|
9501 |
+
var SIDES = Object.keys(BORDER_SIDES).map(function (s) {
|
9502 |
+
return s.toLowerCase();
|
9503 |
+
});
|
9504 |
|
9505 |
+
var parseBorderStyle = function parseBorderStyle(style) {
|
9506 |
+
switch (style) {
|
9507 |
+
case 'none':
|
9508 |
+
return BORDER_STYLE.NONE;
|
9509 |
+
}
|
9510 |
+
return BORDER_STYLE.SOLID;
|
9511 |
+
};
|
9512 |
|
9513 |
+
var parseBorder = exports.parseBorder = function parseBorder(style) {
|
9514 |
+
return SIDES.map(function (side) {
|
9515 |
+
var borderColor = new _Color2.default(style.getPropertyValue('border-' + side + '-color'));
|
9516 |
+
var borderStyle = parseBorderStyle(style.getPropertyValue('border-' + side + '-style'));
|
9517 |
+
var borderWidth = parseFloat(style.getPropertyValue('border-' + side + '-width'));
|
9518 |
+
return {
|
9519 |
+
borderColor: borderColor,
|
9520 |
+
borderStyle: borderStyle,
|
9521 |
+
borderWidth: isNaN(borderWidth) ? 0 : borderWidth
|
9522 |
+
};
|
9523 |
+
});
|
9524 |
+
};
|
|
|
|
|
|
|
|
|
|
|
9525 |
|
9526 |
+
/***/ }),
|
9527 |
+
/* 13 */
|
9528 |
+
/***/ (function(module, exports, __webpack_require__) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9529 |
|
9530 |
+
"use strict";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9531 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9532 |
|
9533 |
+
Object.defineProperty(exports, "__esModule", {
|
9534 |
+
value: true
|
9535 |
+
});
|
9536 |
+
var toCodePoints = exports.toCodePoints = function toCodePoints(str) {
|
9537 |
+
var codePoints = [];
|
9538 |
+
var i = 0;
|
9539 |
+
var length = str.length;
|
9540 |
+
while (i < length) {
|
9541 |
+
var value = str.charCodeAt(i++);
|
9542 |
+
if (value >= 0xd800 && value <= 0xdbff && i < length) {
|
9543 |
+
var extra = str.charCodeAt(i++);
|
9544 |
+
if ((extra & 0xfc00) === 0xdc00) {
|
9545 |
+
codePoints.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000);
|
9546 |
+
} else {
|
9547 |
+
codePoints.push(value);
|
9548 |
+
i--;
|
9549 |
+
}
|
9550 |
+
} else {
|
9551 |
+
codePoints.push(value);
|
9552 |
+
}
|
9553 |
+
}
|
9554 |
+
return codePoints;
|
9555 |
+
};
|
9556 |
+
|
9557 |
+
var fromCodePoint = exports.fromCodePoint = function fromCodePoint() {
|
9558 |
+
if (String.fromCodePoint) {
|
9559 |
+
return String.fromCodePoint.apply(String, arguments);
|
9560 |
+
}
|
9561 |
+
|
9562 |
+
var length = arguments.length;
|
9563 |
+
if (!length) {
|
9564 |
+
return '';
|
9565 |
+
}
|
9566 |
+
|
9567 |
+
var codeUnits = [];
|
9568 |
+
|
9569 |
+
var index = -1;
|
9570 |
+
var result = '';
|
9571 |
+
while (++index < length) {
|
9572 |
+
var codePoint = arguments.length <= index ? undefined : arguments[index];
|
9573 |
+
if (codePoint <= 0xffff) {
|
9574 |
+
codeUnits.push(codePoint);
|
9575 |
+
} else {
|
9576 |
+
codePoint -= 0x10000;
|
9577 |
+
codeUnits.push((codePoint >> 10) + 0xd800, codePoint % 0x400 + 0xdc00);
|
9578 |
+
}
|
9579 |
+
if (index + 1 === length || codeUnits.length > 0x4000) {
|
9580 |
+
result += String.fromCharCode.apply(String, codeUnits);
|
9581 |
+
codeUnits.length = 0;
|
9582 |
+
}
|
9583 |
+
}
|
9584 |
+
return result;
|
9585 |
+
};
|
9586 |
+
|
9587 |
+
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
|
9588 |
+
|
9589 |
+
// Use a lookup table to find the index.
|
9590 |
+
var lookup = typeof Uint8Array === 'undefined' ? [] : new Uint8Array(256);
|
9591 |
+
for (var i = 0; i < chars.length; i++) {
|
9592 |
+
lookup[chars.charCodeAt(i)] = i;
|
9593 |
+
}
|
9594 |
+
|
9595 |
+
var decode = exports.decode = function decode(base64) {
|
9596 |
+
var bufferLength = base64.length * 0.75,
|
9597 |
+
len = base64.length,
|
9598 |
+
i = void 0,
|
9599 |
+
p = 0,
|
9600 |
+
encoded1 = void 0,
|
9601 |
+
encoded2 = void 0,
|
9602 |
+
encoded3 = void 0,
|
9603 |
+
encoded4 = void 0;
|
9604 |
+
|
9605 |
+
if (base64[base64.length - 1] === '=') {
|
9606 |
+
bufferLength--;
|
9607 |
+
if (base64[base64.length - 2] === '=') {
|
9608 |
+
bufferLength--;
|
9609 |
+
}
|
9610 |
+
}
|
9611 |
+
|
9612 |
+
var buffer = typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint8Array.prototype.slice !== 'undefined' ? new ArrayBuffer(bufferLength) : new Array(bufferLength);
|
9613 |
+
var bytes = Array.isArray(buffer) ? buffer : new Uint8Array(buffer);
|
9614 |
+
|
9615 |
+
for (i = 0; i < len; i += 4) {
|
9616 |
+
encoded1 = lookup[base64.charCodeAt(i)];
|
9617 |
+
encoded2 = lookup[base64.charCodeAt(i + 1)];
|
9618 |
+
encoded3 = lookup[base64.charCodeAt(i + 2)];
|
9619 |
+
encoded4 = lookup[base64.charCodeAt(i + 3)];
|
9620 |
+
|
9621 |
+
bytes[p++] = encoded1 << 2 | encoded2 >> 4;
|
9622 |
+
bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
|
9623 |
+
bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
|
9624 |
+
}
|
9625 |
+
|
9626 |
+
return buffer;
|
9627 |
+
};
|
9628 |
+
|
9629 |
+
var polyUint16Array = exports.polyUint16Array = function polyUint16Array(buffer) {
|
9630 |
+
var length = buffer.length;
|
9631 |
+
var bytes = [];
|
9632 |
+
for (var _i = 0; _i < length; _i += 2) {
|
9633 |
+
bytes.push(buffer[_i + 1] << 8 | buffer[_i]);
|
9634 |
+
}
|
9635 |
+
return bytes;
|
9636 |
+
};
|
9637 |
+
|
9638 |
+
var polyUint32Array = exports.polyUint32Array = function polyUint32Array(buffer) {
|
9639 |
+
var length = buffer.length;
|
9640 |
+
var bytes = [];
|
9641 |
+
for (var _i2 = 0; _i2 < length; _i2 += 4) {
|
9642 |
+
bytes.push(buffer[_i2 + 3] << 24 | buffer[_i2 + 2] << 16 | buffer[_i2 + 1] << 8 | buffer[_i2]);
|
9643 |
+
}
|
9644 |
+
return bytes;
|
9645 |
+
};
|
9646 |
+
|
9647 |
+
/***/ }),
|
9648 |
+
/* 14 */
|
9649 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9650 |
+
|
9651 |
+
"use strict";
|
9652 |
+
|
9653 |
+
|
9654 |
+
Object.defineProperty(exports, "__esModule", {
|
9655 |
+
value: true
|
9656 |
+
});
|
9657 |
+
exports.createCounterText = exports.inlineListItemElement = exports.getListOwner = undefined;
|
9658 |
+
|
9659 |
+
var _Util = __webpack_require__(4);
|
9660 |
+
|
9661 |
+
var _NodeContainer = __webpack_require__(3);
|
9662 |
+
|
9663 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
9664 |
+
|
9665 |
+
var _TextContainer = __webpack_require__(9);
|
9666 |
+
|
9667 |
+
var _TextContainer2 = _interopRequireDefault(_TextContainer);
|
9668 |
+
|
9669 |
+
var _listStyle = __webpack_require__(8);
|
9670 |
+
|
9671 |
+
var _Unicode = __webpack_require__(24);
|
9672 |
+
|
9673 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
9674 |
+
|
9675 |
+
// Margin between the enumeration and the list item content
|
9676 |
+
var MARGIN_RIGHT = 7;
|
9677 |
+
|
9678 |
+
var ancestorTypes = ['OL', 'UL', 'MENU'];
|
9679 |
+
|
9680 |
+
var getListOwner = exports.getListOwner = function getListOwner(container) {
|
9681 |
+
var parent = container.parent;
|
9682 |
+
if (!parent) {
|
9683 |
+
return null;
|
9684 |
+
}
|
9685 |
+
|
9686 |
+
do {
|
9687 |
+
var isAncestor = ancestorTypes.indexOf(parent.tagName) !== -1;
|
9688 |
+
if (isAncestor) {
|
9689 |
+
return parent;
|
9690 |
+
}
|
9691 |
+
parent = parent.parent;
|
9692 |
+
} while (parent);
|
9693 |
+
|
9694 |
+
return container.parent;
|
9695 |
+
};
|
9696 |
+
|
9697 |
+
var inlineListItemElement = exports.inlineListItemElement = function inlineListItemElement(node, container, resourceLoader) {
|
9698 |
+
var listStyle = container.style.listStyle;
|
9699 |
+
|
9700 |
+
if (!listStyle) {
|
9701 |
+
return;
|
9702 |
+
}
|
9703 |
+
|
9704 |
+
var style = node.ownerDocument.defaultView.getComputedStyle(node, null);
|
9705 |
+
var wrapper = node.ownerDocument.createElement('html2canvaswrapper');
|
9706 |
+
(0, _Util.copyCSSStyles)(style, wrapper);
|
9707 |
+
|
9708 |
+
wrapper.style.position = 'absolute';
|
9709 |
+
wrapper.style.bottom = 'auto';
|
9710 |
+
wrapper.style.display = 'block';
|
9711 |
+
wrapper.style.letterSpacing = 'normal';
|
9712 |
+
|
9713 |
+
switch (listStyle.listStylePosition) {
|
9714 |
+
case _listStyle.LIST_STYLE_POSITION.OUTSIDE:
|
9715 |
+
wrapper.style.left = 'auto';
|
9716 |
+
wrapper.style.right = node.ownerDocument.defaultView.innerWidth - container.bounds.left - container.style.margin[1].getAbsoluteValue(container.bounds.width) + MARGIN_RIGHT + 'px';
|
9717 |
+
wrapper.style.textAlign = 'right';
|
9718 |
+
break;
|
9719 |
+
case _listStyle.LIST_STYLE_POSITION.INSIDE:
|
9720 |
+
wrapper.style.left = container.bounds.left - container.style.margin[3].getAbsoluteValue(container.bounds.width) + 'px';
|
9721 |
+
wrapper.style.right = 'auto';
|
9722 |
+
wrapper.style.textAlign = 'left';
|
9723 |
+
break;
|
9724 |
+
}
|
9725 |
+
|
9726 |
+
var text = void 0;
|
9727 |
+
var MARGIN_TOP = container.style.margin[0].getAbsoluteValue(container.bounds.width);
|
9728 |
+
var styleImage = listStyle.listStyleImage;
|
9729 |
+
if (styleImage) {
|
9730 |
+
if (styleImage.method === 'url') {
|
9731 |
+
var image = node.ownerDocument.createElement('img');
|
9732 |
+
image.src = styleImage.args[0];
|
9733 |
+
wrapper.style.top = container.bounds.top - MARGIN_TOP + 'px';
|
9734 |
+
wrapper.style.width = 'auto';
|
9735 |
+
wrapper.style.height = 'auto';
|
9736 |
+
wrapper.appendChild(image);
|
9737 |
+
} else {
|
9738 |
+
var size = parseFloat(container.style.font.fontSize) * 0.5;
|
9739 |
+
wrapper.style.top = container.bounds.top - MARGIN_TOP + container.bounds.height - 1.5 * size + 'px';
|
9740 |
+
wrapper.style.width = size + 'px';
|
9741 |
+
wrapper.style.height = size + 'px';
|
9742 |
+
wrapper.style.backgroundImage = style.listStyleImage;
|
9743 |
+
}
|
9744 |
+
} else if (typeof container.listIndex === 'number') {
|
9745 |
+
text = node.ownerDocument.createTextNode(createCounterText(container.listIndex, listStyle.listStyleType, true));
|
9746 |
+
wrapper.appendChild(text);
|
9747 |
+
wrapper.style.top = container.bounds.top - MARGIN_TOP + 'px';
|
9748 |
+
}
|
9749 |
+
|
9750 |
+
// $FlowFixMe
|
9751 |
+
var body = node.ownerDocument.body;
|
9752 |
+
body.appendChild(wrapper);
|
9753 |
+
|
9754 |
+
if (text) {
|
9755 |
+
container.childNodes.push(_TextContainer2.default.fromTextNode(text, container));
|
9756 |
+
body.removeChild(wrapper);
|
9757 |
+
} else {
|
9758 |
+
// $FlowFixMe
|
9759 |
+
container.childNodes.push(new _NodeContainer2.default(wrapper, container, resourceLoader, 0));
|
9760 |
+
}
|
9761 |
+
};
|
9762 |
+
|
9763 |
+
var ROMAN_UPPER = {
|
9764 |
+
integers: [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1],
|
9765 |
+
values: ['M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I']
|
9766 |
+
};
|
9767 |
+
|
9768 |
+
var ARMENIAN = {
|
9769 |
+
integers: [9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],
|
9770 |
+
values: ['Ք', 'Փ', 'Ւ', 'Ց', 'Ր', 'Տ', 'Վ', 'Ս', 'Ռ', 'Ջ', 'Պ', 'Չ', 'Ո', 'Շ', 'Ն', 'Յ', 'Մ', 'Ճ', 'Ղ', 'Ձ', 'Հ', 'Կ', 'Ծ', 'Խ', 'Լ', 'Ի', 'Ժ', 'Թ', 'Ը', 'Է', 'Զ', 'Ե', 'Դ', 'Գ', 'Բ', 'Ա']
|
9771 |
+
};
|
9772 |
+
|
9773 |
+
var HEBREW = {
|
9774 |
+
integers: [10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 19, 18, 17, 16, 15, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],
|
9775 |
+
values: ['י׳', 'ט׳', 'ח׳', 'ז׳', 'ו׳', 'ה׳', 'ד׳', 'ג׳', 'ב׳', 'א׳', 'ת', 'ש', 'ר', 'ק', 'צ', 'פ', 'ע', 'ס', 'נ', 'מ', 'ל', 'כ', 'יט', 'יח', 'יז', 'טז', 'טו', 'י', 'ט', 'ח', 'ז', 'ו', 'ה', 'ד', 'ג', 'ב', 'א']
|
9776 |
+
};
|
9777 |
+
|
9778 |
+
var GEORGIAN = {
|
9779 |
+
integers: [10000, 9000, 8000, 7000, 6000, 5000, 4000, 3000, 2000, 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1],
|
9780 |
+
values: ['ჵ', 'ჰ', 'ჯ', 'ჴ', 'ხ', 'ჭ', 'წ', 'ძ', 'ც', 'ჩ', 'შ', 'ყ', 'ღ', 'ქ', 'ფ', 'ჳ', 'ტ', 'ს', 'რ', 'ჟ', 'პ', 'ო', 'ჲ', 'ნ', 'მ', 'ლ', 'კ', 'ი', 'თ', 'ჱ', 'ზ', 'ვ', 'ე', 'დ', 'გ', 'ბ', 'ა']
|
9781 |
+
};
|
9782 |
+
|
9783 |
+
var createAdditiveCounter = function createAdditiveCounter(value, min, max, symbols, fallback, suffix) {
|
9784 |
+
if (value < min || value > max) {
|
9785 |
+
return createCounterText(value, fallback, suffix.length > 0);
|
9786 |
+
}
|
9787 |
+
|
9788 |
+
return symbols.integers.reduce(function (string, integer, index) {
|
9789 |
+
while (value >= integer) {
|
9790 |
+
value -= integer;
|
9791 |
+
string += symbols.values[index];
|
9792 |
+
}
|
9793 |
+
return string;
|
9794 |
+
}, '') + suffix;
|
9795 |
+
};
|
9796 |
+
|
9797 |
+
var createCounterStyleWithSymbolResolver = function createCounterStyleWithSymbolResolver(value, codePointRangeLength, isNumeric, resolver) {
|
9798 |
+
var string = '';
|
9799 |
+
|
9800 |
+
do {
|
9801 |
+
if (!isNumeric) {
|
9802 |
+
value--;
|
9803 |
+
}
|
9804 |
+
string = resolver(value) + string;
|
9805 |
+
value /= codePointRangeLength;
|
9806 |
+
} while (value * codePointRangeLength >= codePointRangeLength);
|
9807 |
+
|
9808 |
+
return string;
|
9809 |
+
};
|
9810 |
+
|
9811 |
+
var createCounterStyleFromRange = function createCounterStyleFromRange(value, codePointRangeStart, codePointRangeEnd, isNumeric, suffix) {
|
9812 |
+
var codePointRangeLength = codePointRangeEnd - codePointRangeStart + 1;
|
9813 |
+
|
9814 |
+
return (value < 0 ? '-' : '') + (createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, isNumeric, function (codePoint) {
|
9815 |
+
return (0, _Unicode.fromCodePoint)(Math.floor(codePoint % codePointRangeLength) + codePointRangeStart);
|
9816 |
+
}) + suffix);
|
9817 |
+
};
|
9818 |
+
|
9819 |
+
var createCounterStyleFromSymbols = function createCounterStyleFromSymbols(value, symbols) {
|
9820 |
+
var suffix = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '. ';
|
9821 |
+
|
9822 |
+
var codePointRangeLength = symbols.length;
|
9823 |
+
return createCounterStyleWithSymbolResolver(Math.abs(value), codePointRangeLength, false, function (codePoint) {
|
9824 |
+
return symbols[Math.floor(codePoint % codePointRangeLength)];
|
9825 |
+
}) + suffix;
|
9826 |
+
};
|
9827 |
+
|
9828 |
+
var CJK_ZEROS = 1 << 0;
|
9829 |
+
var CJK_TEN_COEFFICIENTS = 1 << 1;
|
9830 |
+
var CJK_TEN_HIGH_COEFFICIENTS = 1 << 2;
|
9831 |
+
var CJK_HUNDRED_COEFFICIENTS = 1 << 3;
|
9832 |
+
|
9833 |
+
var createCJKCounter = function createCJKCounter(value, numbers, multipliers, negativeSign, suffix, flags) {
|
9834 |
+
if (value < -9999 || value > 9999) {
|
9835 |
+
return createCounterText(value, _listStyle.LIST_STYLE_TYPE.CJK_DECIMAL, suffix.length > 0);
|
9836 |
+
}
|
9837 |
+
var tmp = Math.abs(value);
|
9838 |
+
var string = suffix;
|
9839 |
+
|
9840 |
+
if (tmp === 0) {
|
9841 |
+
return numbers[0] + string;
|
9842 |
+
}
|
9843 |
+
|
9844 |
+
for (var digit = 0; tmp > 0 && digit <= 4; digit++) {
|
9845 |
+
var coefficient = tmp % 10;
|
9846 |
+
|
9847 |
+
if (coefficient === 0 && (0, _Util.contains)(flags, CJK_ZEROS) && string !== '') {
|
9848 |
+
string = numbers[coefficient] + string;
|
9849 |
+
} else if (coefficient > 1 || coefficient === 1 && digit === 0 || coefficient === 1 && digit === 1 && (0, _Util.contains)(flags, CJK_TEN_COEFFICIENTS) || coefficient === 1 && digit === 1 && (0, _Util.contains)(flags, CJK_TEN_HIGH_COEFFICIENTS) && value > 100 || coefficient === 1 && digit > 1 && (0, _Util.contains)(flags, CJK_HUNDRED_COEFFICIENTS)) {
|
9850 |
+
string = numbers[coefficient] + (digit > 0 ? multipliers[digit - 1] : '') + string;
|
9851 |
+
} else if (coefficient === 1 && digit > 0) {
|
9852 |
+
string = multipliers[digit - 1] + string;
|
9853 |
+
}
|
9854 |
+
tmp = Math.floor(tmp / 10);
|
9855 |
+
}
|
9856 |
+
|
9857 |
+
return (value < 0 ? negativeSign : '') + string;
|
9858 |
+
};
|
9859 |
+
|
9860 |
+
var CHINESE_INFORMAL_MULTIPLIERS = '十百千萬';
|
9861 |
+
var CHINESE_FORMAL_MULTIPLIERS = '拾佰仟萬';
|
9862 |
+
var JAPANESE_NEGATIVE = 'マイナス';
|
9863 |
+
var KOREAN_NEGATIVE = '마이너스 ';
|
9864 |
+
|
9865 |
+
var createCounterText = exports.createCounterText = function createCounterText(value, type, appendSuffix) {
|
9866 |
+
var defaultSuffix = appendSuffix ? '. ' : '';
|
9867 |
+
var cjkSuffix = appendSuffix ? '、' : '';
|
9868 |
+
var koreanSuffix = appendSuffix ? ', ' : '';
|
9869 |
+
switch (type) {
|
9870 |
+
case _listStyle.LIST_STYLE_TYPE.DISC:
|
9871 |
+
return '•';
|
9872 |
+
case _listStyle.LIST_STYLE_TYPE.CIRCLE:
|
9873 |
+
return '◦';
|
9874 |
+
case _listStyle.LIST_STYLE_TYPE.SQUARE:
|
9875 |
+
return '◾';
|
9876 |
+
case _listStyle.LIST_STYLE_TYPE.DECIMAL_LEADING_ZERO:
|
9877 |
+
var string = createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);
|
9878 |
+
return string.length < 4 ? '0' + string : string;
|
9879 |
+
case _listStyle.LIST_STYLE_TYPE.CJK_DECIMAL:
|
9880 |
+
return createCounterStyleFromSymbols(value, '〇一二三四五六七八九', cjkSuffix);
|
9881 |
+
case _listStyle.LIST_STYLE_TYPE.LOWER_ROMAN:
|
9882 |
+
return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix).toLowerCase();
|
9883 |
+
case _listStyle.LIST_STYLE_TYPE.UPPER_ROMAN:
|
9884 |
+
return createAdditiveCounter(value, 1, 3999, ROMAN_UPPER, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
|
9885 |
+
case _listStyle.LIST_STYLE_TYPE.LOWER_GREEK:
|
9886 |
+
return createCounterStyleFromRange(value, 945, 969, false, defaultSuffix);
|
9887 |
+
case _listStyle.LIST_STYLE_TYPE.LOWER_ALPHA:
|
9888 |
+
return createCounterStyleFromRange(value, 97, 122, false, defaultSuffix);
|
9889 |
+
case _listStyle.LIST_STYLE_TYPE.UPPER_ALPHA:
|
9890 |
+
return createCounterStyleFromRange(value, 65, 90, false, defaultSuffix);
|
9891 |
+
case _listStyle.LIST_STYLE_TYPE.ARABIC_INDIC:
|
9892 |
+
return createCounterStyleFromRange(value, 1632, 1641, true, defaultSuffix);
|
9893 |
+
case _listStyle.LIST_STYLE_TYPE.ARMENIAN:
|
9894 |
+
case _listStyle.LIST_STYLE_TYPE.UPPER_ARMENIAN:
|
9895 |
+
return createAdditiveCounter(value, 1, 9999, ARMENIAN, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
|
9896 |
+
case _listStyle.LIST_STYLE_TYPE.LOWER_ARMENIAN:
|
9897 |
+
return createAdditiveCounter(value, 1, 9999, ARMENIAN, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix).toLowerCase();
|
9898 |
+
case _listStyle.LIST_STYLE_TYPE.BENGALI:
|
9899 |
+
return createCounterStyleFromRange(value, 2534, 2543, true, defaultSuffix);
|
9900 |
+
case _listStyle.LIST_STYLE_TYPE.CAMBODIAN:
|
9901 |
+
case _listStyle.LIST_STYLE_TYPE.KHMER:
|
9902 |
+
return createCounterStyleFromRange(value, 6112, 6121, true, defaultSuffix);
|
9903 |
+
case _listStyle.LIST_STYLE_TYPE.CJK_EARTHLY_BRANCH:
|
9904 |
+
return createCounterStyleFromSymbols(value, '子丑寅卯辰巳午未申酉戌亥', cjkSuffix);
|
9905 |
+
case _listStyle.LIST_STYLE_TYPE.CJK_HEAVENLY_STEM:
|
9906 |
+
return createCounterStyleFromSymbols(value, '甲乙丙丁戊己庚辛壬癸', cjkSuffix);
|
9907 |
+
case _listStyle.LIST_STYLE_TYPE.CJK_IDEOGRAPHIC:
|
9908 |
+
case _listStyle.LIST_STYLE_TYPE.TRAD_CHINESE_INFORMAL:
|
9909 |
+
return createCJKCounter(value, '零一二三四五六七八九', CHINESE_INFORMAL_MULTIPLIERS, '負', cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
|
9910 |
+
case _listStyle.LIST_STYLE_TYPE.TRAD_CHINESE_FORMAL:
|
9911 |
+
return createCJKCounter(value, '零壹貳參肆伍陸柒捌玖', CHINESE_FORMAL_MULTIPLIERS, '負', cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
|
9912 |
+
case _listStyle.LIST_STYLE_TYPE.SIMP_CHINESE_INFORMAL:
|
9913 |
+
return createCJKCounter(value, '零一二三四五六七八九', CHINESE_INFORMAL_MULTIPLIERS, '负', cjkSuffix, CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
|
9914 |
+
case _listStyle.LIST_STYLE_TYPE.SIMP_CHINESE_FORMAL:
|
9915 |
+
return createCJKCounter(value, '零壹贰叁肆伍陆柒捌玖', CHINESE_FORMAL_MULTIPLIERS, '负', cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS | CJK_HUNDRED_COEFFICIENTS);
|
9916 |
+
case _listStyle.LIST_STYLE_TYPE.JAPANESE_INFORMAL:
|
9917 |
+
return createCJKCounter(value, '〇一二三四五六七八九', '十百千万', JAPANESE_NEGATIVE, cjkSuffix, 0);
|
9918 |
+
case _listStyle.LIST_STYLE_TYPE.JAPANESE_FORMAL:
|
9919 |
+
return createCJKCounter(value, '零壱弐参四伍六七八九', '拾百千万', JAPANESE_NEGATIVE, cjkSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
|
9920 |
+
case _listStyle.LIST_STYLE_TYPE.KOREAN_HANGUL_FORMAL:
|
9921 |
+
return createCJKCounter(value, '영일이삼사오육칠팔구', '십백천만', KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
|
9922 |
+
case _listStyle.LIST_STYLE_TYPE.KOREAN_HANJA_INFORMAL:
|
9923 |
+
return createCJKCounter(value, '零一二三四五六七八九', '十百千萬', KOREAN_NEGATIVE, koreanSuffix, 0);
|
9924 |
+
case _listStyle.LIST_STYLE_TYPE.KOREAN_HANJA_FORMAL:
|
9925 |
+
return createCJKCounter(value, '零壹貳參四五六七八九', '拾百千', KOREAN_NEGATIVE, koreanSuffix, CJK_ZEROS | CJK_TEN_COEFFICIENTS | CJK_TEN_HIGH_COEFFICIENTS);
|
9926 |
+
case _listStyle.LIST_STYLE_TYPE.DEVANAGARI:
|
9927 |
+
return createCounterStyleFromRange(value, 0x966, 0x96f, true, defaultSuffix);
|
9928 |
+
case _listStyle.LIST_STYLE_TYPE.GEORGIAN:
|
9929 |
+
return createAdditiveCounter(value, 1, 19999, GEORGIAN, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
|
9930 |
+
case _listStyle.LIST_STYLE_TYPE.GUJARATI:
|
9931 |
+
return createCounterStyleFromRange(value, 0xae6, 0xaef, true, defaultSuffix);
|
9932 |
+
case _listStyle.LIST_STYLE_TYPE.GURMUKHI:
|
9933 |
+
return createCounterStyleFromRange(value, 0xa66, 0xa6f, true, defaultSuffix);
|
9934 |
+
case _listStyle.LIST_STYLE_TYPE.HEBREW:
|
9935 |
+
return createAdditiveCounter(value, 1, 10999, HEBREW, _listStyle.LIST_STYLE_TYPE.DECIMAL, defaultSuffix);
|
9936 |
+
case _listStyle.LIST_STYLE_TYPE.HIRAGANA:
|
9937 |
+
return createCounterStyleFromSymbols(value, 'あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん');
|
9938 |
+
case _listStyle.LIST_STYLE_TYPE.HIRAGANA_IROHA:
|
9939 |
+
return createCounterStyleFromSymbols(value, 'いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす');
|
9940 |
+
case _listStyle.LIST_STYLE_TYPE.KANNADA:
|
9941 |
+
return createCounterStyleFromRange(value, 0xce6, 0xcef, true, defaultSuffix);
|
9942 |
+
case _listStyle.LIST_STYLE_TYPE.KATAKANA:
|
9943 |
+
return createCounterStyleFromSymbols(value, 'アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン', cjkSuffix);
|
9944 |
+
case _listStyle.LIST_STYLE_TYPE.KATAKANA_IROHA:
|
9945 |
+
return createCounterStyleFromSymbols(value, 'イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス', cjkSuffix);
|
9946 |
+
case _listStyle.LIST_STYLE_TYPE.LAO:
|
9947 |
+
return createCounterStyleFromRange(value, 0xed0, 0xed9, true, defaultSuffix);
|
9948 |
+
case _listStyle.LIST_STYLE_TYPE.MONGOLIAN:
|
9949 |
+
return createCounterStyleFromRange(value, 0x1810, 0x1819, true, defaultSuffix);
|
9950 |
+
case _listStyle.LIST_STYLE_TYPE.MYANMAR:
|
9951 |
+
return createCounterStyleFromRange(value, 0x1040, 0x1049, true, defaultSuffix);
|
9952 |
+
case _listStyle.LIST_STYLE_TYPE.ORIYA:
|
9953 |
+
return createCounterStyleFromRange(value, 0xb66, 0xb6f, true, defaultSuffix);
|
9954 |
+
case _listStyle.LIST_STYLE_TYPE.PERSIAN:
|
9955 |
+
return createCounterStyleFromRange(value, 0x6f0, 0x6f9, true, defaultSuffix);
|
9956 |
+
case _listStyle.LIST_STYLE_TYPE.TAMIL:
|
9957 |
+
return createCounterStyleFromRange(value, 0xbe6, 0xbef, true, defaultSuffix);
|
9958 |
+
case _listStyle.LIST_STYLE_TYPE.TELUGU:
|
9959 |
+
return createCounterStyleFromRange(value, 0xc66, 0xc6f, true, defaultSuffix);
|
9960 |
+
case _listStyle.LIST_STYLE_TYPE.THAI:
|
9961 |
+
return createCounterStyleFromRange(value, 0xe50, 0xe59, true, defaultSuffix);
|
9962 |
+
case _listStyle.LIST_STYLE_TYPE.TIBETAN:
|
9963 |
+
return createCounterStyleFromRange(value, 0xf20, 0xf29, true, defaultSuffix);
|
9964 |
+
case _listStyle.LIST_STYLE_TYPE.DECIMAL:
|
9965 |
+
default:
|
9966 |
+
return createCounterStyleFromRange(value, 48, 57, true, defaultSuffix);
|
9967 |
+
}
|
9968 |
+
};
|
9969 |
+
|
9970 |
+
/***/ }),
|
9971 |
+
/* 15 */
|
9972 |
+
/***/ (function(module, exports, __webpack_require__) {
|
9973 |
+
|
9974 |
+
"use strict";
|
9975 |
+
|
9976 |
+
|
9977 |
+
Object.defineProperty(exports, "__esModule", {
|
9978 |
+
value: true
|
9979 |
+
});
|
9980 |
+
|
9981 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
9982 |
+
|
9983 |
+
var _Path = __webpack_require__(6);
|
9984 |
+
|
9985 |
+
var _textDecoration = __webpack_require__(11);
|
9986 |
+
|
9987 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
9988 |
+
|
9989 |
+
var addColorStops = function addColorStops(gradient, canvasGradient) {
|
9990 |
+
var maxStop = Math.max.apply(null, gradient.colorStops.map(function (colorStop) {
|
9991 |
+
return colorStop.stop;
|
9992 |
+
}));
|
9993 |
+
var f = 1 / Math.max(1, maxStop);
|
9994 |
+
gradient.colorStops.forEach(function (colorStop) {
|
9995 |
+
canvasGradient.addColorStop(f * colorStop.stop, colorStop.color.toString());
|
9996 |
+
});
|
9997 |
+
};
|
9998 |
+
|
9999 |
+
var CanvasRenderer = function () {
|
10000 |
+
function CanvasRenderer(canvas) {
|
10001 |
+
_classCallCheck(this, CanvasRenderer);
|
10002 |
+
|
10003 |
+
this.canvas = canvas ? canvas : document.createElement('canvas');
|
10004 |
+
}
|
10005 |
+
|
10006 |
+
_createClass(CanvasRenderer, [{
|
10007 |
+
key: 'render',
|
10008 |
+
value: function render(options) {
|
10009 |
+
this.ctx = this.canvas.getContext('2d');
|
10010 |
+
this.options = options;
|
10011 |
+
this.canvas.width = Math.floor(options.width * options.scale);
|
10012 |
+
this.canvas.height = Math.floor(options.height * options.scale);
|
10013 |
+
this.canvas.style.width = options.width + 'px';
|
10014 |
+
this.canvas.style.height = options.height + 'px';
|
10015 |
+
|
10016 |
+
this.ctx.scale(this.options.scale, this.options.scale);
|
10017 |
+
this.ctx.translate(-options.x, -options.y);
|
10018 |
+
this.ctx.textBaseline = 'bottom';
|
10019 |
+
options.logger.log('Canvas renderer initialized (' + options.width + 'x' + options.height + ' at ' + options.x + ',' + options.y + ') with scale ' + this.options.scale);
|
10020 |
+
}
|
10021 |
+
}, {
|
10022 |
+
key: 'clip',
|
10023 |
+
value: function clip(clipPaths, callback) {
|
10024 |
+
var _this = this;
|
10025 |
+
|
10026 |
+
if (clipPaths.length) {
|
10027 |
+
this.ctx.save();
|
10028 |
+
clipPaths.forEach(function (path) {
|
10029 |
+
_this.path(path);
|
10030 |
+
_this.ctx.clip();
|
10031 |
+
});
|
10032 |
+
}
|
10033 |
+
|
10034 |
+
callback();
|
10035 |
+
|
10036 |
+
if (clipPaths.length) {
|
10037 |
+
this.ctx.restore();
|
10038 |
+
}
|
10039 |
+
}
|
10040 |
+
}, {
|
10041 |
+
key: 'drawImage',
|
10042 |
+
value: function drawImage(image, source, destination) {
|
10043 |
+
this.ctx.drawImage(image, source.left, source.top, source.width, source.height, destination.left, destination.top, destination.width, destination.height);
|
10044 |
+
}
|
10045 |
+
}, {
|
10046 |
+
key: 'drawShape',
|
10047 |
+
value: function drawShape(path, color) {
|
10048 |
+
this.path(path);
|
10049 |
+
this.ctx.fillStyle = color.toString();
|
10050 |
+
this.ctx.fill();
|
10051 |
+
}
|
10052 |
+
}, {
|
10053 |
+
key: 'fill',
|
10054 |
+
value: function fill(color) {
|
10055 |
+
this.ctx.fillStyle = color.toString();
|
10056 |
+
this.ctx.fill();
|
10057 |
+
}
|
10058 |
+
}, {
|
10059 |
+
key: 'getTarget',
|
10060 |
+
value: function getTarget() {
|
10061 |
+
return Promise.resolve(this.canvas);
|
10062 |
+
}
|
10063 |
+
}, {
|
10064 |
+
key: 'path',
|
10065 |
+
value: function path(_path) {
|
10066 |
+
var _this2 = this;
|
10067 |
+
|
10068 |
+
this.ctx.beginPath();
|
10069 |
+
if (Array.isArray(_path)) {
|
10070 |
+
_path.forEach(function (point, index) {
|
10071 |
+
var start = point.type === _Path.PATH.VECTOR ? point : point.start;
|
10072 |
+
if (index === 0) {
|
10073 |
+
_this2.ctx.moveTo(start.x, start.y);
|
10074 |
+
} else {
|
10075 |
+
_this2.ctx.lineTo(start.x, start.y);
|
10076 |
+
}
|
10077 |
+
|
10078 |
+
if (point.type === _Path.PATH.BEZIER_CURVE) {
|
10079 |
+
_this2.ctx.bezierCurveTo(point.startControl.x, point.startControl.y, point.endControl.x, point.endControl.y, point.end.x, point.end.y);
|
10080 |
+
}
|
10081 |
+
});
|
10082 |
+
} else {
|
10083 |
+
this.ctx.arc(_path.x + _path.radius, _path.y + _path.radius, _path.radius, 0, Math.PI * 2, true);
|
10084 |
+
}
|
10085 |
+
|
10086 |
+
this.ctx.closePath();
|
10087 |
+
}
|
10088 |
+
}, {
|
10089 |
+
key: 'rectangle',
|
10090 |
+
value: function rectangle(x, y, width, height, color) {
|
10091 |
+
this.ctx.fillStyle = color.toString();
|
10092 |
+
this.ctx.fillRect(x, y, width, height);
|
10093 |
+
}
|
10094 |
+
}, {
|
10095 |
+
key: 'renderLinearGradient',
|
10096 |
+
value: function renderLinearGradient(bounds, gradient) {
|
10097 |
+
var linearGradient = this.ctx.createLinearGradient(bounds.left + gradient.direction.x1, bounds.top + gradient.direction.y1, bounds.left + gradient.direction.x0, bounds.top + gradient.direction.y0);
|
10098 |
+
|
10099 |
+
addColorStops(gradient, linearGradient);
|
10100 |
+
this.ctx.fillStyle = linearGradient;
|
10101 |
+
this.ctx.fillRect(bounds.left, bounds.top, bounds.width, bounds.height);
|
10102 |
+
}
|
10103 |
+
}, {
|
10104 |
+
key: 'renderRadialGradient',
|
10105 |
+
value: function renderRadialGradient(bounds, gradient) {
|
10106 |
+
var _this3 = this;
|
10107 |
+
|
10108 |
+
var x = bounds.left + gradient.center.x;
|
10109 |
+
var y = bounds.top + gradient.center.y;
|
10110 |
+
|
10111 |
+
var radialGradient = this.ctx.createRadialGradient(x, y, 0, x, y, gradient.radius.x);
|
10112 |
+
if (!radialGradient) {
|
10113 |
+
return;
|
10114 |
+
}
|
10115 |
+
|
10116 |
+
addColorStops(gradient, radialGradient);
|
10117 |
+
this.ctx.fillStyle = radialGradient;
|
10118 |
+
|
10119 |
+
if (gradient.radius.x !== gradient.radius.y) {
|
10120 |
+
// transforms for elliptical radial gradient
|
10121 |
+
var midX = bounds.left + 0.5 * bounds.width;
|
10122 |
+
var midY = bounds.top + 0.5 * bounds.height;
|
10123 |
+
var f = gradient.radius.y / gradient.radius.x;
|
10124 |
+
var invF = 1 / f;
|
10125 |
+
|
10126 |
+
this.transform(midX, midY, [1, 0, 0, f, 0, 0], function () {
|
10127 |
+
return _this3.ctx.fillRect(bounds.left, invF * (bounds.top - midY) + midY, bounds.width, bounds.height * invF);
|
10128 |
+
});
|
10129 |
+
} else {
|
10130 |
+
this.ctx.fillRect(bounds.left, bounds.top, bounds.width, bounds.height);
|
10131 |
+
}
|
10132 |
+
}
|
10133 |
+
}, {
|
10134 |
+
key: 'renderRepeat',
|
10135 |
+
value: function renderRepeat(path, image, imageSize, offsetX, offsetY) {
|
10136 |
+
this.path(path);
|
10137 |
+
this.ctx.fillStyle = this.ctx.createPattern(this.resizeImage(image, imageSize), 'repeat');
|
10138 |
+
this.ctx.translate(offsetX, offsetY);
|
10139 |
+
this.ctx.fill();
|
10140 |
+
this.ctx.translate(-offsetX, -offsetY);
|
10141 |
+
}
|
10142 |
+
}, {
|
10143 |
+
key: 'renderTextNode',
|
10144 |
+
value: function renderTextNode(textBounds, color, font, textDecoration, textShadows) {
|
10145 |
+
var _this4 = this;
|
10146 |
+
|
10147 |
+
this.ctx.font = [font.fontStyle, font.fontVariant, font.fontWeight, font.fontSize, font.fontFamily].join(' ');
|
10148 |
+
|
10149 |
+
textBounds.forEach(function (text) {
|
10150 |
+
_this4.ctx.fillStyle = color.toString();
|
10151 |
+
if (textShadows && text.text.trim().length) {
|
10152 |
+
textShadows.slice(0).reverse().forEach(function (textShadow) {
|
10153 |
+
_this4.ctx.shadowColor = textShadow.color.toString();
|
10154 |
+
_this4.ctx.shadowOffsetX = textShadow.offsetX * _this4.options.scale;
|
10155 |
+
_this4.ctx.shadowOffsetY = textShadow.offsetY * _this4.options.scale;
|
10156 |
+
_this4.ctx.shadowBlur = textShadow.blur;
|
10157 |
+
|
10158 |
+
_this4.ctx.fillText(text.text, text.bounds.left, text.bounds.top + text.bounds.height);
|
10159 |
+
});
|
10160 |
+
} else {
|
10161 |
+
_this4.ctx.fillText(text.text, text.bounds.left, text.bounds.top + text.bounds.height);
|
10162 |
+
}
|
10163 |
+
|
10164 |
+
if (textDecoration !== null) {
|
10165 |
+
var textDecorationColor = textDecoration.textDecorationColor || color;
|
10166 |
+
textDecoration.textDecorationLine.forEach(function (textDecorationLine) {
|
10167 |
+
switch (textDecorationLine) {
|
10168 |
+
case _textDecoration.TEXT_DECORATION_LINE.UNDERLINE:
|
10169 |
+
// Draws a line at the baseline of the font
|
10170 |
+
// TODO As some browsers display the line as more than 1px if the font-size is big,
|
10171 |
+
// need to take that into account both in position and size
|
10172 |
+
var _options$fontMetrics$ = _this4.options.fontMetrics.getMetrics(font),
|
10173 |
+
baseline = _options$fontMetrics$.baseline;
|
10174 |
+
|
10175 |
+
_this4.rectangle(text.bounds.left, Math.round(text.bounds.top + baseline), text.bounds.width, 1, textDecorationColor);
|
10176 |
+
break;
|
10177 |
+
case _textDecoration.TEXT_DECORATION_LINE.OVERLINE:
|
10178 |
+
_this4.rectangle(text.bounds.left, Math.round(text.bounds.top), text.bounds.width, 1, textDecorationColor);
|
10179 |
+
break;
|
10180 |
+
case _textDecoration.TEXT_DECORATION_LINE.LINE_THROUGH:
|
10181 |
+
// TODO try and find exact position for line-through
|
10182 |
+
var _options$fontMetrics$2 = _this4.options.fontMetrics.getMetrics(font),
|
10183 |
+
middle = _options$fontMetrics$2.middle;
|
10184 |
+
|
10185 |
+
_this4.rectangle(text.bounds.left, Math.ceil(text.bounds.top + middle), text.bounds.width, 1, textDecorationColor);
|
10186 |
+
break;
|
10187 |
+
}
|
10188 |
+
});
|
10189 |
+
}
|
10190 |
+
});
|
10191 |
+
}
|
10192 |
+
}, {
|
10193 |
+
key: 'resizeImage',
|
10194 |
+
value: function resizeImage(image, size) {
|
10195 |
+
if (image.width === size.width && image.height === size.height) {
|
10196 |
+
return image;
|
10197 |
+
}
|
10198 |
+
|
10199 |
+
var canvas = this.canvas.ownerDocument.createElement('canvas');
|
10200 |
+
canvas.width = size.width;
|
10201 |
+
canvas.height = size.height;
|
10202 |
+
var ctx = canvas.getContext('2d');
|
10203 |
+
ctx.drawImage(image, 0, 0, image.width, image.height, 0, 0, size.width, size.height);
|
10204 |
+
return canvas;
|
10205 |
+
}
|
10206 |
+
}, {
|
10207 |
+
key: 'setOpacity',
|
10208 |
+
value: function setOpacity(opacity) {
|
10209 |
+
this.ctx.globalAlpha = opacity;
|
10210 |
+
}
|
10211 |
+
}, {
|
10212 |
+
key: 'transform',
|
10213 |
+
value: function transform(offsetX, offsetY, matrix, callback) {
|
10214 |
+
this.ctx.save();
|
10215 |
+
this.ctx.translate(offsetX, offsetY);
|
10216 |
+
this.ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);
|
10217 |
+
this.ctx.translate(-offsetX, -offsetY);
|
10218 |
+
|
10219 |
+
callback();
|
10220 |
+
|
10221 |
+
this.ctx.restore();
|
10222 |
+
}
|
10223 |
+
}]);
|
10224 |
+
|
10225 |
+
return CanvasRenderer;
|
10226 |
+
}();
|
10227 |
+
|
10228 |
+
exports.default = CanvasRenderer;
|
10229 |
+
|
10230 |
+
/***/ }),
|
10231 |
+
/* 16 */
|
10232 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10233 |
+
|
10234 |
+
"use strict";
|
10235 |
+
|
10236 |
+
|
10237 |
+
Object.defineProperty(exports, "__esModule", {
|
10238 |
+
value: true
|
10239 |
+
});
|
10240 |
+
|
10241 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10242 |
+
|
10243 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10244 |
+
|
10245 |
+
var Logger = function () {
|
10246 |
+
function Logger(enabled, id, start) {
|
10247 |
+
_classCallCheck(this, Logger);
|
10248 |
+
|
10249 |
+
this.enabled = typeof window !== 'undefined' && enabled;
|
10250 |
+
this.start = start ? start : Date.now();
|
10251 |
+
this.id = id;
|
10252 |
+
}
|
10253 |
+
|
10254 |
+
_createClass(Logger, [{
|
10255 |
+
key: 'child',
|
10256 |
+
value: function child(id) {
|
10257 |
+
return new Logger(this.enabled, id, this.start);
|
10258 |
+
}
|
10259 |
+
|
10260 |
+
// eslint-disable-next-line flowtype/no-weak-types
|
10261 |
+
|
10262 |
+
}, {
|
10263 |
+
key: 'log',
|
10264 |
+
value: function log() {
|
10265 |
+
if (this.enabled && window.console && window.console.log) {
|
10266 |
+
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
|
10267 |
+
args[_key] = arguments[_key];
|
10268 |
+
}
|
10269 |
+
|
10270 |
+
Function.prototype.bind.call(window.console.log, window.console).apply(window.console, [Date.now() - this.start + 'ms', this.id ? 'html2canvas (' + this.id + '):' : 'html2canvas:'].concat([].slice.call(args, 0)));
|
10271 |
+
}
|
10272 |
+
}
|
10273 |
+
|
10274 |
+
// eslint-disable-next-line flowtype/no-weak-types
|
10275 |
+
|
10276 |
+
}, {
|
10277 |
+
key: 'error',
|
10278 |
+
value: function error() {
|
10279 |
+
if (this.enabled && window.console && window.console.error) {
|
10280 |
+
for (var _len2 = arguments.length, args = Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
10281 |
+
args[_key2] = arguments[_key2];
|
10282 |
+
}
|
10283 |
+
|
10284 |
+
Function.prototype.bind.call(window.console.error, window.console).apply(window.console, [Date.now() - this.start + 'ms', this.id ? 'html2canvas (' + this.id + '):' : 'html2canvas:'].concat([].slice.call(args, 0)));
|
10285 |
+
}
|
10286 |
+
}
|
10287 |
+
}]);
|
10288 |
+
|
10289 |
+
return Logger;
|
10290 |
+
}();
|
10291 |
+
|
10292 |
+
exports.default = Logger;
|
10293 |
+
|
10294 |
+
/***/ }),
|
10295 |
+
/* 17 */
|
10296 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10297 |
+
|
10298 |
+
"use strict";
|
10299 |
+
|
10300 |
+
|
10301 |
+
Object.defineProperty(exports, "__esModule", {
|
10302 |
+
value: true
|
10303 |
+
});
|
10304 |
+
exports.parsePadding = exports.PADDING_SIDES = undefined;
|
10305 |
+
|
10306 |
+
var _Length = __webpack_require__(2);
|
10307 |
+
|
10308 |
+
var _Length2 = _interopRequireDefault(_Length);
|
10309 |
+
|
10310 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10311 |
+
|
10312 |
+
var PADDING_SIDES = exports.PADDING_SIDES = {
|
10313 |
+
TOP: 0,
|
10314 |
+
RIGHT: 1,
|
10315 |
+
BOTTOM: 2,
|
10316 |
+
LEFT: 3
|
10317 |
+
};
|
10318 |
+
|
10319 |
+
var SIDES = ['top', 'right', 'bottom', 'left'];
|
10320 |
+
|
10321 |
+
var parsePadding = exports.parsePadding = function parsePadding(style) {
|
10322 |
+
return SIDES.map(function (side) {
|
10323 |
+
return new _Length2.default(style.getPropertyValue('padding-' + side));
|
10324 |
+
});
|
10325 |
+
};
|
10326 |
+
|
10327 |
+
/***/ }),
|
10328 |
+
/* 18 */
|
10329 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10330 |
+
|
10331 |
+
"use strict";
|
10332 |
+
|
10333 |
+
|
10334 |
+
Object.defineProperty(exports, "__esModule", {
|
10335 |
+
value: true
|
10336 |
+
});
|
10337 |
+
var OVERFLOW_WRAP = exports.OVERFLOW_WRAP = {
|
10338 |
+
NORMAL: 0,
|
10339 |
+
BREAK_WORD: 1
|
10340 |
+
};
|
10341 |
+
|
10342 |
+
var parseOverflowWrap = exports.parseOverflowWrap = function parseOverflowWrap(overflow) {
|
10343 |
+
switch (overflow) {
|
10344 |
+
case 'break-word':
|
10345 |
+
return OVERFLOW_WRAP.BREAK_WORD;
|
10346 |
+
case 'normal':
|
10347 |
+
default:
|
10348 |
+
return OVERFLOW_WRAP.NORMAL;
|
10349 |
+
}
|
10350 |
+
};
|
10351 |
+
|
10352 |
+
/***/ }),
|
10353 |
+
/* 19 */
|
10354 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10355 |
+
|
10356 |
+
"use strict";
|
10357 |
+
|
10358 |
+
|
10359 |
+
Object.defineProperty(exports, "__esModule", {
|
10360 |
+
value: true
|
10361 |
+
});
|
10362 |
+
var POSITION = exports.POSITION = {
|
10363 |
+
STATIC: 0,
|
10364 |
+
RELATIVE: 1,
|
10365 |
+
ABSOLUTE: 2,
|
10366 |
+
FIXED: 3,
|
10367 |
+
STICKY: 4
|
10368 |
+
};
|
10369 |
+
|
10370 |
+
var parsePosition = exports.parsePosition = function parsePosition(position) {
|
10371 |
+
switch (position) {
|
10372 |
+
case 'relative':
|
10373 |
+
return POSITION.RELATIVE;
|
10374 |
+
case 'absolute':
|
10375 |
+
return POSITION.ABSOLUTE;
|
10376 |
+
case 'fixed':
|
10377 |
+
return POSITION.FIXED;
|
10378 |
+
case 'sticky':
|
10379 |
+
return POSITION.STICKY;
|
10380 |
+
}
|
10381 |
+
|
10382 |
+
return POSITION.STATIC;
|
10383 |
+
};
|
10384 |
+
|
10385 |
+
/***/ }),
|
10386 |
+
/* 20 */
|
10387 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10388 |
+
|
10389 |
+
"use strict";
|
10390 |
+
|
10391 |
+
|
10392 |
+
Object.defineProperty(exports, "__esModule", {
|
10393 |
+
value: true
|
10394 |
+
});
|
10395 |
+
var TEXT_TRANSFORM = exports.TEXT_TRANSFORM = {
|
10396 |
+
NONE: 0,
|
10397 |
+
LOWERCASE: 1,
|
10398 |
+
UPPERCASE: 2,
|
10399 |
+
CAPITALIZE: 3
|
10400 |
+
};
|
10401 |
+
|
10402 |
+
var parseTextTransform = exports.parseTextTransform = function parseTextTransform(textTransform) {
|
10403 |
+
switch (textTransform) {
|
10404 |
+
case 'uppercase':
|
10405 |
+
return TEXT_TRANSFORM.UPPERCASE;
|
10406 |
+
case 'lowercase':
|
10407 |
+
return TEXT_TRANSFORM.LOWERCASE;
|
10408 |
+
case 'capitalize':
|
10409 |
+
return TEXT_TRANSFORM.CAPITALIZE;
|
10410 |
+
}
|
10411 |
+
|
10412 |
+
return TEXT_TRANSFORM.NONE;
|
10413 |
+
};
|
10414 |
+
|
10415 |
+
/***/ }),
|
10416 |
+
/* 21 */
|
10417 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10418 |
+
|
10419 |
+
"use strict";
|
10420 |
+
|
10421 |
+
|
10422 |
+
Object.defineProperty(exports, "__esModule", {
|
10423 |
+
value: true
|
10424 |
+
});
|
10425 |
+
exports.reformatInputBounds = exports.inlineSelectElement = exports.inlineTextAreaElement = exports.inlineInputElement = exports.getInputBorderRadius = exports.INPUT_BACKGROUND = exports.INPUT_BORDERS = exports.INPUT_COLOR = undefined;
|
10426 |
+
|
10427 |
+
var _TextContainer = __webpack_require__(9);
|
10428 |
+
|
10429 |
+
var _TextContainer2 = _interopRequireDefault(_TextContainer);
|
10430 |
+
|
10431 |
+
var _background = __webpack_require__(5);
|
10432 |
+
|
10433 |
+
var _border = __webpack_require__(12);
|
10434 |
+
|
10435 |
+
var _Circle = __webpack_require__(50);
|
10436 |
+
|
10437 |
+
var _Circle2 = _interopRequireDefault(_Circle);
|
10438 |
+
|
10439 |
+
var _Vector = __webpack_require__(7);
|
10440 |
+
|
10441 |
+
var _Vector2 = _interopRequireDefault(_Vector);
|
10442 |
+
|
10443 |
+
var _Color = __webpack_require__(0);
|
10444 |
+
|
10445 |
+
var _Color2 = _interopRequireDefault(_Color);
|
10446 |
+
|
10447 |
+
var _Length = __webpack_require__(2);
|
10448 |
+
|
10449 |
+
var _Length2 = _interopRequireDefault(_Length);
|
10450 |
+
|
10451 |
+
var _Bounds = __webpack_require__(1);
|
10452 |
+
|
10453 |
+
var _TextBounds = __webpack_require__(22);
|
10454 |
+
|
10455 |
+
var _Util = __webpack_require__(4);
|
10456 |
+
|
10457 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10458 |
+
|
10459 |
+
var INPUT_COLOR = exports.INPUT_COLOR = new _Color2.default([42, 42, 42]);
|
10460 |
+
var INPUT_BORDER_COLOR = new _Color2.default([165, 165, 165]);
|
10461 |
+
var INPUT_BACKGROUND_COLOR = new _Color2.default([222, 222, 222]);
|
10462 |
+
var INPUT_BORDER = {
|
10463 |
+
borderWidth: 1,
|
10464 |
+
borderColor: INPUT_BORDER_COLOR,
|
10465 |
+
borderStyle: _border.BORDER_STYLE.SOLID
|
10466 |
+
};
|
10467 |
+
var INPUT_BORDERS = exports.INPUT_BORDERS = [INPUT_BORDER, INPUT_BORDER, INPUT_BORDER, INPUT_BORDER];
|
10468 |
+
var INPUT_BACKGROUND = exports.INPUT_BACKGROUND = {
|
10469 |
+
backgroundColor: INPUT_BACKGROUND_COLOR,
|
10470 |
+
backgroundImage: [],
|
10471 |
+
backgroundClip: _background.BACKGROUND_CLIP.PADDING_BOX,
|
10472 |
+
backgroundOrigin: _background.BACKGROUND_ORIGIN.PADDING_BOX
|
10473 |
+
};
|
10474 |
+
|
10475 |
+
var RADIO_BORDER_RADIUS = new _Length2.default('50%');
|
10476 |
+
var RADIO_BORDER_RADIUS_TUPLE = [RADIO_BORDER_RADIUS, RADIO_BORDER_RADIUS];
|
10477 |
+
var INPUT_RADIO_BORDER_RADIUS = [RADIO_BORDER_RADIUS_TUPLE, RADIO_BORDER_RADIUS_TUPLE, RADIO_BORDER_RADIUS_TUPLE, RADIO_BORDER_RADIUS_TUPLE];
|
10478 |
+
|
10479 |
+
var CHECKBOX_BORDER_RADIUS = new _Length2.default('3px');
|
10480 |
+
var CHECKBOX_BORDER_RADIUS_TUPLE = [CHECKBOX_BORDER_RADIUS, CHECKBOX_BORDER_RADIUS];
|
10481 |
+
var INPUT_CHECKBOX_BORDER_RADIUS = [CHECKBOX_BORDER_RADIUS_TUPLE, CHECKBOX_BORDER_RADIUS_TUPLE, CHECKBOX_BORDER_RADIUS_TUPLE, CHECKBOX_BORDER_RADIUS_TUPLE];
|
10482 |
+
|
10483 |
+
var getInputBorderRadius = exports.getInputBorderRadius = function getInputBorderRadius(node) {
|
10484 |
+
return node.type === 'radio' ? INPUT_RADIO_BORDER_RADIUS : INPUT_CHECKBOX_BORDER_RADIUS;
|
10485 |
+
};
|
10486 |
+
|
10487 |
+
var inlineInputElement = exports.inlineInputElement = function inlineInputElement(node, container) {
|
10488 |
+
if (node.type === 'radio' || node.type === 'checkbox') {
|
10489 |
+
if (node.checked) {
|
10490 |
+
var size = Math.min(container.bounds.width, container.bounds.height);
|
10491 |
+
container.childNodes.push(node.type === 'checkbox' ? [new _Vector2.default(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79), new _Vector2.default(container.bounds.left + size * 0.16, container.bounds.top + size * 0.5549), new _Vector2.default(container.bounds.left + size * 0.27347, container.bounds.top + size * 0.44071), new _Vector2.default(container.bounds.left + size * 0.39694, container.bounds.top + size * 0.5649), new _Vector2.default(container.bounds.left + size * 0.72983, container.bounds.top + size * 0.23), new _Vector2.default(container.bounds.left + size * 0.84, container.bounds.top + size * 0.34085), new _Vector2.default(container.bounds.left + size * 0.39363, container.bounds.top + size * 0.79)] : new _Circle2.default(container.bounds.left + size / 4, container.bounds.top + size / 4, size / 4));
|
10492 |
+
}
|
10493 |
+
} else {
|
10494 |
+
inlineFormElement(getInputValue(node), node, container, false);
|
10495 |
+
}
|
10496 |
+
};
|
10497 |
+
|
10498 |
+
var inlineTextAreaElement = exports.inlineTextAreaElement = function inlineTextAreaElement(node, container) {
|
10499 |
+
inlineFormElement(node.value, node, container, true);
|
10500 |
+
};
|
10501 |
+
|
10502 |
+
var inlineSelectElement = exports.inlineSelectElement = function inlineSelectElement(node, container) {
|
10503 |
+
var option = node.options[node.selectedIndex || 0];
|
10504 |
+
inlineFormElement(option ? option.text || '' : '', node, container, false);
|
10505 |
+
};
|
10506 |
+
|
10507 |
+
var reformatInputBounds = exports.reformatInputBounds = function reformatInputBounds(bounds) {
|
10508 |
+
if (bounds.width > bounds.height) {
|
10509 |
+
bounds.left += (bounds.width - bounds.height) / 2;
|
10510 |
+
bounds.width = bounds.height;
|
10511 |
+
} else if (bounds.width < bounds.height) {
|
10512 |
+
bounds.top += (bounds.height - bounds.width) / 2;
|
10513 |
+
bounds.height = bounds.width;
|
10514 |
+
}
|
10515 |
+
return bounds;
|
10516 |
+
};
|
10517 |
+
|
10518 |
+
var inlineFormElement = function inlineFormElement(value, node, container, allowLinebreak) {
|
10519 |
+
var body = node.ownerDocument.body;
|
10520 |
+
if (value.length > 0 && body) {
|
10521 |
+
var wrapper = node.ownerDocument.createElement('html2canvaswrapper');
|
10522 |
+
(0, _Util.copyCSSStyles)(node.ownerDocument.defaultView.getComputedStyle(node, null), wrapper);
|
10523 |
+
wrapper.style.position = 'absolute';
|
10524 |
+
wrapper.style.left = container.bounds.left + 'px';
|
10525 |
+
wrapper.style.top = container.bounds.top + 'px';
|
10526 |
+
if (!allowLinebreak) {
|
10527 |
+
wrapper.style.whiteSpace = 'nowrap';
|
10528 |
+
}
|
10529 |
+
var text = node.ownerDocument.createTextNode(value);
|
10530 |
+
wrapper.appendChild(text);
|
10531 |
+
body.appendChild(wrapper);
|
10532 |
+
container.childNodes.push(_TextContainer2.default.fromTextNode(text, container));
|
10533 |
+
body.removeChild(wrapper);
|
10534 |
+
}
|
10535 |
+
};
|
10536 |
+
|
10537 |
+
var getInputValue = function getInputValue(node) {
|
10538 |
+
var value = node.type === 'password' ? new Array(node.value.length + 1).join('\u2022') : node.value;
|
10539 |
+
|
10540 |
+
return value.length === 0 ? node.placeholder || '' : value;
|
10541 |
+
};
|
10542 |
+
|
10543 |
+
/***/ }),
|
10544 |
+
/* 22 */
|
10545 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10546 |
+
|
10547 |
+
"use strict";
|
10548 |
+
|
10549 |
+
|
10550 |
+
Object.defineProperty(exports, "__esModule", {
|
10551 |
+
value: true
|
10552 |
+
});
|
10553 |
+
exports.parseTextBounds = exports.TextBounds = undefined;
|
10554 |
+
|
10555 |
+
var _Bounds = __webpack_require__(1);
|
10556 |
+
|
10557 |
+
var _textDecoration = __webpack_require__(11);
|
10558 |
+
|
10559 |
+
var _Feature = __webpack_require__(10);
|
10560 |
+
|
10561 |
+
var _Feature2 = _interopRequireDefault(_Feature);
|
10562 |
+
|
10563 |
+
var _Unicode = __webpack_require__(24);
|
10564 |
+
|
10565 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10566 |
+
|
10567 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10568 |
+
|
10569 |
+
var TextBounds = exports.TextBounds = function TextBounds(text, bounds) {
|
10570 |
+
_classCallCheck(this, TextBounds);
|
10571 |
+
|
10572 |
+
this.text = text;
|
10573 |
+
this.bounds = bounds;
|
10574 |
+
};
|
10575 |
+
|
10576 |
+
var parseTextBounds = exports.parseTextBounds = function parseTextBounds(value, parent, node) {
|
10577 |
+
var letterRendering = parent.style.letterSpacing !== 0;
|
10578 |
+
var textList = letterRendering ? (0, _Unicode.toCodePoints)(value).map(function (i) {
|
10579 |
+
return (0, _Unicode.fromCodePoint)(i);
|
10580 |
+
}) : (0, _Unicode.breakWords)(value, parent);
|
10581 |
+
var length = textList.length;
|
10582 |
+
var defaultView = node.parentNode ? node.parentNode.ownerDocument.defaultView : null;
|
10583 |
+
var scrollX = defaultView ? defaultView.pageXOffset : 0;
|
10584 |
+
var scrollY = defaultView ? defaultView.pageYOffset : 0;
|
10585 |
+
var textBounds = [];
|
10586 |
+
var offset = 0;
|
10587 |
+
for (var i = 0; i < length; i++) {
|
10588 |
+
var text = textList[i];
|
10589 |
+
if (parent.style.textDecoration !== _textDecoration.TEXT_DECORATION.NONE || text.trim().length > 0) {
|
10590 |
+
if (_Feature2.default.SUPPORT_RANGE_BOUNDS) {
|
10591 |
+
textBounds.push(new TextBounds(text, getRangeBounds(node, offset, text.length, scrollX, scrollY)));
|
10592 |
+
} else {
|
10593 |
+
var replacementNode = node.splitText(text.length);
|
10594 |
+
textBounds.push(new TextBounds(text, getWrapperBounds(node, scrollX, scrollY)));
|
10595 |
+
node = replacementNode;
|
10596 |
+
}
|
10597 |
+
} else if (!_Feature2.default.SUPPORT_RANGE_BOUNDS) {
|
10598 |
+
node = node.splitText(text.length);
|
10599 |
+
}
|
10600 |
+
offset += text.length;
|
10601 |
+
}
|
10602 |
+
return textBounds;
|
10603 |
+
};
|
10604 |
+
|
10605 |
+
var getWrapperBounds = function getWrapperBounds(node, scrollX, scrollY) {
|
10606 |
+
var wrapper = node.ownerDocument.createElement('html2canvaswrapper');
|
10607 |
+
wrapper.appendChild(node.cloneNode(true));
|
10608 |
+
var parentNode = node.parentNode;
|
10609 |
+
if (parentNode) {
|
10610 |
+
parentNode.replaceChild(wrapper, node);
|
10611 |
+
var bounds = (0, _Bounds.parseBounds)(wrapper, scrollX, scrollY);
|
10612 |
+
if (wrapper.firstChild) {
|
10613 |
+
parentNode.replaceChild(wrapper.firstChild, wrapper);
|
10614 |
+
}
|
10615 |
+
return bounds;
|
10616 |
+
}
|
10617 |
+
return new _Bounds.Bounds(0, 0, 0, 0);
|
10618 |
+
};
|
10619 |
+
|
10620 |
+
var getRangeBounds = function getRangeBounds(node, offset, length, scrollX, scrollY) {
|
10621 |
+
var range = node.ownerDocument.createRange();
|
10622 |
+
range.setStart(node, offset);
|
10623 |
+
range.setEnd(node, offset + length);
|
10624 |
+
return _Bounds.Bounds.fromClientRect(range.getBoundingClientRect(), scrollX, scrollY);
|
10625 |
+
};
|
10626 |
+
|
10627 |
+
/***/ }),
|
10628 |
+
/* 23 */
|
10629 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10630 |
+
|
10631 |
+
"use strict";
|
10632 |
+
|
10633 |
+
|
10634 |
+
Object.defineProperty(exports, "__esModule", {
|
10635 |
+
value: true
|
10636 |
+
});
|
10637 |
+
|
10638 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10639 |
+
|
10640 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10641 |
+
|
10642 |
+
var ForeignObjectRenderer = function () {
|
10643 |
+
function ForeignObjectRenderer(element) {
|
10644 |
+
_classCallCheck(this, ForeignObjectRenderer);
|
10645 |
+
|
10646 |
+
this.element = element;
|
10647 |
+
}
|
10648 |
+
|
10649 |
+
_createClass(ForeignObjectRenderer, [{
|
10650 |
+
key: 'render',
|
10651 |
+
value: function render(options) {
|
10652 |
+
var _this = this;
|
10653 |
+
|
10654 |
+
this.options = options;
|
10655 |
+
this.canvas = document.createElement('canvas');
|
10656 |
+
this.ctx = this.canvas.getContext('2d');
|
10657 |
+
this.canvas.width = Math.floor(options.width) * options.scale;
|
10658 |
+
this.canvas.height = Math.floor(options.height) * options.scale;
|
10659 |
+
this.canvas.style.width = options.width + 'px';
|
10660 |
+
this.canvas.style.height = options.height + 'px';
|
10661 |
+
|
10662 |
+
options.logger.log('ForeignObject renderer initialized (' + options.width + 'x' + options.height + ' at ' + options.x + ',' + options.y + ') with scale ' + options.scale);
|
10663 |
+
var svg = createForeignObjectSVG(Math.max(options.windowWidth, options.width) * options.scale, Math.max(options.windowHeight, options.height) * options.scale, options.scrollX * options.scale, options.scrollY * options.scale, this.element);
|
10664 |
+
|
10665 |
+
return loadSerializedSVG(svg).then(function (img) {
|
10666 |
+
if (options.backgroundColor) {
|
10667 |
+
_this.ctx.fillStyle = options.backgroundColor.toString();
|
10668 |
+
_this.ctx.fillRect(0, 0, options.width * options.scale, options.height * options.scale);
|
10669 |
+
}
|
10670 |
+
|
10671 |
+
_this.ctx.drawImage(img, -options.x * options.scale, -options.y * options.scale);
|
10672 |
+
return _this.canvas;
|
10673 |
+
});
|
10674 |
+
}
|
10675 |
+
}]);
|
10676 |
+
|
10677 |
+
return ForeignObjectRenderer;
|
10678 |
+
}();
|
10679 |
+
|
10680 |
+
exports.default = ForeignObjectRenderer;
|
10681 |
+
var createForeignObjectSVG = exports.createForeignObjectSVG = function createForeignObjectSVG(width, height, x, y, node) {
|
10682 |
+
var xmlns = 'http://www.w3.org/2000/svg';
|
10683 |
+
var svg = document.createElementNS(xmlns, 'svg');
|
10684 |
+
var foreignObject = document.createElementNS(xmlns, 'foreignObject');
|
10685 |
+
svg.setAttributeNS(null, 'width', width);
|
10686 |
+
svg.setAttributeNS(null, 'height', height);
|
10687 |
+
|
10688 |
+
foreignObject.setAttributeNS(null, 'width', '100%');
|
10689 |
+
foreignObject.setAttributeNS(null, 'height', '100%');
|
10690 |
+
foreignObject.setAttributeNS(null, 'x', x);
|
10691 |
+
foreignObject.setAttributeNS(null, 'y', y);
|
10692 |
+
foreignObject.setAttributeNS(null, 'externalResourcesRequired', 'true');
|
10693 |
+
svg.appendChild(foreignObject);
|
10694 |
+
|
10695 |
+
foreignObject.appendChild(node);
|
10696 |
+
|
10697 |
+
return svg;
|
10698 |
+
};
|
10699 |
+
|
10700 |
+
var loadSerializedSVG = exports.loadSerializedSVG = function loadSerializedSVG(svg) {
|
10701 |
+
return new Promise(function (resolve, reject) {
|
10702 |
+
var img = new Image();
|
10703 |
+
img.onload = function () {
|
10704 |
+
return resolve(img);
|
10705 |
+
};
|
10706 |
+
img.onerror = reject;
|
10707 |
+
|
10708 |
+
img.src = 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(new XMLSerializer().serializeToString(svg));
|
10709 |
+
});
|
10710 |
+
};
|
10711 |
+
|
10712 |
+
/***/ }),
|
10713 |
+
/* 24 */
|
10714 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10715 |
+
|
10716 |
+
"use strict";
|
10717 |
+
|
10718 |
+
|
10719 |
+
Object.defineProperty(exports, "__esModule", {
|
10720 |
+
value: true
|
10721 |
+
});
|
10722 |
+
exports.breakWords = exports.fromCodePoint = exports.toCodePoints = undefined;
|
10723 |
+
|
10724 |
+
var _cssLineBreak = __webpack_require__(46);
|
10725 |
+
|
10726 |
+
Object.defineProperty(exports, 'toCodePoints', {
|
10727 |
+
enumerable: true,
|
10728 |
+
get: function get() {
|
10729 |
+
return _cssLineBreak.toCodePoints;
|
10730 |
+
}
|
10731 |
+
});
|
10732 |
+
Object.defineProperty(exports, 'fromCodePoint', {
|
10733 |
+
enumerable: true,
|
10734 |
+
get: function get() {
|
10735 |
+
return _cssLineBreak.fromCodePoint;
|
10736 |
+
}
|
10737 |
+
});
|
10738 |
+
|
10739 |
+
var _NodeContainer = __webpack_require__(3);
|
10740 |
+
|
10741 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
10742 |
+
|
10743 |
+
var _overflowWrap = __webpack_require__(18);
|
10744 |
+
|
10745 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10746 |
+
|
10747 |
+
var breakWords = exports.breakWords = function breakWords(str, parent) {
|
10748 |
+
var breaker = (0, _cssLineBreak.LineBreaker)(str, {
|
10749 |
+
lineBreak: parent.style.lineBreak,
|
10750 |
+
wordBreak: parent.style.overflowWrap === _overflowWrap.OVERFLOW_WRAP.BREAK_WORD ? 'break-word' : parent.style.wordBreak
|
10751 |
+
});
|
10752 |
+
|
10753 |
+
var words = [];
|
10754 |
+
var bk = void 0;
|
10755 |
+
|
10756 |
+
while (!(bk = breaker.next()).done) {
|
10757 |
+
words.push(bk.value.slice());
|
10758 |
+
}
|
10759 |
+
|
10760 |
+
return words;
|
10761 |
+
};
|
10762 |
+
|
10763 |
+
/***/ }),
|
10764 |
+
/* 25 */
|
10765 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10766 |
+
|
10767 |
+
"use strict";
|
10768 |
+
|
10769 |
+
|
10770 |
+
Object.defineProperty(exports, "__esModule", {
|
10771 |
+
value: true
|
10772 |
+
});
|
10773 |
+
exports.FontMetrics = undefined;
|
10774 |
+
|
10775 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
10776 |
+
|
10777 |
+
var _Util = __webpack_require__(4);
|
10778 |
+
|
10779 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
10780 |
+
|
10781 |
+
var SAMPLE_TEXT = 'Hidden Text';
|
10782 |
+
|
10783 |
+
var FontMetrics = exports.FontMetrics = function () {
|
10784 |
+
function FontMetrics(document) {
|
10785 |
+
_classCallCheck(this, FontMetrics);
|
10786 |
+
|
10787 |
+
this._data = {};
|
10788 |
+
this._document = document;
|
10789 |
+
}
|
10790 |
+
|
10791 |
+
_createClass(FontMetrics, [{
|
10792 |
+
key: '_parseMetrics',
|
10793 |
+
value: function _parseMetrics(font) {
|
10794 |
+
var container = this._document.createElement('div');
|
10795 |
+
var img = this._document.createElement('img');
|
10796 |
+
var span = this._document.createElement('span');
|
10797 |
+
|
10798 |
+
var body = this._document.body;
|
10799 |
+
if (!body) {
|
10800 |
+
throw new Error( true ? 'No document found for font metrics' : '');
|
10801 |
+
}
|
10802 |
+
|
10803 |
+
container.style.visibility = 'hidden';
|
10804 |
+
container.style.fontFamily = font.fontFamily;
|
10805 |
+
container.style.fontSize = font.fontSize;
|
10806 |
+
container.style.margin = '0';
|
10807 |
+
container.style.padding = '0';
|
10808 |
+
|
10809 |
+
body.appendChild(container);
|
10810 |
+
|
10811 |
+
img.src = _Util.SMALL_IMAGE;
|
10812 |
+
img.width = 1;
|
10813 |
+
img.height = 1;
|
10814 |
+
|
10815 |
+
img.style.margin = '0';
|
10816 |
+
img.style.padding = '0';
|
10817 |
+
img.style.verticalAlign = 'baseline';
|
10818 |
+
|
10819 |
+
span.style.fontFamily = font.fontFamily;
|
10820 |
+
span.style.fontSize = font.fontSize;
|
10821 |
+
span.style.margin = '0';
|
10822 |
+
span.style.padding = '0';
|
10823 |
+
|
10824 |
+
span.appendChild(this._document.createTextNode(SAMPLE_TEXT));
|
10825 |
+
container.appendChild(span);
|
10826 |
+
container.appendChild(img);
|
10827 |
+
var baseline = img.offsetTop - span.offsetTop + 2;
|
10828 |
+
|
10829 |
+
container.removeChild(span);
|
10830 |
+
container.appendChild(this._document.createTextNode(SAMPLE_TEXT));
|
10831 |
+
|
10832 |
+
container.style.lineHeight = 'normal';
|
10833 |
+
img.style.verticalAlign = 'super';
|
10834 |
+
|
10835 |
+
var middle = img.offsetTop - container.offsetTop + 2;
|
10836 |
+
|
10837 |
+
body.removeChild(container);
|
10838 |
+
|
10839 |
+
return { baseline: baseline, middle: middle };
|
10840 |
+
}
|
10841 |
+
}, {
|
10842 |
+
key: 'getMetrics',
|
10843 |
+
value: function getMetrics(font) {
|
10844 |
+
var key = font.fontFamily + ' ' + font.fontSize;
|
10845 |
+
if (this._data[key] === undefined) {
|
10846 |
+
this._data[key] = this._parseMetrics(font);
|
10847 |
+
}
|
10848 |
+
|
10849 |
+
return this._data[key];
|
10850 |
+
}
|
10851 |
+
}]);
|
10852 |
+
|
10853 |
+
return FontMetrics;
|
10854 |
+
}();
|
10855 |
+
|
10856 |
+
/***/ }),
|
10857 |
+
/* 26 */
|
10858 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10859 |
+
|
10860 |
+
"use strict";
|
10861 |
+
|
10862 |
+
|
10863 |
+
Object.defineProperty(exports, "__esModule", {
|
10864 |
+
value: true
|
10865 |
+
});
|
10866 |
+
exports.Proxy = undefined;
|
10867 |
+
|
10868 |
+
var _Feature = __webpack_require__(10);
|
10869 |
+
|
10870 |
+
var _Feature2 = _interopRequireDefault(_Feature);
|
10871 |
+
|
10872 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10873 |
+
|
10874 |
+
var Proxy = exports.Proxy = function Proxy(src, options) {
|
10875 |
+
if (!options.proxy) {
|
10876 |
+
return Promise.reject( true ? 'No proxy defined' : null);
|
10877 |
+
}
|
10878 |
+
var proxy = options.proxy;
|
10879 |
+
|
10880 |
+
return new Promise(function (resolve, reject) {
|
10881 |
+
var responseType = _Feature2.default.SUPPORT_CORS_XHR && _Feature2.default.SUPPORT_RESPONSE_TYPE ? 'blob' : 'text';
|
10882 |
+
var xhr = _Feature2.default.SUPPORT_CORS_XHR ? new XMLHttpRequest() : new XDomainRequest();
|
10883 |
+
xhr.onload = function () {
|
10884 |
+
if (xhr instanceof XMLHttpRequest) {
|
10885 |
+
if (xhr.status === 200) {
|
10886 |
+
if (responseType === 'text') {
|
10887 |
+
resolve(xhr.response);
|
10888 |
+
} else {
|
10889 |
+
var reader = new FileReader();
|
10890 |
+
// $FlowFixMe
|
10891 |
+
reader.addEventListener('load', function () {
|
10892 |
+
return resolve(reader.result);
|
10893 |
+
}, false);
|
10894 |
+
// $FlowFixMe
|
10895 |
+
reader.addEventListener('error', function (e) {
|
10896 |
+
return reject(e);
|
10897 |
+
}, false);
|
10898 |
+
reader.readAsDataURL(xhr.response);
|
10899 |
+
}
|
10900 |
+
} else {
|
10901 |
+
reject( true ? 'Failed to proxy resource ' + src.substring(0, 256) + ' with status code ' + xhr.status : '');
|
10902 |
+
}
|
10903 |
+
} else {
|
10904 |
+
resolve(xhr.responseText);
|
10905 |
+
}
|
10906 |
+
};
|
10907 |
+
|
10908 |
+
xhr.onerror = reject;
|
10909 |
+
xhr.open('GET', proxy + '?url=' + encodeURIComponent(src) + '&responseType=' + responseType);
|
10910 |
+
|
10911 |
+
if (responseType !== 'text' && xhr instanceof XMLHttpRequest) {
|
10912 |
+
xhr.responseType = responseType;
|
10913 |
+
}
|
10914 |
+
|
10915 |
+
if (options.imageTimeout) {
|
10916 |
+
var timeout = options.imageTimeout;
|
10917 |
+
xhr.timeout = timeout;
|
10918 |
+
xhr.ontimeout = function () {
|
10919 |
+
return reject( true ? 'Timed out (' + timeout + 'ms) proxying ' + src.substring(0, 256) : '');
|
10920 |
+
};
|
10921 |
+
}
|
10922 |
+
|
10923 |
+
xhr.send();
|
10924 |
+
});
|
10925 |
+
};
|
10926 |
+
|
10927 |
+
/***/ }),
|
10928 |
+
/* 27 */
|
10929 |
+
/***/ (function(module, exports, __webpack_require__) {
|
10930 |
+
|
10931 |
+
"use strict";
|
10932 |
+
|
10933 |
+
|
10934 |
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
10935 |
+
|
10936 |
+
var _CanvasRenderer = __webpack_require__(15);
|
10937 |
+
|
10938 |
+
var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer);
|
10939 |
+
|
10940 |
+
var _Logger = __webpack_require__(16);
|
10941 |
+
|
10942 |
+
var _Logger2 = _interopRequireDefault(_Logger);
|
10943 |
+
|
10944 |
+
var _Window = __webpack_require__(28);
|
10945 |
+
|
10946 |
+
var _Bounds = __webpack_require__(1);
|
10947 |
+
|
10948 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
10949 |
+
|
10950 |
+
var html2canvas = function html2canvas(element, conf) {
|
10951 |
+
var config = conf || {};
|
10952 |
+
var logger = new _Logger2.default(typeof config.logging === 'boolean' ? config.logging : true);
|
10953 |
+
logger.log('html2canvas ' + "1.0.0-alpha.10");
|
10954 |
+
|
10955 |
+
if (true && typeof config.onrendered === 'function') {
|
10956 |
+
logger.error('onrendered option is deprecated, html2canvas returns a Promise with the canvas as the value');
|
10957 |
+
}
|
10958 |
+
|
10959 |
+
var ownerDocument = element.ownerDocument;
|
10960 |
+
if (!ownerDocument) {
|
10961 |
+
return Promise.reject('Provided element is not within a Document');
|
10962 |
+
}
|
10963 |
+
var defaultView = ownerDocument.defaultView;
|
10964 |
+
|
10965 |
+
var scrollX = defaultView.pageXOffset;
|
10966 |
+
var scrollY = defaultView.pageYOffset;
|
10967 |
+
|
10968 |
+
var isDocument = element.tagName === 'HTML' || element.tagName === 'BODY';
|
10969 |
+
|
10970 |
+
var _ref = isDocument ? (0, _Bounds.parseDocumentSize)(ownerDocument) : (0, _Bounds.parseBounds)(element, scrollX, scrollY),
|
10971 |
+
width = _ref.width,
|
10972 |
+
height = _ref.height,
|
10973 |
+
left = _ref.left,
|
10974 |
+
top = _ref.top;
|
10975 |
+
|
10976 |
+
var defaultOptions = {
|
10977 |
+
async: true,
|
10978 |
+
allowTaint: false,
|
10979 |
+
backgroundColor: '#ffffff',
|
10980 |
+
imageTimeout: 15000,
|
10981 |
+
logging: true,
|
10982 |
+
proxy: null,
|
10983 |
+
removeContainer: true,
|
10984 |
+
foreignObjectRendering: false,
|
10985 |
+
scale: defaultView.devicePixelRatio || 1,
|
10986 |
+
target: new _CanvasRenderer2.default(config.canvas),
|
10987 |
+
useCORS: false,
|
10988 |
+
x: left,
|
10989 |
+
y: top,
|
10990 |
+
width: Math.ceil(width),
|
10991 |
+
height: Math.ceil(height),
|
10992 |
+
windowWidth: defaultView.innerWidth,
|
10993 |
+
windowHeight: defaultView.innerHeight,
|
10994 |
+
scrollX: defaultView.pageXOffset,
|
10995 |
+
scrollY: defaultView.pageYOffset
|
10996 |
+
};
|
10997 |
+
|
10998 |
+
var result = (0, _Window.renderElement)(element, _extends({}, defaultOptions, config), logger);
|
10999 |
+
|
11000 |
+
if (true) {
|
11001 |
+
return result.catch(function (e) {
|
11002 |
+
logger.error(e);
|
11003 |
+
throw e;
|
11004 |
+
});
|
11005 |
+
}
|
11006 |
+
return result;
|
11007 |
+
};
|
11008 |
+
|
11009 |
+
html2canvas.CanvasRenderer = _CanvasRenderer2.default;
|
11010 |
+
|
11011 |
+
module.exports = html2canvas;
|
11012 |
+
|
11013 |
+
/***/ }),
|
11014 |
+
/* 28 */
|
11015 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11016 |
+
|
11017 |
+
"use strict";
|
11018 |
+
|
11019 |
+
|
11020 |
+
Object.defineProperty(exports, "__esModule", {
|
11021 |
+
value: true
|
11022 |
+
});
|
11023 |
+
exports.renderElement = undefined;
|
11024 |
+
|
11025 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
11026 |
+
|
11027 |
+
var _Logger = __webpack_require__(16);
|
11028 |
+
|
11029 |
+
var _Logger2 = _interopRequireDefault(_Logger);
|
11030 |
+
|
11031 |
+
var _NodeParser = __webpack_require__(29);
|
11032 |
+
|
11033 |
+
var _Renderer = __webpack_require__(51);
|
11034 |
+
|
11035 |
+
var _Renderer2 = _interopRequireDefault(_Renderer);
|
11036 |
+
|
11037 |
+
var _ForeignObjectRenderer = __webpack_require__(23);
|
11038 |
+
|
11039 |
+
var _ForeignObjectRenderer2 = _interopRequireDefault(_ForeignObjectRenderer);
|
11040 |
+
|
11041 |
+
var _Feature = __webpack_require__(10);
|
11042 |
+
|
11043 |
+
var _Feature2 = _interopRequireDefault(_Feature);
|
11044 |
+
|
11045 |
+
var _Bounds = __webpack_require__(1);
|
11046 |
+
|
11047 |
+
var _Clone = __webpack_require__(54);
|
11048 |
+
|
11049 |
+
var _Font = __webpack_require__(25);
|
11050 |
+
|
11051 |
+
var _Color = __webpack_require__(0);
|
11052 |
+
|
11053 |
+
var _Color2 = _interopRequireDefault(_Color);
|
11054 |
+
|
11055 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11056 |
+
|
11057 |
+
var renderElement = exports.renderElement = function renderElement(element, options, logger) {
|
11058 |
+
var ownerDocument = element.ownerDocument;
|
11059 |
+
|
11060 |
+
var windowBounds = new _Bounds.Bounds(options.scrollX, options.scrollY, options.windowWidth, options.windowHeight);
|
11061 |
+
|
11062 |
+
// http://www.w3.org/TR/css3-background/#special-backgrounds
|
11063 |
+
var documentBackgroundColor = ownerDocument.documentElement ? new _Color2.default(getComputedStyle(ownerDocument.documentElement).backgroundColor) : _Color.TRANSPARENT;
|
11064 |
+
var bodyBackgroundColor = ownerDocument.body ? new _Color2.default(getComputedStyle(ownerDocument.body).backgroundColor) : _Color.TRANSPARENT;
|
11065 |
+
|
11066 |
+
var backgroundColor = element === ownerDocument.documentElement ? documentBackgroundColor.isTransparent() ? bodyBackgroundColor.isTransparent() ? options.backgroundColor ? new _Color2.default(options.backgroundColor) : null : bodyBackgroundColor : documentBackgroundColor : options.backgroundColor ? new _Color2.default(options.backgroundColor) : null;
|
11067 |
+
|
11068 |
+
return (options.foreignObjectRendering ? // $FlowFixMe
|
11069 |
+
_Feature2.default.SUPPORT_FOREIGNOBJECT_DRAWING : Promise.resolve(false)).then(function (supportForeignObject) {
|
11070 |
+
return supportForeignObject ? function (cloner) {
|
11071 |
+
if (true) {
|
11072 |
+
logger.log('Document cloned, using foreignObject rendering');
|
11073 |
+
}
|
11074 |
+
|
11075 |
+
return cloner.inlineFonts(ownerDocument).then(function () {
|
11076 |
+
return cloner.resourceLoader.ready();
|
11077 |
+
}).then(function () {
|
11078 |
+
var renderer = new _ForeignObjectRenderer2.default(cloner.documentElement);
|
11079 |
+
return renderer.render({
|
11080 |
+
backgroundColor: backgroundColor,
|
11081 |
+
logger: logger,
|
11082 |
+
scale: options.scale,
|
11083 |
+
x: options.x,
|
11084 |
+
y: options.y,
|
11085 |
+
width: options.width,
|
11086 |
+
height: options.height,
|
11087 |
+
windowWidth: options.windowWidth,
|
11088 |
+
windowHeight: options.windowHeight,
|
11089 |
+
scrollX: options.scrollX,
|
11090 |
+
scrollY: options.scrollY
|
11091 |
+
});
|
11092 |
+
});
|
11093 |
+
}(new _Clone.DocumentCloner(element, options, logger, true, renderElement)) : (0, _Clone.cloneWindow)(ownerDocument, windowBounds, element, options, logger, renderElement).then(function (_ref) {
|
11094 |
+
var _ref2 = _slicedToArray(_ref, 3),
|
11095 |
+
container = _ref2[0],
|
11096 |
+
clonedElement = _ref2[1],
|
11097 |
+
resourceLoader = _ref2[2];
|
11098 |
+
|
11099 |
+
if (true) {
|
11100 |
+
logger.log('Document cloned, using computed rendering');
|
11101 |
+
}
|
11102 |
+
|
11103 |
+
var stack = (0, _NodeParser.NodeParser)(clonedElement, resourceLoader, logger);
|
11104 |
+
var clonedDocument = clonedElement.ownerDocument;
|
11105 |
+
|
11106 |
+
if (backgroundColor === stack.container.style.background.backgroundColor) {
|
11107 |
+
stack.container.style.background.backgroundColor = _Color.TRANSPARENT;
|
11108 |
+
}
|
11109 |
+
|
11110 |
+
return resourceLoader.ready().then(function (imageStore) {
|
11111 |
+
var fontMetrics = new _Font.FontMetrics(clonedDocument);
|
11112 |
+
if (true) {
|
11113 |
+
logger.log('Starting renderer');
|
11114 |
+
}
|
11115 |
+
|
11116 |
+
var renderOptions = {
|
11117 |
+
backgroundColor: backgroundColor,
|
11118 |
+
fontMetrics: fontMetrics,
|
11119 |
+
imageStore: imageStore,
|
11120 |
+
logger: logger,
|
11121 |
+
scale: options.scale,
|
11122 |
+
x: options.x,
|
11123 |
+
y: options.y,
|
11124 |
+
width: options.width,
|
11125 |
+
height: options.height
|
11126 |
+
};
|
11127 |
+
|
11128 |
+
if (Array.isArray(options.target)) {
|
11129 |
+
return Promise.all(options.target.map(function (target) {
|
11130 |
+
var renderer = new _Renderer2.default(target, renderOptions);
|
11131 |
+
return renderer.render(stack);
|
11132 |
+
}));
|
11133 |
+
} else {
|
11134 |
+
var renderer = new _Renderer2.default(options.target, renderOptions);
|
11135 |
+
var canvas = renderer.render(stack);
|
11136 |
+
if (options.removeContainer === true) {
|
11137 |
+
if (container.parentNode) {
|
11138 |
+
container.parentNode.removeChild(container);
|
11139 |
+
} else if (true) {
|
11140 |
+
logger.log('Cannot detach cloned iframe as it is not in the DOM anymore');
|
11141 |
+
}
|
11142 |
+
}
|
11143 |
+
|
11144 |
+
return canvas;
|
11145 |
+
}
|
11146 |
+
});
|
11147 |
+
});
|
11148 |
+
});
|
11149 |
+
};
|
11150 |
+
|
11151 |
+
/***/ }),
|
11152 |
+
/* 29 */
|
11153 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11154 |
+
|
11155 |
+
"use strict";
|
11156 |
+
|
11157 |
+
|
11158 |
+
Object.defineProperty(exports, "__esModule", {
|
11159 |
+
value: true
|
11160 |
+
});
|
11161 |
+
exports.NodeParser = undefined;
|
11162 |
+
|
11163 |
+
var _StackingContext = __webpack_require__(30);
|
11164 |
+
|
11165 |
+
var _StackingContext2 = _interopRequireDefault(_StackingContext);
|
11166 |
+
|
11167 |
+
var _NodeContainer = __webpack_require__(3);
|
11168 |
+
|
11169 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
11170 |
+
|
11171 |
+
var _TextContainer = __webpack_require__(9);
|
11172 |
+
|
11173 |
+
var _TextContainer2 = _interopRequireDefault(_TextContainer);
|
11174 |
+
|
11175 |
+
var _Input = __webpack_require__(21);
|
11176 |
+
|
11177 |
+
var _ListItem = __webpack_require__(14);
|
11178 |
+
|
11179 |
+
var _listStyle = __webpack_require__(8);
|
11180 |
+
|
11181 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11182 |
+
|
11183 |
+
var NodeParser = exports.NodeParser = function NodeParser(node, resourceLoader, logger) {
|
11184 |
+
if (true) {
|
11185 |
+
logger.log('Starting node parsing');
|
11186 |
+
}
|
11187 |
+
|
11188 |
+
var index = 0;
|
11189 |
+
|
11190 |
+
var container = new _NodeContainer2.default(node, null, resourceLoader, index++);
|
11191 |
+
var stack = new _StackingContext2.default(container, null, true);
|
11192 |
+
|
11193 |
+
parseNodeTree(node, container, stack, resourceLoader, index);
|
11194 |
+
|
11195 |
+
if (true) {
|
11196 |
+
logger.log('Finished parsing node tree');
|
11197 |
+
}
|
11198 |
+
|
11199 |
+
return stack;
|
11200 |
+
};
|
11201 |
+
|
11202 |
+
var IGNORED_NODE_NAMES = ['SCRIPT', 'HEAD', 'TITLE', 'OBJECT', 'BR', 'OPTION'];
|
11203 |
+
|
11204 |
+
var parseNodeTree = function parseNodeTree(node, parent, stack, resourceLoader, index) {
|
11205 |
+
if (true && index > 50000) {
|
11206 |
+
throw new Error('Recursion error while parsing node tree');
|
11207 |
+
}
|
11208 |
+
|
11209 |
+
for (var childNode = node.firstChild, nextNode; childNode; childNode = nextNode) {
|
11210 |
+
nextNode = childNode.nextSibling;
|
11211 |
+
var defaultView = childNode.ownerDocument.defaultView;
|
11212 |
+
if (childNode instanceof defaultView.Text || childNode instanceof Text || defaultView.parent && childNode instanceof defaultView.parent.Text) {
|
11213 |
+
if (childNode.data.trim().length > 0) {
|
11214 |
+
parent.childNodes.push(_TextContainer2.default.fromTextNode(childNode, parent));
|
11215 |
+
}
|
11216 |
+
} else if (childNode instanceof defaultView.HTMLElement || childNode instanceof HTMLElement || defaultView.parent && childNode instanceof defaultView.parent.HTMLElement) {
|
11217 |
+
if (IGNORED_NODE_NAMES.indexOf(childNode.nodeName) === -1) {
|
11218 |
+
var container = new _NodeContainer2.default(childNode, parent, resourceLoader, index++);
|
11219 |
+
if (container.isVisible()) {
|
11220 |
+
if (childNode.tagName === 'INPUT') {
|
11221 |
+
// $FlowFixMe
|
11222 |
+
(0, _Input.inlineInputElement)(childNode, container);
|
11223 |
+
} else if (childNode.tagName === 'TEXTAREA') {
|
11224 |
+
// $FlowFixMe
|
11225 |
+
(0, _Input.inlineTextAreaElement)(childNode, container);
|
11226 |
+
} else if (childNode.tagName === 'SELECT') {
|
11227 |
+
// $FlowFixMe
|
11228 |
+
(0, _Input.inlineSelectElement)(childNode, container);
|
11229 |
+
} else if (container.style.listStyle && container.style.listStyle.listStyleType !== _listStyle.LIST_STYLE_TYPE.NONE) {
|
11230 |
+
(0, _ListItem.inlineListItemElement)(childNode, container, resourceLoader);
|
11231 |
+
}
|
11232 |
+
|
11233 |
+
var SHOULD_TRAVERSE_CHILDREN = childNode.tagName !== 'TEXTAREA';
|
11234 |
+
var treatAsRealStackingContext = createsRealStackingContext(container, childNode);
|
11235 |
+
if (treatAsRealStackingContext || createsStackingContext(container)) {
|
11236 |
+
// for treatAsRealStackingContext:false, any positioned descendants and descendants
|
11237 |
+
// which actually create a new stacking context should be considered part of the parent stacking context
|
11238 |
+
var parentStack = treatAsRealStackingContext || container.isPositioned() ? stack.getRealParentStackingContext() : stack;
|
11239 |
+
var childStack = new _StackingContext2.default(container, parentStack, treatAsRealStackingContext);
|
11240 |
+
parentStack.contexts.push(childStack);
|
11241 |
+
if (SHOULD_TRAVERSE_CHILDREN) {
|
11242 |
+
parseNodeTree(childNode, container, childStack, resourceLoader, index);
|
11243 |
+
}
|
11244 |
+
} else {
|
11245 |
+
stack.children.push(container);
|
11246 |
+
if (SHOULD_TRAVERSE_CHILDREN) {
|
11247 |
+
parseNodeTree(childNode, container, stack, resourceLoader, index);
|
11248 |
+
}
|
11249 |
+
}
|
11250 |
+
}
|
11251 |
+
}
|
11252 |
+
} else if (childNode instanceof defaultView.SVGSVGElement || childNode instanceof SVGSVGElement || defaultView.parent && childNode instanceof defaultView.parent.SVGSVGElement) {
|
11253 |
+
var _container = new _NodeContainer2.default(childNode, parent, resourceLoader, index++);
|
11254 |
+
var _treatAsRealStackingContext = createsRealStackingContext(_container, childNode);
|
11255 |
+
if (_treatAsRealStackingContext || createsStackingContext(_container)) {
|
11256 |
+
// for treatAsRealStackingContext:false, any positioned descendants and descendants
|
11257 |
+
// which actually create a new stacking context should be considered part of the parent stacking context
|
11258 |
+
var _parentStack = _treatAsRealStackingContext || _container.isPositioned() ? stack.getRealParentStackingContext() : stack;
|
11259 |
+
var _childStack = new _StackingContext2.default(_container, _parentStack, _treatAsRealStackingContext);
|
11260 |
+
_parentStack.contexts.push(_childStack);
|
11261 |
+
} else {
|
11262 |
+
stack.children.push(_container);
|
11263 |
+
}
|
11264 |
+
}
|
11265 |
+
}
|
11266 |
+
};
|
11267 |
+
|
11268 |
+
var createsRealStackingContext = function createsRealStackingContext(container, node) {
|
11269 |
+
return container.isRootElement() || container.isPositionedWithZIndex() || container.style.opacity < 1 || container.isTransformed() || isBodyWithTransparentRoot(container, node);
|
11270 |
+
};
|
11271 |
+
|
11272 |
+
var createsStackingContext = function createsStackingContext(container) {
|
11273 |
+
return container.isPositioned() || container.isFloating();
|
11274 |
+
};
|
11275 |
+
|
11276 |
+
var isBodyWithTransparentRoot = function isBodyWithTransparentRoot(container, node) {
|
11277 |
+
return node.nodeName === 'BODY' && container.parent instanceof _NodeContainer2.default && container.parent.style.background.backgroundColor.isTransparent();
|
11278 |
+
};
|
11279 |
+
|
11280 |
+
/***/ }),
|
11281 |
+
/* 30 */
|
11282 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11283 |
+
|
11284 |
+
"use strict";
|
11285 |
+
|
11286 |
+
|
11287 |
+
Object.defineProperty(exports, "__esModule", {
|
11288 |
+
value: true
|
11289 |
+
});
|
11290 |
+
|
11291 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
11292 |
+
|
11293 |
+
var _NodeContainer = __webpack_require__(3);
|
11294 |
+
|
11295 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
11296 |
+
|
11297 |
+
var _position = __webpack_require__(19);
|
11298 |
+
|
11299 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11300 |
+
|
11301 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
11302 |
+
|
11303 |
+
var StackingContext = function () {
|
11304 |
+
function StackingContext(container, parent, treatAsRealStackingContext) {
|
11305 |
+
_classCallCheck(this, StackingContext);
|
11306 |
+
|
11307 |
+
this.container = container;
|
11308 |
+
this.parent = parent;
|
11309 |
+
this.contexts = [];
|
11310 |
+
this.children = [];
|
11311 |
+
this.treatAsRealStackingContext = treatAsRealStackingContext;
|
11312 |
+
}
|
11313 |
+
|
11314 |
+
_createClass(StackingContext, [{
|
11315 |
+
key: 'getOpacity',
|
11316 |
+
value: function getOpacity() {
|
11317 |
+
return this.parent ? this.container.style.opacity * this.parent.getOpacity() : this.container.style.opacity;
|
11318 |
+
}
|
11319 |
+
}, {
|
11320 |
+
key: 'getRealParentStackingContext',
|
11321 |
+
value: function getRealParentStackingContext() {
|
11322 |
+
return !this.parent || this.treatAsRealStackingContext ? this : this.parent.getRealParentStackingContext();
|
11323 |
+
}
|
11324 |
+
}]);
|
11325 |
+
|
11326 |
+
return StackingContext;
|
11327 |
+
}();
|
11328 |
+
|
11329 |
+
exports.default = StackingContext;
|
11330 |
+
|
11331 |
+
/***/ }),
|
11332 |
+
/* 31 */
|
11333 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11334 |
+
|
11335 |
+
"use strict";
|
11336 |
+
|
11337 |
+
|
11338 |
+
Object.defineProperty(exports, "__esModule", {
|
11339 |
+
value: true
|
11340 |
+
});
|
11341 |
+
|
11342 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
11343 |
+
|
11344 |
+
var Size = function Size(width, height) {
|
11345 |
+
_classCallCheck(this, Size);
|
11346 |
+
|
11347 |
+
this.width = width;
|
11348 |
+
this.height = height;
|
11349 |
+
};
|
11350 |
+
|
11351 |
+
exports.default = Size;
|
11352 |
+
|
11353 |
+
/***/ }),
|
11354 |
+
/* 32 */
|
11355 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11356 |
+
|
11357 |
+
"use strict";
|
11358 |
+
|
11359 |
+
|
11360 |
+
Object.defineProperty(exports, "__esModule", {
|
11361 |
+
value: true
|
11362 |
+
});
|
11363 |
+
|
11364 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
11365 |
+
|
11366 |
+
var _Path = __webpack_require__(6);
|
11367 |
+
|
11368 |
+
var _Vector = __webpack_require__(7);
|
11369 |
+
|
11370 |
+
var _Vector2 = _interopRequireDefault(_Vector);
|
11371 |
+
|
11372 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11373 |
+
|
11374 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
11375 |
+
|
11376 |
+
var lerp = function lerp(a, b, t) {
|
11377 |
+
return new _Vector2.default(a.x + (b.x - a.x) * t, a.y + (b.y - a.y) * t);
|
11378 |
+
};
|
11379 |
+
|
11380 |
+
var BezierCurve = function () {
|
11381 |
+
function BezierCurve(start, startControl, endControl, end) {
|
11382 |
+
_classCallCheck(this, BezierCurve);
|
11383 |
+
|
11384 |
+
this.type = _Path.PATH.BEZIER_CURVE;
|
11385 |
+
this.start = start;
|
11386 |
+
this.startControl = startControl;
|
11387 |
+
this.endControl = endControl;
|
11388 |
+
this.end = end;
|
11389 |
+
}
|
11390 |
+
|
11391 |
+
_createClass(BezierCurve, [{
|
11392 |
+
key: 'subdivide',
|
11393 |
+
value: function subdivide(t, firstHalf) {
|
11394 |
+
var ab = lerp(this.start, this.startControl, t);
|
11395 |
+
var bc = lerp(this.startControl, this.endControl, t);
|
11396 |
+
var cd = lerp(this.endControl, this.end, t);
|
11397 |
+
var abbc = lerp(ab, bc, t);
|
11398 |
+
var bccd = lerp(bc, cd, t);
|
11399 |
+
var dest = lerp(abbc, bccd, t);
|
11400 |
+
return firstHalf ? new BezierCurve(this.start, ab, abbc, dest) : new BezierCurve(dest, bccd, cd, this.end);
|
11401 |
+
}
|
11402 |
+
}, {
|
11403 |
+
key: 'reverse',
|
11404 |
+
value: function reverse() {
|
11405 |
+
return new BezierCurve(this.end, this.endControl, this.startControl, this.start);
|
11406 |
+
}
|
11407 |
+
}]);
|
11408 |
+
|
11409 |
+
return BezierCurve;
|
11410 |
+
}();
|
11411 |
+
|
11412 |
+
exports.default = BezierCurve;
|
11413 |
+
|
11414 |
+
/***/ }),
|
11415 |
+
/* 33 */
|
11416 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11417 |
+
|
11418 |
+
"use strict";
|
11419 |
+
|
11420 |
+
|
11421 |
+
Object.defineProperty(exports, "__esModule", {
|
11422 |
+
value: true
|
11423 |
+
});
|
11424 |
+
exports.parseBorderRadius = undefined;
|
11425 |
+
|
11426 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
11427 |
+
|
11428 |
+
var _Length = __webpack_require__(2);
|
11429 |
+
|
11430 |
+
var _Length2 = _interopRequireDefault(_Length);
|
11431 |
+
|
11432 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11433 |
+
|
11434 |
+
var SIDES = ['top-left', 'top-right', 'bottom-right', 'bottom-left'];
|
11435 |
+
|
11436 |
+
var parseBorderRadius = exports.parseBorderRadius = function parseBorderRadius(style) {
|
11437 |
+
return SIDES.map(function (side) {
|
11438 |
+
var value = style.getPropertyValue('border-' + side + '-radius');
|
11439 |
+
|
11440 |
+
var _value$split$map = value.split(' ').map(_Length2.default.create),
|
11441 |
+
_value$split$map2 = _slicedToArray(_value$split$map, 2),
|
11442 |
+
horizontal = _value$split$map2[0],
|
11443 |
+
vertical = _value$split$map2[1];
|
11444 |
+
|
11445 |
+
return typeof vertical === 'undefined' ? [horizontal, horizontal] : [horizontal, vertical];
|
11446 |
+
});
|
11447 |
+
};
|
11448 |
+
|
11449 |
+
/***/ }),
|
11450 |
+
/* 34 */
|
11451 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11452 |
+
|
11453 |
+
"use strict";
|
11454 |
+
|
11455 |
+
|
11456 |
+
Object.defineProperty(exports, "__esModule", {
|
11457 |
+
value: true
|
11458 |
+
});
|
11459 |
+
var DISPLAY = exports.DISPLAY = {
|
11460 |
+
NONE: 1 << 0,
|
11461 |
+
BLOCK: 1 << 1,
|
11462 |
+
INLINE: 1 << 2,
|
11463 |
+
RUN_IN: 1 << 3,
|
11464 |
+
FLOW: 1 << 4,
|
11465 |
+
FLOW_ROOT: 1 << 5,
|
11466 |
+
TABLE: 1 << 6,
|
11467 |
+
FLEX: 1 << 7,
|
11468 |
+
GRID: 1 << 8,
|
11469 |
+
RUBY: 1 << 9,
|
11470 |
+
SUBGRID: 1 << 10,
|
11471 |
+
LIST_ITEM: 1 << 11,
|
11472 |
+
TABLE_ROW_GROUP: 1 << 12,
|
11473 |
+
TABLE_HEADER_GROUP: 1 << 13,
|
11474 |
+
TABLE_FOOTER_GROUP: 1 << 14,
|
11475 |
+
TABLE_ROW: 1 << 15,
|
11476 |
+
TABLE_CELL: 1 << 16,
|
11477 |
+
TABLE_COLUMN_GROUP: 1 << 17,
|
11478 |
+
TABLE_COLUMN: 1 << 18,
|
11479 |
+
TABLE_CAPTION: 1 << 19,
|
11480 |
+
RUBY_BASE: 1 << 20,
|
11481 |
+
RUBY_TEXT: 1 << 21,
|
11482 |
+
RUBY_BASE_CONTAINER: 1 << 22,
|
11483 |
+
RUBY_TEXT_CONTAINER: 1 << 23,
|
11484 |
+
CONTENTS: 1 << 24,
|
11485 |
+
INLINE_BLOCK: 1 << 25,
|
11486 |
+
INLINE_LIST_ITEM: 1 << 26,
|
11487 |
+
INLINE_TABLE: 1 << 27,
|
11488 |
+
INLINE_FLEX: 1 << 28,
|
11489 |
+
INLINE_GRID: 1 << 29
|
11490 |
+
};
|
11491 |
+
|
11492 |
+
var parseDisplayValue = function parseDisplayValue(display) {
|
11493 |
+
switch (display) {
|
11494 |
+
case 'block':
|
11495 |
+
return DISPLAY.BLOCK;
|
11496 |
+
case 'inline':
|
11497 |
+
return DISPLAY.INLINE;
|
11498 |
+
case 'run-in':
|
11499 |
+
return DISPLAY.RUN_IN;
|
11500 |
+
case 'flow':
|
11501 |
+
return DISPLAY.FLOW;
|
11502 |
+
case 'flow-root':
|
11503 |
+
return DISPLAY.FLOW_ROOT;
|
11504 |
+
case 'table':
|
11505 |
+
return DISPLAY.TABLE;
|
11506 |
+
case 'flex':
|
11507 |
+
return DISPLAY.FLEX;
|
11508 |
+
case 'grid':
|
11509 |
+
return DISPLAY.GRID;
|
11510 |
+
case 'ruby':
|
11511 |
+
return DISPLAY.RUBY;
|
11512 |
+
case 'subgrid':
|
11513 |
+
return DISPLAY.SUBGRID;
|
11514 |
+
case 'list-item':
|
11515 |
+
return DISPLAY.LIST_ITEM;
|
11516 |
+
case 'table-row-group':
|
11517 |
+
return DISPLAY.TABLE_ROW_GROUP;
|
11518 |
+
case 'table-header-group':
|
11519 |
+
return DISPLAY.TABLE_HEADER_GROUP;
|
11520 |
+
case 'table-footer-group':
|
11521 |
+
return DISPLAY.TABLE_FOOTER_GROUP;
|
11522 |
+
case 'table-row':
|
11523 |
+
return DISPLAY.TABLE_ROW;
|
11524 |
+
case 'table-cell':
|
11525 |
+
return DISPLAY.TABLE_CELL;
|
11526 |
+
case 'table-column-group':
|
11527 |
+
return DISPLAY.TABLE_COLUMN_GROUP;
|
11528 |
+
case 'table-column':
|
11529 |
+
return DISPLAY.TABLE_COLUMN;
|
11530 |
+
case 'table-caption':
|
11531 |
+
return DISPLAY.TABLE_CAPTION;
|
11532 |
+
case 'ruby-base':
|
11533 |
+
return DISPLAY.RUBY_BASE;
|
11534 |
+
case 'ruby-text':
|
11535 |
+
return DISPLAY.RUBY_TEXT;
|
11536 |
+
case 'ruby-base-container':
|
11537 |
+
return DISPLAY.RUBY_BASE_CONTAINER;
|
11538 |
+
case 'ruby-text-container':
|
11539 |
+
return DISPLAY.RUBY_TEXT_CONTAINER;
|
11540 |
+
case 'contents':
|
11541 |
+
return DISPLAY.CONTENTS;
|
11542 |
+
case 'inline-block':
|
11543 |
+
return DISPLAY.INLINE_BLOCK;
|
11544 |
+
case 'inline-list-item':
|
11545 |
+
return DISPLAY.INLINE_LIST_ITEM;
|
11546 |
+
case 'inline-table':
|
11547 |
+
return DISPLAY.INLINE_TABLE;
|
11548 |
+
case 'inline-flex':
|
11549 |
+
return DISPLAY.INLINE_FLEX;
|
11550 |
+
case 'inline-grid':
|
11551 |
+
return DISPLAY.INLINE_GRID;
|
11552 |
+
}
|
11553 |
+
|
11554 |
+
return DISPLAY.NONE;
|
11555 |
+
};
|
11556 |
+
|
11557 |
+
var setDisplayBit = function setDisplayBit(bit, display) {
|
11558 |
+
return bit | parseDisplayValue(display);
|
11559 |
+
};
|
11560 |
+
|
11561 |
+
var parseDisplay = exports.parseDisplay = function parseDisplay(display) {
|
11562 |
+
return display.split(' ').reduce(setDisplayBit, 0);
|
11563 |
+
};
|
11564 |
+
|
11565 |
+
/***/ }),
|
11566 |
+
/* 35 */
|
11567 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11568 |
+
|
11569 |
+
"use strict";
|
11570 |
+
|
11571 |
+
|
11572 |
+
Object.defineProperty(exports, "__esModule", {
|
11573 |
+
value: true
|
11574 |
+
});
|
11575 |
+
var FLOAT = exports.FLOAT = {
|
11576 |
+
NONE: 0,
|
11577 |
+
LEFT: 1,
|
11578 |
+
RIGHT: 2,
|
11579 |
+
INLINE_START: 3,
|
11580 |
+
INLINE_END: 4
|
11581 |
+
};
|
11582 |
+
|
11583 |
+
var parseCSSFloat = exports.parseCSSFloat = function parseCSSFloat(float) {
|
11584 |
+
switch (float) {
|
11585 |
+
case 'left':
|
11586 |
+
return FLOAT.LEFT;
|
11587 |
+
case 'right':
|
11588 |
+
return FLOAT.RIGHT;
|
11589 |
+
case 'inline-start':
|
11590 |
+
return FLOAT.INLINE_START;
|
11591 |
+
case 'inline-end':
|
11592 |
+
return FLOAT.INLINE_END;
|
11593 |
+
}
|
11594 |
+
return FLOAT.NONE;
|
11595 |
+
};
|
11596 |
+
|
11597 |
+
/***/ }),
|
11598 |
+
/* 36 */
|
11599 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11600 |
+
|
11601 |
+
"use strict";
|
11602 |
+
|
11603 |
+
|
11604 |
+
Object.defineProperty(exports, "__esModule", {
|
11605 |
+
value: true
|
11606 |
+
});
|
11607 |
+
|
11608 |
+
|
11609 |
+
var parseFontWeight = function parseFontWeight(weight) {
|
11610 |
+
switch (weight) {
|
11611 |
+
case 'normal':
|
11612 |
+
return 400;
|
11613 |
+
case 'bold':
|
11614 |
+
return 700;
|
11615 |
+
}
|
11616 |
+
|
11617 |
+
var value = parseInt(weight, 10);
|
11618 |
+
return isNaN(value) ? 400 : value;
|
11619 |
+
};
|
11620 |
+
|
11621 |
+
var parseFont = exports.parseFont = function parseFont(style) {
|
11622 |
+
var fontFamily = style.fontFamily;
|
11623 |
+
var fontSize = style.fontSize;
|
11624 |
+
var fontStyle = style.fontStyle;
|
11625 |
+
var fontVariant = style.fontVariant;
|
11626 |
+
var fontWeight = parseFontWeight(style.fontWeight);
|
11627 |
+
|
11628 |
+
return {
|
11629 |
+
fontFamily: fontFamily,
|
11630 |
+
fontSize: fontSize,
|
11631 |
+
fontStyle: fontStyle,
|
11632 |
+
fontVariant: fontVariant,
|
11633 |
+
fontWeight: fontWeight
|
11634 |
+
};
|
11635 |
+
};
|
11636 |
+
|
11637 |
+
/***/ }),
|
11638 |
+
/* 37 */
|
11639 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11640 |
+
|
11641 |
+
"use strict";
|
11642 |
+
|
11643 |
+
|
11644 |
+
Object.defineProperty(exports, "__esModule", {
|
11645 |
+
value: true
|
11646 |
+
});
|
11647 |
+
var parseLetterSpacing = exports.parseLetterSpacing = function parseLetterSpacing(letterSpacing) {
|
11648 |
+
if (letterSpacing === 'normal') {
|
11649 |
+
return 0;
|
11650 |
+
}
|
11651 |
+
var value = parseFloat(letterSpacing);
|
11652 |
+
return isNaN(value) ? 0 : value;
|
11653 |
+
};
|
11654 |
+
|
11655 |
+
/***/ }),
|
11656 |
+
/* 38 */
|
11657 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11658 |
+
|
11659 |
+
"use strict";
|
11660 |
+
|
11661 |
+
|
11662 |
+
Object.defineProperty(exports, "__esModule", {
|
11663 |
+
value: true
|
11664 |
+
});
|
11665 |
+
var LINE_BREAK = exports.LINE_BREAK = {
|
11666 |
+
NORMAL: 'normal',
|
11667 |
+
STRICT: 'strict'
|
11668 |
+
};
|
11669 |
+
|
11670 |
+
var parseLineBreak = exports.parseLineBreak = function parseLineBreak(wordBreak) {
|
11671 |
+
switch (wordBreak) {
|
11672 |
+
case 'strict':
|
11673 |
+
return LINE_BREAK.STRICT;
|
11674 |
+
case 'normal':
|
11675 |
+
default:
|
11676 |
+
return LINE_BREAK.NORMAL;
|
11677 |
+
}
|
11678 |
+
};
|
11679 |
+
|
11680 |
+
/***/ }),
|
11681 |
+
/* 39 */
|
11682 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11683 |
+
|
11684 |
+
"use strict";
|
11685 |
+
|
11686 |
+
|
11687 |
+
Object.defineProperty(exports, "__esModule", {
|
11688 |
+
value: true
|
11689 |
+
});
|
11690 |
+
exports.parseMargin = undefined;
|
11691 |
+
|
11692 |
+
var _Length = __webpack_require__(2);
|
11693 |
+
|
11694 |
+
var _Length2 = _interopRequireDefault(_Length);
|
11695 |
+
|
11696 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11697 |
+
|
11698 |
+
var SIDES = ['top', 'right', 'bottom', 'left'];
|
11699 |
+
|
11700 |
+
var parseMargin = exports.parseMargin = function parseMargin(style) {
|
11701 |
+
return SIDES.map(function (side) {
|
11702 |
+
return new _Length2.default(style.getPropertyValue('margin-' + side));
|
11703 |
+
});
|
11704 |
+
};
|
11705 |
+
|
11706 |
+
/***/ }),
|
11707 |
+
/* 40 */
|
11708 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11709 |
+
|
11710 |
+
"use strict";
|
11711 |
+
|
11712 |
+
|
11713 |
+
Object.defineProperty(exports, "__esModule", {
|
11714 |
+
value: true
|
11715 |
+
});
|
11716 |
+
var OVERFLOW = exports.OVERFLOW = {
|
11717 |
+
VISIBLE: 0,
|
11718 |
+
HIDDEN: 1,
|
11719 |
+
SCROLL: 2,
|
11720 |
+
AUTO: 3
|
11721 |
+
};
|
11722 |
+
|
11723 |
+
var parseOverflow = exports.parseOverflow = function parseOverflow(overflow) {
|
11724 |
+
switch (overflow) {
|
11725 |
+
case 'hidden':
|
11726 |
+
return OVERFLOW.HIDDEN;
|
11727 |
+
case 'scroll':
|
11728 |
+
return OVERFLOW.SCROLL;
|
11729 |
+
case 'auto':
|
11730 |
+
return OVERFLOW.AUTO;
|
11731 |
+
case 'visible':
|
11732 |
+
default:
|
11733 |
+
return OVERFLOW.VISIBLE;
|
11734 |
+
}
|
11735 |
+
};
|
11736 |
+
|
11737 |
+
/***/ }),
|
11738 |
+
/* 41 */
|
11739 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11740 |
+
|
11741 |
+
"use strict";
|
11742 |
+
|
11743 |
+
|
11744 |
+
Object.defineProperty(exports, "__esModule", {
|
11745 |
+
value: true
|
11746 |
+
});
|
11747 |
+
exports.parseTextShadow = undefined;
|
11748 |
+
|
11749 |
+
var _Color = __webpack_require__(0);
|
11750 |
+
|
11751 |
+
var _Color2 = _interopRequireDefault(_Color);
|
11752 |
+
|
11753 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11754 |
+
|
11755 |
+
var NUMBER = /^([+-]|\d|\.)$/i;
|
11756 |
+
|
11757 |
+
var parseTextShadow = exports.parseTextShadow = function parseTextShadow(textShadow) {
|
11758 |
+
if (textShadow === 'none' || typeof textShadow !== 'string') {
|
11759 |
+
return null;
|
11760 |
+
}
|
11761 |
+
|
11762 |
+
var currentValue = '';
|
11763 |
+
var isLength = false;
|
11764 |
+
var values = [];
|
11765 |
+
var shadows = [];
|
11766 |
+
var numParens = 0;
|
11767 |
+
var color = null;
|
11768 |
+
|
11769 |
+
var appendValue = function appendValue() {
|
11770 |
+
if (currentValue.length) {
|
11771 |
+
if (isLength) {
|
11772 |
+
values.push(parseFloat(currentValue));
|
11773 |
+
} else {
|
11774 |
+
color = new _Color2.default(currentValue);
|
11775 |
+
}
|
11776 |
+
}
|
11777 |
+
isLength = false;
|
11778 |
+
currentValue = '';
|
11779 |
+
};
|
11780 |
+
|
11781 |
+
var appendShadow = function appendShadow() {
|
11782 |
+
if (values.length && color !== null) {
|
11783 |
+
shadows.push({
|
11784 |
+
color: color,
|
11785 |
+
offsetX: values[0] || 0,
|
11786 |
+
offsetY: values[1] || 0,
|
11787 |
+
blur: values[2] || 0
|
11788 |
+
});
|
11789 |
+
}
|
11790 |
+
values.splice(0, values.length);
|
11791 |
+
color = null;
|
11792 |
+
};
|
11793 |
+
|
11794 |
+
for (var i = 0; i < textShadow.length; i++) {
|
11795 |
+
var c = textShadow[i];
|
11796 |
+
switch (c) {
|
11797 |
+
case '(':
|
11798 |
+
currentValue += c;
|
11799 |
+
numParens++;
|
11800 |
+
break;
|
11801 |
+
case ')':
|
11802 |
+
currentValue += c;
|
11803 |
+
numParens--;
|
11804 |
+
break;
|
11805 |
+
case ',':
|
11806 |
+
if (numParens === 0) {
|
11807 |
+
appendValue();
|
11808 |
+
appendShadow();
|
11809 |
+
} else {
|
11810 |
+
currentValue += c;
|
11811 |
+
}
|
11812 |
+
break;
|
11813 |
+
case ' ':
|
11814 |
+
if (numParens === 0) {
|
11815 |
+
appendValue();
|
11816 |
+
} else {
|
11817 |
+
currentValue += c;
|
11818 |
+
}
|
11819 |
+
break;
|
11820 |
+
default:
|
11821 |
+
if (currentValue.length === 0 && NUMBER.test(c)) {
|
11822 |
+
isLength = true;
|
11823 |
+
}
|
11824 |
+
currentValue += c;
|
11825 |
+
}
|
11826 |
+
}
|
11827 |
+
|
11828 |
+
appendValue();
|
11829 |
+
appendShadow();
|
11830 |
+
|
11831 |
+
if (shadows.length === 0) {
|
11832 |
+
return null;
|
11833 |
+
}
|
11834 |
+
|
11835 |
+
return shadows;
|
11836 |
+
};
|
11837 |
+
|
11838 |
+
/***/ }),
|
11839 |
+
/* 42 */
|
11840 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11841 |
+
|
11842 |
+
"use strict";
|
11843 |
+
|
11844 |
+
|
11845 |
+
Object.defineProperty(exports, "__esModule", {
|
11846 |
+
value: true
|
11847 |
+
});
|
11848 |
+
exports.parseTransform = undefined;
|
11849 |
+
|
11850 |
+
var _Length = __webpack_require__(2);
|
11851 |
+
|
11852 |
+
var _Length2 = _interopRequireDefault(_Length);
|
11853 |
+
|
11854 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11855 |
+
|
11856 |
+
var toFloat = function toFloat(s) {
|
11857 |
+
return parseFloat(s.trim());
|
11858 |
+
};
|
11859 |
+
|
11860 |
+
var MATRIX = /(matrix|matrix3d)\((.+)\)/;
|
11861 |
+
|
11862 |
+
var parseTransform = exports.parseTransform = function parseTransform(style) {
|
11863 |
+
var transform = parseTransformMatrix(style.transform || style.webkitTransform || style.mozTransform ||
|
11864 |
+
// $FlowFixMe
|
11865 |
+
style.msTransform ||
|
11866 |
+
// $FlowFixMe
|
11867 |
+
style.oTransform);
|
11868 |
+
if (transform === null) {
|
11869 |
+
return null;
|
11870 |
+
}
|
11871 |
+
|
11872 |
+
return {
|
11873 |
+
transform: transform,
|
11874 |
+
transformOrigin: parseTransformOrigin(style.transformOrigin || style.webkitTransformOrigin || style.mozTransformOrigin ||
|
11875 |
+
// $FlowFixMe
|
11876 |
+
style.msTransformOrigin ||
|
11877 |
+
// $FlowFixMe
|
11878 |
+
style.oTransformOrigin)
|
11879 |
+
};
|
11880 |
+
};
|
11881 |
+
|
11882 |
+
// $FlowFixMe
|
11883 |
+
var parseTransformOrigin = function parseTransformOrigin(origin) {
|
11884 |
+
if (typeof origin !== 'string') {
|
11885 |
+
var v = new _Length2.default('0');
|
11886 |
+
return [v, v];
|
11887 |
+
}
|
11888 |
+
var values = origin.split(' ').map(_Length2.default.create);
|
11889 |
+
return [values[0], values[1]];
|
11890 |
+
};
|
11891 |
+
|
11892 |
+
// $FlowFixMe
|
11893 |
+
var parseTransformMatrix = function parseTransformMatrix(transform) {
|
11894 |
+
if (transform === 'none' || typeof transform !== 'string') {
|
11895 |
+
return null;
|
11896 |
+
}
|
11897 |
+
|
11898 |
+
var match = transform.match(MATRIX);
|
11899 |
+
if (match) {
|
11900 |
+
if (match[1] === 'matrix') {
|
11901 |
+
var matrix = match[2].split(',').map(toFloat);
|
11902 |
+
return [matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]];
|
11903 |
+
} else {
|
11904 |
+
var matrix3d = match[2].split(',').map(toFloat);
|
11905 |
+
return [matrix3d[0], matrix3d[1], matrix3d[4], matrix3d[5], matrix3d[12], matrix3d[13]];
|
11906 |
+
}
|
11907 |
+
}
|
11908 |
+
return null;
|
11909 |
+
};
|
11910 |
+
|
11911 |
+
/***/ }),
|
11912 |
+
/* 43 */
|
11913 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11914 |
+
|
11915 |
+
"use strict";
|
11916 |
+
|
11917 |
+
|
11918 |
+
Object.defineProperty(exports, "__esModule", {
|
11919 |
+
value: true
|
11920 |
+
});
|
11921 |
+
var VISIBILITY = exports.VISIBILITY = {
|
11922 |
+
VISIBLE: 0,
|
11923 |
+
HIDDEN: 1,
|
11924 |
+
COLLAPSE: 2
|
11925 |
+
};
|
11926 |
+
|
11927 |
+
var parseVisibility = exports.parseVisibility = function parseVisibility(visibility) {
|
11928 |
+
switch (visibility) {
|
11929 |
+
case 'hidden':
|
11930 |
+
return VISIBILITY.HIDDEN;
|
11931 |
+
case 'collapse':
|
11932 |
+
return VISIBILITY.COLLAPSE;
|
11933 |
+
case 'visible':
|
11934 |
+
default:
|
11935 |
+
return VISIBILITY.VISIBLE;
|
11936 |
+
}
|
11937 |
+
};
|
11938 |
+
|
11939 |
+
/***/ }),
|
11940 |
+
/* 44 */
|
11941 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11942 |
+
|
11943 |
+
"use strict";
|
11944 |
+
|
11945 |
+
|
11946 |
+
Object.defineProperty(exports, "__esModule", {
|
11947 |
+
value: true
|
11948 |
+
});
|
11949 |
+
var WORD_BREAK = exports.WORD_BREAK = {
|
11950 |
+
NORMAL: 'normal',
|
11951 |
+
BREAK_ALL: 'break-all',
|
11952 |
+
KEEP_ALL: 'keep-all'
|
11953 |
+
};
|
11954 |
+
|
11955 |
+
var parseWordBreak = exports.parseWordBreak = function parseWordBreak(wordBreak) {
|
11956 |
+
switch (wordBreak) {
|
11957 |
+
case 'break-all':
|
11958 |
+
return WORD_BREAK.BREAK_ALL;
|
11959 |
+
case 'keep-all':
|
11960 |
+
return WORD_BREAK.KEEP_ALL;
|
11961 |
+
case 'normal':
|
11962 |
+
default:
|
11963 |
+
return WORD_BREAK.NORMAL;
|
11964 |
+
}
|
11965 |
+
};
|
11966 |
+
|
11967 |
+
/***/ }),
|
11968 |
+
/* 45 */
|
11969 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11970 |
+
|
11971 |
+
"use strict";
|
11972 |
+
|
11973 |
+
|
11974 |
+
Object.defineProperty(exports, "__esModule", {
|
11975 |
+
value: true
|
11976 |
+
});
|
11977 |
+
var parseZIndex = exports.parseZIndex = function parseZIndex(zIndex) {
|
11978 |
+
var auto = zIndex === 'auto';
|
11979 |
+
return {
|
11980 |
+
auto: auto,
|
11981 |
+
order: auto ? 0 : parseInt(zIndex, 10)
|
11982 |
+
};
|
11983 |
+
};
|
11984 |
+
|
11985 |
+
/***/ }),
|
11986 |
+
/* 46 */
|
11987 |
+
/***/ (function(module, exports, __webpack_require__) {
|
11988 |
+
|
11989 |
+
"use strict";
|
11990 |
+
|
11991 |
+
|
11992 |
+
Object.defineProperty(exports, "__esModule", {
|
11993 |
+
value: true
|
11994 |
+
});
|
11995 |
+
|
11996 |
+
var _Util = __webpack_require__(13);
|
11997 |
+
|
11998 |
+
Object.defineProperty(exports, 'toCodePoints', {
|
11999 |
+
enumerable: true,
|
12000 |
+
get: function get() {
|
12001 |
+
return _Util.toCodePoints;
|
12002 |
+
}
|
12003 |
+
});
|
12004 |
+
Object.defineProperty(exports, 'fromCodePoint', {
|
12005 |
+
enumerable: true,
|
12006 |
+
get: function get() {
|
12007 |
+
return _Util.fromCodePoint;
|
12008 |
+
}
|
12009 |
+
});
|
12010 |
+
|
12011 |
+
var _LineBreak = __webpack_require__(47);
|
12012 |
+
|
12013 |
+
Object.defineProperty(exports, 'LineBreaker', {
|
12014 |
+
enumerable: true,
|
12015 |
+
get: function get() {
|
12016 |
+
return _LineBreak.LineBreaker;
|
12017 |
+
}
|
12018 |
+
});
|
12019 |
+
|
12020 |
+
/***/ }),
|
12021 |
+
/* 47 */
|
12022 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12023 |
+
|
12024 |
+
"use strict";
|
12025 |
+
|
12026 |
+
|
12027 |
+
Object.defineProperty(exports, "__esModule", {
|
12028 |
+
value: true
|
12029 |
+
});
|
12030 |
+
exports.LineBreaker = exports.inlineBreakOpportunities = exports.lineBreakAtIndex = exports.codePointsToCharacterClasses = exports.UnicodeTrie = exports.BREAK_ALLOWED = exports.BREAK_NOT_ALLOWED = exports.BREAK_MANDATORY = exports.classes = exports.LETTER_NUMBER_MODIFIER = undefined;
|
12031 |
+
|
12032 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
12033 |
+
|
12034 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
12035 |
+
|
12036 |
+
var _Trie = __webpack_require__(48);
|
12037 |
+
|
12038 |
+
var _linebreakTrie = __webpack_require__(49);
|
12039 |
+
|
12040 |
+
var _linebreakTrie2 = _interopRequireDefault(_linebreakTrie);
|
12041 |
+
|
12042 |
+
var _Util = __webpack_require__(13);
|
12043 |
+
|
12044 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12045 |
+
|
12046 |
+
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
12047 |
+
|
12048 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12049 |
+
|
12050 |
+
var LETTER_NUMBER_MODIFIER = exports.LETTER_NUMBER_MODIFIER = 50;
|
12051 |
+
|
12052 |
+
// Non-tailorable Line Breaking Classes
|
12053 |
+
var BK = 1; // Cause a line break (after)
|
12054 |
+
var CR = 2; // Cause a line break (after), except between CR and LF
|
12055 |
+
var LF = 3; // Cause a line break (after)
|
12056 |
+
var CM = 4; // Prohibit a line break between the character and the preceding character
|
12057 |
+
var NL = 5; // Cause a line break (after)
|
12058 |
+
var SG = 6; // Do not occur in well-formed text
|
12059 |
+
var WJ = 7; // Prohibit line breaks before and after
|
12060 |
+
var ZW = 8; // Provide a break opportunity
|
12061 |
+
var GL = 9; // Prohibit line breaks before and after
|
12062 |
+
var SP = 10; // Enable indirect line breaks
|
12063 |
+
var ZWJ = 11; // Prohibit line breaks within joiner sequences
|
12064 |
+
// Break Opportunities
|
12065 |
+
var B2 = 12; // Provide a line break opportunity before and after the character
|
12066 |
+
var BA = 13; // Generally provide a line break opportunity after the character
|
12067 |
+
var BB = 14; // Generally provide a line break opportunity before the character
|
12068 |
+
var HY = 15; // Provide a line break opportunity after the character, except in numeric context
|
12069 |
+
var CB = 16; // Provide a line break opportunity contingent on additional information
|
12070 |
+
// Characters Prohibiting Certain Breaks
|
12071 |
+
var CL = 17; // Prohibit line breaks before
|
12072 |
+
var CP = 18; // Prohibit line breaks before
|
12073 |
+
var EX = 19; // Prohibit line breaks before
|
12074 |
+
var IN = 20; // Allow only indirect line breaks between pairs
|
12075 |
+
var NS = 21; // Allow only indirect line breaks before
|
12076 |
+
var OP = 22; // Prohibit line breaks after
|
12077 |
+
var QU = 23; // Act like they are both opening and closing
|
12078 |
+
// Numeric Context
|
12079 |
+
var IS = 24; // Prevent breaks after any and before numeric
|
12080 |
+
var NU = 25; // Form numeric expressions for line breaking purposes
|
12081 |
+
var PO = 26; // Do not break following a numeric expression
|
12082 |
+
var PR = 27; // Do not break in front of a numeric expression
|
12083 |
+
var SY = 28; // Prevent a break before; and allow a break after
|
12084 |
+
// Other Characters
|
12085 |
+
var AI = 29; // Act like AL when the resolvedEAW is N; otherwise; act as ID
|
12086 |
+
var AL = 30; // Are alphabetic characters or symbols that are used with alphabetic characters
|
12087 |
+
var CJ = 31; // Treat as NS or ID for strict or normal breaking.
|
12088 |
+
var EB = 32; // Do not break from following Emoji Modifier
|
12089 |
+
var EM = 33; // Do not break from preceding Emoji Base
|
12090 |
+
var H2 = 34; // Form Korean syllable blocks
|
12091 |
+
var H3 = 35; // Form Korean syllable blocks
|
12092 |
+
var HL = 36; // Do not break around a following hyphen; otherwise act as Alphabetic
|
12093 |
+
var ID = 37; // Break before or after; except in some numeric context
|
12094 |
+
var JL = 38; // Form Korean syllable blocks
|
12095 |
+
var JV = 39; // Form Korean syllable blocks
|
12096 |
+
var JT = 40; // Form Korean syllable blocks
|
12097 |
+
var RI = 41; // Keep pairs together. For pairs; break before and after other classes
|
12098 |
+
var SA = 42; // Provide a line break opportunity contingent on additional, language-specific context analysis
|
12099 |
+
var XX = 43; // Have as yet unknown line breaking behavior or unassigned code positions
|
12100 |
+
|
12101 |
+
var classes = exports.classes = {
|
12102 |
+
BK: BK,
|
12103 |
+
CR: CR,
|
12104 |
+
LF: LF,
|
12105 |
+
CM: CM,
|
12106 |
+
NL: NL,
|
12107 |
+
SG: SG,
|
12108 |
+
WJ: WJ,
|
12109 |
+
ZW: ZW,
|
12110 |
+
GL: GL,
|
12111 |
+
SP: SP,
|
12112 |
+
ZWJ: ZWJ,
|
12113 |
+
B2: B2,
|
12114 |
+
BA: BA,
|
12115 |
+
BB: BB,
|
12116 |
+
HY: HY,
|
12117 |
+
CB: CB,
|
12118 |
+
CL: CL,
|
12119 |
+
CP: CP,
|
12120 |
+
EX: EX,
|
12121 |
+
IN: IN,
|
12122 |
+
NS: NS,
|
12123 |
+
OP: OP,
|
12124 |
+
QU: QU,
|
12125 |
+
IS: IS,
|
12126 |
+
NU: NU,
|
12127 |
+
PO: PO,
|
12128 |
+
PR: PR,
|
12129 |
+
SY: SY,
|
12130 |
+
AI: AI,
|
12131 |
+
AL: AL,
|
12132 |
+
CJ: CJ,
|
12133 |
+
EB: EB,
|
12134 |
+
EM: EM,
|
12135 |
+
H2: H2,
|
12136 |
+
H3: H3,
|
12137 |
+
HL: HL,
|
12138 |
+
ID: ID,
|
12139 |
+
JL: JL,
|
12140 |
+
JV: JV,
|
12141 |
+
JT: JT,
|
12142 |
+
RI: RI,
|
12143 |
+
SA: SA,
|
12144 |
+
XX: XX
|
12145 |
+
};
|
12146 |
+
|
12147 |
+
var BREAK_MANDATORY = exports.BREAK_MANDATORY = '!';
|
12148 |
+
var BREAK_NOT_ALLOWED = exports.BREAK_NOT_ALLOWED = '×';
|
12149 |
+
var BREAK_ALLOWED = exports.BREAK_ALLOWED = '÷';
|
12150 |
+
var UnicodeTrie = exports.UnicodeTrie = (0, _Trie.createTrieFromBase64)(_linebreakTrie2.default);
|
12151 |
+
|
12152 |
+
var ALPHABETICS = [AL, HL];
|
12153 |
+
var HARD_LINE_BREAKS = [BK, CR, LF, NL];
|
12154 |
+
var SPACE = [SP, ZW];
|
12155 |
+
var PREFIX_POSTFIX = [PR, PO];
|
12156 |
+
var LINE_BREAKS = HARD_LINE_BREAKS.concat(SPACE);
|
12157 |
+
var KOREAN_SYLLABLE_BLOCK = [JL, JV, JT, H2, H3];
|
12158 |
+
var HYPHEN = [HY, BA];
|
12159 |
+
|
12160 |
+
var codePointsToCharacterClasses = exports.codePointsToCharacterClasses = function codePointsToCharacterClasses(codePoints) {
|
12161 |
+
var lineBreak = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'strict';
|
12162 |
+
|
12163 |
+
var types = [];
|
12164 |
+
var indicies = [];
|
12165 |
+
var categories = [];
|
12166 |
+
codePoints.forEach(function (codePoint, index) {
|
12167 |
+
var classType = UnicodeTrie.get(codePoint);
|
12168 |
+
if (classType > LETTER_NUMBER_MODIFIER) {
|
12169 |
+
categories.push(true);
|
12170 |
+
classType -= LETTER_NUMBER_MODIFIER;
|
12171 |
+
} else {
|
12172 |
+
categories.push(false);
|
12173 |
+
}
|
12174 |
+
|
12175 |
+
if (['normal', 'auto', 'loose'].indexOf(lineBreak) !== -1) {
|
12176 |
+
// U+2010, – U+2013, 〜 U+301C, ゠ U+30A0
|
12177 |
+
if ([0x2010, 0x2013, 0x301c, 0x30a0].indexOf(codePoint) !== -1) {
|
12178 |
+
indicies.push(index);
|
12179 |
+
return types.push(CB);
|
12180 |
+
}
|
12181 |
+
}
|
12182 |
+
|
12183 |
+
if (classType === CM || classType === ZWJ) {
|
12184 |
+
// LB10 Treat any remaining combining mark or ZWJ as AL.
|
12185 |
+
if (index === 0) {
|
12186 |
+
indicies.push(index);
|
12187 |
+
return types.push(AL);
|
12188 |
+
}
|
12189 |
+
|
12190 |
+
// LB9 Do not break a combining character sequence; treat it as if it has the line breaking class of
|
12191 |
+
// the base character in all of the following rules. Treat ZWJ as if it were CM.
|
12192 |
+
var prev = types[index - 1];
|
12193 |
+
if (LINE_BREAKS.indexOf(prev) === -1) {
|
12194 |
+
indicies.push(indicies[index - 1]);
|
12195 |
+
return types.push(prev);
|
12196 |
+
}
|
12197 |
+
indicies.push(index);
|
12198 |
+
return types.push(AL);
|
12199 |
+
}
|
12200 |
+
|
12201 |
+
indicies.push(index);
|
12202 |
+
|
12203 |
+
if (classType === CJ) {
|
12204 |
+
return types.push(lineBreak === 'strict' ? NS : ID);
|
12205 |
+
}
|
12206 |
+
|
12207 |
+
if (classType === SA) {
|
12208 |
+
return types.push(AL);
|
12209 |
+
}
|
12210 |
+
|
12211 |
+
if (classType === AI) {
|
12212 |
+
return types.push(AL);
|
12213 |
+
}
|
12214 |
+
|
12215 |
+
// For supplementary characters, a useful default is to treat characters in the range 10000..1FFFD as AL
|
12216 |
+
// and characters in the ranges 20000..2FFFD and 30000..3FFFD as ID, until the implementation can be revised
|
12217 |
+
// to take into account the actual line breaking properties for these characters.
|
12218 |
+
if (classType === XX) {
|
12219 |
+
if (codePoint >= 0x20000 && codePoint <= 0x2fffd || codePoint >= 0x30000 && codePoint <= 0x3fffd) {
|
12220 |
+
return types.push(ID);
|
12221 |
+
} else {
|
12222 |
+
return types.push(AL);
|
12223 |
+
}
|
12224 |
+
}
|
12225 |
+
|
12226 |
+
types.push(classType);
|
12227 |
+
});
|
12228 |
+
|
12229 |
+
return [indicies, types, categories];
|
12230 |
+
};
|
12231 |
+
|
12232 |
+
var isAdjacentWithSpaceIgnored = function isAdjacentWithSpaceIgnored(a, b, currentIndex, classTypes) {
|
12233 |
+
var current = classTypes[currentIndex];
|
12234 |
+
if (Array.isArray(a) ? a.indexOf(current) !== -1 : a === current) {
|
12235 |
+
var i = currentIndex;
|
12236 |
+
while (i <= classTypes.length) {
|
12237 |
+
i++;
|
12238 |
+
var next = classTypes[i];
|
12239 |
+
|
12240 |
+
if (next === b) {
|
12241 |
+
return true;
|
12242 |
+
}
|
12243 |
+
|
12244 |
+
if (next !== SP) {
|
12245 |
+
break;
|
12246 |
+
}
|
12247 |
+
}
|
12248 |
+
}
|
12249 |
+
|
12250 |
+
if (current === SP) {
|
12251 |
+
var _i = currentIndex;
|
12252 |
+
|
12253 |
+
while (_i > 0) {
|
12254 |
+
_i--;
|
12255 |
+
var prev = classTypes[_i];
|
12256 |
+
|
12257 |
+
if (Array.isArray(a) ? a.indexOf(prev) !== -1 : a === prev) {
|
12258 |
+
var n = currentIndex;
|
12259 |
+
while (n <= classTypes.length) {
|
12260 |
+
n++;
|
12261 |
+
var _next = classTypes[n];
|
12262 |
+
|
12263 |
+
if (_next === b) {
|
12264 |
+
return true;
|
12265 |
+
}
|
12266 |
+
|
12267 |
+
if (_next !== SP) {
|
12268 |
+
break;
|
12269 |
+
}
|
12270 |
+
}
|
12271 |
+
}
|
12272 |
+
|
12273 |
+
if (prev !== SP) {
|
12274 |
+
break;
|
12275 |
+
}
|
12276 |
+
}
|
12277 |
+
}
|
12278 |
+
return false;
|
12279 |
+
};
|
12280 |
+
|
12281 |
+
var previousNonSpaceClassType = function previousNonSpaceClassType(currentIndex, classTypes) {
|
12282 |
+
var i = currentIndex;
|
12283 |
+
while (i >= 0) {
|
12284 |
+
var type = classTypes[i];
|
12285 |
+
if (type === SP) {
|
12286 |
+
i--;
|
12287 |
+
} else {
|
12288 |
+
return type;
|
12289 |
+
}
|
12290 |
+
}
|
12291 |
+
return 0;
|
12292 |
+
};
|
12293 |
+
|
12294 |
+
var _lineBreakAtIndex = function _lineBreakAtIndex(codePoints, classTypes, indicies, index, forbiddenBreaks) {
|
12295 |
+
if (indicies[index] === 0) {
|
12296 |
+
return BREAK_NOT_ALLOWED;
|
12297 |
+
}
|
12298 |
+
|
12299 |
+
var currentIndex = index - 1;
|
12300 |
+
if (Array.isArray(forbiddenBreaks) && forbiddenBreaks[currentIndex] === true) {
|
12301 |
+
return BREAK_NOT_ALLOWED;
|
12302 |
+
}
|
12303 |
+
|
12304 |
+
var beforeIndex = currentIndex - 1;
|
12305 |
+
var afterIndex = currentIndex + 1;
|
12306 |
+
var current = classTypes[currentIndex];
|
12307 |
+
|
12308 |
+
// LB4 Always break after hard line breaks.
|
12309 |
+
// LB5 Treat CR followed by LF, as well as CR, LF, and NL as hard line breaks.
|
12310 |
+
var before = beforeIndex >= 0 ? classTypes[beforeIndex] : 0;
|
12311 |
+
var next = classTypes[afterIndex];
|
12312 |
+
|
12313 |
+
if (current === CR && next === LF) {
|
12314 |
+
return BREAK_NOT_ALLOWED;
|
12315 |
+
}
|
12316 |
+
|
12317 |
+
if (HARD_LINE_BREAKS.indexOf(current) !== -1) {
|
12318 |
+
return BREAK_MANDATORY;
|
12319 |
+
}
|
12320 |
+
|
12321 |
+
// LB6 Do not break before hard line breaks.
|
12322 |
+
if (HARD_LINE_BREAKS.indexOf(next) !== -1) {
|
12323 |
+
return BREAK_NOT_ALLOWED;
|
12324 |
+
}
|
12325 |
+
|
12326 |
+
// LB7 Do not break before spaces or zero width space.
|
12327 |
+
if (SPACE.indexOf(next) !== -1) {
|
12328 |
+
return BREAK_NOT_ALLOWED;
|
12329 |
+
}
|
12330 |
+
|
12331 |
+
// LB8 Break before any character following a zero-width space, even if one or more spaces intervene.
|
12332 |
+
if (previousNonSpaceClassType(currentIndex, classTypes) === ZW) {
|
12333 |
+
return BREAK_ALLOWED;
|
12334 |
+
}
|
12335 |
+
|
12336 |
+
// LB8a Do not break between a zero width joiner and an ideograph, emoji base or emoji modifier.
|
12337 |
+
if (UnicodeTrie.get(codePoints[currentIndex]) === ZWJ && (next === ID || next === EB || next === EM)) {
|
12338 |
+
return BREAK_NOT_ALLOWED;
|
12339 |
+
}
|
12340 |
+
|
12341 |
+
// LB11 Do not break before or after Word joiner and related characters.
|
12342 |
+
if (current === WJ || next === WJ) {
|
12343 |
+
return BREAK_NOT_ALLOWED;
|
12344 |
+
}
|
12345 |
+
|
12346 |
+
// LB12 Do not break after NBSP and related characters.
|
12347 |
+
if (current === GL) {
|
12348 |
+
return BREAK_NOT_ALLOWED;
|
12349 |
+
}
|
12350 |
+
|
12351 |
+
// LB12a Do not break before NBSP and related characters, except after spaces and hyphens.
|
12352 |
+
if ([SP, BA, HY].indexOf(current) === -1 && next === GL) {
|
12353 |
+
return BREAK_NOT_ALLOWED;
|
12354 |
+
}
|
12355 |
+
|
12356 |
+
// LB13 Do not break before ‘]’ or ‘!’ or ‘;’ or ‘/’, even after spaces.
|
12357 |
+
if ([CL, CP, EX, IS, SY].indexOf(next) !== -1) {
|
12358 |
+
return BREAK_NOT_ALLOWED;
|
12359 |
+
}
|
12360 |
+
|
12361 |
+
// LB14 Do not break after ‘[’, even after spaces.
|
12362 |
+
if (previousNonSpaceClassType(currentIndex, classTypes) === OP) {
|
12363 |
+
return BREAK_NOT_ALLOWED;
|
12364 |
+
}
|
12365 |
+
|
12366 |
+
// LB15 Do not break within ‘”[’, even with intervening spaces.
|
12367 |
+
if (isAdjacentWithSpaceIgnored(QU, OP, currentIndex, classTypes)) {
|
12368 |
+
return BREAK_NOT_ALLOWED;
|
12369 |
+
}
|
12370 |
+
|
12371 |
+
// LB16 Do not break between closing punctuation and a nonstarter (lb=NS), even with intervening spaces.
|
12372 |
+
if (isAdjacentWithSpaceIgnored([CL, CP], NS, currentIndex, classTypes)) {
|
12373 |
+
return BREAK_NOT_ALLOWED;
|
12374 |
+
}
|
12375 |
+
|
12376 |
+
// LB17 Do not break within ‘——’, even with intervening spaces.
|
12377 |
+
if (isAdjacentWithSpaceIgnored(B2, B2, currentIndex, classTypes)) {
|
12378 |
+
return BREAK_NOT_ALLOWED;
|
12379 |
+
}
|
12380 |
+
|
12381 |
+
// LB18 Break after spaces.
|
12382 |
+
if (current === SP) {
|
12383 |
+
return BREAK_ALLOWED;
|
12384 |
+
}
|
12385 |
+
|
12386 |
+
// LB19 Do not break before or after quotation marks, such as ‘ ” ’.
|
12387 |
+
if (current === QU || next === QU) {
|
12388 |
+
return BREAK_NOT_ALLOWED;
|
12389 |
+
}
|
12390 |
+
|
12391 |
+
// LB20 Break before and after unresolved CB.
|
12392 |
+
if (next === CB || current === CB) {
|
12393 |
+
return BREAK_ALLOWED;
|
12394 |
+
}
|
12395 |
+
|
12396 |
+
// LB21 Do not break before hyphen-minus, other hyphens, fixed-width spaces, small kana, and other non-starters, or after acute accents.
|
12397 |
+
if ([BA, HY, NS].indexOf(next) !== -1 || current === BB) {
|
12398 |
+
return BREAK_NOT_ALLOWED;
|
12399 |
+
}
|
12400 |
+
|
12401 |
+
// LB21a Don't break after Hebrew + Hyphen.
|
12402 |
+
if (before === HL && HYPHEN.indexOf(current) !== -1) {
|
12403 |
+
return BREAK_NOT_ALLOWED;
|
12404 |
+
}
|
12405 |
+
|
12406 |
+
// LB21b Don’t break between Solidus and Hebrew letters.
|
12407 |
+
if (current === SY && next === HL) {
|
12408 |
+
return BREAK_NOT_ALLOWED;
|
12409 |
+
}
|
12410 |
+
|
12411 |
+
// LB22 Do not break between two ellipses, or between letters, numbers or exclamations and ellipsis.
|
12412 |
+
if (next === IN && ALPHABETICS.concat(IN, EX, NU, ID, EB, EM).indexOf(current) !== -1) {
|
12413 |
+
return BREAK_NOT_ALLOWED;
|
12414 |
+
}
|
12415 |
+
|
12416 |
+
// LB23 Do not break between digits and letters.
|
12417 |
+
if (ALPHABETICS.indexOf(next) !== -1 && current === NU || ALPHABETICS.indexOf(current) !== -1 && next === NU) {
|
12418 |
+
return BREAK_NOT_ALLOWED;
|
12419 |
+
}
|
12420 |
+
|
12421 |
+
// LB23a Do not break between numeric prefixes and ideographs, or between ideographs and numeric postfixes.
|
12422 |
+
if (current === PR && [ID, EB, EM].indexOf(next) !== -1 || [ID, EB, EM].indexOf(current) !== -1 && next === PO) {
|
12423 |
+
return BREAK_NOT_ALLOWED;
|
12424 |
+
}
|
12425 |
+
|
12426 |
+
// LB24 Do not break between numeric prefix/postfix and letters, or between letters and prefix/postfix.
|
12427 |
+
if (ALPHABETICS.indexOf(current) !== -1 && PREFIX_POSTFIX.indexOf(next) !== -1 || PREFIX_POSTFIX.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) {
|
12428 |
+
return BREAK_NOT_ALLOWED;
|
12429 |
+
}
|
12430 |
+
|
12431 |
+
// LB25 Do not break between the following pairs of classes relevant to numbers:
|
12432 |
+
if (
|
12433 |
+
// (PR | PO) × ( OP | HY )? NU
|
12434 |
+
[PR, PO].indexOf(current) !== -1 && (next === NU || [OP, HY].indexOf(next) !== -1 && classTypes[afterIndex + 1] === NU) ||
|
12435 |
+
// ( OP | HY ) × NU
|
12436 |
+
[OP, HY].indexOf(current) !== -1 && next === NU ||
|
12437 |
+
// NU × (NU | SY | IS)
|
12438 |
+
current === NU && [NU, SY, IS].indexOf(next) !== -1) {
|
12439 |
+
return BREAK_NOT_ALLOWED;
|
12440 |
+
}
|
12441 |
+
|
12442 |
+
// NU (NU | SY | IS)* × (NU | SY | IS | CL | CP)
|
12443 |
+
if ([NU, SY, IS, CL, CP].indexOf(next) !== -1) {
|
12444 |
+
var prevIndex = currentIndex;
|
12445 |
+
while (prevIndex >= 0) {
|
12446 |
+
var type = classTypes[prevIndex];
|
12447 |
+
if (type === NU) {
|
12448 |
+
return BREAK_NOT_ALLOWED;
|
12449 |
+
} else if ([SY, IS].indexOf(type) !== -1) {
|
12450 |
+
prevIndex--;
|
12451 |
+
} else {
|
12452 |
+
break;
|
12453 |
+
}
|
12454 |
+
}
|
12455 |
+
}
|
12456 |
+
|
12457 |
+
// NU (NU | SY | IS)* (CL | CP)? × (PO | PR))
|
12458 |
+
if ([PR, PO].indexOf(next) !== -1) {
|
12459 |
+
var _prevIndex = [CL, CP].indexOf(current) !== -1 ? beforeIndex : currentIndex;
|
12460 |
+
while (_prevIndex >= 0) {
|
12461 |
+
var _type = classTypes[_prevIndex];
|
12462 |
+
if (_type === NU) {
|
12463 |
+
return BREAK_NOT_ALLOWED;
|
12464 |
+
} else if ([SY, IS].indexOf(_type) !== -1) {
|
12465 |
+
_prevIndex--;
|
12466 |
+
} else {
|
12467 |
+
break;
|
12468 |
+
}
|
12469 |
+
}
|
12470 |
+
}
|
12471 |
+
|
12472 |
+
// LB26 Do not break a Korean syllable.
|
12473 |
+
if (JL === current && [JL, JV, H2, H3].indexOf(next) !== -1 || [JV, H2].indexOf(current) !== -1 && [JV, JT].indexOf(next) !== -1 || [JT, H3].indexOf(current) !== -1 && next === JT) {
|
12474 |
+
return BREAK_NOT_ALLOWED;
|
12475 |
+
}
|
12476 |
+
|
12477 |
+
// LB27 Treat a Korean Syllable Block the same as ID.
|
12478 |
+
if (KOREAN_SYLLABLE_BLOCK.indexOf(current) !== -1 && [IN, PO].indexOf(next) !== -1 || KOREAN_SYLLABLE_BLOCK.indexOf(next) !== -1 && current === PR) {
|
12479 |
+
return BREAK_NOT_ALLOWED;
|
12480 |
+
}
|
12481 |
+
|
12482 |
+
// LB28 Do not break between alphabetics (“at”).
|
12483 |
+
if (ALPHABETICS.indexOf(current) !== -1 && ALPHABETICS.indexOf(next) !== -1) {
|
12484 |
+
return BREAK_NOT_ALLOWED;
|
12485 |
+
}
|
12486 |
+
|
12487 |
+
// LB29 Do not break between numeric punctuation and alphabetics (“e.g.”).
|
12488 |
+
if (current === IS && ALPHABETICS.indexOf(next) !== -1) {
|
12489 |
+
return BREAK_NOT_ALLOWED;
|
12490 |
+
}
|
12491 |
+
|
12492 |
+
// LB30 Do not break between letters, numbers, or ordinary symbols and opening or closing parentheses.
|
12493 |
+
if (ALPHABETICS.concat(NU).indexOf(current) !== -1 && next === OP || ALPHABETICS.concat(NU).indexOf(next) !== -1 && current === CP) {
|
12494 |
+
return BREAK_NOT_ALLOWED;
|
12495 |
+
}
|
12496 |
+
|
12497 |
+
// LB30a Break between two regional indicator symbols if and only if there are an even number of regional
|
12498 |
+
// indicators preceding the position of the break.
|
12499 |
+
if (current === RI && next === RI) {
|
12500 |
+
var i = indicies[currentIndex];
|
12501 |
+
var count = 1;
|
12502 |
+
while (i > 0) {
|
12503 |
+
i--;
|
12504 |
+
if (classTypes[i] === RI) {
|
12505 |
+
count++;
|
12506 |
+
} else {
|
12507 |
+
break;
|
12508 |
+
}
|
12509 |
+
}
|
12510 |
+
if (count % 2 !== 0) {
|
12511 |
+
return BREAK_NOT_ALLOWED;
|
12512 |
+
}
|
12513 |
+
}
|
12514 |
+
|
12515 |
+
// LB30b Do not break between an emoji base and an emoji modifier.
|
12516 |
+
if (current === EB && next === EM) {
|
12517 |
+
return BREAK_NOT_ALLOWED;
|
12518 |
+
}
|
12519 |
+
|
12520 |
+
return BREAK_ALLOWED;
|
12521 |
+
};
|
12522 |
+
|
12523 |
+
var lineBreakAtIndex = exports.lineBreakAtIndex = function lineBreakAtIndex(codePoints, index) {
|
12524 |
+
// LB2 Never break at the start of text.
|
12525 |
+
if (index === 0) {
|
12526 |
+
return BREAK_NOT_ALLOWED;
|
12527 |
+
}
|
12528 |
+
|
12529 |
+
// LB3 Always break at the end of text.
|
12530 |
+
if (index >= codePoints.length) {
|
12531 |
+
return BREAK_MANDATORY;
|
12532 |
+
}
|
12533 |
+
|
12534 |
+
var _codePointsToCharacte = codePointsToCharacterClasses(codePoints),
|
12535 |
+
_codePointsToCharacte2 = _slicedToArray(_codePointsToCharacte, 2),
|
12536 |
+
indicies = _codePointsToCharacte2[0],
|
12537 |
+
classTypes = _codePointsToCharacte2[1];
|
12538 |
+
|
12539 |
+
return _lineBreakAtIndex(codePoints, classTypes, indicies, index);
|
12540 |
+
};
|
12541 |
+
|
12542 |
+
var cssFormattedClasses = function cssFormattedClasses(codePoints, options) {
|
12543 |
+
if (!options) {
|
12544 |
+
options = { lineBreak: 'normal', wordBreak: 'normal' };
|
12545 |
+
}
|
12546 |
+
|
12547 |
+
var _codePointsToCharacte3 = codePointsToCharacterClasses(codePoints, options.lineBreak),
|
12548 |
+
_codePointsToCharacte4 = _slicedToArray(_codePointsToCharacte3, 3),
|
12549 |
+
indicies = _codePointsToCharacte4[0],
|
12550 |
+
classTypes = _codePointsToCharacte4[1],
|
12551 |
+
isLetterNumber = _codePointsToCharacte4[2];
|
12552 |
+
|
12553 |
+
if (options.wordBreak === 'break-all' || options.wordBreak === 'break-word') {
|
12554 |
+
classTypes = classTypes.map(function (type) {
|
12555 |
+
return [NU, AL, SA].indexOf(type) !== -1 ? ID : type;
|
12556 |
+
});
|
12557 |
+
}
|
12558 |
+
|
12559 |
+
var forbiddenBreakpoints = options.wordBreak === 'keep-all' ? isLetterNumber.map(function (isLetterNumber, i) {
|
12560 |
+
return isLetterNumber && codePoints[i] >= 0x4e00 && codePoints[i] <= 0x9fff;
|
12561 |
+
}) : null;
|
12562 |
+
|
12563 |
+
return [indicies, classTypes, forbiddenBreakpoints];
|
12564 |
+
};
|
12565 |
+
|
12566 |
+
var inlineBreakOpportunities = exports.inlineBreakOpportunities = function inlineBreakOpportunities(str, options) {
|
12567 |
+
var codePoints = (0, _Util.toCodePoints)(str);
|
12568 |
+
var output = BREAK_NOT_ALLOWED;
|
12569 |
+
|
12570 |
+
var _cssFormattedClasses = cssFormattedClasses(codePoints, options),
|
12571 |
+
_cssFormattedClasses2 = _slicedToArray(_cssFormattedClasses, 3),
|
12572 |
+
indicies = _cssFormattedClasses2[0],
|
12573 |
+
classTypes = _cssFormattedClasses2[1],
|
12574 |
+
forbiddenBreakpoints = _cssFormattedClasses2[2];
|
12575 |
+
|
12576 |
+
codePoints.forEach(function (codePoint, i) {
|
12577 |
+
output += (0, _Util.fromCodePoint)(codePoint) + (i >= codePoints.length - 1 ? BREAK_MANDATORY : _lineBreakAtIndex(codePoints, classTypes, indicies, i + 1, forbiddenBreakpoints));
|
12578 |
+
});
|
12579 |
+
|
12580 |
+
return output;
|
12581 |
+
};
|
12582 |
+
|
12583 |
+
var Break = function () {
|
12584 |
+
function Break(codePoints, lineBreak, start, end) {
|
12585 |
+
_classCallCheck(this, Break);
|
12586 |
+
|
12587 |
+
this._codePoints = codePoints;
|
12588 |
+
this.required = lineBreak === BREAK_MANDATORY;
|
12589 |
+
this.start = start;
|
12590 |
+
this.end = end;
|
12591 |
+
}
|
12592 |
+
|
12593 |
+
_createClass(Break, [{
|
12594 |
+
key: 'slice',
|
12595 |
+
value: function slice() {
|
12596 |
+
return _Util.fromCodePoint.apply(undefined, _toConsumableArray(this._codePoints.slice(this.start, this.end)));
|
12597 |
+
}
|
12598 |
+
}]);
|
12599 |
+
|
12600 |
+
return Break;
|
12601 |
+
}();
|
12602 |
+
|
12603 |
+
var LineBreaker = exports.LineBreaker = function LineBreaker(str, options) {
|
12604 |
+
var codePoints = (0, _Util.toCodePoints)(str);
|
12605 |
+
|
12606 |
+
var _cssFormattedClasses3 = cssFormattedClasses(codePoints, options),
|
12607 |
+
_cssFormattedClasses4 = _slicedToArray(_cssFormattedClasses3, 3),
|
12608 |
+
indicies = _cssFormattedClasses4[0],
|
12609 |
+
classTypes = _cssFormattedClasses4[1],
|
12610 |
+
forbiddenBreakpoints = _cssFormattedClasses4[2];
|
12611 |
+
|
12612 |
+
var length = codePoints.length;
|
12613 |
+
var lastEnd = 0;
|
12614 |
+
var nextIndex = 0;
|
12615 |
+
|
12616 |
+
return {
|
12617 |
+
next: function next() {
|
12618 |
+
if (nextIndex >= length) {
|
12619 |
+
return { done: true };
|
12620 |
+
}
|
12621 |
+
var lineBreak = BREAK_NOT_ALLOWED;
|
12622 |
+
while (nextIndex < length && (lineBreak = _lineBreakAtIndex(codePoints, classTypes, indicies, ++nextIndex, forbiddenBreakpoints)) === BREAK_NOT_ALLOWED) {}
|
12623 |
+
|
12624 |
+
if (lineBreak !== BREAK_NOT_ALLOWED || nextIndex === length) {
|
12625 |
+
var value = new Break(codePoints, lineBreak, lastEnd, nextIndex);
|
12626 |
+
lastEnd = nextIndex;
|
12627 |
+
return { value: value, done: false };
|
12628 |
+
}
|
12629 |
+
|
12630 |
+
return { done: true };
|
12631 |
+
}
|
12632 |
+
};
|
12633 |
+
};
|
12634 |
+
|
12635 |
+
/***/ }),
|
12636 |
+
/* 48 */
|
12637 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12638 |
+
|
12639 |
+
"use strict";
|
12640 |
+
|
12641 |
+
|
12642 |
+
Object.defineProperty(exports, "__esModule", {
|
12643 |
+
value: true
|
12644 |
+
});
|
12645 |
+
exports.Trie = exports.createTrieFromBase64 = exports.UTRIE2_INDEX_2_MASK = exports.UTRIE2_INDEX_2_BLOCK_LENGTH = exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = exports.UTRIE2_INDEX_1_OFFSET = exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH = exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET = exports.UTRIE2_INDEX_2_BMP_LENGTH = exports.UTRIE2_LSCP_INDEX_2_LENGTH = exports.UTRIE2_DATA_MASK = exports.UTRIE2_DATA_BLOCK_LENGTH = exports.UTRIE2_LSCP_INDEX_2_OFFSET = exports.UTRIE2_SHIFT_1_2 = exports.UTRIE2_INDEX_SHIFT = exports.UTRIE2_SHIFT_1 = exports.UTRIE2_SHIFT_2 = undefined;
|
12646 |
+
|
12647 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
12648 |
+
|
12649 |
+
var _Util = __webpack_require__(13);
|
12650 |
+
|
12651 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12652 |
+
|
12653 |
+
/** Shift size for getting the index-2 table offset. */
|
12654 |
+
var UTRIE2_SHIFT_2 = exports.UTRIE2_SHIFT_2 = 5;
|
12655 |
+
|
12656 |
+
/** Shift size for getting the index-1 table offset. */
|
12657 |
+
var UTRIE2_SHIFT_1 = exports.UTRIE2_SHIFT_1 = 6 + 5;
|
12658 |
+
|
12659 |
+
/**
|
12660 |
+
* Shift size for shifting left the index array values.
|
12661 |
+
* Increases possible data size with 16-bit index values at the cost
|
12662 |
+
* of compactability.
|
12663 |
+
* This requires data blocks to be aligned by UTRIE2_DATA_GRANULARITY.
|
12664 |
+
*/
|
12665 |
+
var UTRIE2_INDEX_SHIFT = exports.UTRIE2_INDEX_SHIFT = 2;
|
12666 |
+
|
12667 |
+
/**
|
12668 |
+
* Difference between the two shift sizes,
|
12669 |
+
* for getting an index-1 offset from an index-2 offset. 6=11-5
|
12670 |
+
*/
|
12671 |
+
var UTRIE2_SHIFT_1_2 = exports.UTRIE2_SHIFT_1_2 = UTRIE2_SHIFT_1 - UTRIE2_SHIFT_2;
|
12672 |
+
|
12673 |
+
/**
|
12674 |
+
* The part of the index-2 table for U+D800..U+DBFF stores values for
|
12675 |
+
* lead surrogate code _units_ not code _points_.
|
12676 |
+
* Values for lead surrogate code _points_ are indexed with this portion of the table.
|
12677 |
+
* Length=32=0x20=0x400>>UTRIE2_SHIFT_2. (There are 1024=0x400 lead surrogates.)
|
12678 |
+
*/
|
12679 |
+
var UTRIE2_LSCP_INDEX_2_OFFSET = exports.UTRIE2_LSCP_INDEX_2_OFFSET = 0x10000 >> UTRIE2_SHIFT_2;
|
12680 |
+
|
12681 |
+
/** Number of entries in a data block. 32=0x20 */
|
12682 |
+
var UTRIE2_DATA_BLOCK_LENGTH = exports.UTRIE2_DATA_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_2;
|
12683 |
+
/** Mask for getting the lower bits for the in-data-block offset. */
|
12684 |
+
var UTRIE2_DATA_MASK = exports.UTRIE2_DATA_MASK = UTRIE2_DATA_BLOCK_LENGTH - 1;
|
12685 |
+
|
12686 |
+
var UTRIE2_LSCP_INDEX_2_LENGTH = exports.UTRIE2_LSCP_INDEX_2_LENGTH = 0x400 >> UTRIE2_SHIFT_2;
|
12687 |
+
/** Count the lengths of both BMP pieces. 2080=0x820 */
|
12688 |
+
var UTRIE2_INDEX_2_BMP_LENGTH = exports.UTRIE2_INDEX_2_BMP_LENGTH = UTRIE2_LSCP_INDEX_2_OFFSET + UTRIE2_LSCP_INDEX_2_LENGTH;
|
12689 |
+
/**
|
12690 |
+
* The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
|
12691 |
+
* Length 32=0x20 for lead bytes C0..DF, regardless of UTRIE2_SHIFT_2.
|
12692 |
+
*/
|
12693 |
+
var UTRIE2_UTF8_2B_INDEX_2_OFFSET = exports.UTRIE2_UTF8_2B_INDEX_2_OFFSET = UTRIE2_INDEX_2_BMP_LENGTH;
|
12694 |
+
var UTRIE2_UTF8_2B_INDEX_2_LENGTH = exports.UTRIE2_UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; /* U+0800 is the first code point after 2-byte UTF-8 */
|
12695 |
+
/**
|
12696 |
+
* The index-1 table, only used for supplementary code points, at offset 2112=0x840.
|
12697 |
+
* Variable length, for code points up to highStart, where the last single-value range starts.
|
12698 |
+
* Maximum length 512=0x200=0x100000>>UTRIE2_SHIFT_1.
|
12699 |
+
* (For 0x100000 supplementary code points U+10000..U+10ffff.)
|
12700 |
+
*
|
12701 |
+
* The part of the index-2 table for supplementary code points starts
|
12702 |
+
* after this index-1 table.
|
12703 |
+
*
|
12704 |
+
* Both the index-1 table and the following part of the index-2 table
|
12705 |
+
* are omitted completely if there is only BMP data.
|
12706 |
+
*/
|
12707 |
+
var UTRIE2_INDEX_1_OFFSET = exports.UTRIE2_INDEX_1_OFFSET = UTRIE2_UTF8_2B_INDEX_2_OFFSET + UTRIE2_UTF8_2B_INDEX_2_LENGTH;
|
12708 |
+
|
12709 |
+
/**
|
12710 |
+
* Number of index-1 entries for the BMP. 32=0x20
|
12711 |
+
* This part of the index-1 table is omitted from the serialized form.
|
12712 |
+
*/
|
12713 |
+
var UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = exports.UTRIE2_OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> UTRIE2_SHIFT_1;
|
12714 |
+
|
12715 |
+
/** Number of entries in an index-2 block. 64=0x40 */
|
12716 |
+
var UTRIE2_INDEX_2_BLOCK_LENGTH = exports.UTRIE2_INDEX_2_BLOCK_LENGTH = 1 << UTRIE2_SHIFT_1_2;
|
12717 |
+
/** Mask for getting the lower bits for the in-index-2-block offset. */
|
12718 |
+
var UTRIE2_INDEX_2_MASK = exports.UTRIE2_INDEX_2_MASK = UTRIE2_INDEX_2_BLOCK_LENGTH - 1;
|
12719 |
+
|
12720 |
+
var createTrieFromBase64 = exports.createTrieFromBase64 = function createTrieFromBase64(base64) {
|
12721 |
+
var buffer = (0, _Util.decode)(base64);
|
12722 |
+
var view32 = Array.isArray(buffer) ? (0, _Util.polyUint32Array)(buffer) : new Uint32Array(buffer);
|
12723 |
+
var view16 = Array.isArray(buffer) ? (0, _Util.polyUint16Array)(buffer) : new Uint16Array(buffer);
|
12724 |
+
var headerLength = 24;
|
12725 |
+
|
12726 |
+
var index = view16.slice(headerLength / 2, view32[4] / 2);
|
12727 |
+
var data = view32[5] === 2 ? view16.slice((headerLength + view32[4]) / 2) : view32.slice(Math.ceil((headerLength + view32[4]) / 4));
|
12728 |
+
|
12729 |
+
return new Trie(view32[0], view32[1], view32[2], view32[3], index, data);
|
12730 |
+
};
|
12731 |
+
|
12732 |
+
var Trie = exports.Trie = function () {
|
12733 |
+
function Trie(initialValue, errorValue, highStart, highValueIndex, index, data) {
|
12734 |
+
_classCallCheck(this, Trie);
|
12735 |
+
|
12736 |
+
this.initialValue = initialValue;
|
12737 |
+
this.errorValue = errorValue;
|
12738 |
+
this.highStart = highStart;
|
12739 |
+
this.highValueIndex = highValueIndex;
|
12740 |
+
this.index = index;
|
12741 |
+
this.data = data;
|
12742 |
+
}
|
12743 |
+
|
12744 |
+
/**
|
12745 |
+
* Get the value for a code point as stored in the Trie.
|
12746 |
+
*
|
12747 |
+
* @param codePoint the code point
|
12748 |
+
* @return the value
|
12749 |
+
*/
|
12750 |
+
|
12751 |
+
|
12752 |
+
_createClass(Trie, [{
|
12753 |
+
key: 'get',
|
12754 |
+
value: function get(codePoint) {
|
12755 |
+
var ix = void 0;
|
12756 |
+
if (codePoint >= 0) {
|
12757 |
+
if (codePoint < 0x0d800 || codePoint > 0x0dbff && codePoint <= 0x0ffff) {
|
12758 |
+
// Ordinary BMP code point, excluding leading surrogates.
|
12759 |
+
// BMP uses a single level lookup. BMP index starts at offset 0 in the Trie2 index.
|
12760 |
+
// 16 bit data is stored in the index array itself.
|
12761 |
+
ix = this.index[codePoint >> UTRIE2_SHIFT_2];
|
12762 |
+
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
12763 |
+
return this.data[ix];
|
12764 |
+
}
|
12765 |
+
|
12766 |
+
if (codePoint <= 0xffff) {
|
12767 |
+
// Lead Surrogate Code Point. A Separate index section is stored for
|
12768 |
+
// lead surrogate code units and code points.
|
12769 |
+
// The main index has the code unit data.
|
12770 |
+
// For this function, we need the code point data.
|
12771 |
+
// Note: this expression could be refactored for slightly improved efficiency, but
|
12772 |
+
// surrogate code points will be so rare in practice that it's not worth it.
|
12773 |
+
ix = this.index[UTRIE2_LSCP_INDEX_2_OFFSET + (codePoint - 0xd800 >> UTRIE2_SHIFT_2)];
|
12774 |
+
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
12775 |
+
return this.data[ix];
|
12776 |
+
}
|
12777 |
+
|
12778 |
+
if (codePoint < this.highStart) {
|
12779 |
+
// Supplemental code point, use two-level lookup.
|
12780 |
+
ix = UTRIE2_INDEX_1_OFFSET - UTRIE2_OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> UTRIE2_SHIFT_1);
|
12781 |
+
ix = this.index[ix];
|
12782 |
+
ix += codePoint >> UTRIE2_SHIFT_2 & UTRIE2_INDEX_2_MASK;
|
12783 |
+
ix = this.index[ix];
|
12784 |
+
ix = (ix << UTRIE2_INDEX_SHIFT) + (codePoint & UTRIE2_DATA_MASK);
|
12785 |
+
return this.data[ix];
|
12786 |
+
}
|
12787 |
+
if (codePoint <= 0x10ffff) {
|
12788 |
+
return this.data[this.highValueIndex];
|
12789 |
+
}
|
12790 |
+
}
|
12791 |
+
|
12792 |
+
// Fall through. The code point is outside of the legal range of 0..0x10ffff.
|
12793 |
+
return this.errorValue;
|
12794 |
+
}
|
12795 |
+
}]);
|
12796 |
+
|
12797 |
+
return Trie;
|
12798 |
+
}();
|
12799 |
+
|
12800 |
+
/***/ }),
|
12801 |
+
/* 49 */
|
12802 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12803 |
+
|
12804 |
+
"use strict";
|
12805 |
+
|
12806 |
+
|
12807 |
+
module.exports = 'KwAAAAAAAAAACA4AIDoAAPAfAAACAAAAAAAIABAAGABAAEgAUABYAF4AZgBeAGYAYABoAHAAeABeAGYAfACEAIAAiACQAJgAoACoAK0AtQC9AMUAXgBmAF4AZgBeAGYAzQDVAF4AZgDRANkA3gDmAOwA9AD8AAQBDAEUARoBIgGAAIgAJwEvATcBPwFFAU0BTAFUAVwBZAFsAXMBewGDATAAiwGTAZsBogGkAawBtAG8AcIBygHSAdoB4AHoAfAB+AH+AQYCDgIWAv4BHgImAi4CNgI+AkUCTQJTAlsCYwJrAnECeQKBAk0CiQKRApkCoQKoArACuALAAsQCzAIwANQC3ALkAjAA7AL0AvwCAQMJAxADGAMwACADJgMuAzYDPgOAAEYDSgNSA1IDUgNaA1oDYANiA2IDgACAAGoDgAByA3YDfgOAAIQDgACKA5IDmgOAAIAAogOqA4AAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAK8DtwOAAIAAvwPHA88D1wPfAyAD5wPsA/QD/AOAAIAABAQMBBIEgAAWBB4EJgQuBDMEIAM7BEEEXgBJBCADUQRZBGEEaQQwADAAcQQ+AXkEgQSJBJEEgACYBIAAoASoBK8EtwQwAL8ExQSAAIAAgACAAIAAgACgAM0EXgBeAF4AXgBeAF4AXgBeANUEXgDZBOEEXgDpBPEE+QQBBQkFEQUZBSEFKQUxBTUFPQVFBUwFVAVcBV4AYwVeAGsFcwV7BYMFiwWSBV4AmgWgBacFXgBeAF4AXgBeAKsFXgCyBbEFugW7BcIFwgXIBcIFwgXQBdQF3AXkBesF8wX7BQMGCwYTBhsGIwYrBjMGOwZeAD8GRwZNBl4AVAZbBl4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAGMGXgBqBnEGXgBeAF4AXgBeAF4AXgBeAF4AXgB5BoAG4wSGBo4GkwaAAIADHgR5AF4AXgBeAJsGgABGA4AAowarBrMGswagALsGwwbLBjAA0wbaBtoG3QbaBtoG2gbaBtoG2gblBusG8wb7BgMHCwcTBxsHCwcjBysHMAc1BzUHOgdCB9oGSgdSB1oHYAfaBloHaAfaBlIH2gbaBtoG2gbaBtoG2gbaBjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHbQdeAF4ANQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQd1B30HNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B4MH2gaKB68EgACAAIAAgACAAIAAgACAAI8HlwdeAJ8HpweAAIAArwe3B14AXgC/B8UHygcwANAH2AfgB4AA6AfwBz4B+AcACFwBCAgPCBcIogEYAR8IJwiAAC8INwg/CCADRwhPCFcIXwhnCEoDGgSAAIAAgABvCHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIfQh3CHgIeQh6CHsIfAh9CHcIeAh5CHoIewh8CH0Idwh4CHkIegh7CHwIhAiLCI4IMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAANQc1BzUHNQc1BzUHNQc1BzUHNQc1B54INQc1B6II2gaqCLIIugiAAIAAvgjGCIAAgACAAIAAgACAAIAAgACAAIAAywiHAYAA0wiAANkI3QjlCO0I9Aj8CIAAgACAAAIJCgkSCRoJIgknCTYHLwk3CZYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiWCJYIlgiAAIAAAAFAAXgBeAGAAcABeAHwAQACQAKAArQC9AJ4AXgBeAE0A3gBRAN4A7AD8AMwBGgEAAKcBNwEFAUwBXAF4QkhCmEKnArcCgAHHAsABz4LAAcABwAHAAd+C6ABoAG+C/4LAAcABwAHAAc+DF4MAAcAB54M3gweDV4Nng3eDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEeDqABVg6WDqABoQ6gAaABoAHXDvcONw/3DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DvcO9w73DncPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB7cPPwlGCU4JMACAAIAAgABWCV4JYQmAAGkJcAl4CXwJgAkwADAAMAAwAIgJgACLCZMJgACZCZ8JowmrCYAAswkwAF4AXgB8AIAAuwkABMMJyQmAAM4JgADVCTAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAqwYWBNkIMAAwADAAMADdCeAJ6AnuCR4E9gkwAP4JBQoNCjAAMACAABUK0wiAAB0KJAosCjQKgAAwADwKQwqAAEsKvQmdCVMKWwowADAAgACAALcEMACAAGMKgABrCjAAMAAwADAAMAAwADAAMAAwADAAMAAeBDAAMAAwADAAMAAwADAAMAAwADAAMAAwAIkEPQFzCnoKiQSCCooKkAqJBJgKoAqkCokEGAGsCrQKvArBCjAAMADJCtEKFQHZCuEK/gHpCvEKMAAwADAAMACAAIwE+QowAIAAPwEBCzAAMAAwADAAMACAAAkLEQswAIAAPwEZCyELgAAOCCkLMAAxCzkLMAAwADAAMAAwADAAXgBeAEELMAAwADAAMAAwADAAMAAwAEkLTQtVC4AAXAtkC4AAiQkwADAAMAAwADAAMAAwADAAbAtxC3kLgAuFC4sLMAAwAJMLlwufCzAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAApwswADAAMACAAIAAgACvC4AAgACAAIAAgACAALcLMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAvwuAAMcLgACAAIAAgACAAIAAyguAAIAAgACAAIAA0QswADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAANkLgACAAIAA4AswADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACJCR4E6AswADAAhwHwC4AA+AsADAgMEAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMACAAIAAGAwdDCUMMAAwAC0MNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQw1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHPQwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADUHNQc1BzUHNQc1BzUHNQc2BzAAMAA5DDUHNQc1BzUHNQc1BzUHNQc1BzUHNQdFDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAgACAAIAATQxSDFoMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAF4AXgBeAF4AXgBeAF4AYgxeAGoMXgBxDHkMfwxeAIUMXgBeAI0MMAAwADAAMAAwAF4AXgCVDJ0MMAAwADAAMABeAF4ApQxeAKsMswy7DF4Awgy9DMoMXgBeAF4AXgBeAF4AXgBeAF4AXgDRDNkMeQBqCeAM3Ax8AOYM7Az0DPgMXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgBeAF4AXgCgAAANoAAHDQ4NFg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAeDSYNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIAAgACAAIAAgACAAC4NMABeAF4ANg0wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAD4NRg1ODVYNXg1mDTAAbQ0wADAAMAAwADAAMAAwADAA2gbaBtoG2gbaBtoG2gbaBnUNeg3CBYANwgWFDdoGjA3aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gaUDZwNpA2oDdoG2gawDbcNvw3HDdoG2gbPDdYN3A3fDeYN2gbsDfMN2gbaBvoN/g3aBgYODg7aBl4AXgBeABYOXgBeACUG2gYeDl4AJA5eACwO2w3aBtoGMQ45DtoG2gbaBtoGQQ7aBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDjUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B1EO2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQdZDjUHNQc1BzUHNQc1B2EONQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHaA41BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B3AO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gY1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1BzUHNQc1B2EO2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gZJDtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBtoG2gbaBkkOeA6gAKAAoAAwADAAMAAwAKAAoACgAKAAoACgAKAAgA4wADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAD//wQABAAEAAQABAAEAAQABAAEAA0AAwABAAEAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAKABMAFwAeABsAGgAeABcAFgASAB4AGwAYAA8AGAAcAEsASwBLAEsASwBLAEsASwBLAEsAGAAYAB4AHgAeABMAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAFgAbABIAHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYADQARAB4ABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkAFgAaABsAGwAbAB4AHQAdAB4ATwAXAB4ADQAeAB4AGgAbAE8ATwAOAFAAHQAdAB0ATwBPABcATwBPAE8AFgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwArAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAAQABAANAA0ASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAUAArACsAKwArACsAKwArACsABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAGgAaAFAAUABQAFAAUABMAB4AGwBQAB4AKwArACsABAAEAAQAKwBQAFAAUABQAFAAUAArACsAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUAArAFAAUAArACsABAArAAQABAAEAAQABAArACsAKwArAAQABAArACsABAAEAAQAKwArACsABAArACsAKwArACsAKwArAFAAUABQAFAAKwBQACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwAEAAQAUABQAFAABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUAArACsABABQAAQABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQAKwArAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeABsAKwArACsAKwArACsAKwBQAAQABAAEAAQABAAEACsABAAEAAQAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArAAQABAArACsABAAEAAQAKwArACsAKwArACsAKwArAAQABAArACsAKwArAFAAUAArAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwAeAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwAEAFAAKwBQAFAAUABQAFAAUAArACsAKwBQAFAAUAArAFAAUABQAFAAKwArACsAUABQACsAUAArAFAAUAArACsAKwBQAFAAKwArACsAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQAKwArACsABAAEAAQAKwAEAAQABAAEACsAKwBQACsAKwArACsAKwArAAQAKwArACsAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAB4AHgAeAB4AHgAeABsAHgArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArAFAAUABQACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAB4AUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABAArACsAKwArACsAKwArAAQABAArACsAKwArACsAKwArAFAAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwArAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAKwBcAFwAKwBcACsAKwBcACsAKwArACsAKwArAFwAXABcAFwAKwBcAFwAXABcAFwAXABcACsAXABcAFwAKwBcACsAXAArACsAXABcACsAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgArACoAKgBcACsAKwBcAFwAXABcAFwAKwBcACsAKgAqACoAKgAqACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAFwAXABcAFwAUAAOAA4ADgAOAB4ADgAOAAkADgAOAA0ACQATABMAEwATABMACQAeABMAHgAeAB4ABAAEAB4AHgAeAB4AHgAeAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUAANAAQAHgAEAB4ABAAWABEAFgARAAQABABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAAQABAAEAAQABAANAAQABABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsADQANAB4AHgAeAB4AHgAeAAQAHgAeAB4AHgAeAB4AKwAeAB4ADgAOAA0ADgAeAB4AHgAeAB4ACQAJACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgAeAB4AHgBcAFwAXABcAFwAXAAqACoAKgAqAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAKgAqACoAKgAqACoAKgBcAFwAXAAqACoAKgAqAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAXAAqAEsASwBLAEsASwBLAEsASwBLAEsAKgAqACoAKgAqACoAUABQAFAAUABQAFAAKwBQACsAKwArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQACsAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwAEAAQABAAeAA0AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAEQArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAADQANAA0AUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAA0ADQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQACsABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoADQANABUAXAANAB4ADQAbAFwAKgArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAB4AHgATABMADQANAA4AHgATABMAHgAEAAQABAAJACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAUABQAFAAUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwAeACsAKwArABMAEwBLAEsASwBLAEsASwBLAEsASwBLAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwBcAFwAXABcAFwAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcACsAKwArACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwAeAB4AXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsABABLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKgAqACoAKgAqACoAKgBcACoAKgAqACoAKgAqACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAUABQAFAAUABQAFAAUAArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4ADQANAA0ADQAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAHgAeAB4AHgBQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwANAA0ADQANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwBQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsABAAEAAQAHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAABABQAFAAUABQAAQABAAEAFAAUAAEAAQABAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAKwBQACsAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAKwArAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAKwAeAB4AHgAeAB4AHgAeAA4AHgArAA0ADQANAA0ADQANAA0ACQANAA0ADQAIAAQACwAEAAQADQAJAA0ADQAMAB0AHQAeABcAFwAWABcAFwAXABYAFwAdAB0AHgAeABQAFAAUAA0AAQABAAQABAAEAAQABAAJABoAGgAaABoAGgAaABoAGgAeABcAFwAdABUAFQAeAB4AHgAeAB4AHgAYABYAEQAVABUAFQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgANAB4ADQANAA0ADQAeAA0ADQANAAcAHgAeAB4AHgArAAQABAAEAAQABAAEAAQABAAEAAQAUABQACsAKwBPAFAAUABQAFAAUAAeAB4AHgAWABEATwBQAE8ATwBPAE8AUABQAFAAUABQAB4AHgAeABYAEQArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAaABsAGwAbABsAGgAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgBQABoAHgAdAB4AUAAeABoAHgAeAB4AHgAeAB4AHgAeAB4ATwAeAFAAGwAeAB4AUABQAFAAUABQAB4AHgAeAB0AHQAeAFAAHgBQAB4AUAAeAFAATwBQAFAAHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AUABQAFAAUABPAE8AUABQAFAAUABQAE8AUABQAE8AUABPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAE8ATwBPAE8ATwBPAE8ATwBPAE8AUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAATwAeAB4AKwArACsAKwAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB0AHQAeAB4AHgAdAB0AHgAeAB0AHgAeAB4AHQAeAB0AGwAbAB4AHQAeAB4AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB0AHgAdAB4AHQAdAB0AHQAdAB0AHgAdAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAdAB0AHQAdAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAlACUAHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBQAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAeAB4AHgAeAB0AHQAeAB4AHgAeAB0AHQAdAB4AHgAdAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB0AHQAeAB4AHQAeAB4AHgAeAB0AHQAeAB4AHgAeACUAJQAdAB0AJQAeACUAJQAlACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAHgAeAB4AHgAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHQAdAB0AHgAdACUAHQAdAB4AHQAdAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHQAdAB0AHQAlAB4AJQAlACUAHQAlACUAHQAdAB0AJQAlAB0AHQAlAB0AHQAlACUAJQAeAB0AHgAeAB4AHgAdAB0AJQAdAB0AHQAdAB0AHQAlACUAJQAlACUAHQAlACUAIAAlAB0AHQAlACUAJQAlACUAJQAlACUAHgAeAB4AJQAlACAAIAAgACAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeABcAFwAXABcAFwAXAB4AEwATACUAHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACUAJQBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwArACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAE8ATwBPAE8ATwBPAE8ATwAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeACsAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUAArACsAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQBQAFAAUABQACsAKwArACsAUABQAFAAUABQAFAAUABQAA0AUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAABAAEAAQAKwAEAAQAKwArACsAKwArAAQABAAEAAQAUABQAFAAUAArAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsABAAEAAQAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsADQANAA0ADQANAA0ADQANAB4AKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAUABQAFAAUABQAA0ADQANAA0ADQANABQAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwANAA0ADQANAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAeAAQABAAEAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLACsADQArAB4AKwArAAQABAAEAAQAUABQAB4AUAArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwAEAAQABAAEAAQABAAEAAQABAAOAA0ADQATABMAHgAeAB4ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0AUABQAFAAUAAEAAQAKwArAAQADQANAB4AUAArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXABcAA0ADQANACoASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUAArACsAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANACsADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEcARwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQACsAKwAeAAQABAANAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAEAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUAArACsAUAArACsAUABQACsAKwBQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AKwArAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAeAB4ADQANAA0ADQAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAArAAQABAArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAEAAQABAAEAAQABAAEACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAFgAWAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAKwBQACsAKwArACsAKwArAFAAKwArACsAKwBQACsAUAArAFAAKwBQAFAAUAArAFAAUAArAFAAKwArAFAAKwBQACsAUAArAFAAKwBQACsAUABQACsAUAArACsAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAUABQAFAAUAArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUAArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAlACUAJQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeACUAJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeACUAJQAlACUAJQAeACUAJQAlACUAJQAgACAAIAAlACUAIAAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIQAhACEAIQAhACUAJQAgACAAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAIAAlACUAJQAlACAAJQAgACAAIAAgACAAIAAgACAAIAAlACUAJQAgACUAJQAlACUAIAAgACAAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeACUAHgAlAB4AJQAlACUAJQAlACAAJQAlACUAJQAeACUAHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAIAAgACAAIAAgAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFwAXABcAFQAVABUAHgAeAB4AHgAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAIAAgACAAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAlACAAIAAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsA';
|
12808 |
+
|
12809 |
+
/***/ }),
|
12810 |
+
/* 50 */
|
12811 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12812 |
+
|
12813 |
+
"use strict";
|
12814 |
+
|
12815 |
+
|
12816 |
+
Object.defineProperty(exports, "__esModule", {
|
12817 |
+
value: true
|
12818 |
+
});
|
12819 |
+
|
12820 |
+
var _Path = __webpack_require__(6);
|
12821 |
+
|
12822 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12823 |
+
|
12824 |
+
var Circle = function Circle(x, y, radius) {
|
12825 |
+
_classCallCheck(this, Circle);
|
12826 |
+
|
12827 |
+
this.type = _Path.PATH.CIRCLE;
|
12828 |
+
this.x = x;
|
12829 |
+
this.y = y;
|
12830 |
+
this.radius = radius;
|
12831 |
+
if (true) {
|
12832 |
+
if (isNaN(x)) {
|
12833 |
+
console.error('Invalid x value given for Circle');
|
12834 |
+
}
|
12835 |
+
if (isNaN(y)) {
|
12836 |
+
console.error('Invalid y value given for Circle');
|
12837 |
+
}
|
12838 |
+
if (isNaN(radius)) {
|
12839 |
+
console.error('Invalid radius value given for Circle');
|
12840 |
+
}
|
12841 |
+
}
|
12842 |
+
};
|
12843 |
+
|
12844 |
+
exports.default = Circle;
|
12845 |
+
|
12846 |
+
/***/ }),
|
12847 |
+
/* 51 */
|
12848 |
+
/***/ (function(module, exports, __webpack_require__) {
|
12849 |
+
|
12850 |
+
"use strict";
|
12851 |
+
|
12852 |
+
|
12853 |
+
Object.defineProperty(exports, "__esModule", {
|
12854 |
+
value: true
|
12855 |
+
});
|
12856 |
+
|
12857 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
12858 |
+
|
12859 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
12860 |
+
|
12861 |
+
var _Bounds = __webpack_require__(1);
|
12862 |
+
|
12863 |
+
var _Font = __webpack_require__(25);
|
12864 |
+
|
12865 |
+
var _Gradient = __webpack_require__(52);
|
12866 |
+
|
12867 |
+
var _TextContainer = __webpack_require__(9);
|
12868 |
+
|
12869 |
+
var _TextContainer2 = _interopRequireDefault(_TextContainer);
|
12870 |
+
|
12871 |
+
var _background = __webpack_require__(5);
|
12872 |
+
|
12873 |
+
var _border = __webpack_require__(12);
|
12874 |
+
|
12875 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12876 |
+
|
12877 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
12878 |
+
|
12879 |
+
var Renderer = function () {
|
12880 |
+
function Renderer(target, options) {
|
12881 |
+
_classCallCheck(this, Renderer);
|
12882 |
+
|
12883 |
+
this.target = target;
|
12884 |
+
this.options = options;
|
12885 |
+
target.render(options);
|
12886 |
+
}
|
12887 |
+
|
12888 |
+
_createClass(Renderer, [{
|
12889 |
+
key: 'renderNode',
|
12890 |
+
value: function renderNode(container) {
|
12891 |
+
if (container.isVisible()) {
|
12892 |
+
this.renderNodeBackgroundAndBorders(container);
|
12893 |
+
this.renderNodeContent(container);
|
12894 |
+
}
|
12895 |
+
}
|
12896 |
+
}, {
|
12897 |
+
key: 'renderNodeContent',
|
12898 |
+
value: function renderNodeContent(container) {
|
12899 |
+
var _this = this;
|
12900 |
+
|
12901 |
+
var callback = function callback() {
|
12902 |
+
if (container.childNodes.length) {
|
12903 |
+
container.childNodes.forEach(function (child) {
|
12904 |
+
if (child instanceof _TextContainer2.default) {
|
12905 |
+
var style = child.parent.style;
|
12906 |
+
_this.target.renderTextNode(child.bounds, style.color, style.font, style.textDecoration, style.textShadow);
|
12907 |
+
} else {
|
12908 |
+
_this.target.drawShape(child, container.style.color);
|
12909 |
+
}
|
12910 |
+
});
|
12911 |
+
}
|
12912 |
+
|
12913 |
+
if (container.image) {
|
12914 |
+
var _image = _this.options.imageStore.get(container.image);
|
12915 |
+
if (_image) {
|
12916 |
+
var contentBox = (0, _Bounds.calculateContentBox)(container.bounds, container.style.padding, container.style.border);
|
12917 |
+
var _width = typeof _image.width === 'number' && _image.width > 0 ? _image.width : contentBox.width;
|
12918 |
+
var _height = typeof _image.height === 'number' && _image.height > 0 ? _image.height : contentBox.height;
|
12919 |
+
if (_width > 0 && _height > 0) {
|
12920 |
+
_this.target.clip([(0, _Bounds.calculatePaddingBoxPath)(container.curvedBounds)], function () {
|
12921 |
+
_this.target.drawImage(_image, new _Bounds.Bounds(0, 0, _width, _height), contentBox);
|
12922 |
+
});
|
12923 |
+
}
|
12924 |
+
}
|
12925 |
+
}
|
12926 |
+
};
|
12927 |
+
var paths = container.getClipPaths();
|
12928 |
+
if (paths.length) {
|
12929 |
+
this.target.clip(paths, callback);
|
12930 |
+
} else {
|
12931 |
+
callback();
|
12932 |
+
}
|
12933 |
+
}
|
12934 |
+
}, {
|
12935 |
+
key: 'renderNodeBackgroundAndBorders',
|
12936 |
+
value: function renderNodeBackgroundAndBorders(container) {
|
12937 |
+
var _this2 = this;
|
12938 |
+
|
12939 |
+
var HAS_BACKGROUND = !container.style.background.backgroundColor.isTransparent() || container.style.background.backgroundImage.length;
|
12940 |
+
|
12941 |
+
var hasRenderableBorders = container.style.border.some(function (border) {
|
12942 |
+
return border.borderStyle !== _border.BORDER_STYLE.NONE && !border.borderColor.isTransparent();
|
12943 |
+
});
|
12944 |
+
|
12945 |
+
var callback = function callback() {
|
12946 |
+
var backgroundPaintingArea = (0, _background.calculateBackgroungPaintingArea)(container.curvedBounds, container.style.background.backgroundClip);
|
12947 |
+
|
12948 |
+
if (HAS_BACKGROUND) {
|
12949 |
+
_this2.target.clip([backgroundPaintingArea], function () {
|
12950 |
+
if (!container.style.background.backgroundColor.isTransparent()) {
|
12951 |
+
_this2.target.fill(container.style.background.backgroundColor);
|
12952 |
+
}
|
12953 |
+
|
12954 |
+
_this2.renderBackgroundImage(container);
|
12955 |
+
});
|
12956 |
+
}
|
12957 |
+
|
12958 |
+
container.style.border.forEach(function (border, side) {
|
12959 |
+
if (border.borderStyle !== _border.BORDER_STYLE.NONE && !border.borderColor.isTransparent()) {
|
12960 |
+
_this2.renderBorder(border, side, container.curvedBounds);
|
12961 |
+
}
|
12962 |
+
});
|
12963 |
+
};
|
12964 |
+
|
12965 |
+
if (HAS_BACKGROUND || hasRenderableBorders) {
|
12966 |
+
var paths = container.parent ? container.parent.getClipPaths() : [];
|
12967 |
+
if (paths.length) {
|
12968 |
+
this.target.clip(paths, callback);
|
12969 |
+
} else {
|
12970 |
+
callback();
|
12971 |
+
}
|
12972 |
+
}
|
12973 |
+
}
|
12974 |
+
}, {
|
12975 |
+
key: 'renderBackgroundImage',
|
12976 |
+
value: function renderBackgroundImage(container) {
|
12977 |
+
var _this3 = this;
|
12978 |
+
|
12979 |
+
container.style.background.backgroundImage.slice(0).reverse().forEach(function (backgroundImage) {
|
12980 |
+
if (backgroundImage.source.method === 'url' && backgroundImage.source.args.length) {
|
12981 |
+
_this3.renderBackgroundRepeat(container, backgroundImage);
|
12982 |
+
} else if (/gradient/i.test(backgroundImage.source.method)) {
|
12983 |
+
_this3.renderBackgroundGradient(container, backgroundImage);
|
12984 |
+
}
|
12985 |
+
});
|
12986 |
+
}
|
12987 |
+
}, {
|
12988 |
+
key: 'renderBackgroundRepeat',
|
12989 |
+
value: function renderBackgroundRepeat(container, background) {
|
12990 |
+
var image = this.options.imageStore.get(background.source.args[0]);
|
12991 |
+
if (image) {
|
12992 |
+
var backgroundPositioningArea = (0, _background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin, container.bounds, container.style.padding, container.style.border);
|
12993 |
+
var backgroundImageSize = (0, _background.calculateBackgroundSize)(background, image, backgroundPositioningArea);
|
12994 |
+
var position = (0, _background.calculateBackgroundPosition)(background.position, backgroundImageSize, backgroundPositioningArea);
|
12995 |
+
var _path = (0, _background.calculateBackgroundRepeatPath)(background, position, backgroundImageSize, backgroundPositioningArea, container.bounds);
|
12996 |
+
|
12997 |
+
var _offsetX = Math.round(backgroundPositioningArea.left + position.x);
|
12998 |
+
var _offsetY = Math.round(backgroundPositioningArea.top + position.y);
|
12999 |
+
this.target.renderRepeat(_path, image, backgroundImageSize, _offsetX, _offsetY);
|
13000 |
+
}
|
13001 |
+
}
|
13002 |
+
}, {
|
13003 |
+
key: 'renderBackgroundGradient',
|
13004 |
+
value: function renderBackgroundGradient(container, background) {
|
13005 |
+
var backgroundPositioningArea = (0, _background.calculateBackgroungPositioningArea)(container.style.background.backgroundOrigin, container.bounds, container.style.padding, container.style.border);
|
13006 |
+
var backgroundImageSize = (0, _background.calculateGradientBackgroundSize)(background, backgroundPositioningArea);
|
13007 |
+
var position = (0, _background.calculateBackgroundPosition)(background.position, backgroundImageSize, backgroundPositioningArea);
|
13008 |
+
var gradientBounds = new _Bounds.Bounds(Math.round(backgroundPositioningArea.left + position.x), Math.round(backgroundPositioningArea.top + position.y), backgroundImageSize.width, backgroundImageSize.height);
|
13009 |
+
|
13010 |
+
var gradient = (0, _Gradient.parseGradient)(container, background.source, gradientBounds);
|
13011 |
+
if (gradient) {
|
13012 |
+
switch (gradient.type) {
|
13013 |
+
case _Gradient.GRADIENT_TYPE.LINEAR_GRADIENT:
|
13014 |
+
// $FlowFixMe
|
13015 |
+
this.target.renderLinearGradient(gradientBounds, gradient);
|
13016 |
+
break;
|
13017 |
+
case _Gradient.GRADIENT_TYPE.RADIAL_GRADIENT:
|
13018 |
+
// $FlowFixMe
|
13019 |
+
this.target.renderRadialGradient(gradientBounds, gradient);
|
13020 |
+
break;
|
13021 |
+
}
|
13022 |
+
}
|
13023 |
+
}
|
13024 |
+
}, {
|
13025 |
+
key: 'renderBorder',
|
13026 |
+
value: function renderBorder(border, side, curvePoints) {
|
13027 |
+
this.target.drawShape((0, _Bounds.parsePathForBorder)(curvePoints, side), border.borderColor);
|
13028 |
+
}
|
13029 |
+
}, {
|
13030 |
+
key: 'renderStack',
|
13031 |
+
value: function renderStack(stack) {
|
13032 |
+
var _this4 = this;
|
13033 |
+
|
13034 |
+
if (stack.container.isVisible()) {
|
13035 |
+
var _opacity = stack.getOpacity();
|
13036 |
+
if (_opacity !== this._opacity) {
|
13037 |
+
this.target.setOpacity(stack.getOpacity());
|
13038 |
+
this._opacity = _opacity;
|
13039 |
+
}
|
13040 |
+
|
13041 |
+
var _transform = stack.container.style.transform;
|
13042 |
+
if (_transform !== null) {
|
13043 |
+
this.target.transform(stack.container.bounds.left + _transform.transformOrigin[0].value, stack.container.bounds.top + _transform.transformOrigin[1].value, _transform.transform, function () {
|
13044 |
+
return _this4.renderStackContent(stack);
|
13045 |
+
});
|
13046 |
+
} else {
|
13047 |
+
this.renderStackContent(stack);
|
13048 |
+
}
|
13049 |
+
}
|
13050 |
+
}
|
13051 |
+
}, {
|
13052 |
+
key: 'renderStackContent',
|
13053 |
+
value: function renderStackContent(stack) {
|
13054 |
+
var _splitStackingContext = splitStackingContexts(stack),
|
13055 |
+
_splitStackingContext2 = _slicedToArray(_splitStackingContext, 5),
|
13056 |
+
negativeZIndex = _splitStackingContext2[0],
|
13057 |
+
zeroOrAutoZIndexOrTransformedOrOpacity = _splitStackingContext2[1],
|
13058 |
+
positiveZIndex = _splitStackingContext2[2],
|
13059 |
+
nonPositionedFloats = _splitStackingContext2[3],
|
13060 |
+
nonPositionedInlineLevel = _splitStackingContext2[4];
|
13061 |
+
|
13062 |
+
var _splitDescendants = splitDescendants(stack),
|
13063 |
+
_splitDescendants2 = _slicedToArray(_splitDescendants, 2),
|
13064 |
+
inlineLevel = _splitDescendants2[0],
|
13065 |
+
nonInlineLevel = _splitDescendants2[1];
|
13066 |
+
|
13067 |
+
// https://www.w3.org/TR/css-position-3/#painting-order
|
13068 |
+
// 1. the background and borders of the element forming the stacking context.
|
13069 |
+
|
13070 |
+
|
13071 |
+
this.renderNodeBackgroundAndBorders(stack.container);
|
13072 |
+
// 2. the child stacking contexts with negative stack levels (most negative first).
|
13073 |
+
negativeZIndex.sort(sortByZIndex).forEach(this.renderStack, this);
|
13074 |
+
// 3. For all its in-flow, non-positioned, block-level descendants in tree order:
|
13075 |
+
this.renderNodeContent(stack.container);
|
13076 |
+
nonInlineLevel.forEach(this.renderNode, this);
|
13077 |
+
// 4. All non-positioned floating descendants, in tree order. For each one of these,
|
13078 |
+
// treat the element as if it created a new stacking context, but any positioned descendants and descendants
|
13079 |
+
// which actually create a new stacking context should be considered part of the parent stacking context,
|
13080 |
+
// not this new one.
|
13081 |
+
nonPositionedFloats.forEach(this.renderStack, this);
|
13082 |
+
// 5. the in-flow, inline-level, non-positioned descendants, including inline tables and inline blocks.
|
13083 |
+
nonPositionedInlineLevel.forEach(this.renderStack, this);
|
13084 |
+
inlineLevel.forEach(this.renderNode, this);
|
13085 |
+
// 6. All positioned, opacity or transform descendants, in tree order that fall into the following categories:
|
13086 |
+
// All positioned descendants with 'z-index: auto' or 'z-index: 0', in tree order.
|
13087 |
+
// For those with 'z-index: auto', treat the element as if it created a new stacking context,
|
13088 |
+
// but any positioned descendants and descendants which actually create a new stacking context should be
|
13089 |
+
// considered part of the parent stacking context, not this new one. For those with 'z-index: 0',
|
13090 |
+
// treat the stacking context generated atomically.
|
13091 |
+
//
|
13092 |
+
// All opacity descendants with opacity less than 1
|
13093 |
+
//
|
13094 |
+
// All transform descendants with transform other than none
|
13095 |
+
zeroOrAutoZIndexOrTransformedOrOpacity.forEach(this.renderStack, this);
|
13096 |
+
// 7. Stacking contexts formed by positioned descendants with z-indices greater than or equal to 1 in z-index
|
13097 |
+
// order (smallest first) then tree order.
|
13098 |
+
positiveZIndex.sort(sortByZIndex).forEach(this.renderStack, this);
|
13099 |
+
}
|
13100 |
+
}, {
|
13101 |
+
key: 'render',
|
13102 |
+
value: function render(stack) {
|
13103 |
+
var _this5 = this;
|
13104 |
+
|
13105 |
+
if (this.options.backgroundColor) {
|
13106 |
+
this.target.rectangle(this.options.x, this.options.y, this.options.width, this.options.height, this.options.backgroundColor);
|
13107 |
+
}
|
13108 |
+
this.renderStack(stack);
|
13109 |
+
var target = this.target.getTarget();
|
13110 |
+
if (true) {
|
13111 |
+
return target.then(function (output) {
|
13112 |
+
_this5.options.logger.log('Render completed');
|
13113 |
+
return output;
|
13114 |
+
});
|
13115 |
+
}
|
13116 |
+
return target;
|
13117 |
+
}
|
13118 |
+
}]);
|
13119 |
+
|
13120 |
+
return Renderer;
|
13121 |
+
}();
|
13122 |
+
|
13123 |
+
exports.default = Renderer;
|
13124 |
+
|
13125 |
+
|
13126 |
+
var splitDescendants = function splitDescendants(stack) {
|
13127 |
+
var inlineLevel = [];
|
13128 |
+
var nonInlineLevel = [];
|
13129 |
+
|
13130 |
+
var length = stack.children.length;
|
13131 |
+
for (var i = 0; i < length; i++) {
|
13132 |
+
var child = stack.children[i];
|
13133 |
+
if (child.isInlineLevel()) {
|
13134 |
+
inlineLevel.push(child);
|
13135 |
+
} else {
|
13136 |
+
nonInlineLevel.push(child);
|
13137 |
+
}
|
13138 |
+
}
|
13139 |
+
return [inlineLevel, nonInlineLevel];
|
13140 |
+
};
|
13141 |
+
|
13142 |
+
var splitStackingContexts = function splitStackingContexts(stack) {
|
13143 |
+
var negativeZIndex = [];
|
13144 |
+
var zeroOrAutoZIndexOrTransformedOrOpacity = [];
|
13145 |
+
var positiveZIndex = [];
|
13146 |
+
var nonPositionedFloats = [];
|
13147 |
+
var nonPositionedInlineLevel = [];
|
13148 |
+
var length = stack.contexts.length;
|
13149 |
+
for (var i = 0; i < length; i++) {
|
13150 |
+
var child = stack.contexts[i];
|
13151 |
+
if (child.container.isPositioned() || child.container.style.opacity < 1 || child.container.isTransformed()) {
|
13152 |
+
if (child.container.style.zIndex.order < 0) {
|
13153 |
+
negativeZIndex.push(child);
|
13154 |
+
} else if (child.container.style.zIndex.order > 0) {
|
13155 |
+
positiveZIndex.push(child);
|
13156 |
+
} else {
|
13157 |
+
zeroOrAutoZIndexOrTransformedOrOpacity.push(child);
|
13158 |
+
}
|
13159 |
+
} else {
|
13160 |
+
if (child.container.isFloating()) {
|
13161 |
+
nonPositionedFloats.push(child);
|
13162 |
+
} else {
|
13163 |
+
nonPositionedInlineLevel.push(child);
|
13164 |
+
}
|
13165 |
+
}
|
13166 |
+
}
|
13167 |
+
return [negativeZIndex, zeroOrAutoZIndexOrTransformedOrOpacity, positiveZIndex, nonPositionedFloats, nonPositionedInlineLevel];
|
13168 |
+
};
|
13169 |
+
|
13170 |
+
var sortByZIndex = function sortByZIndex(a, b) {
|
13171 |
+
if (a.container.style.zIndex.order > b.container.style.zIndex.order) {
|
13172 |
+
return 1;
|
13173 |
+
} else if (a.container.style.zIndex.order < b.container.style.zIndex.order) {
|
13174 |
+
return -1;
|
13175 |
+
}
|
13176 |
+
|
13177 |
+
return a.container.index > b.container.index ? 1 : -1;
|
13178 |
+
};
|
13179 |
+
|
13180 |
+
/***/ }),
|
13181 |
+
/* 52 */
|
13182 |
+
/***/ (function(module, exports, __webpack_require__) {
|
13183 |
+
|
13184 |
+
"use strict";
|
13185 |
+
|
13186 |
+
|
13187 |
+
Object.defineProperty(exports, "__esModule", {
|
13188 |
+
value: true
|
13189 |
+
});
|
13190 |
+
exports.transformWebkitRadialGradientArgs = exports.parseGradient = exports.RadialGradient = exports.LinearGradient = exports.RADIAL_GRADIENT_SHAPE = exports.GRADIENT_TYPE = undefined;
|
13191 |
+
|
13192 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
13193 |
+
|
13194 |
+
var _NodeContainer = __webpack_require__(3);
|
13195 |
+
|
13196 |
+
var _NodeContainer2 = _interopRequireDefault(_NodeContainer);
|
13197 |
+
|
13198 |
+
var _Angle = __webpack_require__(53);
|
13199 |
+
|
13200 |
+
var _Color = __webpack_require__(0);
|
13201 |
+
|
13202 |
+
var _Color2 = _interopRequireDefault(_Color);
|
13203 |
+
|
13204 |
+
var _Length = __webpack_require__(2);
|
13205 |
+
|
13206 |
+
var _Length2 = _interopRequireDefault(_Length);
|
13207 |
+
|
13208 |
+
var _Util = __webpack_require__(4);
|
13209 |
+
|
13210 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13211 |
+
|
13212 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
13213 |
+
|
13214 |
+
var SIDE_OR_CORNER = /^(to )?(left|top|right|bottom)( (left|top|right|bottom))?$/i;
|
13215 |
+
var PERCENTAGE_ANGLES = /^([+-]?\d*\.?\d+)% ([+-]?\d*\.?\d+)%$/i;
|
13216 |
+
var ENDS_WITH_LENGTH = /(px)|%|( 0)$/i;
|
13217 |
+
var FROM_TO_COLORSTOP = /^(from|to|color-stop)\((?:([\d.]+)(%)?,\s*)?(.+?)\)$/i;
|
13218 |
+
var RADIAL_SHAPE_DEFINITION = /^\s*(circle|ellipse)?\s*((?:([\d.]+)(px|r?em|%)\s*(?:([\d.]+)(px|r?em|%))?)|closest-side|closest-corner|farthest-side|farthest-corner)?\s*(?:at\s*(?:(left|center|right)|([\d.]+)(px|r?em|%))\s+(?:(top|center|bottom)|([\d.]+)(px|r?em|%)))?(?:\s|$)/i;
|
13219 |
+
|
13220 |
+
var GRADIENT_TYPE = exports.GRADIENT_TYPE = {
|
13221 |
+
LINEAR_GRADIENT: 0,
|
13222 |
+
RADIAL_GRADIENT: 1
|
13223 |
+
};
|
13224 |
+
|
13225 |
+
var RADIAL_GRADIENT_SHAPE = exports.RADIAL_GRADIENT_SHAPE = {
|
13226 |
+
CIRCLE: 0,
|
13227 |
+
ELLIPSE: 1
|
13228 |
+
};
|
13229 |
+
|
13230 |
+
var LENGTH_FOR_POSITION = {
|
13231 |
+
left: new _Length2.default('0%'),
|
13232 |
+
top: new _Length2.default('0%'),
|
13233 |
+
center: new _Length2.default('50%'),
|
13234 |
+
right: new _Length2.default('100%'),
|
13235 |
+
bottom: new _Length2.default('100%')
|
13236 |
+
};
|
13237 |
+
|
13238 |
+
var LinearGradient = exports.LinearGradient = function LinearGradient(colorStops, direction) {
|
13239 |
+
_classCallCheck(this, LinearGradient);
|
13240 |
+
|
13241 |
+
this.type = GRADIENT_TYPE.LINEAR_GRADIENT;
|
13242 |
+
this.colorStops = colorStops;
|
13243 |
+
this.direction = direction;
|
13244 |
+
};
|
13245 |
+
|
13246 |
+
var RadialGradient = exports.RadialGradient = function RadialGradient(colorStops, shape, center, radius) {
|
13247 |
+
_classCallCheck(this, RadialGradient);
|
13248 |
+
|
13249 |
+
this.type = GRADIENT_TYPE.RADIAL_GRADIENT;
|
13250 |
+
this.colorStops = colorStops;
|
13251 |
+
this.shape = shape;
|
13252 |
+
this.center = center;
|
13253 |
+
this.radius = radius;
|
13254 |
+
};
|
13255 |
+
|
13256 |
+
var parseGradient = exports.parseGradient = function parseGradient(container, _ref, bounds) {
|
13257 |
+
var args = _ref.args,
|
13258 |
+
method = _ref.method,
|
13259 |
+
prefix = _ref.prefix;
|
13260 |
+
|
13261 |
+
if (method === 'linear-gradient') {
|
13262 |
+
return parseLinearGradient(args, bounds, !!prefix);
|
13263 |
+
} else if (method === 'gradient' && args[0] === 'linear') {
|
13264 |
+
// TODO handle correct angle
|
13265 |
+
return parseLinearGradient(['to bottom'].concat(transformObsoleteColorStops(args.slice(3))), bounds, !!prefix);
|
13266 |
+
} else if (method === 'radial-gradient') {
|
13267 |
+
return parseRadialGradient(container, prefix === '-webkit-' ? transformWebkitRadialGradientArgs(args) : args, bounds);
|
13268 |
+
} else if (method === 'gradient' && args[0] === 'radial') {
|
13269 |
+
return parseRadialGradient(container, transformObsoleteColorStops(transformWebkitRadialGradientArgs(args.slice(1))), bounds);
|
13270 |
+
}
|
13271 |
+
};
|
13272 |
+
|
13273 |
+
var parseColorStops = function parseColorStops(args, firstColorStopIndex, lineLength) {
|
13274 |
+
var colorStops = [];
|
13275 |
+
|
13276 |
+
for (var i = firstColorStopIndex; i < args.length; i++) {
|
13277 |
+
var value = args[i];
|
13278 |
+
var HAS_LENGTH = ENDS_WITH_LENGTH.test(value);
|
13279 |
+
var lastSpaceIndex = value.lastIndexOf(' ');
|
13280 |
+
var _color = new _Color2.default(HAS_LENGTH ? value.substring(0, lastSpaceIndex) : value);
|
13281 |
+
var _stop = HAS_LENGTH ? new _Length2.default(value.substring(lastSpaceIndex + 1)) : i === firstColorStopIndex ? new _Length2.default('0%') : i === args.length - 1 ? new _Length2.default('100%') : null;
|
13282 |
+
colorStops.push({ color: _color, stop: _stop });
|
13283 |
+
}
|
13284 |
+
|
13285 |
+
var absoluteValuedColorStops = colorStops.map(function (_ref2) {
|
13286 |
+
var color = _ref2.color,
|
13287 |
+
stop = _ref2.stop;
|
13288 |
+
|
13289 |
+
var absoluteStop = lineLength === 0 ? 0 : stop ? stop.getAbsoluteValue(lineLength) / lineLength : null;
|
13290 |
+
|
13291 |
+
return {
|
13292 |
+
color: color,
|
13293 |
+
// $FlowFixMe
|
13294 |
+
stop: absoluteStop
|
13295 |
+
};
|
13296 |
+
});
|
13297 |
+
|
13298 |
+
var previousColorStop = absoluteValuedColorStops[0].stop;
|
13299 |
+
for (var _i = 0; _i < absoluteValuedColorStops.length; _i++) {
|
13300 |
+
if (previousColorStop !== null) {
|
13301 |
+
var _stop2 = absoluteValuedColorStops[_i].stop;
|
13302 |
+
if (_stop2 === null) {
|
13303 |
+
var n = _i;
|
13304 |
+
while (absoluteValuedColorStops[n].stop === null) {
|
13305 |
+
n++;
|
13306 |
+
}
|
13307 |
+
var steps = n - _i + 1;
|
13308 |
+
var nextColorStep = absoluteValuedColorStops[n].stop;
|
13309 |
+
var stepSize = (nextColorStep - previousColorStop) / steps;
|
13310 |
+
for (; _i < n; _i++) {
|
13311 |
+
previousColorStop = absoluteValuedColorStops[_i].stop = previousColorStop + stepSize;
|
13312 |
+
}
|
13313 |
+
} else {
|
13314 |
+
previousColorStop = _stop2;
|
13315 |
+
}
|
13316 |
+
}
|
13317 |
+
}
|
13318 |
+
|
13319 |
+
return absoluteValuedColorStops;
|
13320 |
+
};
|
13321 |
+
|
13322 |
+
var parseLinearGradient = function parseLinearGradient(args, bounds, hasPrefix) {
|
13323 |
+
var angle = (0, _Angle.parseAngle)(args[0]);
|
13324 |
+
var HAS_SIDE_OR_CORNER = SIDE_OR_CORNER.test(args[0]);
|
13325 |
+
var HAS_DIRECTION = HAS_SIDE_OR_CORNER || angle !== null || PERCENTAGE_ANGLES.test(args[0]);
|
13326 |
+
var direction = HAS_DIRECTION ? angle !== null ? calculateGradientDirection(
|
13327 |
+
// if there is a prefix, the 0° angle points due East (instead of North per W3C)
|
13328 |
+
hasPrefix ? angle - Math.PI * 0.5 : angle, bounds) : HAS_SIDE_OR_CORNER ? parseSideOrCorner(args[0], bounds) : parsePercentageAngle(args[0], bounds) : calculateGradientDirection(Math.PI, bounds);
|
13329 |
+
var firstColorStopIndex = HAS_DIRECTION ? 1 : 0;
|
13330 |
+
|
13331 |
+
// TODO: Fix some inaccuracy with color stops with px values
|
13332 |
+
var lineLength = Math.min((0, _Util.distance)(Math.abs(direction.x0) + Math.abs(direction.x1), Math.abs(direction.y0) + Math.abs(direction.y1)), bounds.width * 2, bounds.height * 2);
|
13333 |
+
|
13334 |
+
return new LinearGradient(parseColorStops(args, firstColorStopIndex, lineLength), direction);
|
13335 |
+
};
|
13336 |
+
|
13337 |
+
var parseRadialGradient = function parseRadialGradient(container, args, bounds) {
|
13338 |
+
var m = args[0].match(RADIAL_SHAPE_DEFINITION);
|
13339 |
+
var shape = m && (m[1] === 'circle' || // explicit shape specification
|
13340 |
+
m[3] !== undefined && m[5] === undefined) // only one radius coordinate
|
13341 |
+
? RADIAL_GRADIENT_SHAPE.CIRCLE : RADIAL_GRADIENT_SHAPE.ELLIPSE;
|
13342 |
+
var radius = {};
|
13343 |
+
var center = {};
|
13344 |
+
|
13345 |
+
if (m) {
|
13346 |
+
// Radius
|
13347 |
+
if (m[3] !== undefined) {
|
13348 |
+
radius.x = (0, _Length.calculateLengthFromValueWithUnit)(container, m[3], m[4]).getAbsoluteValue(bounds.width);
|
13349 |
+
}
|
13350 |
+
|
13351 |
+
if (m[5] !== undefined) {
|
13352 |
+
radius.y = (0, _Length.calculateLengthFromValueWithUnit)(container, m[5], m[6]).getAbsoluteValue(bounds.height);
|
13353 |
+
}
|
13354 |
+
|
13355 |
+
// Position
|
13356 |
+
if (m[7]) {
|
13357 |
+
center.x = LENGTH_FOR_POSITION[m[7].toLowerCase()];
|
13358 |
+
} else if (m[8] !== undefined) {
|
13359 |
+
center.x = (0, _Length.calculateLengthFromValueWithUnit)(container, m[8], m[9]);
|
13360 |
+
}
|
13361 |
+
|
13362 |
+
if (m[10]) {
|
13363 |
+
center.y = LENGTH_FOR_POSITION[m[10].toLowerCase()];
|
13364 |
+
} else if (m[11] !== undefined) {
|
13365 |
+
center.y = (0, _Length.calculateLengthFromValueWithUnit)(container, m[11], m[12]);
|
13366 |
+
}
|
13367 |
+
}
|
13368 |
+
|
13369 |
+
var gradientCenter = {
|
13370 |
+
x: center.x === undefined ? bounds.width / 2 : center.x.getAbsoluteValue(bounds.width),
|
13371 |
+
y: center.y === undefined ? bounds.height / 2 : center.y.getAbsoluteValue(bounds.height)
|
13372 |
+
};
|
13373 |
+
var gradientRadius = calculateRadius(m && m[2] || 'farthest-corner', shape, gradientCenter, radius, bounds);
|
13374 |
+
|
13375 |
+
return new RadialGradient(parseColorStops(args, m ? 1 : 0, Math.min(gradientRadius.x, gradientRadius.y)), shape, gradientCenter, gradientRadius);
|
13376 |
+
};
|
13377 |
+
|
13378 |
+
var calculateGradientDirection = function calculateGradientDirection(radian, bounds) {
|
13379 |
+
var width = bounds.width;
|
13380 |
+
var height = bounds.height;
|
13381 |
+
var HALF_WIDTH = width * 0.5;
|
13382 |
+
var HALF_HEIGHT = height * 0.5;
|
13383 |
+
var lineLength = Math.abs(width * Math.sin(radian)) + Math.abs(height * Math.cos(radian));
|
13384 |
+
var HALF_LINE_LENGTH = lineLength / 2;
|
13385 |
+
|
13386 |
+
var x0 = HALF_WIDTH + Math.sin(radian) * HALF_LINE_LENGTH;
|
13387 |
+
var y0 = HALF_HEIGHT - Math.cos(radian) * HALF_LINE_LENGTH;
|
13388 |
+
var x1 = width - x0;
|
13389 |
+
var y1 = height - y0;
|
13390 |
+
|
13391 |
+
return { x0: x0, x1: x1, y0: y0, y1: y1 };
|
13392 |
+
};
|
13393 |
+
|
13394 |
+
var parseTopRight = function parseTopRight(bounds) {
|
13395 |
+
return Math.acos(bounds.width / 2 / ((0, _Util.distance)(bounds.width, bounds.height) / 2));
|
13396 |
+
};
|
13397 |
+
|
13398 |
+
var parseSideOrCorner = function parseSideOrCorner(side, bounds) {
|
13399 |
+
switch (side) {
|
13400 |
+
case 'bottom':
|
13401 |
+
case 'to top':
|
13402 |
+
return calculateGradientDirection(0, bounds);
|
13403 |
+
case 'left':
|
13404 |
+
case 'to right':
|
13405 |
+
return calculateGradientDirection(Math.PI / 2, bounds);
|
13406 |
+
case 'right':
|
13407 |
+
case 'to left':
|
13408 |
+
return calculateGradientDirection(3 * Math.PI / 2, bounds);
|
13409 |
+
case 'top right':
|
13410 |
+
case 'right top':
|
13411 |
+
case 'to bottom left':
|
13412 |
+
case 'to left bottom':
|
13413 |
+
return calculateGradientDirection(Math.PI + parseTopRight(bounds), bounds);
|
13414 |
+
case 'top left':
|
13415 |
+
case 'left top':
|
13416 |
+
case 'to bottom right':
|
13417 |
+
case 'to right bottom':
|
13418 |
+
return calculateGradientDirection(Math.PI - parseTopRight(bounds), bounds);
|
13419 |
+
case 'bottom left':
|
13420 |
+
case 'left bottom':
|
13421 |
+
case 'to top right':
|
13422 |
+
case 'to right top':
|
13423 |
+
return calculateGradientDirection(parseTopRight(bounds), bounds);
|
13424 |
+
case 'bottom right':
|
13425 |
+
case 'right bottom':
|
13426 |
+
case 'to top left':
|
13427 |
+
case 'to left top':
|
13428 |
+
return calculateGradientDirection(2 * Math.PI - parseTopRight(bounds), bounds);
|
13429 |
+
case 'top':
|
13430 |
+
case 'to bottom':
|
13431 |
+
default:
|
13432 |
+
return calculateGradientDirection(Math.PI, bounds);
|
13433 |
+
}
|
13434 |
+
};
|
13435 |
+
|
13436 |
+
var parsePercentageAngle = function parsePercentageAngle(angle, bounds) {
|
13437 |
+
var _angle$split$map = angle.split(' ').map(parseFloat),
|
13438 |
+
_angle$split$map2 = _slicedToArray(_angle$split$map, 2),
|
13439 |
+
left = _angle$split$map2[0],
|
13440 |
+
top = _angle$split$map2[1];
|
13441 |
+
|
13442 |
+
var ratio = left / 100 * bounds.width / (top / 100 * bounds.height);
|
13443 |
+
|
13444 |
+
return calculateGradientDirection(Math.atan(isNaN(ratio) ? 1 : ratio) + Math.PI / 2, bounds);
|
13445 |
+
};
|
13446 |
+
|
13447 |
+
var findCorner = function findCorner(bounds, x, y, closest) {
|
13448 |
+
var corners = [{ x: 0, y: 0 }, { x: 0, y: bounds.height }, { x: bounds.width, y: 0 }, { x: bounds.width, y: bounds.height }];
|
13449 |
+
|
13450 |
+
// $FlowFixMe
|
13451 |
+
return corners.reduce(function (stat, corner) {
|
13452 |
+
var d = (0, _Util.distance)(x - corner.x, y - corner.y);
|
13453 |
+
if (closest ? d < stat.optimumDistance : d > stat.optimumDistance) {
|
13454 |
+
return {
|
13455 |
+
optimumCorner: corner,
|
13456 |
+
optimumDistance: d
|
13457 |
+
};
|
13458 |
+
}
|
13459 |
+
|
13460 |
+
return stat;
|
13461 |
+
}, {
|
13462 |
+
optimumDistance: closest ? Infinity : -Infinity,
|
13463 |
+
optimumCorner: null
|
13464 |
+
}).optimumCorner;
|
13465 |
+
};
|
13466 |
+
|
13467 |
+
var calculateRadius = function calculateRadius(extent, shape, center, radius, bounds) {
|
13468 |
+
var x = center.x;
|
13469 |
+
var y = center.y;
|
13470 |
+
var rx = 0;
|
13471 |
+
var ry = 0;
|
13472 |
+
|
13473 |
+
switch (extent) {
|
13474 |
+
case 'closest-side':
|
13475 |
+
// The ending shape is sized so that that it exactly meets the side of the gradient box closest to the gradient’s center.
|
13476 |
+
// If the shape is an ellipse, it exactly meets the closest side in each dimension.
|
13477 |
+
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
13478 |
+
rx = ry = Math.min(Math.abs(x), Math.abs(x - bounds.width), Math.abs(y), Math.abs(y - bounds.height));
|
13479 |
+
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
13480 |
+
rx = Math.min(Math.abs(x), Math.abs(x - bounds.width));
|
13481 |
+
ry = Math.min(Math.abs(y), Math.abs(y - bounds.height));
|
13482 |
+
}
|
13483 |
+
break;
|
13484 |
+
|
13485 |
+
case 'closest-corner':
|
13486 |
+
// The ending shape is sized so that that it passes through the corner of the gradient box closest to the gradient’s center.
|
13487 |
+
// If the shape is an ellipse, the ending shape is given the same aspect-ratio it would have if closest-side were specified.
|
13488 |
+
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
13489 |
+
rx = ry = Math.min((0, _Util.distance)(x, y), (0, _Util.distance)(x, y - bounds.height), (0, _Util.distance)(x - bounds.width, y), (0, _Util.distance)(x - bounds.width, y - bounds.height));
|
13490 |
+
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
13491 |
+
// Compute the ratio ry/rx (which is to be the same as for "closest-side")
|
13492 |
+
var c = Math.min(Math.abs(y), Math.abs(y - bounds.height)) / Math.min(Math.abs(x), Math.abs(x - bounds.width));
|
13493 |
+
var corner = findCorner(bounds, x, y, true);
|
13494 |
+
rx = (0, _Util.distance)(corner.x - x, (corner.y - y) / c);
|
13495 |
+
ry = c * rx;
|
13496 |
+
}
|
13497 |
+
break;
|
13498 |
+
|
13499 |
+
case 'farthest-side':
|
13500 |
+
// Same as closest-side, except the ending shape is sized based on the farthest side(s)
|
13501 |
+
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
13502 |
+
rx = ry = Math.max(Math.abs(x), Math.abs(x - bounds.width), Math.abs(y), Math.abs(y - bounds.height));
|
13503 |
+
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
13504 |
+
rx = Math.max(Math.abs(x), Math.abs(x - bounds.width));
|
13505 |
+
ry = Math.max(Math.abs(y), Math.abs(y - bounds.height));
|
13506 |
+
}
|
13507 |
+
break;
|
13508 |
+
|
13509 |
+
case 'farthest-corner':
|
13510 |
+
// Same as closest-corner, except the ending shape is sized based on the farthest corner.
|
13511 |
+
// If the shape is an ellipse, the ending shape is given the same aspect ratio it would have if farthest-side were specified.
|
13512 |
+
if (shape === RADIAL_GRADIENT_SHAPE.CIRCLE) {
|
13513 |
+
rx = ry = Math.max((0, _Util.distance)(x, y), (0, _Util.distance)(x, y - bounds.height), (0, _Util.distance)(x - bounds.width, y), (0, _Util.distance)(x - bounds.width, y - bounds.height));
|
13514 |
+
} else if (shape === RADIAL_GRADIENT_SHAPE.ELLIPSE) {
|
13515 |
+
// Compute the ratio ry/rx (which is to be the same as for "farthest-side")
|
13516 |
+
var _c = Math.max(Math.abs(y), Math.abs(y - bounds.height)) / Math.max(Math.abs(x), Math.abs(x - bounds.width));
|
13517 |
+
var _corner = findCorner(bounds, x, y, false);
|
13518 |
+
rx = (0, _Util.distance)(_corner.x - x, (_corner.y - y) / _c);
|
13519 |
+
ry = _c * rx;
|
13520 |
+
}
|
13521 |
+
break;
|
13522 |
+
|
13523 |
+
default:
|
13524 |
+
// pixel or percentage values
|
13525 |
+
rx = radius.x || 0;
|
13526 |
+
ry = radius.y !== undefined ? radius.y : rx;
|
13527 |
+
break;
|
13528 |
+
}
|
13529 |
+
|
13530 |
+
return {
|
13531 |
+
x: rx,
|
13532 |
+
y: ry
|
13533 |
+
};
|
13534 |
+
};
|
13535 |
+
|
13536 |
+
var transformWebkitRadialGradientArgs = exports.transformWebkitRadialGradientArgs = function transformWebkitRadialGradientArgs(args) {
|
13537 |
+
var shape = '';
|
13538 |
+
var radius = '';
|
13539 |
+
var extent = '';
|
13540 |
+
var position = '';
|
13541 |
+
var idx = 0;
|
13542 |
+
|
13543 |
+
var POSITION = /^(left|center|right|\d+(?:px|r?em|%)?)(?:\s+(top|center|bottom|\d+(?:px|r?em|%)?))?$/i;
|
13544 |
+
var SHAPE_AND_EXTENT = /^(circle|ellipse)?\s*(closest-side|closest-corner|farthest-side|farthest-corner|contain|cover)?$/i;
|
13545 |
+
var RADIUS = /^\d+(px|r?em|%)?(?:\s+\d+(px|r?em|%)?)?$/i;
|
13546 |
+
|
13547 |
+
var matchStartPosition = args[idx].match(POSITION);
|
13548 |
+
if (matchStartPosition) {
|
13549 |
+
idx++;
|
13550 |
+
}
|
13551 |
+
|
13552 |
+
var matchShapeExtent = args[idx].match(SHAPE_AND_EXTENT);
|
13553 |
+
if (matchShapeExtent) {
|
13554 |
+
shape = matchShapeExtent[1] || '';
|
13555 |
+
extent = matchShapeExtent[2] || '';
|
13556 |
+
if (extent === 'contain') {
|
13557 |
+
extent = 'closest-side';
|
13558 |
+
} else if (extent === 'cover') {
|
13559 |
+
extent = 'farthest-corner';
|
13560 |
+
}
|
13561 |
+
idx++;
|
13562 |
+
}
|
13563 |
+
|
13564 |
+
var matchStartRadius = args[idx].match(RADIUS);
|
13565 |
+
if (matchStartRadius) {
|
13566 |
+
idx++;
|
13567 |
+
}
|
13568 |
+
|
13569 |
+
var matchEndPosition = args[idx].match(POSITION);
|
13570 |
+
if (matchEndPosition) {
|
13571 |
+
idx++;
|
13572 |
+
}
|
13573 |
+
|
13574 |
+
var matchEndRadius = args[idx].match(RADIUS);
|
13575 |
+
if (matchEndRadius) {
|
13576 |
+
idx++;
|
13577 |
+
}
|
13578 |
+
|
13579 |
+
var matchPosition = matchEndPosition || matchStartPosition;
|
13580 |
+
if (matchPosition && matchPosition[1]) {
|
13581 |
+
position = matchPosition[1] + (/^\d+$/.test(matchPosition[1]) ? 'px' : '');
|
13582 |
+
if (matchPosition[2]) {
|
13583 |
+
position += ' ' + matchPosition[2] + (/^\d+$/.test(matchPosition[2]) ? 'px' : '');
|
13584 |
+
}
|
13585 |
+
}
|
13586 |
+
|
13587 |
+
var matchRadius = matchEndRadius || matchStartRadius;
|
13588 |
+
if (matchRadius) {
|
13589 |
+
radius = matchRadius[0];
|
13590 |
+
if (!matchRadius[1]) {
|
13591 |
+
radius += 'px';
|
13592 |
+
}
|
13593 |
+
}
|
13594 |
+
|
13595 |
+
if (position && !shape && !radius && !extent) {
|
13596 |
+
radius = position;
|
13597 |
+
position = '';
|
13598 |
+
}
|
13599 |
+
|
13600 |
+
if (position) {
|
13601 |
+
position = 'at ' + position;
|
13602 |
+
}
|
13603 |
+
|
13604 |
+
return [[shape, extent, radius, position].filter(function (s) {
|
13605 |
+
return !!s;
|
13606 |
+
}).join(' ')].concat(args.slice(idx));
|
13607 |
+
};
|
13608 |
+
|
13609 |
+
var transformObsoleteColorStops = function transformObsoleteColorStops(args) {
|
13610 |
+
return args.map(function (color) {
|
13611 |
+
return color.match(FROM_TO_COLORSTOP);
|
13612 |
+
})
|
13613 |
+
// $FlowFixMe
|
13614 |
+
.map(function (v, index) {
|
13615 |
+
if (!v) {
|
13616 |
+
return args[index];
|
13617 |
+
}
|
13618 |
+
|
13619 |
+
switch (v[1]) {
|
13620 |
+
case 'from':
|
13621 |
+
return v[4] + ' 0%';
|
13622 |
+
case 'to':
|
13623 |
+
return v[4] + ' 100%';
|
13624 |
+
case 'color-stop':
|
13625 |
+
if (v[3] === '%') {
|
13626 |
+
return v[4] + ' ' + v[2];
|
13627 |
+
}
|
13628 |
+
return v[4] + ' ' + parseFloat(v[2]) * 100 + '%';
|
13629 |
+
}
|
13630 |
+
});
|
13631 |
+
};
|
13632 |
+
|
13633 |
+
/***/ }),
|
13634 |
+
/* 53 */
|
13635 |
+
/***/ (function(module, exports, __webpack_require__) {
|
13636 |
+
|
13637 |
+
"use strict";
|
13638 |
+
|
13639 |
+
|
13640 |
+
Object.defineProperty(exports, "__esModule", {
|
13641 |
+
value: true
|
13642 |
+
});
|
13643 |
+
var ANGLE = /([+-]?\d*\.?\d+)(deg|grad|rad|turn)/i;
|
13644 |
+
|
13645 |
+
var parseAngle = exports.parseAngle = function parseAngle(angle) {
|
13646 |
+
var match = angle.match(ANGLE);
|
13647 |
+
|
13648 |
+
if (match) {
|
13649 |
+
var value = parseFloat(match[1]);
|
13650 |
+
switch (match[2].toLowerCase()) {
|
13651 |
+
case 'deg':
|
13652 |
+
return Math.PI * value / 180;
|
13653 |
+
case 'grad':
|
13654 |
+
return Math.PI / 200 * value;
|
13655 |
+
case 'rad':
|
13656 |
+
return value;
|
13657 |
+
case 'turn':
|
13658 |
+
return Math.PI * 2 * value;
|
13659 |
+
}
|
13660 |
+
}
|
13661 |
+
|
13662 |
+
return null;
|
13663 |
+
};
|
13664 |
+
|
13665 |
+
/***/ }),
|
13666 |
+
/* 54 */
|
13667 |
+
/***/ (function(module, exports, __webpack_require__) {
|
13668 |
+
|
13669 |
+
"use strict";
|
13670 |
+
|
13671 |
+
|
13672 |
+
Object.defineProperty(exports, "__esModule", {
|
13673 |
+
value: true
|
13674 |
+
});
|
13675 |
+
exports.cloneWindow = exports.DocumentCloner = undefined;
|
13676 |
+
|
13677 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
13678 |
+
|
13679 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
13680 |
+
|
13681 |
+
var _Bounds = __webpack_require__(1);
|
13682 |
+
|
13683 |
+
var _Proxy = __webpack_require__(26);
|
13684 |
+
|
13685 |
+
var _ResourceLoader = __webpack_require__(55);
|
13686 |
+
|
13687 |
+
var _ResourceLoader2 = _interopRequireDefault(_ResourceLoader);
|
13688 |
+
|
13689 |
+
var _Util = __webpack_require__(4);
|
13690 |
+
|
13691 |
+
var _background = __webpack_require__(5);
|
13692 |
+
|
13693 |
+
var _CanvasRenderer = __webpack_require__(15);
|
13694 |
+
|
13695 |
+
var _CanvasRenderer2 = _interopRequireDefault(_CanvasRenderer);
|
13696 |
+
|
13697 |
+
var _PseudoNodeContent = __webpack_require__(56);
|
13698 |
+
|
13699 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
13700 |
+
|
13701 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
13702 |
+
|
13703 |
+
var IGNORE_ATTRIBUTE = 'data-html2canvas-ignore';
|
13704 |
+
|
13705 |
+
var DocumentCloner = exports.DocumentCloner = function () {
|
13706 |
+
function DocumentCloner(element, options, logger, copyInline, renderer) {
|
13707 |
+
_classCallCheck(this, DocumentCloner);
|
13708 |
+
|
13709 |
+
this.referenceElement = element;
|
13710 |
+
this.scrolledElements = [];
|
13711 |
+
this.copyStyles = copyInline;
|
13712 |
+
this.inlineImages = copyInline;
|
13713 |
+
this.logger = logger;
|
13714 |
+
this.options = options;
|
13715 |
+
this.renderer = renderer;
|
13716 |
+
this.resourceLoader = new _ResourceLoader2.default(options, logger, window);
|
13717 |
+
this.pseudoContentData = {
|
13718 |
+
counters: {},
|
13719 |
+
quoteDepth: 0
|
13720 |
+
};
|
13721 |
+
// $FlowFixMe
|
13722 |
+
this.documentElement = this.cloneNode(element.ownerDocument.documentElement);
|
13723 |
+
}
|
13724 |
+
|
13725 |
+
_createClass(DocumentCloner, [{
|
13726 |
+
key: 'inlineAllImages',
|
13727 |
+
value: function inlineAllImages(node) {
|
13728 |
+
var _this = this;
|
13729 |
+
|
13730 |
+
if (this.inlineImages && node) {
|
13731 |
+
var style = node.style;
|
13732 |
+
Promise.all((0, _background.parseBackgroundImage)(style.backgroundImage).map(function (backgroundImage) {
|
13733 |
+
if (backgroundImage.method === 'url') {
|
13734 |
+
return _this.resourceLoader.inlineImage(backgroundImage.args[0]).then(function (img) {
|
13735 |
+
return img && typeof img.src === 'string' ? 'url("' + img.src + '")' : 'none';
|
13736 |
+
}).catch(function (e) {
|
13737 |
+
if (true) {
|
13738 |
+
_this.logger.log('Unable to load image', e);
|
13739 |
+
}
|
13740 |
+
});
|
13741 |
+
}
|
13742 |
+
return Promise.resolve('' + backgroundImage.prefix + backgroundImage.method + '(' + backgroundImage.args.join(',') + ')');
|
13743 |
+
})).then(function (backgroundImages) {
|
13744 |
+
if (backgroundImages.length > 1) {
|
13745 |
+
// TODO Multiple backgrounds somehow broken in Chrome
|
13746 |
+
style.backgroundColor = '';
|
13747 |
+
}
|
13748 |
+
style.backgroundImage = backgroundImages.join(',');
|
13749 |
+
});
|
13750 |
+
|
13751 |
+
if (node instanceof HTMLImageElement) {
|
13752 |
+
this.resourceLoader.inlineImage(node.src).then(function (img) {
|
13753 |
+
if (img && node instanceof HTMLImageElement && node.parentNode) {
|
13754 |
+
var parentNode = node.parentNode;
|
13755 |
+
var clonedChild = (0, _Util.copyCSSStyles)(node.style, img.cloneNode(false));
|
13756 |
+
parentNode.replaceChild(clonedChild, node);
|
13757 |
+
}
|
13758 |
+
}).catch(function (e) {
|
13759 |
+
if (true) {
|
13760 |
+
_this.logger.log('Unable to load image', e);
|
13761 |
+
}
|
13762 |
+
});
|
13763 |
+
}
|
13764 |
+
}
|
13765 |
+
}
|
13766 |
+
}, {
|
13767 |
+
key: 'inlineFonts',
|
13768 |
+
value: function inlineFonts(document) {
|
13769 |
+
var _this2 = this;
|
13770 |
+
|
13771 |
+
return Promise.all(Array.from(document.styleSheets).map(function (sheet) {
|
13772 |
+
if (sheet.href) {
|
13773 |
+
return fetch(sheet.href).then(function (res) {
|
13774 |
+
return res.text();
|
13775 |
+
}).then(function (text) {
|
13776 |
+
return createStyleSheetFontsFromText(text, sheet.href);
|
13777 |
+
}).catch(function (e) {
|
13778 |
+
if (true) {
|
13779 |
+
_this2.logger.log('Unable to load stylesheet', e);
|
13780 |
+
}
|
13781 |
+
return [];
|
13782 |
+
});
|
13783 |
+
}
|
13784 |
+
return getSheetFonts(sheet, document);
|
13785 |
+
})).then(function (fonts) {
|
13786 |
+
return fonts.reduce(function (acc, font) {
|
13787 |
+
return acc.concat(font);
|
13788 |
+
}, []);
|
13789 |
+
}).then(function (fonts) {
|
13790 |
+
return Promise.all(fonts.map(function (font) {
|
13791 |
+
return fetch(font.formats[0].src).then(function (response) {
|
13792 |
+
return response.blob();
|
13793 |
+
}).then(function (blob) {
|
13794 |
+
return new Promise(function (resolve, reject) {
|
13795 |
+
var reader = new FileReader();
|
13796 |
+
reader.onerror = reject;
|
13797 |
+
reader.onload = function () {
|
13798 |
+
// $FlowFixMe
|
13799 |
+
var result = reader.result;
|
13800 |
+
resolve(result);
|
13801 |
+
};
|
13802 |
+
reader.readAsDataURL(blob);
|
13803 |
+
});
|
13804 |
+
}).then(function (dataUri) {
|
13805 |
+
font.fontFace.setProperty('src', 'url("' + dataUri + '")');
|
13806 |
+
return '@font-face {' + font.fontFace.cssText + ' ';
|
13807 |
+
});
|
13808 |
+
}));
|
13809 |
+
}).then(function (fontCss) {
|
13810 |
+
var style = document.createElement('style');
|
13811 |
+
style.textContent = fontCss.join('\n');
|
13812 |
+
_this2.documentElement.appendChild(style);
|
13813 |
+
});
|
13814 |
+
}
|
13815 |
+
}, {
|
13816 |
+
key: 'createElementClone',
|
13817 |
+
value: function createElementClone(node) {
|
13818 |
+
var _this3 = this;
|
13819 |
+
|
13820 |
+
if (this.copyStyles && node instanceof HTMLCanvasElement) {
|
13821 |
+
var img = node.ownerDocument.createElement('img');
|
13822 |
+
try {
|
13823 |
+
img.src = node.toDataURL();
|
13824 |
+
return img;
|
13825 |
+
} catch (e) {
|
13826 |
+
if (true) {
|
13827 |
+
this.logger.log('Unable to clone canvas contents, canvas is tainted');
|
13828 |
+
}
|
13829 |
+
}
|
13830 |
+
}
|
13831 |
+
|
13832 |
+
if (node instanceof HTMLIFrameElement) {
|
13833 |
+
var tempIframe = node.cloneNode(false);
|
13834 |
+
var iframeKey = generateIframeKey();
|
13835 |
+
tempIframe.setAttribute('data-html2canvas-internal-iframe-key', iframeKey);
|
13836 |
+
|
13837 |
+
var _parseBounds = (0, _Bounds.parseBounds)(node, 0, 0),
|
13838 |
+
width = _parseBounds.width,
|
13839 |
+
height = _parseBounds.height;
|
13840 |
+
|
13841 |
+
this.resourceLoader.cache[iframeKey] = getIframeDocumentElement(node, this.options).then(function (documentElement) {
|
13842 |
+
return _this3.renderer(documentElement, {
|
13843 |
+
async: _this3.options.async,
|
13844 |
+
allowTaint: _this3.options.allowTaint,
|
13845 |
+
backgroundColor: '#ffffff',
|
13846 |
+
canvas: null,
|
13847 |
+
imageTimeout: _this3.options.imageTimeout,
|
13848 |
+
logging: _this3.options.logging,
|
13849 |
+
proxy: _this3.options.proxy,
|
13850 |
+
removeContainer: _this3.options.removeContainer,
|
13851 |
+
scale: _this3.options.scale,
|
13852 |
+
foreignObjectRendering: _this3.options.foreignObjectRendering,
|
13853 |
+
useCORS: _this3.options.useCORS,
|
13854 |
+
target: new _CanvasRenderer2.default(),
|
13855 |
+
width: width,
|
13856 |
+
height: height,
|
13857 |
+
x: 0,
|
13858 |
+
y: 0,
|
13859 |
+
windowWidth: documentElement.ownerDocument.defaultView.innerWidth,
|
13860 |
+
windowHeight: documentElement.ownerDocument.defaultView.innerHeight,
|
13861 |
+
scrollX: documentElement.ownerDocument.defaultView.pageXOffset,
|
13862 |
+
scrollY: documentElement.ownerDocument.defaultView.pageYOffset
|
13863 |
+
}, _this3.logger.child(iframeKey));
|
13864 |
+
}).then(function (canvas) {
|
13865 |
+
return new Promise(function (resolve, reject) {
|
13866 |
+
var iframeCanvas = document.createElement('img');
|
13867 |
+
iframeCanvas.onload = function () {
|
13868 |
+
return resolve(canvas);
|
13869 |
+
};
|
13870 |
+
iframeCanvas.onerror = reject;
|
13871 |
+
iframeCanvas.src = canvas.toDataURL();
|
13872 |
+
if (tempIframe.parentNode) {
|
13873 |
+
tempIframe.parentNode.replaceChild((0, _Util.copyCSSStyles)(node.ownerDocument.defaultView.getComputedStyle(node), iframeCanvas), tempIframe);
|
13874 |
+
}
|
13875 |
+
});
|
13876 |
+
});
|
13877 |
+
return tempIframe;
|
13878 |
+
}
|
13879 |
+
|
13880 |
+
if (node instanceof HTMLStyleElement && node.sheet && node.sheet.cssRules) {
|
13881 |
+
var css = [].slice.call(node.sheet.cssRules, 0).reduce(function (css, rule) {
|
13882 |
+
return css + rule.cssText;
|
13883 |
+
}, '');
|
13884 |
+
var style = node.cloneNode(false);
|
13885 |
+
style.textContent = css;
|
13886 |
+
return style;
|
13887 |
+
}
|
13888 |
+
|
13889 |
+
return node.cloneNode(false);
|
13890 |
+
}
|
13891 |
+
}, {
|
13892 |
+
key: 'cloneNode',
|
13893 |
+
value: function cloneNode(node) {
|
13894 |
+
var clone = node.nodeType === Node.TEXT_NODE ? document.createTextNode(node.nodeValue) : this.createElementClone(node);
|
13895 |
+
|
13896 |
+
var window = node.ownerDocument.defaultView;
|
13897 |
+
var style = node instanceof window.HTMLElement ? window.getComputedStyle(node) : null;
|
13898 |
+
var styleBefore = node instanceof window.HTMLElement ? window.getComputedStyle(node, ':before') : null;
|
13899 |
+
var styleAfter = node instanceof window.HTMLElement ? window.getComputedStyle(node, ':after') : null;
|
13900 |
+
|
13901 |
+
if (this.referenceElement === node && clone instanceof window.HTMLElement) {
|
13902 |
+
this.clonedReferenceElement = clone;
|
13903 |
+
}
|
13904 |
+
|
13905 |
+
if (clone instanceof window.HTMLBodyElement) {
|
13906 |
+
createPseudoHideStyles(clone);
|
13907 |
+
}
|
13908 |
+
|
13909 |
+
var counters = (0, _PseudoNodeContent.parseCounterReset)(style, this.pseudoContentData);
|
13910 |
+
var contentBefore = (0, _PseudoNodeContent.resolvePseudoContent)(node, styleBefore, this.pseudoContentData);
|
13911 |
+
|
13912 |
+
for (var child = node.firstChild; child; child = child.nextSibling) {
|
13913 |
+
if (child.nodeType !== Node.ELEMENT_NODE || child.nodeName !== 'SCRIPT' &&
|
13914 |
+
// $FlowFixMe
|
13915 |
+
!child.hasAttribute(IGNORE_ATTRIBUTE) && (typeof this.options.ignoreElements !== 'function' ||
|
13916 |
+
// $FlowFixMe
|
13917 |
+
!this.options.ignoreElements(child))) {
|
13918 |
+
if (!this.copyStyles || child.nodeName !== 'STYLE') {
|
13919 |
+
clone.appendChild(this.cloneNode(child));
|
13920 |
+
}
|
13921 |
+
}
|
13922 |
+
}
|
13923 |
+
|
13924 |
+
var contentAfter = (0, _PseudoNodeContent.resolvePseudoContent)(node, styleAfter, this.pseudoContentData);
|
13925 |
+
(0, _PseudoNodeContent.popCounters)(counters, this.pseudoContentData);
|
13926 |
+
|
13927 |
+
if (node instanceof window.HTMLElement && clone instanceof window.HTMLElement) {
|
13928 |
+
if (styleBefore) {
|
13929 |
+
this.inlineAllImages(inlinePseudoElement(node, clone, styleBefore, contentBefore, PSEUDO_BEFORE));
|
13930 |
+
}
|
13931 |
+
if (styleAfter) {
|
13932 |
+
this.inlineAllImages(inlinePseudoElement(node, clone, styleAfter, contentAfter, PSEUDO_AFTER));
|
13933 |
+
}
|
13934 |
+
if (style && this.copyStyles && !(node instanceof HTMLIFrameElement)) {
|
13935 |
+
(0, _Util.copyCSSStyles)(style, clone);
|
13936 |
+
}
|
13937 |
+
this.inlineAllImages(clone);
|
13938 |
+
if (node.scrollTop !== 0 || node.scrollLeft !== 0) {
|
13939 |
+
this.scrolledElements.push([clone, node.scrollLeft, node.scrollTop]);
|
13940 |
+
}
|
13941 |
+
switch (node.nodeName) {
|
13942 |
+
case 'CANVAS':
|
13943 |
+
if (!this.copyStyles) {
|
13944 |
+
cloneCanvasContents(node, clone);
|
13945 |
+
}
|
13946 |
+
break;
|
13947 |
+
case 'TEXTAREA':
|
13948 |
+
case 'SELECT':
|
13949 |
+
clone.value = node.value;
|
13950 |
+
break;
|
13951 |
+
}
|
13952 |
+
}
|
13953 |
+
return clone;
|
13954 |
+
}
|
13955 |
+
}]);
|
13956 |
+
|
13957 |
+
return DocumentCloner;
|
13958 |
+
}();
|
13959 |
+
|
13960 |
+
var getSheetFonts = function getSheetFonts(sheet, document) {
|
13961 |
+
// $FlowFixMe
|
13962 |
+
return (sheet.cssRules ? Array.from(sheet.cssRules) : []).filter(function (rule) {
|
13963 |
+
return rule.type === CSSRule.FONT_FACE_RULE;
|
13964 |
+
}).map(function (rule) {
|
13965 |
+
var src = (0, _background.parseBackgroundImage)(rule.style.getPropertyValue('src'));
|
13966 |
+
var formats = [];
|
13967 |
+
for (var i = 0; i < src.length; i++) {
|
13968 |
+
if (src[i].method === 'url' && src[i + 1] && src[i + 1].method === 'format') {
|
13969 |
+
var a = document.createElement('a');
|
13970 |
+
a.href = src[i].args[0];
|
13971 |
+
if (document.body) {
|
13972 |
+
document.body.appendChild(a);
|
13973 |
+
}
|
13974 |
+
|
13975 |
+
var font = {
|
13976 |
+
src: a.href,
|
13977 |
+
format: src[i + 1].args[0]
|
13978 |
+
};
|
13979 |
+
formats.push(font);
|
13980 |
+
}
|
13981 |
+
}
|
13982 |
+
|
13983 |
+
return {
|
13984 |
+
// TODO select correct format for browser),
|
13985 |
+
|
13986 |
+
formats: formats.filter(function (font) {
|
13987 |
+
return (/^woff/i.test(font.format)
|
13988 |
+
);
|
13989 |
+
}),
|
13990 |
+
fontFace: rule.style
|
13991 |
+
};
|
13992 |
+
}).filter(function (font) {
|
13993 |
+
return font.formats.length;
|
13994 |
+
});
|
13995 |
+
};
|
13996 |
+
|
13997 |
+
var createStyleSheetFontsFromText = function createStyleSheetFontsFromText(text, baseHref) {
|
13998 |
+
var doc = document.implementation.createHTMLDocument('');
|
13999 |
+
var base = document.createElement('base');
|
14000 |
+
// $FlowFixMe
|
14001 |
+
base.href = baseHref;
|
14002 |
+
var style = document.createElement('style');
|
14003 |
+
|
14004 |
+
style.textContent = text;
|
14005 |
+
if (doc.head) {
|
14006 |
+
doc.head.appendChild(base);
|
14007 |
+
}
|
14008 |
+
if (doc.body) {
|
14009 |
+
doc.body.appendChild(style);
|
14010 |
+
}
|
14011 |
+
|
14012 |
+
return style.sheet ? getSheetFonts(style.sheet, doc) : [];
|
14013 |
+
};
|
14014 |
+
|
14015 |
+
var restoreOwnerScroll = function restoreOwnerScroll(ownerDocument, x, y) {
|
14016 |
+
if (ownerDocument.defaultView && (x !== ownerDocument.defaultView.pageXOffset || y !== ownerDocument.defaultView.pageYOffset)) {
|
14017 |
+
ownerDocument.defaultView.scrollTo(x, y);
|
14018 |
+
}
|
14019 |
+
};
|
14020 |
+
|
14021 |
+
var cloneCanvasContents = function cloneCanvasContents(canvas, clonedCanvas) {
|
14022 |
+
try {
|
14023 |
+
if (clonedCanvas) {
|
14024 |
+
clonedCanvas.width = canvas.width;
|
14025 |
+
clonedCanvas.height = canvas.height;
|
14026 |
+
var ctx = canvas.getContext('2d');
|
14027 |
+
var clonedCtx = clonedCanvas.getContext('2d');
|
14028 |
+
if (ctx) {
|
14029 |
+
clonedCtx.putImageData(ctx.getImageData(0, 0, canvas.width, canvas.height), 0, 0);
|
14030 |
+
} else {
|
14031 |
+
clonedCtx.drawImage(canvas, 0, 0);
|
14032 |
+
}
|
14033 |
+
}
|
14034 |
+
} catch (e) {}
|
14035 |
+
};
|
14036 |
+
|
14037 |
+
var inlinePseudoElement = function inlinePseudoElement(node, clone, style, contentItems, pseudoElt) {
|
14038 |
+
if (!style || !style.content || style.content === 'none' || style.content === '-moz-alt-content' || style.display === 'none') {
|
14039 |
+
return;
|
14040 |
+
}
|
14041 |
+
|
14042 |
+
var anonymousReplacedElement = clone.ownerDocument.createElement('html2canvaspseudoelement');
|
14043 |
+
(0, _Util.copyCSSStyles)(style, anonymousReplacedElement);
|
14044 |
+
|
14045 |
+
if (contentItems) {
|
14046 |
+
var len = contentItems.length;
|
14047 |
+
for (var i = 0; i < len; i++) {
|
14048 |
+
var item = contentItems[i];
|
14049 |
+
switch (item.type) {
|
14050 |
+
case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.IMAGE:
|
14051 |
+
var img = clone.ownerDocument.createElement('img');
|
14052 |
+
img.src = (0, _background.parseBackgroundImage)('url(' + item.value + ')')[0].args[0];
|
14053 |
+
img.style.opacity = '1';
|
14054 |
+
anonymousReplacedElement.appendChild(img);
|
14055 |
+
break;
|
14056 |
+
case _PseudoNodeContent.PSEUDO_CONTENT_ITEM_TYPE.TEXT:
|
14057 |
+
anonymousReplacedElement.appendChild(clone.ownerDocument.createTextNode(item.value));
|
14058 |
+
break;
|
14059 |
+
}
|
14060 |
+
}
|
14061 |
+
}
|
14062 |
+
|
14063 |
+
anonymousReplacedElement.className = PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + ' ' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
14064 |
+
clone.className += pseudoElt === PSEUDO_BEFORE ? ' ' + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE : ' ' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER;
|
14065 |
+
if (pseudoElt === PSEUDO_BEFORE) {
|
14066 |
+
clone.insertBefore(anonymousReplacedElement, clone.firstChild);
|
14067 |
+
} else {
|
14068 |
+
clone.appendChild(anonymousReplacedElement);
|
14069 |
+
}
|
14070 |
+
|
14071 |
+
return anonymousReplacedElement;
|
14072 |
+
};
|
14073 |
+
|
14074 |
+
var URL_REGEXP = /^url\((.+)\)$/i;
|
14075 |
+
var PSEUDO_BEFORE = ':before';
|
14076 |
+
var PSEUDO_AFTER = ':after';
|
14077 |
+
var PSEUDO_HIDE_ELEMENT_CLASS_BEFORE = '___html2canvas___pseudoelement_before';
|
14078 |
+
var PSEUDO_HIDE_ELEMENT_CLASS_AFTER = '___html2canvas___pseudoelement_after';
|
14079 |
+
|
14080 |
+
var PSEUDO_HIDE_ELEMENT_STYLE = '{\n content: "" !important;\n display: none !important;\n}';
|
14081 |
+
|
14082 |
+
var createPseudoHideStyles = function createPseudoHideStyles(body) {
|
14083 |
+
createStyles(body, '.' + PSEUDO_HIDE_ELEMENT_CLASS_BEFORE + PSEUDO_BEFORE + PSEUDO_HIDE_ELEMENT_STYLE + '\n .' + PSEUDO_HIDE_ELEMENT_CLASS_AFTER + PSEUDO_AFTER + PSEUDO_HIDE_ELEMENT_STYLE);
|
14084 |
+
};
|
14085 |
+
|
14086 |
+
var createStyles = function createStyles(body, styles) {
|
14087 |
+
var style = body.ownerDocument.createElement('style');
|
14088 |
+
style.innerHTML = styles;
|
14089 |
+
body.appendChild(style);
|
14090 |
+
};
|
14091 |
+
|
14092 |
+
var initNode = function initNode(_ref) {
|
14093 |
+
var _ref2 = _slicedToArray(_ref, 3),
|
14094 |
+
element = _ref2[0],
|
14095 |
+
x = _ref2[1],
|
14096 |
+
y = _ref2[2];
|
14097 |
+
|
14098 |
+
element.scrollLeft = x;
|
14099 |
+
element.scrollTop = y;
|
14100 |
+
};
|
14101 |
+
|
14102 |
+
var generateIframeKey = function generateIframeKey() {
|
14103 |
+
return Math.ceil(Date.now() + Math.random() * 10000000).toString(16);
|
14104 |
+
};
|
14105 |
+
|
14106 |
+
var DATA_URI_REGEXP = /^data:text\/(.+);(base64)?,(.*)$/i;
|
14107 |
+
|
14108 |
+
var getIframeDocumentElement = function getIframeDocumentElement(node, options) {
|
14109 |
+
try {
|
14110 |
+
return Promise.resolve(node.contentWindow.document.documentElement);
|
14111 |
+
} catch (e) {
|
14112 |
+
return options.proxy ? (0, _Proxy.Proxy)(node.src, options).then(function (html) {
|
14113 |
+
var match = html.match(DATA_URI_REGEXP);
|
14114 |
+
if (!match) {
|
14115 |
+
return Promise.reject();
|
14116 |
+
}
|
14117 |
+
|
14118 |
+
return match[2] === 'base64' ? window.atob(decodeURIComponent(match[3])) : decodeURIComponent(match[3]);
|
14119 |
+
}).then(function (html) {
|
14120 |
+
return createIframeContainer(node.ownerDocument, (0, _Bounds.parseBounds)(node, 0, 0)).then(function (cloneIframeContainer) {
|
14121 |
+
var cloneWindow = cloneIframeContainer.contentWindow;
|
14122 |
+
var documentClone = cloneWindow.document;
|
14123 |
+
|
14124 |
+
documentClone.open();
|
14125 |
+
documentClone.write(html);
|
14126 |
+
var iframeLoad = iframeLoader(cloneIframeContainer).then(function () {
|
14127 |
+
return documentClone.documentElement;
|
14128 |
+
});
|
14129 |
+
|
14130 |
+
documentClone.close();
|
14131 |
+
return iframeLoad;
|
14132 |
+
});
|
14133 |
+
}) : Promise.reject();
|
14134 |
+
}
|
14135 |
+
};
|
14136 |
+
|
14137 |
+
var createIframeContainer = function createIframeContainer(ownerDocument, bounds) {
|
14138 |
+
var cloneIframeContainer = ownerDocument.createElement('iframe');
|
14139 |
+
|
14140 |
+
cloneIframeContainer.className = 'html2canvas-container';
|
14141 |
+
cloneIframeContainer.style.visibility = 'hidden';
|
14142 |
+
cloneIframeContainer.style.position = 'fixed';
|
14143 |
+
cloneIframeContainer.style.left = '-10000px';
|
14144 |
+
cloneIframeContainer.style.top = '0px';
|
14145 |
+
cloneIframeContainer.style.border = '0';
|
14146 |
+
cloneIframeContainer.width = bounds.width.toString();
|
14147 |
+
cloneIframeContainer.height = bounds.height.toString();
|
14148 |
+
cloneIframeContainer.scrolling = 'no'; // ios won't scroll without it
|
14149 |
+
cloneIframeContainer.setAttribute(IGNORE_ATTRIBUTE, 'true');
|
14150 |
+
if (!ownerDocument.body) {
|
14151 |
+
return Promise.reject( true ? 'Body element not found in Document that is getting rendered' : '');
|
14152 |
+
}
|
14153 |
+
|
14154 |
+
ownerDocument.body.appendChild(cloneIframeContainer);
|
14155 |
+
|
14156 |
+
return Promise.resolve(cloneIframeContainer);
|
14157 |
+
};
|
14158 |
+
|
14159 |
+
var iframeLoader = function iframeLoader(cloneIframeContainer) {
|
14160 |
+
var cloneWindow = cloneIframeContainer.contentWindow;
|
14161 |
+
var documentClone = cloneWindow.document;
|
14162 |
+
|
14163 |
+
return new Promise(function (resolve, reject) {
|
14164 |
+
cloneWindow.onload = cloneIframeContainer.onload = documentClone.onreadystatechange = function () {
|
14165 |
+
var interval = setInterval(function () {
|
14166 |
+
if (documentClone.body.childNodes.length > 0 && documentClone.readyState === 'complete') {
|
14167 |
+
clearInterval(interval);
|
14168 |
+
resolve(cloneIframeContainer);
|
14169 |
+
}
|
14170 |
+
}, 50);
|
14171 |
+
};
|
14172 |
+
});
|
14173 |
+
};
|
14174 |
+
|
14175 |
+
var cloneWindow = exports.cloneWindow = function cloneWindow(ownerDocument, bounds, referenceElement, options, logger, renderer) {
|
14176 |
+
var cloner = new DocumentCloner(referenceElement, options, logger, false, renderer);
|
14177 |
+
var scrollX = ownerDocument.defaultView.pageXOffset;
|
14178 |
+
var scrollY = ownerDocument.defaultView.pageYOffset;
|
14179 |
+
|
14180 |
+
return createIframeContainer(ownerDocument, bounds).then(function (cloneIframeContainer) {
|
14181 |
+
var cloneWindow = cloneIframeContainer.contentWindow;
|
14182 |
+
var documentClone = cloneWindow.document;
|
14183 |
+
|
14184 |
+
/* Chrome doesn't detect relative background-images assigned in inline <style> sheets when fetched through getComputedStyle
|
14185 |
+
if window url is about:blank, we can assign the url to current by writing onto the document
|
14186 |
+
*/
|
14187 |
+
|
14188 |
+
var iframeLoad = iframeLoader(cloneIframeContainer).then(function () {
|
14189 |
+
cloner.scrolledElements.forEach(initNode);
|
14190 |
+
cloneWindow.scrollTo(bounds.left, bounds.top);
|
14191 |
+
if (/(iPad|iPhone|iPod)/g.test(navigator.userAgent) && (cloneWindow.scrollY !== bounds.top || cloneWindow.scrollX !== bounds.left)) {
|
14192 |
+
documentClone.documentElement.style.top = -bounds.top + 'px';
|
14193 |
+
documentClone.documentElement.style.left = -bounds.left + 'px';
|
14194 |
+
documentClone.documentElement.style.position = 'absolute';
|
14195 |
+
}
|
14196 |
+
|
14197 |
+
var result = Promise.resolve([cloneIframeContainer, cloner.clonedReferenceElement, cloner.resourceLoader]);
|
14198 |
+
|
14199 |
+
var onclone = options.onclone;
|
14200 |
+
|
14201 |
+
return cloner.clonedReferenceElement instanceof cloneWindow.HTMLElement || cloner.clonedReferenceElement instanceof ownerDocument.defaultView.HTMLElement || cloner.clonedReferenceElement instanceof HTMLElement ? typeof onclone === 'function' ? Promise.resolve().then(function () {
|
14202 |
+
return onclone(documentClone);
|
14203 |
+
}).then(function () {
|
14204 |
+
return result;
|
14205 |
+
}) : result : Promise.reject( true ? 'Error finding the ' + referenceElement.nodeName + ' in the cloned document' : '');
|
14206 |
+
});
|
14207 |
+
|
14208 |
+
documentClone.open();
|
14209 |
+
documentClone.write(serializeDoctype(document.doctype) + '<html></html>');
|
14210 |
+
// Chrome scrolls the parent document for some reason after the write to the cloned window???
|
14211 |
+
restoreOwnerScroll(referenceElement.ownerDocument, scrollX, scrollY);
|
14212 |
+
documentClone.replaceChild(documentClone.adoptNode(cloner.documentElement), documentClone.documentElement);
|
14213 |
+
documentClone.close();
|
14214 |
+
|
14215 |
+
return iframeLoad;
|
14216 |
+
});
|
14217 |
+
};
|
14218 |
+
|
14219 |
+
var serializeDoctype = function serializeDoctype(doctype) {
|
14220 |
+
var str = '';
|
14221 |
+
if (doctype) {
|
14222 |
+
str += '<!DOCTYPE ';
|
14223 |
+
if (doctype.name) {
|
14224 |
+
str += doctype.name;
|
14225 |
+
}
|
14226 |
+
|
14227 |
+
if (doctype.internalSubset) {
|
14228 |
+
str += doctype.internalSubset;
|
14229 |
+
}
|
14230 |
+
|
14231 |
+
if (doctype.publicId) {
|
14232 |
+
str += '"' + doctype.publicId + '"';
|
14233 |
+
}
|
14234 |
+
|
14235 |
+
if (doctype.systemId) {
|
14236 |
+
str += '"' + doctype.systemId + '"';
|
14237 |
+
}
|
14238 |
+
|
14239 |
+
str += '>';
|
14240 |
+
}
|
14241 |
+
|
14242 |
+
return str;
|
14243 |
+
};
|
14244 |
+
|
14245 |
+
/***/ }),
|
14246 |
+
/* 55 */
|
14247 |
+
/***/ (function(module, exports, __webpack_require__) {
|
14248 |
+
|
14249 |
+
"use strict";
|
14250 |
+
|
14251 |
+
|
14252 |
+
Object.defineProperty(exports, "__esModule", {
|
14253 |
+
value: true
|
14254 |
+
});
|
14255 |
+
exports.ResourceStore = undefined;
|
14256 |
+
|
14257 |
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
14258 |
+
|
14259 |
+
var _Feature = __webpack_require__(10);
|
14260 |
+
|
14261 |
+
var _Feature2 = _interopRequireDefault(_Feature);
|
14262 |
+
|
14263 |
+
var _Proxy = __webpack_require__(26);
|
14264 |
+
|
14265 |
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14266 |
+
|
14267 |
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
14268 |
+
|
14269 |
+
var ResourceLoader = function () {
|
14270 |
+
function ResourceLoader(options, logger, window) {
|
14271 |
+
_classCallCheck(this, ResourceLoader);
|
14272 |
+
|
14273 |
+
this.options = options;
|
14274 |
+
this._window = window;
|
14275 |
+
this.origin = this.getOrigin(window.location.href);
|
14276 |
+
this.cache = {};
|
14277 |
+
this.logger = logger;
|
14278 |
+
this._index = 0;
|
14279 |
+
}
|
14280 |
+
|
14281 |
+
_createClass(ResourceLoader, [{
|
14282 |
+
key: 'loadImage',
|
14283 |
+
value: function loadImage(src) {
|
14284 |
+
var _this = this;
|
14285 |
+
|
14286 |
+
if (this.hasResourceInCache(src)) {
|
14287 |
+
return src;
|
14288 |
+
}
|
14289 |
+
|
14290 |
+
if (!isSVG(src) || _Feature2.default.SUPPORT_SVG_DRAWING) {
|
14291 |
+
if (this.options.allowTaint === true || isInlineImage(src) || this.isSameOrigin(src)) {
|
14292 |
+
return this.addImage(src, src, false);
|
14293 |
+
} else if (!this.isSameOrigin(src)) {
|
14294 |
+
if (typeof this.options.proxy === 'string') {
|
14295 |
+
this.cache[src] = (0, _Proxy.Proxy)(src, this.options).then(function (src) {
|
14296 |
+
return _loadImage(src, _this.options.imageTimeout || 0);
|
14297 |
+
});
|
14298 |
+
return src;
|
14299 |
+
} else if (this.options.useCORS === true && _Feature2.default.SUPPORT_CORS_IMAGES) {
|
14300 |
+
return this.addImage(src, src, true);
|
14301 |
+
}
|
14302 |
+
}
|
14303 |
+
}
|
14304 |
+
}
|
14305 |
+
}, {
|
14306 |
+
key: 'inlineImage',
|
14307 |
+
value: function inlineImage(src) {
|
14308 |
+
var _this2 = this;
|
14309 |
+
|
14310 |
+
if (isInlineImage(src)) {
|
14311 |
+
return _loadImage(src, this.options.imageTimeout || 0);
|
14312 |
+
}
|
14313 |
+
if (this.hasResourceInCache(src)) {
|
14314 |
+
return this.cache[src];
|
14315 |
+
}
|
14316 |
+
if (!this.isSameOrigin(src) && typeof this.options.proxy === 'string') {
|
14317 |
+
return this.cache[src] = (0, _Proxy.Proxy)(src, this.options).then(function (src) {
|
14318 |
+
return _loadImage(src, _this2.options.imageTimeout || 0);
|
14319 |
+
});
|
14320 |
+
}
|
14321 |
+
|
14322 |
+
return this.xhrImage(src);
|
14323 |
+
}
|
14324 |
+
}, {
|
14325 |
+
key: 'xhrImage',
|
14326 |
+
value: function xhrImage(src) {
|
14327 |
+
var _this3 = this;
|
14328 |
+
|
14329 |
+
this.cache[src] = new Promise(function (resolve, reject) {
|
14330 |
+
var xhr = new XMLHttpRequest();
|
14331 |
+
xhr.onreadystatechange = function () {
|
14332 |
+
if (xhr.readyState === 4) {
|
14333 |
+
if (xhr.status !== 200) {
|
14334 |
+
reject('Failed to fetch image ' + src.substring(0, 256) + ' with status code ' + xhr.status);
|
14335 |
+
} else {
|
14336 |
+
var reader = new FileReader();
|
14337 |
+
reader.addEventListener('load', function () {
|
14338 |
+
// $FlowFixMe
|
14339 |
+
var result = reader.result;
|
14340 |
+
resolve(result);
|
14341 |
+
}, false);
|
14342 |
+
reader.addEventListener('error', function (e) {
|
14343 |
+
return reject(e);
|
14344 |
+
}, false);
|
14345 |
+
reader.readAsDataURL(xhr.response);
|
14346 |
+
}
|
14347 |
+
}
|
14348 |
+
};
|
14349 |
+
xhr.responseType = 'blob';
|
14350 |
+
if (_this3.options.imageTimeout) {
|
14351 |
+
var timeout = _this3.options.imageTimeout;
|
14352 |
+
xhr.timeout = timeout;
|
14353 |
+
xhr.ontimeout = function () {
|
14354 |
+
return reject( true ? 'Timed out (' + timeout + 'ms) fetching ' + src.substring(0, 256) : '');
|
14355 |
+
};
|
14356 |
+
}
|
14357 |
+
xhr.open('GET', src, true);
|
14358 |
+
xhr.send();
|
14359 |
+
}).then(function (src) {
|
14360 |
+
return _loadImage(src, _this3.options.imageTimeout || 0);
|
14361 |
+
});
|
14362 |
+
|
14363 |
+
return this.cache[src];
|
14364 |
+
}
|
14365 |
+
}, {
|
14366 |
+
key: 'loadCanvas',
|
14367 |
+
value: function loadCanvas(node) {
|
14368 |
+
var key = String(this._index++);
|
14369 |
+
this.cache[key] = Promise.resolve(node);
|
14370 |
+
return key;
|
14371 |
+
}
|
14372 |
+
}, {
|
14373 |
+
key: 'hasResourceInCache',
|
14374 |
+
value: function hasResourceInCache(key) {
|
14375 |
+
return typeof this.cache[key] !== 'undefined';
|
14376 |
+
}
|
14377 |
+
}, {
|
14378 |
+
key: 'addImage',
|
14379 |
+
value: function addImage(key, src, useCORS) {
|
14380 |
+
var _this4 = this;
|
14381 |
+
|
14382 |
+
if (true) {
|
14383 |
+
this.logger.log('Added image ' + key.substring(0, 256));
|
14384 |
+
}
|
14385 |
+
|
14386 |
+
var imageLoadHandler = function imageLoadHandler(supportsDataImages) {
|
14387 |
+
return new Promise(function (resolve, reject) {
|
14388 |
+
var img = new Image();
|
14389 |
+
img.onload = function () {
|
14390 |
+
return resolve(img);
|
14391 |
+
};
|
14392 |
+
//ios safari 10.3 taints canvas with data urls unless crossOrigin is set to anonymous
|
14393 |
+
if (!supportsDataImages || useCORS) {
|
14394 |
+
img.crossOrigin = 'anonymous';
|
14395 |
+
}
|
14396 |
+
|
14397 |
+
img.onerror = reject;
|
14398 |
+
img.src = src;
|
14399 |
+
if (img.complete === true) {
|
14400 |
+
// Inline XML images may fail to parse, throwing an Error later on
|
14401 |
+
setTimeout(function () {
|
14402 |
+
resolve(img);
|
14403 |
+
}, 500);
|
14404 |
+
}
|
14405 |
+
if (_this4.options.imageTimeout) {
|
14406 |
+
var timeout = _this4.options.imageTimeout;
|
14407 |
+
setTimeout(function () {
|
14408 |
+
return reject( true ? 'Timed out (' + timeout + 'ms) fetching ' + src.substring(0, 256) : '');
|
14409 |
+
}, timeout);
|
14410 |
+
}
|
14411 |
+
});
|
14412 |
+
};
|
14413 |
+
|
14414 |
+
this.cache[key] = isInlineBase64Image(src) && !isSVG(src) ? // $FlowFixMe
|
14415 |
+
_Feature2.default.SUPPORT_BASE64_DRAWING(src).then(imageLoadHandler) : imageLoadHandler(true);
|
14416 |
+
return key;
|
14417 |
+
}
|
14418 |
+
}, {
|
14419 |
+
key: 'isSameOrigin',
|
14420 |
+
value: function isSameOrigin(url) {
|
14421 |
+
return this.getOrigin(url) === this.origin;
|
14422 |
+
}
|
14423 |
+
}, {
|
14424 |
+
key: 'getOrigin',
|
14425 |
+
value: function getOrigin(url) {
|
14426 |
+
var link = this._link || (this._link = this._window.document.createElement('a'));
|
14427 |
+
link.href = url;
|
14428 |
+
link.href = link.href; // IE9, LOL! - http://jsfiddle.net/niklasvh/2e48b/
|
14429 |
+
return link.protocol + link.hostname + link.port;
|
14430 |
+
}
|
14431 |
+
}, {
|
14432 |
+
key: 'ready',
|
14433 |
+
value: function ready() {
|
14434 |
+
var _this5 = this;
|
14435 |
+
|
14436 |
+
var keys = Object.keys(this.cache);
|
14437 |
+
var values = keys.map(function (str) {
|
14438 |
+
return _this5.cache[str].catch(function (e) {
|
14439 |
+
if (true) {
|
14440 |
+
_this5.logger.log('Unable to load image', e);
|
14441 |
+
}
|
14442 |
+
return null;
|
14443 |
+
});
|
14444 |
+
});
|
14445 |
+
return Promise.all(values).then(function (images) {
|
14446 |
+
if (true) {
|
14447 |
+
_this5.logger.log('Finished loading ' + images.length + ' images', images);
|
14448 |
+
}
|
14449 |
+
return new ResourceStore(keys, images);
|
14450 |
+
});
|
14451 |
+
}
|
14452 |
+
}]);
|
14453 |
+
|
14454 |
+
return ResourceLoader;
|
14455 |
+
}();
|
14456 |
+
|
14457 |
+
exports.default = ResourceLoader;
|
14458 |
+
|
14459 |
+
var ResourceStore = exports.ResourceStore = function () {
|
14460 |
+
function ResourceStore(keys, resources) {
|
14461 |
+
_classCallCheck(this, ResourceStore);
|
14462 |
+
|
14463 |
+
this._keys = keys;
|
14464 |
+
this._resources = resources;
|
14465 |
+
}
|
14466 |
+
|
14467 |
+
_createClass(ResourceStore, [{
|
14468 |
+
key: 'get',
|
14469 |
+
value: function get(key) {
|
14470 |
+
var index = this._keys.indexOf(key);
|
14471 |
+
return index === -1 ? null : this._resources[index];
|
14472 |
+
}
|
14473 |
+
}]);
|
14474 |
+
|
14475 |
+
return ResourceStore;
|
14476 |
+
}();
|
14477 |
+
|
14478 |
+
var INLINE_SVG = /^data:image\/svg\+xml/i;
|
14479 |
+
var INLINE_BASE64 = /^data:image\/.*;base64,/i;
|
14480 |
+
var INLINE_IMG = /^data:image\/.*/i;
|
14481 |
+
|
14482 |
+
var isInlineImage = function isInlineImage(src) {
|
14483 |
+
return INLINE_IMG.test(src);
|
14484 |
+
};
|
14485 |
+
var isInlineBase64Image = function isInlineBase64Image(src) {
|
14486 |
+
return INLINE_BASE64.test(src);
|
14487 |
+
};
|
14488 |
+
|
14489 |
+
var isSVG = function isSVG(src) {
|
14490 |
+
return src.substr(-3).toLowerCase() === 'svg' || INLINE_SVG.test(src);
|
14491 |
+
};
|
14492 |
+
|
14493 |
+
var _loadImage = function _loadImage(src, timeout) {
|
14494 |
+
return new Promise(function (resolve, reject) {
|
14495 |
+
var img = new Image();
|
14496 |
+
img.onload = function () {
|
14497 |
+
return resolve(img);
|
14498 |
+
};
|
14499 |
+
img.onerror = reject;
|
14500 |
+
img.src = src;
|
14501 |
+
if (img.complete === true) {
|
14502 |
+
// Inline XML images may fail to parse, throwing an Error later on
|
14503 |
+
setTimeout(function () {
|
14504 |
+
resolve(img);
|
14505 |
+
}, 500);
|
14506 |
+
}
|
14507 |
+
if (timeout) {
|
14508 |
+
setTimeout(function () {
|
14509 |
+
return reject( true ? 'Timed out (' + timeout + 'ms) loading image' : '');
|
14510 |
+
}, timeout);
|
14511 |
+
}
|
14512 |
+
});
|
14513 |
+
};
|
14514 |
+
|
14515 |
+
/***/ }),
|
14516 |
+
/* 56 */
|
14517 |
+
/***/ (function(module, exports, __webpack_require__) {
|
14518 |
+
|
14519 |
+
"use strict";
|
14520 |
+
|
14521 |
+
|
14522 |
+
Object.defineProperty(exports, "__esModule", {
|
14523 |
+
value: true
|
14524 |
+
});
|
14525 |
+
exports.parseContent = exports.resolvePseudoContent = exports.popCounters = exports.parseCounterReset = exports.TOKEN_TYPE = exports.PSEUDO_CONTENT_ITEM_TYPE = undefined;
|
14526 |
+
|
14527 |
+
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
|
14528 |
+
|
14529 |
+
var _ListItem = __webpack_require__(14);
|
14530 |
+
|
14531 |
+
var _listStyle = __webpack_require__(8);
|
14532 |
+
|
14533 |
+
var PSEUDO_CONTENT_ITEM_TYPE = exports.PSEUDO_CONTENT_ITEM_TYPE = {
|
14534 |
+
TEXT: 0,
|
14535 |
+
IMAGE: 1
|
14536 |
+
};
|
14537 |
+
|
14538 |
+
var TOKEN_TYPE = exports.TOKEN_TYPE = {
|
14539 |
+
STRING: 0,
|
14540 |
+
ATTRIBUTE: 1,
|
14541 |
+
URL: 2,
|
14542 |
+
COUNTER: 3,
|
14543 |
+
COUNTERS: 4,
|
14544 |
+
OPENQUOTE: 5,
|
14545 |
+
CLOSEQUOTE: 6
|
14546 |
+
};
|
14547 |
+
|
14548 |
+
var parseCounterReset = exports.parseCounterReset = function parseCounterReset(style, data) {
|
14549 |
+
if (!style || !style.counterReset || style.counterReset === 'none') {
|
14550 |
+
return [];
|
14551 |
+
}
|
14552 |
+
|
14553 |
+
var counterNames = [];
|
14554 |
+
var counterResets = style.counterReset.split(/\s*,\s*/);
|
14555 |
+
var lenCounterResets = counterResets.length;
|
14556 |
+
|
14557 |
+
for (var i = 0; i < lenCounterResets; i++) {
|
14558 |
+
var _counterResets$i$spli = counterResets[i].split(/\s+/),
|
14559 |
+
_counterResets$i$spli2 = _slicedToArray(_counterResets$i$spli, 2),
|
14560 |
+
counterName = _counterResets$i$spli2[0],
|
14561 |
+
initialValue = _counterResets$i$spli2[1];
|
14562 |
+
|
14563 |
+
counterNames.push(counterName);
|
14564 |
+
var counter = data.counters[counterName];
|
14565 |
+
if (!counter) {
|
14566 |
+
counter = data.counters[counterName] = [];
|
14567 |
+
}
|
14568 |
+
counter.push(parseInt(initialValue || 0, 10));
|
14569 |
+
}
|
14570 |
+
|
14571 |
+
return counterNames;
|
14572 |
+
};
|
14573 |
+
|
14574 |
+
var popCounters = exports.popCounters = function popCounters(counterNames, data) {
|
14575 |
+
var lenCounters = counterNames.length;
|
14576 |
+
for (var i = 0; i < lenCounters; i++) {
|
14577 |
+
data.counters[counterNames[i]].pop();
|
14578 |
+
}
|
14579 |
+
};
|
14580 |
+
|
14581 |
+
var resolvePseudoContent = exports.resolvePseudoContent = function resolvePseudoContent(node, style, data) {
|
14582 |
+
if (!style || !style.content || style.content === 'none' || style.content === '-moz-alt-content' || style.display === 'none') {
|
14583 |
+
return null;
|
14584 |
+
}
|
14585 |
+
|
14586 |
+
var tokens = parseContent(style.content);
|
14587 |
+
|
14588 |
+
var len = tokens.length;
|
14589 |
+
var contentItems = [];
|
14590 |
+
var s = '';
|
14591 |
+
|
14592 |
+
// increment the counter (if there is a "counter-increment" declaration)
|
14593 |
+
var counterIncrement = style.counterIncrement;
|
14594 |
+
if (counterIncrement && counterIncrement !== 'none') {
|
14595 |
+
var _counterIncrement$spl = counterIncrement.split(/\s+/),
|
14596 |
+
_counterIncrement$spl2 = _slicedToArray(_counterIncrement$spl, 2),
|
14597 |
+
counterName = _counterIncrement$spl2[0],
|
14598 |
+
incrementValue = _counterIncrement$spl2[1];
|
14599 |
+
|
14600 |
+
var counter = data.counters[counterName];
|
14601 |
+
if (counter) {
|
14602 |
+
counter[counter.length - 1] += incrementValue === undefined ? 1 : parseInt(incrementValue, 10);
|
14603 |
+
}
|
14604 |
+
}
|
14605 |
+
|
14606 |
+
// build the content string
|
14607 |
+
for (var i = 0; i < len; i++) {
|
14608 |
+
var token = tokens[i];
|
14609 |
+
switch (token.type) {
|
14610 |
+
case TOKEN_TYPE.STRING:
|
14611 |
+
s += token.value || '';
|
14612 |
+
break;
|
14613 |
+
|
14614 |
+
case TOKEN_TYPE.ATTRIBUTE:
|
14615 |
+
if (node instanceof HTMLElement && token.value) {
|
14616 |
+
s += node.getAttribute(token.value) || '';
|
14617 |
+
}
|
14618 |
+
break;
|
14619 |
+
|
14620 |
+
case TOKEN_TYPE.COUNTER:
|
14621 |
+
var _counter = data.counters[token.name || ''];
|
14622 |
+
if (_counter) {
|
14623 |
+
s += formatCounterValue([_counter[_counter.length - 1]], '', token.format);
|
14624 |
+
}
|
14625 |
+
break;
|
14626 |
+
|
14627 |
+
case TOKEN_TYPE.COUNTERS:
|
14628 |
+
var _counters = data.counters[token.name || ''];
|
14629 |
+
if (_counters) {
|
14630 |
+
s += formatCounterValue(_counters, token.glue, token.format);
|
14631 |
+
}
|
14632 |
+
break;
|
14633 |
+
|
14634 |
+
case TOKEN_TYPE.OPENQUOTE:
|
14635 |
+
s += getQuote(style, true, data.quoteDepth);
|
14636 |
+
data.quoteDepth++;
|
14637 |
+
break;
|
14638 |
+
|
14639 |
+
case TOKEN_TYPE.CLOSEQUOTE:
|
14640 |
+
data.quoteDepth--;
|
14641 |
+
s += getQuote(style, false, data.quoteDepth);
|
14642 |
+
break;
|
14643 |
+
|
14644 |
+
case TOKEN_TYPE.URL:
|
14645 |
+
if (s) {
|
14646 |
+
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.TEXT, value: s });
|
14647 |
+
s = '';
|
14648 |
+
}
|
14649 |
+
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.IMAGE, value: token.value || '' });
|
14650 |
+
break;
|
14651 |
+
}
|
14652 |
+
}
|
14653 |
+
|
14654 |
+
if (s) {
|
14655 |
+
contentItems.push({ type: PSEUDO_CONTENT_ITEM_TYPE.TEXT, value: s });
|
14656 |
+
}
|
14657 |
+
|
14658 |
+
return contentItems;
|
14659 |
+
};
|
14660 |
+
|
14661 |
+
var parseContent = exports.parseContent = function parseContent(content, cache) {
|
14662 |
+
if (cache && cache[content]) {
|
14663 |
+
return cache[content];
|
14664 |
+
}
|
14665 |
+
|
14666 |
+
var tokens = [];
|
14667 |
+
var len = content.length;
|
14668 |
+
|
14669 |
+
var isString = false;
|
14670 |
+
var isEscaped = false;
|
14671 |
+
var isFunction = false;
|
14672 |
+
var str = '';
|
14673 |
+
var functionName = '';
|
14674 |
+
var args = [];
|
14675 |
+
|
14676 |
+
for (var i = 0; i < len; i++) {
|
14677 |
+
var c = content.charAt(i);
|
14678 |
+
|
14679 |
+
switch (c) {
|
14680 |
+
case "'":
|
14681 |
+
case '"':
|
14682 |
+
if (isEscaped) {
|
14683 |
+
str += c;
|
14684 |
+
} else {
|
14685 |
+
isString = !isString;
|
14686 |
+
if (!isFunction && !isString) {
|
14687 |
+
tokens.push({ type: TOKEN_TYPE.STRING, value: str });
|
14688 |
+
str = '';
|
14689 |
+
}
|
14690 |
+
}
|
14691 |
+
break;
|
14692 |
+
|
14693 |
+
case '\\':
|
14694 |
+
if (isEscaped) {
|
14695 |
+
str += c;
|
14696 |
+
isEscaped = false;
|
14697 |
+
} else {
|
14698 |
+
isEscaped = true;
|
14699 |
+
}
|
14700 |
+
break;
|
14701 |
+
|
14702 |
+
case '(':
|
14703 |
+
if (isString) {
|
14704 |
+
str += c;
|
14705 |
+
} else {
|
14706 |
+
isFunction = true;
|
14707 |
+
functionName = str;
|
14708 |
+
str = '';
|
14709 |
+
args = [];
|
14710 |
+
}
|
14711 |
+
break;
|
14712 |
+
|
14713 |
+
case ')':
|
14714 |
+
if (isString) {
|
14715 |
+
str += c;
|
14716 |
+
} else if (isFunction) {
|
14717 |
+
if (str) {
|
14718 |
+
args.push(str);
|
14719 |
+
}
|
14720 |
+
|
14721 |
+
switch (functionName) {
|
14722 |
+
case 'attr':
|
14723 |
+
if (args.length > 0) {
|
14724 |
+
tokens.push({ type: TOKEN_TYPE.ATTRIBUTE, value: args[0] });
|
14725 |
+
}
|
14726 |
+
break;
|
14727 |
+
|
14728 |
+
case 'counter':
|
14729 |
+
if (args.length > 0) {
|
14730 |
+
var counter = {
|
14731 |
+
type: TOKEN_TYPE.COUNTER,
|
14732 |
+
name: args[0]
|
14733 |
+
};
|
14734 |
+
if (args.length > 1) {
|
14735 |
+
counter.format = args[1];
|
14736 |
+
}
|
14737 |
+
tokens.push(counter);
|
14738 |
+
}
|
14739 |
+
break;
|
14740 |
+
|
14741 |
+
case 'counters':
|
14742 |
+
if (args.length > 0) {
|
14743 |
+
var _counters2 = {
|
14744 |
+
type: TOKEN_TYPE.COUNTERS,
|
14745 |
+
name: args[0]
|
14746 |
+
};
|
14747 |
+
if (args.length > 1) {
|
14748 |
+
_counters2.glue = args[1];
|
14749 |
+
}
|
14750 |
+
if (args.length > 2) {
|
14751 |
+
_counters2.format = args[2];
|
14752 |
+
}
|
14753 |
+
tokens.push(_counters2);
|
14754 |
+
}
|
14755 |
+
break;
|
14756 |
+
|
14757 |
+
case 'url':
|
14758 |
+
if (args.length > 0) {
|
14759 |
+
tokens.push({ type: TOKEN_TYPE.URL, value: args[0] });
|
14760 |
+
}
|
14761 |
+
break;
|
14762 |
+
}
|
14763 |
+
|
14764 |
+
isFunction = false;
|
14765 |
+
str = '';
|
14766 |
+
}
|
14767 |
+
break;
|
14768 |
+
|
14769 |
+
case ',':
|
14770 |
+
if (isString) {
|
14771 |
+
str += c;
|
14772 |
+
} else if (isFunction) {
|
14773 |
+
args.push(str);
|
14774 |
+
str = '';
|
14775 |
+
}
|
14776 |
+
break;
|
14777 |
+
|
14778 |
+
case ' ':
|
14779 |
+
case '\t':
|
14780 |
+
if (isString) {
|
14781 |
+
str += c;
|
14782 |
+
} else if (str) {
|
14783 |
+
addOtherToken(tokens, str);
|
14784 |
+
str = '';
|
14785 |
+
}
|
14786 |
+
break;
|
14787 |
+
|
14788 |
+
default:
|
14789 |
+
str += c;
|
14790 |
+
}
|
14791 |
+
|
14792 |
+
if (c !== '\\') {
|
14793 |
+
isEscaped = false;
|
14794 |
+
}
|
14795 |
+
}
|
14796 |
+
|
14797 |
+
if (str) {
|
14798 |
+
addOtherToken(tokens, str);
|
14799 |
+
}
|
14800 |
+
|
14801 |
+
if (cache) {
|
14802 |
+
cache[content] = tokens;
|
14803 |
+
}
|
14804 |
+
|
14805 |
+
return tokens;
|
14806 |
+
};
|
14807 |
+
|
14808 |
+
var addOtherToken = function addOtherToken(tokens, identifier) {
|
14809 |
+
switch (identifier) {
|
14810 |
+
case 'open-quote':
|
14811 |
+
tokens.push({ type: TOKEN_TYPE.OPENQUOTE });
|
14812 |
+
break;
|
14813 |
+
case 'close-quote':
|
14814 |
+
tokens.push({ type: TOKEN_TYPE.CLOSEQUOTE });
|
14815 |
+
break;
|
14816 |
+
}
|
14817 |
+
};
|
14818 |
+
|
14819 |
+
var getQuote = function getQuote(style, isOpening, quoteDepth) {
|
14820 |
+
var quotes = style.quotes ? style.quotes.split(/\s+/) : ["'\"'", "'\"'"];
|
14821 |
+
var idx = quoteDepth * 2;
|
14822 |
+
if (idx >= quotes.length) {
|
14823 |
+
idx = quotes.length - 2;
|
14824 |
+
}
|
14825 |
+
if (!isOpening) {
|
14826 |
+
++idx;
|
14827 |
+
}
|
14828 |
+
return quotes[idx].replace(/^["']|["']$/g, '');
|
14829 |
+
};
|
14830 |
+
|
14831 |
+
var formatCounterValue = function formatCounterValue(counter, glue, format) {
|
14832 |
+
var len = counter.length;
|
14833 |
+
var result = '';
|
14834 |
+
|
14835 |
+
for (var i = 0; i < len; i++) {
|
14836 |
+
if (i > 0) {
|
14837 |
+
result += glue || '';
|
14838 |
+
}
|
14839 |
+
result += (0, _ListItem.createCounterText)(counter[i], (0, _listStyle.parseListStyleType)(format || 'decimal'), false);
|
14840 |
+
}
|
14841 |
+
|
14842 |
+
return result;
|
14843 |
+
};
|
14844 |
+
|
14845 |
+
/***/ })
|
14846 |
+
/******/ ]);
|
14847 |
});
|
|
|
14848 |
|
14849 |
/***/ },
|
14850 |
|
assets/js/{vendor.98a3aa8c.js → vendor.e6d02f27.js}
RENAMED
@@ -76,7 +76,7 @@
|
|
76 |
/******/ script.charset = 'utf-8';
|
77 |
/******/ script.async = true;
|
78 |
|
79 |
-
/******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"
|
80 |
/******/ head.appendChild(script);
|
81 |
/******/ }
|
82 |
/******/ };
|
76 |
/******/ script.charset = 'utf-8';
|
77 |
/******/ script.async = true;
|
78 |
|
79 |
+
/******/ script.src = __webpack_require__.p + "" + ({"0":"admin","1":"admin_vendor","2":"form_editor","3":"mailpoet","4":"newsletter_editor"}[chunkId]||chunkId) + "." + {"0":"c5e75f6d","1":"e4568802","2":"ba96f4f2","3":"5d4557f5","4":"637e880e"}[chunkId] + ".chunk.js";
|
80 |
/******/ head.appendChild(script);
|
81 |
/******/ }
|
82 |
/******/ };
|
lang/mailpoet-en_GB.mo
CHANGED
Binary file
|
lang/mailpoet-fr_CA.mo
CHANGED
Binary file
|
lang/mailpoet.pot
CHANGED
@@ -4,7 +4,7 @@ msgid ""
|
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
|
7 |
-
"POT-Creation-Date: 2018-05-
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
@@ -75,7 +75,7 @@ msgid "New form"
|
|
75 |
msgstr ""
|
76 |
|
77 |
#: lib/API/JSON/v1/Forms.php:70 lib/API/JSON/v1/Forms.php:74
|
78 |
-
#: lib/API/MP/v1/API.php:
|
79 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:44
|
80 |
#: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:39
|
81 |
#: views/newsletter/editor.html:938 views/newsletter/editor.html:939
|
@@ -131,8 +131,8 @@ msgstr ""
|
|
131 |
|
132 |
#: lib/API/JSON/v1/Segments.php:24 lib/API/JSON/v1/Segments.php:75
|
133 |
#: lib/API/JSON/v1/Segments.php:91 lib/API/JSON/v1/Segments.php:107
|
134 |
-
#: lib/API/JSON/v1/Segments.php:121 lib/API/MP/v1/API.php:
|
135 |
-
#: lib/API/MP/v1/API.php:
|
136 |
msgid "This list does not exist."
|
137 |
msgstr ""
|
138 |
|
@@ -206,73 +206,73 @@ msgstr ""
|
|
206 |
msgid "You have not specified any settings to be saved."
|
207 |
msgstr ""
|
208 |
|
209 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
210 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
211 |
-
#: lib/API/MP/v1/API.php:
|
212 |
msgid "This subscriber does not exist."
|
213 |
msgstr ""
|
214 |
|
215 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
216 |
msgid "Please specify a valid form ID."
|
217 |
msgstr ""
|
218 |
|
219 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
220 |
msgid "Please leave the first field empty."
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
224 |
msgid "Please check the captcha."
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
228 |
msgid "Error while validating the captcha."
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
232 |
msgid "Please select a list."
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: lib/API/JSON/v1/Subscribers.php:
|
236 |
msgid "You need to wait %d seconds before subscribing again."
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: lib/API/MP/v1/API.php:
|
240 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:45
|
241 |
#: lib/Subscription/Pages.php:283 views/form/editor.html:219
|
242 |
#: views/form/editor.html:222 views/subscribers/subscribers.html:52
|
243 |
msgid "First name"
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: lib/API/MP/v1/API.php:
|
247 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:46
|
248 |
#: lib/Subscription/Pages.php:292 views/form/editor.html:228
|
249 |
#: views/form/editor.html:231 views/subscribers/subscribers.html:53
|
250 |
msgid "Last name"
|
251 |
msgstr ""
|
252 |
|
253 |
-
#: lib/API/MP/v1/API.php:
|
254 |
msgid "At least one segment ID is required."
|
255 |
msgstr ""
|
256 |
|
257 |
-
#: lib/API/MP/v1/API.php:
|
258 |
msgid "List with ID %s does not exist."
|
259 |
msgid_plural "Lists with IDs %s do not exist."
|
260 |
msgstr[0] ""
|
261 |
msgstr[1] ""
|
262 |
|
263 |
-
#: lib/API/MP/v1/API.php:
|
264 |
msgid "Subscriber email address is required."
|
265 |
msgstr ""
|
266 |
|
267 |
-
#: lib/API/MP/v1/API.php:
|
268 |
msgid "This subscriber already exists."
|
269 |
msgstr ""
|
270 |
|
271 |
-
#: lib/API/MP/v1/API.php:
|
272 |
msgid "List name is required."
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: lib/API/MP/v1/API.php:
|
276 |
msgid "This list already exists."
|
277 |
msgstr ""
|
278 |
|
@@ -300,11 +300,12 @@ msgstr ""
|
|
300 |
msgid "Manage segments"
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: lib/Config/Capabilities.php:67 lib/Config/Menu.php:646
|
|
|
304 |
msgid "MailPoet"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: lib/Config/Hooks.php:
|
308 |
msgid "MailPoet Newsletter"
|
309 |
msgstr ""
|
310 |
|
@@ -492,19 +493,27 @@ msgid ""
|
|
492 |
"[link]Your host can help you.[/link]"
|
493 |
msgstr ""
|
494 |
|
495 |
-
#: lib/Config/
|
|
|
|
|
|
|
|
|
496 |
msgid "MailPoet Lists"
|
497 |
msgstr ""
|
498 |
|
499 |
-
#: lib/Config/PersonalDataExporters.php:
|
500 |
#: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:21
|
501 |
msgid "MailPoet Subscriber Data"
|
502 |
msgstr ""
|
503 |
|
504 |
-
#: lib/Config/PersonalDataExporters.php:
|
505 |
msgid "MailPoet Emails"
|
506 |
msgstr ""
|
507 |
|
|
|
|
|
|
|
|
|
508 |
#: lib/Config/PluginActivatedHook.php:14
|
509 |
msgid ""
|
510 |
"We noticed that you're using an unsupported environment. While MailPoet "
|
@@ -1033,6 +1042,43 @@ msgstr ""
|
|
1033 |
msgid "Salute the sun and your subscribers."
|
1034 |
msgstr ""
|
1035 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1036 |
#: lib/Config/Renderer.php:106
|
1037 |
msgid ""
|
1038 |
"Failed to render template \"%s\". Please ensure the template cache folder "
|
@@ -1355,12 +1401,12 @@ msgid "Please specify a type."
|
|
1355 |
msgstr ""
|
1356 |
|
1357 |
#: lib/Models/Form.php:93 lib/Models/Newsletter.php:707
|
1358 |
-
#: lib/Models/Segment.php:133 lib/Models/Subscriber.php:
|
1359 |
msgid "All"
|
1360 |
msgstr ""
|
1361 |
|
1362 |
#: lib/Models/Form.php:98 lib/Models/Newsletter.php:778
|
1363 |
-
#: lib/Models/Segment.php:138 lib/Models/Subscriber.php:
|
1364 |
#: views/newsletters.html:82 views/segments.html:50
|
1365 |
#: views/subscribers/subscribers.html:37
|
1366 |
msgid "Trash"
|
@@ -1375,7 +1421,7 @@ msgstr ""
|
|
1375 |
msgid "Deleted list"
|
1376 |
msgstr ""
|
1377 |
|
1378 |
-
#: lib/Models/Newsletter.php:606 lib/Models/Subscriber.php:
|
1379 |
msgid "All Lists"
|
1380 |
msgstr ""
|
1381 |
|
@@ -1449,34 +1495,34 @@ msgid ""
|
|
1449 |
"The Team"
|
1450 |
msgstr ""
|
1451 |
|
1452 |
-
#: lib/Models/Subscriber.php:
|
1453 |
msgid "Please enter your email address"
|
1454 |
msgstr ""
|
1455 |
|
1456 |
-
#: lib/Models/Subscriber.php:
|
1457 |
msgid "Your email address is invalid!"
|
1458 |
msgstr ""
|
1459 |
|
1460 |
-
#: lib/Models/Subscriber.php:
|
1461 |
msgid "Subscribers without a list (%s)"
|
1462 |
msgstr ""
|
1463 |
|
1464 |
-
#: lib/Models/Subscriber.php:
|
1465 |
#: views/segments.html:30 views/subscribers/subscribers.html:56
|
1466 |
msgid "Subscribed"
|
1467 |
msgstr ""
|
1468 |
|
1469 |
-
#: lib/Models/Subscriber.php:
|
1470 |
#: views/subscribers/subscribers.html:55
|
1471 |
msgid "Unconfirmed"
|
1472 |
msgstr ""
|
1473 |
|
1474 |
-
#: lib/Models/Subscriber.php:
|
1475 |
#: views/segments.html:32 views/subscribers/subscribers.html:57
|
1476 |
msgid "Unsubscribed"
|
1477 |
msgstr ""
|
1478 |
|
1479 |
-
#: lib/Models/Subscriber.php:
|
1480 |
#: views/segments.html:33 views/subscribers/subscribers.html:58
|
1481 |
msgid "Bounced"
|
1482 |
msgstr ""
|
@@ -1621,15 +1667,15 @@ msgstr ""
|
|
1621 |
msgid "List"
|
1622 |
msgstr ""
|
1623 |
|
1624 |
-
#: lib/Subscribers/ImportExport/Import/Import.php:
|
1625 |
msgid "Missing or invalid import data."
|
1626 |
msgstr ""
|
1627 |
|
1628 |
-
#: lib/Subscribers/ImportExport/Import/Import.php:
|
1629 |
msgid "No valid subscribers were found."
|
1630 |
msgstr ""
|
1631 |
|
1632 |
-
#: lib/Subscribers/ImportExport/Import/Import.php:
|
1633 |
msgid "Unable to save imported subscribers."
|
1634 |
msgstr ""
|
1635 |
|
@@ -1696,20 +1742,63 @@ msgstr ""
|
|
1696 |
msgid "User fields"
|
1697 |
msgstr ""
|
1698 |
|
1699 |
-
#: lib/Subscribers/ImportExport/PersonalDataExporters/
|
|
|
1700 |
#: views/settings/signup.html:111
|
1701 |
msgid "Email subject"
|
1702 |
msgstr ""
|
1703 |
|
1704 |
-
#: lib/Subscribers/ImportExport/PersonalDataExporters/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1705 |
msgid "Sent at"
|
1706 |
msgstr ""
|
1707 |
|
1708 |
-
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1709 |
msgid "Email preview"
|
1710 |
msgstr ""
|
1711 |
|
1712 |
-
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php:
|
1713 |
msgid "MailPoet Emails Sent"
|
1714 |
msgstr ""
|
1715 |
|
@@ -1744,7 +1833,7 @@ msgid "Confirmed IP"
|
|
1744 |
msgstr ""
|
1745 |
|
1746 |
#: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:60
|
1747 |
-
msgid "Created at
|
1748 |
msgstr ""
|
1749 |
|
1750 |
#: lib/Subscription/Comment.php:23 lib/Subscription/Registration.php:11
|
@@ -2037,26 +2126,6 @@ msgstr ""
|
|
2037 |
msgid "Yes"
|
2038 |
msgstr ""
|
2039 |
|
2040 |
-
#: views/form/templates/settings/date_default.hbs:20
|
2041 |
-
#: views/form/templates/settings/label_within.hbs:8
|
2042 |
-
#: views/form/templates/settings/required.hbs:17
|
2043 |
-
#: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:130
|
2044 |
-
#: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:183
|
2045 |
-
#: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:209
|
2046 |
-
#: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:287
|
2047 |
-
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:85
|
2048 |
-
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:139
|
2049 |
-
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:165
|
2050 |
-
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:227
|
2051 |
-
#: views/premium.html:62 views/premium.html:63 views/settings/advanced.html:122
|
2052 |
-
#: views/settings/advanced.html:162 views/settings/advanced.html:202
|
2053 |
-
#: views/settings/bounce.html:148 views/settings/bounce.html:179
|
2054 |
-
#: views/settings/mta.html:545 views/settings/mta.html:599
|
2055 |
-
#: views/settings/signup.html:46
|
2056 |
-
#: views/subscribers/importExport/import/step2.html:67
|
2057 |
-
msgid "No"
|
2058 |
-
msgstr ""
|
2059 |
-
|
2060 |
#: views/form/templates/settings/date_formats.hbs:9
|
2061 |
msgid "Order"
|
2062 |
msgstr ""
|
4 |
msgstr ""
|
5 |
"Project-Id-Version: \n"
|
6 |
"Report-Msgid-Bugs-To: http://support.mailpoet.com/\n"
|
7 |
+
"POT-Creation-Date: 2018-05-15 10:23:14+00:00\n"
|
8 |
"MIME-Version: 1.0\n"
|
9 |
"Content-Type: text/plain; charset=utf-8\n"
|
10 |
"Content-Transfer-Encoding: 8bit\n"
|
75 |
msgstr ""
|
76 |
|
77 |
#: lib/API/JSON/v1/Forms.php:70 lib/API/JSON/v1/Forms.php:74
|
78 |
+
#: lib/API/MP/v1/API.php:18
|
79 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:44
|
80 |
#: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:39
|
81 |
#: views/newsletter/editor.html:938 views/newsletter/editor.html:939
|
131 |
|
132 |
#: lib/API/JSON/v1/Segments.php:24 lib/API/JSON/v1/Segments.php:75
|
133 |
#: lib/API/JSON/v1/Segments.php:91 lib/API/JSON/v1/Segments.php:107
|
134 |
+
#: lib/API/JSON/v1/Segments.php:121 lib/API/MP/v1/API.php:61
|
135 |
+
#: lib/API/MP/v1/API.php:112
|
136 |
msgid "This list does not exist."
|
137 |
msgstr ""
|
138 |
|
206 |
msgid "You have not specified any settings to be saved."
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: lib/API/JSON/v1/Subscribers.php:36 lib/API/JSON/v1/Subscribers.php:214
|
210 |
+
#: lib/API/JSON/v1/Subscribers.php:230 lib/API/JSON/v1/Subscribers.php:246
|
211 |
+
#: lib/API/MP/v1/API.php:55 lib/API/MP/v1/API.php:106 lib/API/MP/v1/API.php:235
|
212 |
msgid "This subscriber does not exist."
|
213 |
msgstr ""
|
214 |
|
215 |
+
#: lib/API/JSON/v1/Subscribers.php:86
|
216 |
msgid "Please specify a valid form ID."
|
217 |
msgstr ""
|
218 |
|
219 |
+
#: lib/API/JSON/v1/Subscribers.php:91
|
220 |
msgid "Please leave the first field empty."
|
221 |
msgstr ""
|
222 |
|
223 |
+
#: lib/API/JSON/v1/Subscribers.php:97
|
224 |
msgid "Please check the captcha."
|
225 |
msgstr ""
|
226 |
|
227 |
+
#: lib/API/JSON/v1/Subscribers.php:111 lib/API/JSON/v1/Subscribers.php:117
|
228 |
msgid "Error while validating the captcha."
|
229 |
msgstr ""
|
230 |
|
231 |
+
#: lib/API/JSON/v1/Subscribers.php:133 views/form/editor.html:57
|
232 |
msgid "Please select a list."
|
233 |
msgstr ""
|
234 |
|
235 |
+
#: lib/API/JSON/v1/Subscribers.php:145
|
236 |
msgid "You need to wait %d seconds before subscribing again."
|
237 |
msgstr ""
|
238 |
|
239 |
+
#: lib/API/MP/v1/API.php:22
|
240 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:45
|
241 |
#: lib/Subscription/Pages.php:283 views/form/editor.html:219
|
242 |
#: views/form/editor.html:222 views/subscribers/subscribers.html:52
|
243 |
msgid "First name"
|
244 |
msgstr ""
|
245 |
|
246 |
+
#: lib/API/MP/v1/API.php:26
|
247 |
#: lib/Subscribers/ImportExport/ImportExportFactory.php:46
|
248 |
#: lib/Subscription/Pages.php:292 views/form/editor.html:228
|
249 |
#: views/form/editor.html:231 views/subscribers/subscribers.html:53
|
250 |
msgid "Last name"
|
251 |
msgstr ""
|
252 |
|
253 |
+
#: lib/API/MP/v1/API.php:49 lib/API/MP/v1/API.php:100
|
254 |
msgid "At least one segment ID is required."
|
255 |
msgstr ""
|
256 |
|
257 |
+
#: lib/API/MP/v1/API.php:78 lib/API/MP/v1/API.php:129
|
258 |
msgid "List with ID %s does not exist."
|
259 |
msgid_plural "Lists with IDs %s do not exist."
|
260 |
msgstr[0] ""
|
261 |
msgstr[1] ""
|
262 |
|
263 |
+
#: lib/API/MP/v1/API.php:150
|
264 |
msgid "Subscriber email address is required."
|
265 |
msgstr ""
|
266 |
|
267 |
+
#: lib/API/MP/v1/API.php:157
|
268 |
msgid "This subscriber already exists."
|
269 |
msgstr ""
|
270 |
|
271 |
+
#: lib/API/MP/v1/API.php:204
|
272 |
msgid "List name is required."
|
273 |
msgstr ""
|
274 |
|
275 |
+
#: lib/API/MP/v1/API.php:211
|
276 |
msgid "This list already exists."
|
277 |
msgstr ""
|
278 |
|
300 |
msgid "Manage segments"
|
301 |
msgstr ""
|
302 |
|
303 |
+
#: lib/Config/Capabilities.php:67 lib/Config/Menu.php:646
|
304 |
+
#: lib/Config/PrivacyPolicy.php:11 views/premium.html:41
|
305 |
msgid "MailPoet"
|
306 |
msgstr ""
|
307 |
|
308 |
+
#: lib/Config/Hooks.php:149
|
309 |
msgid "MailPoet Newsletter"
|
310 |
msgstr ""
|
311 |
|
493 |
"[link]Your host can help you.[/link]"
|
494 |
msgstr ""
|
495 |
|
496 |
+
#: lib/Config/PersonalDataErasers.php:15
|
497 |
+
msgid "Mailpoet Subscribers"
|
498 |
+
msgstr ""
|
499 |
+
|
500 |
+
#: lib/Config/PersonalDataExporters.php:21
|
501 |
msgid "MailPoet Lists"
|
502 |
msgstr ""
|
503 |
|
504 |
+
#: lib/Config/PersonalDataExporters.php:29
|
505 |
#: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:21
|
506 |
msgid "MailPoet Subscriber Data"
|
507 |
msgstr ""
|
508 |
|
509 |
+
#: lib/Config/PersonalDataExporters.php:37
|
510 |
msgid "MailPoet Emails"
|
511 |
msgstr ""
|
512 |
|
513 |
+
#: lib/Config/PersonalDataExporters.php:45
|
514 |
+
msgid "MailPoet Email Clicks"
|
515 |
+
msgstr ""
|
516 |
+
|
517 |
#: lib/Config/PluginActivatedHook.php:14
|
518 |
msgid ""
|
519 |
"We noticed that you're using an unsupported environment. While MailPoet "
|
1042 |
msgid "Salute the sun and your subscribers."
|
1043 |
msgstr ""
|
1044 |
|
1045 |
+
#: lib/Config/PrivacyPolicy.php:18
|
1046 |
+
msgid "MailPoet newsletter & emails"
|
1047 |
+
msgstr ""
|
1048 |
+
|
1049 |
+
#: lib/Config/PrivacyPolicy.php:21
|
1050 |
+
msgid ""
|
1051 |
+
"If you have subscribed to our newsletter or if you are a member of our "
|
1052 |
+
"website (you can log in) or if you have purchased on our website, there is "
|
1053 |
+
"a good chance you will receive emails from us."
|
1054 |
+
msgstr ""
|
1055 |
+
|
1056 |
+
#: lib/Config/PrivacyPolicy.php:24
|
1057 |
+
msgid ""
|
1058 |
+
"We will only send you emails which you have signed up to receive, or which "
|
1059 |
+
"pertain to the services we provided to you."
|
1060 |
+
msgstr ""
|
1061 |
+
|
1062 |
+
#: lib/Config/PrivacyPolicy.php:27
|
1063 |
+
msgid ""
|
1064 |
+
"To send you emails, we use the name and email address you provide us. Our "
|
1065 |
+
"site also logs the IP address you used when you signed up for the service "
|
1066 |
+
"to prevent abuse of the system."
|
1067 |
+
msgstr ""
|
1068 |
+
|
1069 |
+
#: lib/Config/PrivacyPolicy.php:31
|
1070 |
+
msgid ""
|
1071 |
+
"This website can send emails through the [link]MailPoet sending "
|
1072 |
+
"service[/link]. This service allows us to track opens and clicks on our "
|
1073 |
+
"emails. We use this information to improve the content of our newsletters."
|
1074 |
+
msgstr ""
|
1075 |
+
|
1076 |
+
#: lib/Config/PrivacyPolicy.php:37
|
1077 |
+
msgid ""
|
1078 |
+
"No identifiable information is otherwise tracked outside this website "
|
1079 |
+
"except for the email address."
|
1080 |
+
msgstr ""
|
1081 |
+
|
1082 |
#: lib/Config/Renderer.php:106
|
1083 |
msgid ""
|
1084 |
"Failed to render template \"%s\". Please ensure the template cache folder "
|
1401 |
msgstr ""
|
1402 |
|
1403 |
#: lib/Models/Form.php:93 lib/Models/Newsletter.php:707
|
1404 |
+
#: lib/Models/Segment.php:133 lib/Models/Subscriber.php:337
|
1405 |
msgid "All"
|
1406 |
msgstr ""
|
1407 |
|
1408 |
#: lib/Models/Form.php:98 lib/Models/Newsletter.php:778
|
1409 |
+
#: lib/Models/Segment.php:138 lib/Models/Subscriber.php:362 views/forms.html:66
|
1410 |
#: views/newsletters.html:82 views/segments.html:50
|
1411 |
#: views/subscribers/subscribers.html:37
|
1412 |
msgid "Trash"
|
1421 |
msgid "Deleted list"
|
1422 |
msgstr ""
|
1423 |
|
1424 |
+
#: lib/Models/Newsletter.php:606 lib/Models/Subscriber.php:273
|
1425 |
msgid "All Lists"
|
1426 |
msgstr ""
|
1427 |
|
1495 |
"The Team"
|
1496 |
msgstr ""
|
1497 |
|
1498 |
+
#: lib/Models/Subscriber.php:24
|
1499 |
msgid "Please enter your email address"
|
1500 |
msgstr ""
|
1501 |
|
1502 |
+
#: lib/Models/Subscriber.php:25
|
1503 |
msgid "Your email address is invalid!"
|
1504 |
msgstr ""
|
1505 |
|
1506 |
+
#: lib/Models/Subscriber.php:281
|
1507 |
msgid "Subscribers without a list (%s)"
|
1508 |
msgstr ""
|
1509 |
|
1510 |
+
#: lib/Models/Subscriber.php:342 lib/Subscription/Pages.php:306
|
1511 |
#: views/segments.html:30 views/subscribers/subscribers.html:56
|
1512 |
msgid "Subscribed"
|
1513 |
msgstr ""
|
1514 |
|
1515 |
+
#: lib/Models/Subscriber.php:347 views/segments.html:31
|
1516 |
#: views/subscribers/subscribers.html:55
|
1517 |
msgid "Unconfirmed"
|
1518 |
msgstr ""
|
1519 |
|
1520 |
+
#: lib/Models/Subscriber.php:352 lib/Subscription/Pages.php:314
|
1521 |
#: views/segments.html:32 views/subscribers/subscribers.html:57
|
1522 |
msgid "Unsubscribed"
|
1523 |
msgstr ""
|
1524 |
|
1525 |
+
#: lib/Models/Subscriber.php:357 lib/Subscription/Pages.php:322
|
1526 |
#: views/segments.html:33 views/subscribers/subscribers.html:58
|
1527 |
msgid "Bounced"
|
1528 |
msgstr ""
|
1667 |
msgid "List"
|
1668 |
msgstr ""
|
1669 |
|
1670 |
+
#: lib/Subscribers/ImportExport/Import/Import.php:70
|
1671 |
msgid "Missing or invalid import data."
|
1672 |
msgstr ""
|
1673 |
|
1674 |
+
#: lib/Subscribers/ImportExport/Import/Import.php:91
|
1675 |
msgid "No valid subscribers were found."
|
1676 |
msgstr ""
|
1677 |
|
1678 |
+
#: lib/Subscribers/ImportExport/Import/Import.php:132
|
1679 |
msgid "Unable to save imported subscribers."
|
1680 |
msgstr ""
|
1681 |
|
1742 |
msgid "User fields"
|
1743 |
msgstr ""
|
1744 |
|
1745 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporter.php:40
|
1746 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php:44
|
1747 |
#: views/settings/signup.html:111
|
1748 |
msgid "Email subject"
|
1749 |
msgstr ""
|
1750 |
|
1751 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporter.php:44
|
1752 |
+
msgid "Timestamp of the click event"
|
1753 |
+
msgstr ""
|
1754 |
+
|
1755 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporter.php:48
|
1756 |
+
msgid "Url"
|
1757 |
+
msgstr ""
|
1758 |
+
|
1759 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewsletterClicksExporter.php:53
|
1760 |
+
msgid "MailPoet Emails Clicks"
|
1761 |
+
msgstr ""
|
1762 |
+
|
1763 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php:48
|
1764 |
msgid "Sent at"
|
1765 |
msgstr ""
|
1766 |
|
1767 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php:53
|
1768 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php:62
|
1769 |
+
msgid "Opened"
|
1770 |
+
msgstr ""
|
1771 |
+
|
1772 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php:57
|
1773 |
+
msgid "Opened at"
|
1774 |
+
msgstr ""
|
1775 |
+
|
1776 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php:63
|
1777 |
+
#: views/form/templates/settings/date_default.hbs:20
|
1778 |
+
#: views/form/templates/settings/label_within.hbs:8
|
1779 |
+
#: views/form/templates/settings/required.hbs:17
|
1780 |
+
#: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:130
|
1781 |
+
#: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:183
|
1782 |
+
#: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:209
|
1783 |
+
#: views/newsletter/templates/blocks/automatedLatestContent/settings.hbs:287
|
1784 |
+
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:85
|
1785 |
+
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:139
|
1786 |
+
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:165
|
1787 |
+
#: views/newsletter/templates/blocks/posts/settingsDisplayOptions.hbs:227
|
1788 |
+
#: views/premium.html:62 views/premium.html:63 views/settings/advanced.html:122
|
1789 |
+
#: views/settings/advanced.html:162 views/settings/advanced.html:202
|
1790 |
+
#: views/settings/bounce.html:148 views/settings/bounce.html:179
|
1791 |
+
#: views/settings/mta.html:545 views/settings/mta.html:599
|
1792 |
+
#: views/settings/signup.html:46
|
1793 |
+
#: views/subscribers/importExport/import/step2.html:67
|
1794 |
+
msgid "No"
|
1795 |
+
msgstr ""
|
1796 |
+
|
1797 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php:68
|
1798 |
msgid "Email preview"
|
1799 |
msgstr ""
|
1800 |
|
1801 |
+
#: lib/Subscribers/ImportExport/PersonalDataExporters/NewslettersExporter.php:80
|
1802 |
msgid "MailPoet Emails Sent"
|
1803 |
msgstr ""
|
1804 |
|
1833 |
msgstr ""
|
1834 |
|
1835 |
#: lib/Subscribers/ImportExport/PersonalDataExporters/SubscriberExporter.php:60
|
1836 |
+
msgid "Created at"
|
1837 |
msgstr ""
|
1838 |
|
1839 |
#: lib/Subscription/Comment.php:23 lib/Subscription/Registration.php:11
|
2126 |
msgid "Yes"
|
2127 |
msgstr ""
|
2128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2129 |
#: views/form/templates/settings/date_formats.hbs:9
|
2130 |
msgid "Order"
|
2131 |
msgstr ""
|
lib/API/JSON/v1/AutomatedLatestContent.php
CHANGED
@@ -21,12 +21,11 @@ class AutomatedLatestContent extends APIEndpoint {
|
|
21 |
|
22 |
function getPostTypes() {
|
23 |
$post_types = array_map(function($post_type) {
|
24 |
-
if(!empty($post_type->exclude_from_search)) return;
|
25 |
return array(
|
26 |
'name' => $post_type->name,
|
27 |
'label' => $post_type->label
|
28 |
);
|
29 |
-
},
|
30 |
return $this->successResponse(
|
31 |
array_filter($post_types)
|
32 |
);
|
21 |
|
22 |
function getPostTypes() {
|
23 |
$post_types = array_map(function($post_type) {
|
|
|
24 |
return array(
|
25 |
'name' => $post_type->name,
|
26 |
'label' => $post_type->label
|
27 |
);
|
28 |
+
}, WPPosts::getTypes(array(), 'objects'));
|
29 |
return $this->successResponse(
|
30 |
array_filter($post_types)
|
31 |
);
|
lib/API/JSON/v1/Subscribers.php
CHANGED
@@ -14,6 +14,7 @@ use MailPoet\Models\Subscriber;
|
|
14 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
15 |
use MailPoet\Segments\BulkAction;
|
16 |
use MailPoet\Segments\SubscribersListings;
|
|
|
17 |
use MailPoet\Subscription\Throttling as SubscriptionThrottling;
|
18 |
use MailPoet\WP\Hooks;
|
19 |
|
@@ -191,6 +192,11 @@ class Subscribers extends APIEndpoint {
|
|
191 |
return $this->badRequest($errors);
|
192 |
}
|
193 |
|
|
|
|
|
|
|
|
|
|
|
194 |
if(!empty($data['segments'])) {
|
195 |
Scheduler::scheduleSubscriberWelcomeNotification($subscriber->id, $data['segments']);
|
196 |
}
|
14 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
15 |
use MailPoet\Segments\BulkAction;
|
16 |
use MailPoet\Segments\SubscribersListings;
|
17 |
+
use MailPoet\Subscribers\Source;
|
18 |
use MailPoet\Subscription\Throttling as SubscriptionThrottling;
|
19 |
use MailPoet\WP\Hooks;
|
20 |
|
192 |
return $this->badRequest($errors);
|
193 |
}
|
194 |
|
195 |
+
if($subscriber->isNew()) {
|
196 |
+
$subscriber = Source::setSource($subscriber, Source::ADMINISTRATOR);
|
197 |
+
$subscriber->save();
|
198 |
+
}
|
199 |
+
|
200 |
if(!empty($data['segments'])) {
|
201 |
Scheduler::scheduleSubscriberWelcomeNotification($subscriber->id, $data['segments']);
|
202 |
}
|
lib/API/MP/v1/API.php
CHANGED
@@ -6,6 +6,7 @@ use MailPoet\Models\Segment;
|
|
6 |
use MailPoet\Models\Subscriber;
|
7 |
use MailPoet\Models\SubscriberSegment;
|
8 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
|
|
9 |
|
10 |
if(!defined('ABSPATH')) exit;
|
11 |
|
@@ -165,6 +166,7 @@ class API {
|
|
165 |
// add subscriber
|
166 |
$new_subscriber = Subscriber::create();
|
167 |
$new_subscriber->hydrate($default_fields);
|
|
|
168 |
$new_subscriber->save();
|
169 |
if($new_subscriber->getErrors() !== false) {
|
170 |
throw new \Exception(
|
6 |
use MailPoet\Models\Subscriber;
|
7 |
use MailPoet\Models\SubscriberSegment;
|
8 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
9 |
+
use MailPoet\Subscribers\Source;
|
10 |
|
11 |
if(!defined('ABSPATH')) exit;
|
12 |
|
166 |
// add subscriber
|
167 |
$new_subscriber = Subscriber::create();
|
168 |
$new_subscriber->hydrate($default_fields);
|
169 |
+
$new_subscriber = Source::setSource($new_subscriber, Source::API);
|
170 |
$new_subscriber->save();
|
171 |
if($new_subscriber->getErrors() !== false) {
|
172 |
throw new \Exception(
|
lib/Config/Hooks.php
CHANGED
@@ -3,6 +3,7 @@
|
|
3 |
namespace MailPoet\Config;
|
4 |
|
5 |
use MailPoet\Models\Setting;
|
|
|
6 |
|
7 |
class Hooks {
|
8 |
function init() {
|
@@ -166,8 +167,7 @@ class Hooks {
|
|
166 |
}
|
167 |
|
168 |
function setupPostNotifications() {
|
169 |
-
|
170 |
-
foreach($post_types as $post_type) {
|
171 |
add_filter(
|
172 |
'publish_' . $post_type,
|
173 |
'\MailPoet\Newsletter\Scheduler\Scheduler::schedulePostNotification',
|
3 |
namespace MailPoet\Config;
|
4 |
|
5 |
use MailPoet\Models\Setting;
|
6 |
+
use MailPoet\WP\Posts as WPPosts;
|
7 |
|
8 |
class Hooks {
|
9 |
function init() {
|
167 |
}
|
168 |
|
169 |
function setupPostNotifications() {
|
170 |
+
foreach(WPPosts::getTypes() as $post_type) {
|
|
|
171 |
add_filter(
|
172 |
'publish_' . $post_type,
|
173 |
'\MailPoet\Newsletter\Scheduler\Scheduler::schedulePostNotification',
|
lib/Config/Initializer.php
CHANGED
@@ -131,6 +131,8 @@ class Initializer {
|
|
131 |
$this->setupShortcodes();
|
132 |
$this->setupImages();
|
133 |
$this->setupPersonalDataExporters();
|
|
|
|
|
134 |
|
135 |
$this->setupChangelog();
|
136 |
$this->setupCronTrigger();
|
@@ -267,11 +269,21 @@ class Initializer {
|
|
267 |
$hooks->init();
|
268 |
}
|
269 |
|
|
|
|
|
|
|
|
|
|
|
270 |
function setupPersonalDataExporters() {
|
271 |
$exporters = new PersonalDataExporters();
|
272 |
$exporters->init();
|
273 |
}
|
274 |
|
|
|
|
|
|
|
|
|
|
|
275 |
function setupPHPVersionWarnings() {
|
276 |
$php_version_warnings = new PHPVersionWarnings();
|
277 |
$warnings = $php_version_warnings->init(phpversion(), Menu::isOnMailPoetAdminPage());
|
131 |
$this->setupShortcodes();
|
132 |
$this->setupImages();
|
133 |
$this->setupPersonalDataExporters();
|
134 |
+
$this->setupPrivacyPolicy();
|
135 |
+
$this->setupPersonalDataErasers();
|
136 |
|
137 |
$this->setupChangelog();
|
138 |
$this->setupCronTrigger();
|
269 |
$hooks->init();
|
270 |
}
|
271 |
|
272 |
+
function setupPrivacyPolicy() {
|
273 |
+
$privacy_policy = new PrivacyPolicy();
|
274 |
+
$privacy_policy->init();
|
275 |
+
}
|
276 |
+
|
277 |
function setupPersonalDataExporters() {
|
278 |
$exporters = new PersonalDataExporters();
|
279 |
$exporters->init();
|
280 |
}
|
281 |
|
282 |
+
function setupPersonalDataErasers() {
|
283 |
+
$erasers = new PersonalDataErasers();
|
284 |
+
$erasers->init();
|
285 |
+
}
|
286 |
+
|
287 |
function setupPHPVersionWarnings() {
|
288 |
$php_version_warnings = new PHPVersionWarnings();
|
289 |
$warnings = $php_version_warnings->init(phpversion(), Menu::isOnMailPoetAdminPage());
|
lib/Config/Migrator.php
CHANGED
@@ -171,6 +171,7 @@ class Migrator {
|
|
171 |
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
|
172 |
'deleted_at TIMESTAMP NULL,',
|
173 |
'unconfirmed_data longtext,',
|
|
|
174 |
'PRIMARY KEY (id),',
|
175 |
'UNIQUE KEY email (email),',
|
176 |
'KEY wp_user_id (wp_user_id),',
|
@@ -199,7 +200,7 @@ class Migrator {
|
|
199 |
'id int(11) unsigned NOT NULL AUTO_INCREMENT,',
|
200 |
'subscriber_id int(11) unsigned NOT NULL,',
|
201 |
'custom_field_id int(11) unsigned NOT NULL,',
|
202 |
-
'value
|
203 |
'created_at TIMESTAMP NULL,',
|
204 |
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
|
205 |
'PRIMARY KEY (id),',
|
171 |
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
|
172 |
'deleted_at TIMESTAMP NULL,',
|
173 |
'unconfirmed_data longtext,',
|
174 |
+
'source ENUM("form", "imported", "administrator", "api", "wordpress_user", "unknown") DEFAULT "unknown",',
|
175 |
'PRIMARY KEY (id),',
|
176 |
'UNIQUE KEY email (email),',
|
177 |
'KEY wp_user_id (wp_user_id),',
|
200 |
'id int(11) unsigned NOT NULL AUTO_INCREMENT,',
|
201 |
'subscriber_id int(11) unsigned NOT NULL,',
|
202 |
'custom_field_id int(11) unsigned NOT NULL,',
|
203 |
+
'value text NOT NULL,',
|
204 |
'created_at TIMESTAMP NULL,',
|
205 |
'updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,',
|
206 |
'PRIMARY KEY (id),',
|
lib/Config/PersonalDataErasers.php
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailPoet\Config;
|
4 |
+
|
5 |
+
use MailPoet\Subscribers\SubscriberPersonalDataEraser;
|
6 |
+
|
7 |
+
class PersonalDataErasers {
|
8 |
+
|
9 |
+
function init() {
|
10 |
+
add_filter('wp_privacy_personal_data_erasers', array($this, 'registerSubscriberEraser'));
|
11 |
+
}
|
12 |
+
|
13 |
+
function registerSubscriberEraser($erasers) {
|
14 |
+
$erasers['mailpet-subscriber'] = array(
|
15 |
+
'eraser_friendly_name' => __('Mailpoet Subscribers', 'mailpoet'),
|
16 |
+
'callback' => array(new SubscriberPersonalDataEraser(), 'erase'),
|
17 |
+
);
|
18 |
+
|
19 |
+
return $erasers;
|
20 |
+
}
|
21 |
+
|
22 |
+
}
|
lib/Config/PersonalDataExporters.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
|
3 |
namespace MailPoet\Config;
|
4 |
|
|
|
5 |
use MailPoet\Subscribers\ImportExport\PersonalDataExporters\NewslettersExporter;
|
6 |
use MailPoet\Subscribers\ImportExport\PersonalDataExporters\SegmentsExporter;
|
7 |
use MailPoet\Subscribers\ImportExport\PersonalDataExporters\SubscriberExporter;
|
@@ -12,11 +13,12 @@ class PersonalDataExporters {
|
|
12 |
add_filter('wp_privacy_personal_data_exporters', array($this, 'registerSubscriberExporter'));
|
13 |
add_filter('wp_privacy_personal_data_exporters', array($this, 'registerSegmentsExporter'));
|
14 |
add_filter('wp_privacy_personal_data_exporters', array($this, 'registerNewslettersExporter'));
|
|
|
15 |
}
|
16 |
|
17 |
function registerSegmentsExporter($exporters) {
|
18 |
$exporters[] = array(
|
19 |
-
'exporter_friendly_name' => __('MailPoet Lists'),
|
20 |
'callback' => array(new SegmentsExporter(), 'export'),
|
21 |
);
|
22 |
return $exporters;
|
@@ -24,7 +26,7 @@ class PersonalDataExporters {
|
|
24 |
|
25 |
function registerSubscriberExporter($exporters) {
|
26 |
$exporters[] = array(
|
27 |
-
'exporter_friendly_name' => __('MailPoet Subscriber Data'),
|
28 |
'callback' => array(new SubscriberExporter(), 'export'),
|
29 |
);
|
30 |
return $exporters;
|
@@ -32,10 +34,18 @@ class PersonalDataExporters {
|
|
32 |
|
33 |
function registerNewslettersExporter($exporters) {
|
34 |
$exporters[] = array(
|
35 |
-
'exporter_friendly_name' => __('MailPoet Emails'),
|
36 |
'callback' => array(new NewslettersExporter(), 'export'),
|
37 |
);
|
38 |
return $exporters;
|
39 |
}
|
40 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
2 |
|
3 |
namespace MailPoet\Config;
|
4 |
|
5 |
+
use MailPoet\Subscribers\ImportExport\PersonalDataExporters\NewsletterClicksExporter;
|
6 |
use MailPoet\Subscribers\ImportExport\PersonalDataExporters\NewslettersExporter;
|
7 |
use MailPoet\Subscribers\ImportExport\PersonalDataExporters\SegmentsExporter;
|
8 |
use MailPoet\Subscribers\ImportExport\PersonalDataExporters\SubscriberExporter;
|
13 |
add_filter('wp_privacy_personal_data_exporters', array($this, 'registerSubscriberExporter'));
|
14 |
add_filter('wp_privacy_personal_data_exporters', array($this, 'registerSegmentsExporter'));
|
15 |
add_filter('wp_privacy_personal_data_exporters', array($this, 'registerNewslettersExporter'));
|
16 |
+
add_filter('wp_privacy_personal_data_exporters', array($this, 'registerNewsletterClicksExporter'));
|
17 |
}
|
18 |
|
19 |
function registerSegmentsExporter($exporters) {
|
20 |
$exporters[] = array(
|
21 |
+
'exporter_friendly_name' => __('MailPoet Lists', 'mailpoet'),
|
22 |
'callback' => array(new SegmentsExporter(), 'export'),
|
23 |
);
|
24 |
return $exporters;
|
26 |
|
27 |
function registerSubscriberExporter($exporters) {
|
28 |
$exporters[] = array(
|
29 |
+
'exporter_friendly_name' => __('MailPoet Subscriber Data', 'mailpoet'),
|
30 |
'callback' => array(new SubscriberExporter(), 'export'),
|
31 |
);
|
32 |
return $exporters;
|
34 |
|
35 |
function registerNewslettersExporter($exporters) {
|
36 |
$exporters[] = array(
|
37 |
+
'exporter_friendly_name' => __('MailPoet Emails', 'mailpoet'),
|
38 |
'callback' => array(new NewslettersExporter(), 'export'),
|
39 |
);
|
40 |
return $exporters;
|
41 |
}
|
42 |
|
43 |
+
function registerNewsletterClicksExporter($exporters) {
|
44 |
+
$exporters[] = array(
|
45 |
+
'exporter_friendly_name' => __('MailPoet Email Clicks', 'mailpoet'),
|
46 |
+
'callback' => array(new NewsletterClicksExporter(), 'export'),
|
47 |
+
);
|
48 |
+
return $exporters;
|
49 |
+
}
|
50 |
+
|
51 |
}
|
lib/Config/PrivacyPolicy.php
ADDED
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
namespace MailPoet\Config;
|
4 |
+
|
5 |
+
use MailPoet\Util\Helpers;
|
6 |
+
|
7 |
+
class PrivacyPolicy {
|
8 |
+
|
9 |
+
function init() {
|
10 |
+
if(function_exists('wp_add_privacy_policy_content')) {
|
11 |
+
wp_add_privacy_policy_content(__('MailPoet', 'mailpoet'), $this->getPrivacyPolicyContent());
|
12 |
+
}
|
13 |
+
}
|
14 |
+
|
15 |
+
function getPrivacyPolicyContent() {
|
16 |
+
return
|
17 |
+
'<h2>' .
|
18 |
+
__('MailPoet newsletter & emails', 'mailpoet') .
|
19 |
+
'</h2>' .
|
20 |
+
'<p>' .
|
21 |
+
__('If you have subscribed to our newsletter or if you are a member of our website (you can log in) or if you have purchased on our website, there is a good chance you will receive emails from us.', 'mailpoet') .
|
22 |
+
'</p>' .
|
23 |
+
'<p>' .
|
24 |
+
__('We will only send you emails which you have signed up to receive, or which pertain to the services we provided to you.', 'mailpoet') .
|
25 |
+
'</p>' .
|
26 |
+
'<p>' .
|
27 |
+
__('To send you emails, we use the name and email address you provide us. Our site also logs the IP address you used when you signed up for the service to prevent abuse of the system.', 'mailpoet') .
|
28 |
+
'</p>' .
|
29 |
+
'<p>' .
|
30 |
+
Helpers::replaceLinkTags(
|
31 |
+
__('This website can send emails through the [link]MailPoet sending service[/link]. This service allows us to track opens and clicks on our emails. We use this information to improve the content of our newsletters.', 'mailpoet'),
|
32 |
+
'https://www.mailpoet.com/privacy-notice/',
|
33 |
+
array('target' => '_blank')
|
34 |
+
) .
|
35 |
+
'</p>' .
|
36 |
+
'<p>' .
|
37 |
+
__('No identifiable information is otherwise tracked outside this website except for the email address.', 'mailpoet') .
|
38 |
+
'</p>';
|
39 |
+
}
|
40 |
+
|
41 |
+
}
|
lib/Models/StatisticsClicks.php
CHANGED
@@ -24,4 +24,24 @@ class StatisticsClicks extends Model {
|
|
24 |
}
|
25 |
return $statistics->save();
|
26 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
}
|
24 |
}
|
25 |
return $statistics->save();
|
26 |
}
|
27 |
+
|
28 |
+
static function getAllForSubsciber(Subscriber $subscriber) {
|
29 |
+
return static::table_alias('clicks')
|
30 |
+
->select('clicks.id', 'id')
|
31 |
+
->select('newsletter_rendered_subject')
|
32 |
+
->select('clicks.created_at', 'created_at')
|
33 |
+
->select('url')
|
34 |
+
->join(
|
35 |
+
SendingQueue::$_table,
|
36 |
+
array('clicks.queue_id', '=', 'queue.id'),
|
37 |
+
'queue'
|
38 |
+
)
|
39 |
+
->join(
|
40 |
+
NewsletterLink::$_table,
|
41 |
+
array('clicks.link_id', '=', 'link.id'),
|
42 |
+
'link'
|
43 |
+
)
|
44 |
+
->where('clicks.subscriber_id', $subscriber->id())
|
45 |
+
->orderByAsc('url');
|
46 |
+
}
|
47 |
}
|
lib/Models/StatisticsNewsletters.php
CHANGED
@@ -34,12 +34,18 @@ class StatisticsNewsletters extends Model {
|
|
34 |
return static::table_alias('statistics')
|
35 |
->select('statistics.newsletter_id', 'newsletter_id')
|
36 |
->select('newsletter_rendered_subject')
|
|
|
37 |
->select('sent_at')
|
38 |
->join(
|
39 |
SendingQueue::$_table,
|
40 |
array('statistics.queue_id', '=', 'queue.id'),
|
41 |
'queue'
|
42 |
)
|
|
|
|
|
|
|
|
|
|
|
43 |
->where('statistics.subscriber_id', $subscriber->id())
|
44 |
->orderByAsc('newsletter_id');
|
45 |
}
|
34 |
return static::table_alias('statistics')
|
35 |
->select('statistics.newsletter_id', 'newsletter_id')
|
36 |
->select('newsletter_rendered_subject')
|
37 |
+
->select('opens.created_at', 'opened_at')
|
38 |
->select('sent_at')
|
39 |
->join(
|
40 |
SendingQueue::$_table,
|
41 |
array('statistics.queue_id', '=', 'queue.id'),
|
42 |
'queue'
|
43 |
)
|
44 |
+
->leftOuterJoin(
|
45 |
+
StatisticsOpens::$_table,
|
46 |
+
array('statistics.newsletter_id', '=', 'opens.newsletter_id'),
|
47 |
+
'opens'
|
48 |
+
)
|
49 |
->where('statistics.subscriber_id', $subscriber->id())
|
50 |
->orderByAsc('newsletter_id');
|
51 |
}
|
lib/Models/Subscriber.php
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
namespace MailPoet\Models;
|
3 |
use MailPoet\Mailer\Mailer;
|
4 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
|
|
5 |
use MailPoet\Util\Helpers;
|
6 |
use MailPoet\Subscription;
|
7 |
|
@@ -182,6 +183,8 @@ class Subscriber extends Model {
|
|
182 |
// create new subscriber or update if no confirmation is required
|
183 |
$subscriber = self::createOrUpdate($subscriber_data);
|
184 |
if($subscriber->getErrors() !== false) {
|
|
|
|
|
185 |
return $subscriber;
|
186 |
}
|
187 |
|
@@ -206,6 +209,8 @@ class Subscriber extends Model {
|
|
206 |
}
|
207 |
}
|
208 |
|
|
|
|
|
209 |
if($subscriber->save()) {
|
210 |
// link subscriber to segments
|
211 |
SubscriberSegment::subscribeToSegments($subscriber, $segment_ids);
|
2 |
namespace MailPoet\Models;
|
3 |
use MailPoet\Mailer\Mailer;
|
4 |
use MailPoet\Newsletter\Scheduler\Scheduler;
|
5 |
+
use MailPoet\Subscribers\Source;
|
6 |
use MailPoet\Util\Helpers;
|
7 |
use MailPoet\Subscription;
|
8 |
|
183 |
// create new subscriber or update if no confirmation is required
|
184 |
$subscriber = self::createOrUpdate($subscriber_data);
|
185 |
if($subscriber->getErrors() !== false) {
|
186 |
+
$subscriber = Source::setSource($subscriber, Source::FORM);
|
187 |
+
$subscriber->save();
|
188 |
return $subscriber;
|
189 |
}
|
190 |
|
209 |
}
|
210 |
}
|
211 |
|
212 |
+
$subscriber = Source::setSource($subscriber, Source::FORM);
|
213 |
+
|
214 |
if($subscriber->save()) {
|
215 |
// link subscriber to segments
|
216 |
SubscriberSegment::subscribeToSegments($subscriber, $segment_ids);
|
lib/Newsletter/Scheduler/Scheduler.php
CHANGED
@@ -108,6 +108,14 @@ class Scheduler {
|
|
108 |
}
|
109 |
|
110 |
static function createPostNotificationQueue($newsletter) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
$next_run_date = self::getNextRunDate($newsletter->schedule);
|
112 |
if(!$next_run_date) return;
|
113 |
// do not schedule du
|
108 |
}
|
109 |
|
110 |
static function createPostNotificationQueue($newsletter) {
|
111 |
+
$existing_notification_history = Newsletter::where('parent_id', $newsletter->id)
|
112 |
+
->where('type', Newsletter::TYPE_NOTIFICATION_HISTORY)
|
113 |
+
->where('status', Newsletter::STATUS_SENDING)
|
114 |
+
->findOne();
|
115 |
+
if($existing_notification_history) {
|
116 |
+
return;
|
117 |
+
}
|
118 |
+
|
119 |
$next_run_date = self::getNextRunDate($newsletter->schedule);
|
120 |
if(!$next_run_date) return;
|
121 |
// do not schedule du
|