Move documentation

This commit is contained in:
kevinpauer
2022-05-12 10:14:10 +02:00
parent 5d66376c77
commit 5f183de174
130 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,96 @@
/**
* @author mrdoob / http://mrdoob.com/
*/
var EventDispatcher = function () {};
Object.assign( EventDispatcher.prototype, {
addEventListener: function ( type, listener ) {
if ( this._listeners === undefined ) this._listeners = {};
var listeners = this._listeners;
if ( listeners[ type ] === undefined ) {
listeners[ type ] = [];
}
if ( listeners[ type ].indexOf( listener ) === - 1 ) {
listeners[ type ].push( listener );
}
},
hasEventListener: function ( type, listener ) {
if ( this._listeners === undefined ) return false;
var listeners = this._listeners;
if ( listeners[ type ] !== undefined && listeners[ type ].indexOf( listener ) !== - 1 ) {
return true;
}
return false;
},
removeEventListener: function ( type, listener ) {
if ( this._listeners === undefined ) return;
var listeners = this._listeners;
var listenerArray = listeners[ type ];
if ( listenerArray !== undefined ) {
var index = listenerArray.indexOf( listener );
if ( index !== - 1 ) {
listenerArray.splice( index, 1 );
}
}
},
dispatchEvent: function ( event ) {
if ( this._listeners === undefined ) return;
var listeners = this._listeners;
var listenerArray = listeners[ event.type ];
if ( listenerArray !== undefined ) {
event.target = this;
var array = [], i = 0;
var length = listenerArray.length;
for ( i = 0; i < length; i ++ ) {
array[ i ] = listenerArray[ i ];
}
for ( i = 0; i < length; i ++ ) {
array[ i ].call( this, event );
}
}
}
} );

View File

@@ -0,0 +1,292 @@
// Native Javascript for Bootstrap 3 v1.1.0 | © dnp_theme | MIT-License
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD support:
define([], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like:
module.exports = factory();
} else {
// Browser globals (root is window)
var bsn = factory();
root.Affix = bsn.Affix;
root.Alert = bsn.Alert;
root.Button = bsn.Button;
root.Carousel = bsn.Carousel;
root.Collapse = bsn.Collapse;
root.Dropdown = bsn.Dropdown;
root.Modal = bsn.Modal;
root.Popover = bsn.Popover;
root.ScrollSpy = bsn.ScrollSpy;
root.Tab = bsn.Tab;
root.Tooltip = bsn.Tooltip;
}
}(this, function() {
// Native Javascript for Bootstrap 3 | Internal Utility Functions
// by dnp_theme
var addClass = function(el, c) { // where modern browsers fail, use classList
if (el.classList) {
el.classList.add(c);
} else {
el.className += ' ' + c;
el.offsetWidth;
}
},
removeClass = function(el, c) {
if (el.classList) {
el.classList.remove(c);
} else {
el.className = el.className.replace(c, '').replace(/^\s+|\s+$/g, '');
}
},
isIE = (new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})").exec(navigator.userAgent) != null) ? parseFloat(RegExp.$1) : false,
getClosest = function(el, s) { //el is the element and s the selector of the closest item to find
// source http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/
var f = s.charAt(0);
for (; el && el !== document; el = el.parentNode) { // Get closest match
if (f === '.') { // If selector is a class
if (document.querySelector(s) !== undefined) {
return el;
}
}
if (f === '#') { // If selector is an ID
if (el.id === s.substr(1)) {
return el;
}
}
}
return false;
},
// tooltip / popover stuff
isElementInViewport = function(t) { // check if this.tooltip is in viewport
var r = t.getBoundingClientRect();
return (
r.top >= 0 && r.left >= 0 && r.bottom <= (window.innerHeight || document.documentElement.clientHeight) && r.right <= (window.innerWidth || document.documentElement.clientWidth))
},
getScroll = function() { // also Affix and scrollSpy uses it
return {
y: window.pageYOffset || document.documentElement.scrollTop,
x: window.pageXOffset || document.documentElement.scrollLeft
}
},
mouseHover = ('onmouseleave' in document) ? ['mouseenter', 'mouseleave'] : ['mouseover', 'mouseout'],
tipPositions = /\b(top|bottom|left|top)+/;
// Native Javascript for Bootstrap 3 | Collapse
// by dnp_theme
// COLLAPSE DEFINITION
// ===================
var Collapse = function(element, options) {
options = options || {};
this.btn = typeof element === 'object' ? element : document.querySelector(element);
this.accordion = null;
this.collapse = null;
this.duration = 300; // default collapse transition duration
this.options = {};
this.options.duration = (isIE && isIE < 10) ? 0 : (options.duration || this.duration);
var self = this;
var getOuterHeight = function(el) {
var s = el && (el.currentStyle || window.getComputedStyle(el)),
// the getComputedStyle polyfill would do this for us, but we want to make sure it does
btp = /px/.test(s.borderTopWidth) ? Math.round(s.borderTopWidth.replace('px', '')) : 0,
mtp = /px/.test(s.marginTop) ? Math.round(s.marginTop.replace('px', '')) : 0,
mbp = /px/.test(s.marginBottom) ? Math.round(s.marginBottom.replace('px', '')) : 0,
mte = /em/.test(s.marginTop) ? Math.round(s.marginTop.replace('em', '') * parseInt(s.fontSize)) : 0,
mbe = /em/.test(s.marginBottom) ? Math.round(s.marginBottom.replace('em', '') * parseInt(s.fontSize)) : 0;
return el.clientHeight + parseInt(btp) + parseInt(mtp) + parseInt(mbp) + parseInt(mte) + parseInt(mbe); //we need an accurate margin value
};
this.toggle = function(e) {
e.preventDefault();
if (!/\bin/.test(self.collapse.className)) {
self.open();
} else {
self.close();
}
};
this.close = function() {
this._close(this.collapse);
addClass(this.btn, 'collapsed');
};
this.open = function() {
this._open(this.collapse);
removeClass(this.btn, 'collapsed');
if (this.accordion !== null) {
var active = this.accordion.querySelectorAll('.collapse.in'),
al = active.length,
i = 0;
for (i; i < al; i++) {
if (active[i] !== this.collapse) this._close(active[i]);
}
}
};
this._open = function(c) {
this.removeEvent();
addClass(c, 'in');
c.setAttribute('aria-expanded', 'true');
addClass(c, 'collapsing');
setTimeout(function() {
c.style.height = self.getMaxHeight(c) + 'px'
c.style.overflowY = 'hidden';
}, 0);
setTimeout(function() {
c.style.height = '';
c.style.overflowY = '';
removeClass(c, 'collapsing');
self.addEvent();
}, this.options.duration);
};
this._close = function(c) {
this.removeEvent();
c.setAttribute('aria-expanded', 'false');
c.style.height = this.getMaxHeight(c) + 'px'
setTimeout(function() {
c.style.height = '0px';
c.style.overflowY = 'hidden';
addClass(c, 'collapsing');
}, 0);
setTimeout(function() {
removeClass(c, 'collapsing');
removeClass(c, 'in');
c.style.overflowY = '';
c.style.height = '';
self.addEvent();
}, this.options.duration);
};
this.getMaxHeight = function(l) { // get collapse trueHeight and border
var h = 0;
for (var k = 0, ll = l.children.length; k < ll; k++) {
h += getOuterHeight(l.children[k]);
}
return h;
};
this.removeEvent = function() {
this.btn.removeEventListener('click', this.toggle, false);
};
this.addEvent = function() {
this.btn.addEventListener('click', this.toggle, false);
};
this.getTarget = function() {
var t = this.btn,
h = t.href && t.getAttribute('href').replace('#', ''),
d = t.getAttribute('data-target') && (t.getAttribute('data-target')),
id = h || (d && /#/.test(d)) && d.replace('#', ''),
cl = (d && d.charAt(0) === '.') && d,
//the navbar collapse trigger targets a class
c = id && document.getElementById(id) || cl && document.querySelector(cl);
return c;
};
// init
this.addEvent();
this.collapse = this.getTarget();
this.accordion = this.btn.getAttribute('data-parent') && getClosest(this.btn, this.btn.getAttribute('data-parent'));
};
// COLLAPSE DATA API
// =================
var Collapses = document.querySelectorAll('[data-toggle="collapse"]');
for (var o = 0, cll = Collapses.length; o < cll; o++) {
var collapse = Collapses[o],
options = {};
options.duration = collapse.getAttribute('data-duration');
new Collapse(collapse, options);
}
// Native Javascript for Bootstrap 3 | Tab
// by dnp_theme
// TAB DEFINITION
// ===================
var Tab = function( element,options ) {
options = options || {};
this.tab = typeof element === 'object' ? element : document.querySelector(element);
this.tabs = this.tab.parentNode.parentNode;
this.dropdown = this.tabs.querySelector('.dropdown');
if ( /\bdropdown-menu/.test(this.tabs.className) ) {
this.dropdown = this.tabs.parentNode;
this.tabs = this.tabs.parentNode.parentNode;
}
this.options = options;
// default tab transition duration
this.duration = 150;
this.options.duration = (isIE && isIE < 10) ? 0 : (options.duration || this.duration);
var self = this;
this.handle = function(e) {
e = e || window.e; e.preventDefault();
var next = e.target; //the tab we clicked is now the next tab
var nextContent = document.getElementById(next.getAttribute('href').replace('#','')); //this is the actual object, the next tab content to activate
// get current active tab and content
var activeTab = self.getActiveTab();
var activeContent = self.getActiveContent();
if ( !/\bactive/.test(next.parentNode.className) ) {
// toggle "active" class name
removeClass(activeTab,'active');
addClass(next.parentNode,'active');
// handle dropdown menu "active" class name
if ( self.dropdown ) {
if ( !(/\bdropdown-menu/.test(self.tab.parentNode.parentNode.className)) ) {
if (/\bactive/.test(self.dropdown.className)) removeClass(self.dropdown,'active');
} else {
if (!/\bactive/.test(self.dropdown.className)) addClass(self.dropdown,'active');
}
}
//1. hide current active content first
removeClass(activeContent,'in');
setTimeout(function() {
//2. toggle current active content from view
removeClass(activeContent,'active');
addClass(nextContent,'active');
}, self.options.duration);
setTimeout(function() {
//3. show next active content
addClass(nextContent,'in');
}, self.options.duration*2);
}
};
this.getActiveTab = function() {
var activeTabs = this.tabs.querySelectorAll('.active');
if ( activeTabs.length === 1 && !/\bdropdown/.test(activeTabs[0].className) ) {
return activeTabs[0]
} else if ( activeTabs.length > 1 ) {
return activeTabs[activeTabs.length-1]
}
};
this.getActiveContent = function() {
var active = this.getActiveTab().getElementsByTagName('A')[0].getAttribute('href').replace('#','');
return active && document.getElementById(active)
};
// init
this.tab.addEventListener('click', this.handle, false);
};
// TAB DATA API
// =================
var Tabs = document.querySelectorAll("[data-toggle='tab'], [data-toggle='pill']");
for ( var tb = 0, tbl = Tabs.length; tb<tbl; tb++ ) {
var tab = Tabs[tb], options = {};
options.duration = tab.getAttribute('data-duration') && tab.getAttribute('data-duration') || false;
new Tab(tab,options);
}
return {
Tab: Tab,
Collapse: Collapse
};
}));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,15 @@
/**
@license @nocompile
Copyright (c) 2018 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
(function () {
'use strict';
(function(){if(void 0===window.Reflect||void 0===window.customElements||window.customElements.hasOwnProperty('polyfillWrapFlushCallback'))return;const a=HTMLElement;window.HTMLElement=function(){return Reflect.construct(a,[],this.constructor)},HTMLElement.prototype=a.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,a);})();
}());

View File

@@ -0,0 +1,38 @@
(function(){
'use strict';var h=new function(){};var aa=new Set("annotation-xml color-profile font-face font-face-src font-face-uri font-face-format font-face-name missing-glyph".split(" "));function m(b){var a=aa.has(b);b=/^[a-z][.0-9_a-z]*-[\-.0-9_a-z]*$/.test(b);return!a&&b}function n(b){var a=b.isConnected;if(void 0!==a)return a;for(;b&&!(b.__CE_isImportDocument||b instanceof Document);)b=b.parentNode||(window.ShadowRoot&&b instanceof ShadowRoot?b.host:void 0);return!(!b||!(b.__CE_isImportDocument||b instanceof Document))}
function p(b,a){for(;a&&a!==b&&!a.nextSibling;)a=a.parentNode;return a&&a!==b?a.nextSibling:null}
function t(b,a,c){c=c?c:new Set;for(var d=b;d;){if(d.nodeType===Node.ELEMENT_NODE){var e=d;a(e);var f=e.localName;if("link"===f&&"import"===e.getAttribute("rel")){d=e.import;if(d instanceof Node&&!c.has(d))for(c.add(d),d=d.firstChild;d;d=d.nextSibling)t(d,a,c);d=p(b,e);continue}else if("template"===f){d=p(b,e);continue}if(e=e.__CE_shadowRoot)for(e=e.firstChild;e;e=e.nextSibling)t(e,a,c)}d=d.firstChild?d.firstChild:p(b,d)}}function u(b,a,c){b[a]=c};function v(){this.a=new Map;this.s=new Map;this.f=[];this.b=!1}function ba(b,a,c){b.a.set(a,c);b.s.set(c.constructor,c)}function w(b,a){b.b=!0;b.f.push(a)}function x(b,a){b.b&&t(a,function(a){return y(b,a)})}function y(b,a){if(b.b&&!a.__CE_patched){a.__CE_patched=!0;for(var c=0;c<b.f.length;c++)b.f[c](a)}}function z(b,a){var c=[];t(a,function(b){return c.push(b)});for(a=0;a<c.length;a++){var d=c[a];1===d.__CE_state?b.connectedCallback(d):A(b,d)}}
function B(b,a){var c=[];t(a,function(b){return c.push(b)});for(a=0;a<c.length;a++){var d=c[a];1===d.__CE_state&&b.disconnectedCallback(d)}}
function C(b,a,c){c=c?c:{};var d=c.w||new Set,e=c.i||function(a){return A(b,a)},f=[];t(a,function(a){if("link"===a.localName&&"import"===a.getAttribute("rel")){var c=a.import;c instanceof Node&&(c.__CE_isImportDocument=!0,c.__CE_hasRegistry=!0);c&&"complete"===c.readyState?c.__CE_documentLoadHandled=!0:a.addEventListener("load",function(){var c=a.import;if(!c.__CE_documentLoadHandled){c.__CE_documentLoadHandled=!0;var f=new Set(d);f.delete(c);C(b,c,{w:f,i:e})}})}else f.push(a)},d);if(b.b)for(a=0;a<
f.length;a++)y(b,f[a]);for(a=0;a<f.length;a++)e(f[a])}
function A(b,a){if(void 0===a.__CE_state){var c=a.ownerDocument;if(c.defaultView||c.__CE_isImportDocument&&c.__CE_hasRegistry)if(c=b.a.get(a.localName)){c.constructionStack.push(a);var d=c.constructor;try{try{if(new d!==a)throw Error("The custom element constructor did not produce the element being upgraded.");}finally{c.constructionStack.pop()}}catch(r){throw a.__CE_state=2,r;}a.__CE_state=1;a.__CE_definition=c;if(c.attributeChangedCallback)for(c=c.observedAttributes,d=0;d<c.length;d++){var e=c[d],
f=a.getAttribute(e);null!==f&&b.attributeChangedCallback(a,e,null,f,null)}n(a)&&b.connectedCallback(a)}}}v.prototype.connectedCallback=function(b){var a=b.__CE_definition;a.connectedCallback&&a.connectedCallback.call(b)};v.prototype.disconnectedCallback=function(b){var a=b.__CE_definition;a.disconnectedCallback&&a.disconnectedCallback.call(b)};
v.prototype.attributeChangedCallback=function(b,a,c,d,e){var f=b.__CE_definition;f.attributeChangedCallback&&-1<f.observedAttributes.indexOf(a)&&f.attributeChangedCallback.call(b,a,c,d,e)};function D(b,a){this.c=b;this.a=a;this.b=void 0;C(this.c,this.a);"loading"===this.a.readyState&&(this.b=new MutationObserver(this.f.bind(this)),this.b.observe(this.a,{childList:!0,subtree:!0}))}function E(b){b.b&&b.b.disconnect()}D.prototype.f=function(b){var a=this.a.readyState;"interactive"!==a&&"complete"!==a||E(this);for(a=0;a<b.length;a++)for(var c=b[a].addedNodes,d=0;d<c.length;d++)C(this.c,c[d])};function ca(){var b=this;this.b=this.a=void 0;this.f=new Promise(function(a){b.b=a;b.a&&a(b.a)})}function F(b){if(b.a)throw Error("Already resolved.");b.a=void 0;b.b&&b.b(void 0)};function G(b){this.j=!1;this.c=b;this.o=new Map;this.l=function(b){return b()};this.g=!1;this.m=[];this.u=new D(b,document)}
G.prototype.define=function(b,a){var c=this;if(!(a instanceof Function))throw new TypeError("Custom element constructors must be functions.");if(!m(b))throw new SyntaxError("The element name '"+b+"' is not valid.");if(this.c.a.get(b))throw Error("A custom element with name '"+b+"' has already been defined.");if(this.j)throw Error("A custom element is already being defined.");this.j=!0;var d,e,f,r,k;try{var g=function(b){var a=l[b];if(void 0!==a&&!(a instanceof Function))throw Error("The '"+b+"' callback must be a function.");
return a},l=a.prototype;if(!(l instanceof Object))throw new TypeError("The custom element constructor's prototype is not an object.");d=g("connectedCallback");e=g("disconnectedCallback");f=g("adoptedCallback");r=g("attributeChangedCallback");k=a.observedAttributes||[]}catch(q){return}finally{this.j=!1}a={localName:b,constructor:a,connectedCallback:d,disconnectedCallback:e,adoptedCallback:f,attributeChangedCallback:r,observedAttributes:k,constructionStack:[]};ba(this.c,b,a);this.m.push(a);this.g||
(this.g=!0,this.l(function(){return da(c)}))};G.prototype.i=function(b){C(this.c,b)};function da(b){if(!1!==b.g){b.g=!1;for(var a=b.m,c=[],d=new Map,e=0;e<a.length;e++)d.set(a[e].localName,[]);C(b.c,document,{i:function(a){if(void 0===a.__CE_state){var e=a.localName,f=d.get(e);f?f.push(a):b.c.a.get(e)&&c.push(a)}}});for(e=0;e<c.length;e++)A(b.c,c[e]);for(;0<a.length;){for(var f=a.shift(),e=f.localName,f=d.get(f.localName),r=0;r<f.length;r++)A(b.c,f[r]);(e=b.o.get(e))&&F(e)}}}
G.prototype.get=function(b){if(b=this.c.a.get(b))return b.constructor};G.prototype.whenDefined=function(b){if(!m(b))return Promise.reject(new SyntaxError("'"+b+"' is not a valid custom element name."));var a=this.o.get(b);if(a)return a.f;a=new ca;this.o.set(b,a);this.c.a.get(b)&&!this.m.some(function(a){return a.localName===b})&&F(a);return a.f};G.prototype.v=function(b){E(this.u);var a=this.l;this.l=function(c){return b(function(){return a(c)})}};window.CustomElementRegistry=G;
G.prototype.define=G.prototype.define;G.prototype.upgrade=G.prototype.i;G.prototype.get=G.prototype.get;G.prototype.whenDefined=G.prototype.whenDefined;G.prototype.polyfillWrapFlushCallback=G.prototype.v;var H=window.Document.prototype.createElement,I=window.Document.prototype.createElementNS,ea=window.Document.prototype.importNode,fa=window.Document.prototype.prepend,ga=window.Document.prototype.append,ha=window.DocumentFragment.prototype.prepend,ia=window.DocumentFragment.prototype.append,J=window.Node.prototype.cloneNode,K=window.Node.prototype.appendChild,L=window.Node.prototype.insertBefore,M=window.Node.prototype.removeChild,N=window.Node.prototype.replaceChild,O=Object.getOwnPropertyDescriptor(window.Node.prototype,
"textContent"),P=window.Element.prototype.attachShadow,Q=Object.getOwnPropertyDescriptor(window.Element.prototype,"innerHTML"),R=window.Element.prototype.getAttribute,S=window.Element.prototype.setAttribute,T=window.Element.prototype.removeAttribute,U=window.Element.prototype.getAttributeNS,ja=window.Element.prototype.setAttributeNS,ka=window.Element.prototype.removeAttributeNS,la=window.Element.prototype.insertAdjacentElement,ma=window.Element.prototype.insertAdjacentHTML,na=window.Element.prototype.prepend,
oa=window.Element.prototype.append,V=window.Element.prototype.before,pa=window.Element.prototype.after,qa=window.Element.prototype.replaceWith,ra=window.Element.prototype.remove,sa=window.HTMLElement,W=Object.getOwnPropertyDescriptor(window.HTMLElement.prototype,"innerHTML"),ta=window.HTMLElement.prototype.insertAdjacentElement,ua=window.HTMLElement.prototype.insertAdjacentHTML;function va(){var b=X;window.HTMLElement=function(){function a(){var a=this.constructor,d=b.s.get(a);if(!d)throw Error("The custom element being constructed was not registered with `customElements`.");var e=d.constructionStack;if(!e.length)return e=H.call(document,d.localName),Object.setPrototypeOf(e,a.prototype),e.__CE_state=1,e.__CE_definition=d,y(b,e),e;var d=e.length-1,f=e[d];if(f===h)throw Error("The HTMLElement constructor was either called reentrantly for this constructor or called multiple times.");
e[d]=h;Object.setPrototypeOf(f,a.prototype);y(b,f);return f}a.prototype=sa.prototype;return a}()};function Y(b,a,c){function d(a){return function(c){for(var e=[],d=0;d<arguments.length;++d)e[d-0]=arguments[d];for(var d=[],f=[],l=0;l<e.length;l++){var q=e[l];q instanceof Element&&n(q)&&f.push(q);if(q instanceof DocumentFragment)for(q=q.firstChild;q;q=q.nextSibling)d.push(q);else d.push(q)}a.apply(this,e);for(e=0;e<f.length;e++)B(b,f[e]);if(n(this))for(e=0;e<d.length;e++)f=d[e],f instanceof Element&&z(b,f)}}c.h&&(a.prepend=d(c.h));c.append&&(a.append=d(c.append))};function wa(){var b=X;u(Document.prototype,"createElement",function(a){if(this.__CE_hasRegistry){var c=b.a.get(a);if(c)return new c.constructor}a=H.call(this,a);y(b,a);return a});u(Document.prototype,"importNode",function(a,c){a=ea.call(this,a,c);this.__CE_hasRegistry?C(b,a):x(b,a);return a});u(Document.prototype,"createElementNS",function(a,c){if(this.__CE_hasRegistry&&(null===a||"http://www.w3.org/1999/xhtml"===a)){var d=b.a.get(c);if(d)return new d.constructor}a=I.call(this,a,c);y(b,a);return a});
Y(b,Document.prototype,{h:fa,append:ga})};function xa(){var b=X;function a(a,d){Object.defineProperty(a,"textContent",{enumerable:d.enumerable,configurable:!0,get:d.get,set:function(a){if(this.nodeType===Node.TEXT_NODE)d.set.call(this,a);else{var e=void 0;if(this.firstChild){var c=this.childNodes,k=c.length;if(0<k&&n(this))for(var e=Array(k),g=0;g<k;g++)e[g]=c[g]}d.set.call(this,a);if(e)for(a=0;a<e.length;a++)B(b,e[a])}}})}u(Node.prototype,"insertBefore",function(a,d){if(a instanceof DocumentFragment){var e=Array.prototype.slice.apply(a.childNodes);
a=L.call(this,a,d);if(n(this))for(d=0;d<e.length;d++)z(b,e[d]);return a}e=n(a);d=L.call(this,a,d);e&&B(b,a);n(this)&&z(b,a);return d});u(Node.prototype,"appendChild",function(a){if(a instanceof DocumentFragment){var c=Array.prototype.slice.apply(a.childNodes);a=K.call(this,a);if(n(this))for(var e=0;e<c.length;e++)z(b,c[e]);return a}c=n(a);e=K.call(this,a);c&&B(b,a);n(this)&&z(b,a);return e});u(Node.prototype,"cloneNode",function(a){a=J.call(this,a);this.ownerDocument.__CE_hasRegistry?C(b,a):x(b,a);
return a});u(Node.prototype,"removeChild",function(a){var c=n(a),e=M.call(this,a);c&&B(b,a);return e});u(Node.prototype,"replaceChild",function(a,d){if(a instanceof DocumentFragment){var e=Array.prototype.slice.apply(a.childNodes);a=N.call(this,a,d);if(n(this))for(B(b,d),d=0;d<e.length;d++)z(b,e[d]);return a}var e=n(a),f=N.call(this,a,d),c=n(this);c&&B(b,d);e&&B(b,a);c&&z(b,a);return f});O&&O.get?a(Node.prototype,O):w(b,function(b){a(b,{enumerable:!0,configurable:!0,get:function(){for(var a=[],b=
0;b<this.childNodes.length;b++)a.push(this.childNodes[b].textContent);return a.join("")},set:function(a){for(;this.firstChild;)M.call(this,this.firstChild);K.call(this,document.createTextNode(a))}})})};function ya(b){var a=Element.prototype;function c(a){return function(e){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];for(var d=[],k=[],g=0;g<c.length;g++){var l=c[g];l instanceof Element&&n(l)&&k.push(l);if(l instanceof DocumentFragment)for(l=l.firstChild;l;l=l.nextSibling)d.push(l);else d.push(l)}a.apply(this,c);for(c=0;c<k.length;c++)B(b,k[c]);if(n(this))for(c=0;c<d.length;c++)k=d[c],k instanceof Element&&z(b,k)}}V&&(a.before=c(V));V&&(a.after=c(pa));qa&&u(a,"replaceWith",function(a){for(var e=
[],c=0;c<arguments.length;++c)e[c-0]=arguments[c];for(var c=[],d=[],k=0;k<e.length;k++){var g=e[k];g instanceof Element&&n(g)&&d.push(g);if(g instanceof DocumentFragment)for(g=g.firstChild;g;g=g.nextSibling)c.push(g);else c.push(g)}k=n(this);qa.apply(this,e);for(e=0;e<d.length;e++)B(b,d[e]);if(k)for(B(b,this),e=0;e<c.length;e++)d=c[e],d instanceof Element&&z(b,d)});ra&&u(a,"remove",function(){var a=n(this);ra.call(this);a&&B(b,this)})};function za(){var b=X;function a(a,c){Object.defineProperty(a,"innerHTML",{enumerable:c.enumerable,configurable:!0,get:c.get,set:function(a){var e=this,d=void 0;n(this)&&(d=[],t(this,function(a){a!==e&&d.push(a)}));c.set.call(this,a);if(d)for(var f=0;f<d.length;f++){var r=d[f];1===r.__CE_state&&b.disconnectedCallback(r)}this.ownerDocument.__CE_hasRegistry?C(b,this):x(b,this);return a}})}function c(a,c){u(a,"insertAdjacentElement",function(a,e){var d=n(e);a=c.call(this,a,e);d&&B(b,e);n(a)&&z(b,e);
return a})}function d(a,c){function e(a,e){for(var c=[];a!==e;a=a.nextSibling)c.push(a);for(e=0;e<c.length;e++)C(b,c[e])}u(a,"insertAdjacentHTML",function(a,b){a=a.toLowerCase();if("beforebegin"===a){var d=this.previousSibling;c.call(this,a,b);e(d||this.parentNode.firstChild,this)}else if("afterbegin"===a)d=this.firstChild,c.call(this,a,b),e(this.firstChild,d);else if("beforeend"===a)d=this.lastChild,c.call(this,a,b),e(d||this.firstChild,null);else if("afterend"===a)d=this.nextSibling,c.call(this,
a,b),e(this.nextSibling,d);else throw new SyntaxError("The value provided ("+String(a)+") is not one of 'beforebegin', 'afterbegin', 'beforeend', or 'afterend'.");})}P&&u(Element.prototype,"attachShadow",function(a){return this.__CE_shadowRoot=a=P.call(this,a)});Q&&Q.get?a(Element.prototype,Q):W&&W.get?a(HTMLElement.prototype,W):w(b,function(b){a(b,{enumerable:!0,configurable:!0,get:function(){return J.call(this,!0).innerHTML},set:function(a){var b="template"===this.localName,e=b?this.content:this,
c=I.call(document,this.namespaceURI,this.localName);for(c.innerHTML=a;0<e.childNodes.length;)M.call(e,e.childNodes[0]);for(a=b?c.content:c;0<a.childNodes.length;)K.call(e,a.childNodes[0])}})});u(Element.prototype,"setAttribute",function(a,c){if(1!==this.__CE_state)return S.call(this,a,c);var e=R.call(this,a);S.call(this,a,c);c=R.call(this,a);b.attributeChangedCallback(this,a,e,c,null)});u(Element.prototype,"setAttributeNS",function(a,c,d){if(1!==this.__CE_state)return ja.call(this,a,c,d);var e=U.call(this,
a,c);ja.call(this,a,c,d);d=U.call(this,a,c);b.attributeChangedCallback(this,c,e,d,a)});u(Element.prototype,"removeAttribute",function(a){if(1!==this.__CE_state)return T.call(this,a);var c=R.call(this,a);T.call(this,a);null!==c&&b.attributeChangedCallback(this,a,c,null,null)});u(Element.prototype,"removeAttributeNS",function(a,c){if(1!==this.__CE_state)return ka.call(this,a,c);var d=U.call(this,a,c);ka.call(this,a,c);var e=U.call(this,a,c);d!==e&&b.attributeChangedCallback(this,c,d,e,a)});ta?c(HTMLElement.prototype,
ta):la?c(Element.prototype,la):console.warn("Custom Elements: `Element#insertAdjacentElement` was not patched.");ua?d(HTMLElement.prototype,ua):ma?d(Element.prototype,ma):console.warn("Custom Elements: `Element#insertAdjacentHTML` was not patched.");Y(b,Element.prototype,{h:na,append:oa});ya(b)};/*
Copyright (c) 2016 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
var Z=window.customElements;if(!Z||Z.forcePolyfill||"function"!=typeof Z.define||"function"!=typeof Z.get){var X=new v;va();wa();Y(X,DocumentFragment.prototype,{h:ha,append:ia});xa();za();document.__CE_hasRegistry=!0;var customElements=new G(X);Object.defineProperty(window,"customElements",{configurable:!0,enumerable:!0,value:customElements})};
}).call(self);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
!function(e){"use strict";function t(){"complete"===document.readyState?n():e.addEventListener("DOMContentLoaded",n)}function n(){try{var e=document.querySelectorAll("code.hljs:not(.bash)");for(var t in e)e.hasOwnProperty(t)&&r(e[t])}catch(n){console.error("LineNumbers error: ",n)}}function r(e){if("object"==typeof e){var t=e.parentNode,n=o(t.outerText);if(n>1){for(var r="",c=0;n>c;c++)r+=c+1+"\n";var l=document.createElement("code");l.className="hljs hljs-line-numbers",l.style["float"]="left",l.textContent=r,t.insertBefore(l,e)}}}function o(e){if(0===e.length)return 0;var t=/\r\n|\r|\n/g,n=e.match(t);return n=n?n.length:0,e[e.length-1].match(t)||(n+=1),n}"undefined"==typeof e.hljs?console.error("highlight.js not detected!"):(e.hljs.initLineNumbersOnLoad=t,e.hljs.lineNumbersBlock=r)}(window);

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,9 @@
/**
* innerHTML property for SVGElement
* Copyright(c) 2010, Jeff Schiller
*
* Licensed under the Apache License, Version 2
*
* Minor modifications by Chris Price to only polyfill when required.
*/
!function(e){if(e&&!("innerHTML"in e.prototype)){var t=function(e,r){var i=e.nodeType;if(3==i)r.push(e.textContent.replace(/&/,"&amp;").replace(/</,"&lt;").replace(">","&gt;"));else if(1==i){if(r.push("<",e.tagName),e.hasAttributes())for(var n=e.attributes,s=0,o=n.length;s<o;++s){var a=n.item(s);r.push(" ",a.name,"='",a.value,"'")}if(e.hasChildNodes()){r.push(">");for(var h=e.childNodes,s=0,o=h.length;s<o;++s)t(h.item(s),r);r.push("</",e.tagName,">")}else r.push("/>")}else{if(8!=i)throw"Error serializing XML. Unhandled node of type: "+i;r.push("\x3c!--",e.nodeValue,"--\x3e")}};Object.defineProperty(e.prototype,"innerHTML",{get:function(){for(var e=[],r=this.firstChild;r;)t(r,e),r=r.nextSibling;return e.join("")},set:function(e){for(;this.firstChild;)this.removeChild(this.firstChild);try{var t=new DOMParser;t.async=!1,sXML="<svg xmlns='http://www.w3.org/2000/svg'>"+e+"</svg>";for(var r=t.parseFromString(sXML,"text/xml").documentElement.firstChild;r;)this.appendChild(this.ownerDocument.importNode(r,!0)),r=r.nextSibling}catch(e){throw new Error("Error parsing XML string")}}})}}((0,eval)("this").SVGElement);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,6 @@
/*
* Copyright 2012-2013 (c) Pierre Duquesne <stackp@online.fr>
* Licensed under the New BSD License.
* https://github.com/stackp/promisejs
*/
(function(a){function b(){this._callbacks=[];}b.prototype.then=function(a,c){var d;if(this._isdone)d=a.apply(c,this.result);else{d=new b();this._callbacks.push(function(){var b=a.apply(c,arguments);if(b&&typeof b.then==='function')b.then(d.done,d);});}return d;};b.prototype.done=function(){this.result=arguments;this._isdone=true;for(var a=0;a<this._callbacks.length;a++)this._callbacks[a].apply(null,arguments);this._callbacks=[];};function c(a){var c=new b();var d=[];if(!a||!a.length){c.done(d);return c;}var e=0;var f=a.length;function g(a){return function(){e+=1;d[a]=Array.prototype.slice.call(arguments);if(e===f)c.done(d);};}for(var h=0;h<f;h++)a[h].then(g(h));return c;}function d(a,c){var e=new b();if(a.length===0)e.done.apply(e,c);else a[0].apply(null,c).then(function(){a.splice(0,1);d(a,arguments).then(function(){e.done.apply(e,arguments);});});return e;}function e(a){var b="";if(typeof a==="string")b=a;else{var c=encodeURIComponent;var d=[];for(var e in a)if(a.hasOwnProperty(e))d.push(c(e)+'='+c(a[e]));b=d.join('&');}return b;}function f(){var a;if(window.XMLHttpRequest)a=new XMLHttpRequest();else if(window.ActiveXObject)try{a=new ActiveXObject("Msxml2.XMLHTTP");}catch(b){a=new ActiveXObject("Microsoft.XMLHTTP");}return a;}function g(a,c,d,g){var h=new b();var j,k;d=d||{};g=g||{};try{j=f();}catch(l){h.done(i.ENOXHR,"");return h;}k=e(d);if(a==='GET'&&k){c+='?'+k;k=null;}j.open(a,c);var m='application/x-www-form-urlencoded';for(var n in g)if(g.hasOwnProperty(n))if(n.toLowerCase()==='content-type')m=g[n];else j.setRequestHeader(n,g[n]);j.setRequestHeader('Content-type',m);function o(){j.abort();h.done(i.ETIMEOUT,"",j);}var p=i.ajaxTimeout;if(p)var q=setTimeout(o,p);j.onreadystatechange=function(){if(p)clearTimeout(q);if(j.readyState===4){var a=(!j.status||(j.status<200||j.status>=300)&&j.status!==304);h.done(a,j.responseText,j);}};j.send(k);return h;}function h(a){return function(b,c,d){return g(a,b,c,d);};}var i={Promise:b,join:c,chain:d,ajax:g,get:h('GET'),post:h('POST'),put:h('PUT'),del:h('DELETE'),ENOXHR:1,ETIMEOUT:2,ajaxTimeout:0};if(typeof define==='function'&&define.amd)define(function(){return i;});else a.promise=i;})(this);

View File

@@ -0,0 +1,782 @@
// svg-pan-zoom v3.2.5
// https://github.com/ariutta/svg-pan-zoom
! function t(e, o, n) {
function i(r, a) {
if (!o[r]) {
if (!e[r]) {
var l = "function" == typeof require && require;
if (!a && l) return l(r, !0);
if (s) return s(r, !0);
var u = new Error("Cannot find module '" + r + "'");
throw u.code = "MODULE_NOT_FOUND", u
}
var h = o[r] = {
exports: {}
};
e[r][0].call(h.exports, function(t) {
var o = e[r][1][t];
return i(o ? o : t)
}, h, h.exports, t, e, o, n)
}
return o[r].exports
}
for (var s = "function" == typeof require && require, r = 0; r < n.length; r++) i(n[r]);
return i
}({
1: [function(t, e) {
var o = t("./svg-pan-zoom.js");
! function(t) {
"function" == typeof define && define.amd ? define("svg-pan-zoom", function() {
return o
}) : "undefined" != typeof e && e.exports && (e.exports = o, t.svgPanZoom = o)
}(window, document)
}, {
"./svg-pan-zoom.js": 4
}],
2: [function(t, e) {
var o = t("./svg-utilities");
e.exports = {
enable: function(t) {
var e = t.svg.querySelector("defs");
e || (e = document.createElementNS(o.svgNS, "defs"), t.svg.appendChild(e));
var n = document.createElementNS(o.svgNS, "style");
n.setAttribute("type", "text/css"), n.textContent = ".svg-pan-zoom-control { cursor: pointer; fill: black; fill-opacity: 0.333; } .svg-pan-zoom-control:hover { fill-opacity: 0.8; } .svg-pan-zoom-control-background { fill: white; fill-opacity: 0.5; } .svg-pan-zoom-control-background { fill-opacity: 0.8; }", e.appendChild(n);
var i = document.createElementNS(o.svgNS, "g");
i.setAttribute("id", "svg-pan-zoom-controls"), i.setAttribute("transform", "translate(" + (t.width - 70) + " " + (t.height - 76) + ") scale(0.75)"), i.setAttribute("class", "svg-pan-zoom-control"), i.appendChild(this._createZoomIn(t)), i.appendChild(this._createZoomReset(t)), i.appendChild(this._createZoomOut(t)), t.svg.appendChild(i), t.controlIcons = i
},
_createZoomIn: function(t) {
var e = document.createElementNS(o.svgNS, "g");
e.setAttribute("id", "svg-pan-zoom-zoom-in"), e.setAttribute("transform", "translate(30.5 5) scale(0.015)"), e.setAttribute("class", "svg-pan-zoom-control"), e.addEventListener("click", function() {
t.getPublicInstance().zoomIn()
}, !1), e.addEventListener("touchstart", function() {
t.getPublicInstance().zoomIn()
}, !1);
var n = document.createElementNS(o.svgNS, "rect");
n.setAttribute("x", "0"), n.setAttribute("y", "0"), n.setAttribute("width", "1500"), n.setAttribute("height", "1400"), n.setAttribute("class", "svg-pan-zoom-control-background"), e.appendChild(n);
var i = document.createElementNS(o.svgNS, "path");
return i.setAttribute("d", "M1280 576v128q0 26 -19 45t-45 19h-320v320q0 26 -19 45t-45 19h-128q-26 0 -45 -19t-19 -45v-320h-320q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h320v-320q0 -26 19 -45t45 -19h128q26 0 45 19t19 45v320h320q26 0 45 19t19 45zM1536 1120v-960 q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5t84.5 -203.5z"), i.setAttribute("class", "svg-pan-zoom-control-element"), e.appendChild(i), e
},
_createZoomReset: function(t) {
var e = document.createElementNS(o.svgNS, "g");
e.setAttribute("id", "svg-pan-zoom-reset-pan-zoom"), e.setAttribute("transform", "translate(5 35) scale(0.4)"), e.setAttribute("class", "svg-pan-zoom-control"), e.addEventListener("click", function() {
t.getPublicInstance().reset()
}, !1), e.addEventListener("touchstart", function() {
t.getPublicInstance().reset()
}, !1);
var n = document.createElementNS(o.svgNS, "rect");
n.setAttribute("x", "2"), n.setAttribute("y", "2"), n.setAttribute("width", "182"), n.setAttribute("height", "58"), n.setAttribute("class", "svg-pan-zoom-control-background"), e.appendChild(n);
var i = document.createElementNS(o.svgNS, "path");
i.setAttribute("d", "M33.051,20.632c-0.742-0.406-1.854-0.609-3.338-0.609h-7.969v9.281h7.769c1.543,0,2.701-0.188,3.473-0.562c1.365-0.656,2.048-1.953,2.048-3.891C35.032,22.757,34.372,21.351,33.051,20.632z"), i.setAttribute("class", "svg-pan-zoom-control-element"), e.appendChild(i);
var s = document.createElementNS(o.svgNS, "path");
return s.setAttribute("d", "M170.231,0.5H15.847C7.102,0.5,0.5,5.708,0.5,11.84v38.861C0.5,56.833,7.102,61.5,15.847,61.5h154.384c8.745,0,15.269-4.667,15.269-10.798V11.84C185.5,5.708,178.976,0.5,170.231,0.5z M42.837,48.569h-7.969c-0.219-0.766-0.375-1.383-0.469-1.852c-0.188-0.969-0.289-1.961-0.305-2.977l-0.047-3.211c-0.03-2.203-0.41-3.672-1.142-4.406c-0.732-0.734-2.103-1.102-4.113-1.102h-7.05v13.547h-7.055V14.022h16.524c2.361,0.047,4.178,0.344,5.45,0.891c1.272,0.547,2.351,1.352,3.234,2.414c0.731,0.875,1.31,1.844,1.737,2.906s0.64,2.273,0.64,3.633c0,1.641-0.414,3.254-1.242,4.84s-2.195,2.707-4.102,3.363c1.594,0.641,2.723,1.551,3.387,2.73s0.996,2.98,0.996,5.402v2.32c0,1.578,0.063,2.648,0.19,3.211c0.19,0.891,0.635,1.547,1.333,1.969V48.569z M75.579,48.569h-26.18V14.022h25.336v6.117H56.454v7.336h16.781v6H56.454v8.883h19.125V48.569z M104.497,46.331c-2.44,2.086-5.887,3.129-10.34,3.129c-4.548,0-8.125-1.027-10.731-3.082s-3.909-4.879-3.909-8.473h6.891c0.224,1.578,0.662,2.758,1.316,3.539c1.196,1.422,3.246,2.133,6.15,2.133c1.739,0,3.151-0.188,4.236-0.562c2.058-0.719,3.087-2.055,3.087-4.008c0-1.141-0.504-2.023-1.512-2.648c-1.008-0.609-2.607-1.148-4.796-1.617l-3.74-0.82c-3.676-0.812-6.201-1.695-7.576-2.648c-2.328-1.594-3.492-4.086-3.492-7.477c0-3.094,1.139-5.664,3.417-7.711s5.623-3.07,10.036-3.07c3.685,0,6.829,0.965,9.431,2.895c2.602,1.93,3.966,4.73,4.093,8.402h-6.938c-0.128-2.078-1.057-3.555-2.787-4.43c-1.154-0.578-2.587-0.867-4.301-0.867c-1.907,0-3.428,0.375-4.565,1.125c-1.138,0.75-1.706,1.797-1.706,3.141c0,1.234,0.561,2.156,1.682,2.766c0.721,0.406,2.25,0.883,4.589,1.43l6.063,1.43c2.657,0.625,4.648,1.461,5.975,2.508c2.059,1.625,3.089,3.977,3.089,7.055C108.157,41.624,106.937,44.245,104.497,46.331z M139.61,48.569h-26.18V14.022h25.336v6.117h-18.281v7.336h16.781v6h-16.781v8.883h19.125V48.569z M170.337,20.14h-10.336v28.43h-7.266V20.14h-10.383v-6.117h27.984V20.14z"), s.setAttribute("class", "svg-pan-zoom-control-element"), e.appendChild(s), e
},
_createZoomOut: function(t) {
var e = document.createElementNS(o.svgNS, "g");
e.setAttribute("id", "svg-pan-zoom-zoom-out"), e.setAttribute("transform", "translate(30.5 70) scale(0.015)"), e.setAttribute("class", "svg-pan-zoom-control"), e.addEventListener("click", function() {
t.getPublicInstance().zoomOut()
}, !1), e.addEventListener("touchstart", function() {
t.getPublicInstance().zoomOut()
}, !1);
var n = document.createElementNS(o.svgNS, "rect");
n.setAttribute("x", "0"), n.setAttribute("y", "0"), n.setAttribute("width", "1500"), n.setAttribute("height", "1400"), n.setAttribute("class", "svg-pan-zoom-control-background"), e.appendChild(n);
var i = document.createElementNS(o.svgNS, "path");
return i.setAttribute("d", "M1280 576v128q0 26 -19 45t-45 19h-896q-26 0 -45 -19t-19 -45v-128q0 -26 19 -45t45 -19h896q26 0 45 19t19 45zM1536 1120v-960q0 -119 -84.5 -203.5t-203.5 -84.5h-960q-119 0 -203.5 84.5t-84.5 203.5v960q0 119 84.5 203.5t203.5 84.5h960q119 0 203.5 -84.5 t84.5 -203.5z"), i.setAttribute("class", "svg-pan-zoom-control-element"), e.appendChild(i), e
},
disable: function(t) {
t.controlIcons && (t.controlIcons.parentNode.removeChild(t.controlIcons), t.controlIcons = null)
}
}
}, {
"./svg-utilities": 5
}],
3: [function(t, e) {
var o = t("./svg-utilities"),
n = t("./utilities"),
i = function(t, e) {
this.init(t, e)
};
i.prototype.init = function(t, e) {
this.viewport = t, this.options = e, this.originalState = {
zoom: 1,
x: 0,
y: 0
}, this.activeState = {
zoom: 1,
x: 0,
y: 0
}, this.updateCTMCached = n.proxy(this.updateCTM, this), this.requestAnimationFrame = n.createRequestAnimationFrame(this.options.refreshRate), this.viewBox = {
x: 0,
y: 0,
width: 0,
height: 0
}, this.cacheViewBox(), this.processCTM(), this.updateCTM()
}, i.prototype.cacheViewBox = function() {
var t = this.options.svg.getAttribute("viewBox");
if (t) {
var e = t.split(/[\s\,]/).filter(function(t) {
return t
}).map(parseFloat);
this.viewBox.x = e[0], this.viewBox.y = e[1], this.viewBox.width = e[2], this.viewBox.height = e[3];
var o = Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height);
this.activeState.zoom = o, this.activeState.x = (this.options.width - this.viewBox.width * o) / 2, this.activeState.y = (this.options.height - this.viewBox.height * o) / 2, this.updateCTMOnNextFrame(), this.options.svg.removeAttribute("viewBox")
} else {
var n = this.viewport.getBBox();
this.viewBox.x = n.x, this.viewBox.y = n.y, this.viewBox.width = n.width, this.viewBox.height = n.height
}
}, i.prototype.recacheViewBox = function() {
var t = this.viewport.getBoundingClientRect(),
e = t.width / this.getZoom(),
o = t.height / this.getZoom();
this.viewBox.x = 0, this.viewBox.y = 0, this.viewBox.width = e, this.viewBox.height = o
}, i.prototype.getViewBox = function() {
return n.extend({}, this.viewBox)
}, i.prototype.processCTM = function() {
var t = this.getCTM();
if (this.options.fit || this.options.contain) {
var e;
e = this.options.fit ? Math.min(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height) : Math.max(this.options.width / this.viewBox.width, this.options.height / this.viewBox.height), t.a = e, t.d = e, t.e = -this.viewBox.x * e, t.f = -this.viewBox.y * e
}
if (this.options.center) {
var o = .5 * (this.options.width - (this.viewBox.width + 2 * this.viewBox.x) * t.a),
n = .5 * (this.options.height - (this.viewBox.height + 2 * this.viewBox.y) * t.a);
t.e = o, t.f = n
}
this.originalState.zoom = t.a, this.originalState.x = t.e, this.originalState.y = t.f, this.setCTM(t)
}, i.prototype.getOriginalState = function() {
return n.extend({}, this.originalState)
}, i.prototype.getState = function() {
return n.extend({}, this.activeState)
}, i.prototype.getZoom = function() {
return this.activeState.zoom
}, i.prototype.getRelativeZoom = function() {
return this.activeState.zoom / this.originalState.zoom
}, i.prototype.computeRelativeZoom = function(t) {
return t / this.originalState.zoom
}, i.prototype.getPan = function() {
return {
x: this.activeState.x,
y: this.activeState.y
}
}, i.prototype.getCTM = function() {
var t = this.options.svg.createSVGMatrix();
return t.a = this.activeState.zoom, t.b = 0, t.c = 0, t.d = this.activeState.zoom, t.e = this.activeState.x, t.f = this.activeState.y, t
}, i.prototype.setCTM = function(t) {
var e = this.isZoomDifferent(t),
o = this.isPanDifferent(t);
if (e || o) {
if (e && this.options.beforeZoom(this.getRelativeZoom(), this.computeRelativeZoom(t.a)) === !1 && (t.a = t.d = this.activeState.zoom, e = !1), o) {
var i = this.options.beforePan(this.getPan(), {
x: t.e,
y: t.f
}),
s = !1,
r = !1;
i === !1 ? (t.e = this.getPan().x, t.f = this.getPan().y, s = r = !0) : n.isObject(i) && (i.x === !1 ? (t.e = this.getPan().x, s = !0) : n.isNumber(i.x) && (t.e = i.x), i.y === !1 ? (t.f = this.getPan().y, r = !0) : n.isNumber(i.y) && (t.f = i.y)), s && r && (o = !1)
}(e || o) && (this.updateCache(t), this.updateCTMOnNextFrame(), e && this.options.onZoom(this.getRelativeZoom()), o && this.options.onPan(this.getPan()))
}
}, i.prototype.isZoomDifferent = function(t) {
return this.activeState.zoom !== t.a
}, i.prototype.isPanDifferent = function(t) {
return this.activeState.x !== t.e || this.activeState.y !== t.f
}, i.prototype.updateCache = function(t) {
this.activeState.zoom = t.a, this.activeState.x = t.e, this.activeState.y = t.f
}, i.prototype.pendingUpdate = !1, i.prototype.updateCTMOnNextFrame = function() {
this.pendingUpdate || (this.pendingUpdate = !0, this.requestAnimationFrame.call(window, this.updateCTMCached))
}, i.prototype.updateCTM = function() {
o.setCTM(this.viewport, this.getCTM(), this.defs), this.pendingUpdate = !1
}, e.exports = function(t, e) {
return new i(t, e)
}
}, {
"./svg-utilities": 5,
"./utilities": 7
}],
4: [function(t, e) {
var o = t("./uniwheel"),
n = t("./control-icons"),
i = t("./utilities"),
s = t("./svg-utilities"),
r = t("./shadow-viewport"),
a = function(t, e) {
this.init(t, e)
},
l = {
viewportSelector: ".svg-pan-zoom_viewport",
panEnabled: !0,
controlIconsEnabled: !1,
zoomEnabled: !0,
dblClickZoomEnabled: !0,
mouseWheelZoomEnabled: !0,
preventMouseEventsDefault: !0,
zoomScaleSensitivity: .1,
minZoom: .5,
maxZoom: 10,
fit: !0,
contain: !1,
center: !0,
refreshRate: "auto",
beforeZoom: null,
onZoom: null,
beforePan: null,
onPan: null,
customEventsHandler: null,
eventsListenerElement: null
};
a.prototype.init = function(t, e) {
var o = this;
this.svg = t, this.defs = t.querySelector("defs"), s.setupSvgAttributes(this.svg), this.options = i.extend(i.extend({}, l), e), this.state = "none";
var a = s.getBoundingClientRectNormalized(t);
this.width = a.width, this.height = a.height, this.viewport = r(s.getOrCreateViewport(this.svg, this.options.viewportSelector), {
svg: this.svg,
width: this.width,
height: this.height,
fit: this.options.fit,
contain: this.options.contain,
center: this.options.center,
refreshRate: this.options.refreshRate,
beforeZoom: function(t, e) {
return o.viewport && o.options.beforeZoom ? o.options.beforeZoom(t, e) : void 0
},
onZoom: function(t) {
return o.viewport && o.options.onZoom ? o.options.onZoom(t) : void 0
},
beforePan: function(t, e) {
return o.viewport && o.options.beforePan ? o.options.beforePan(t, e) : void 0
},
onPan: function(t) {
return o.viewport && o.options.onPan ? o.options.onPan(t) : void 0
}
});
var u = this.getPublicInstance();
u.setBeforeZoom(this.options.beforeZoom), u.setOnZoom(this.options.onZoom), u.setBeforePan(this.options.beforePan), u.setOnPan(this.options.onPan), this.options.controlIconsEnabled && n.enable(this), this.lastMouseWheelEventTime = Date.now(), this.setupHandlers()
}, a.prototype.setupHandlers = function() {
var t = this,
e = null;
if (this.eventListeners = {
mousedown: function(e) {
return t.handleMouseDown(e, null)
},
touchstart: function(o) {
var n = t.handleMouseDown(o, e);
return e = o, n
},
mouseup: function(e) {
return t.handleMouseUp(e)
},
touchend: function(e) {
return t.handleMouseUp(e)
},
mousemove: function(e) {
return t.handleMouseMove(e)
},
touchmove: function(e) {
return t.handleMouseMove(e)
},
mouseleave: function(e) {
return t.handleMouseUp(e)
},
touchleave: function(e) {
return t.handleMouseUp(e)
},
touchcancel: function(e) {
return t.handleMouseUp(e)
}
}, null != this.options.customEventsHandler) {
this.options.customEventsHandler.init({
svgElement: this.svg,
eventsListenerElement: this.options.eventsListenerElement,
instance: this.getPublicInstance()
});
var o = this.options.customEventsHandler.haltEventListeners;
if (o && o.length)
for (var n = o.length - 1; n >= 0; n--) this.eventListeners.hasOwnProperty(o[n]) && delete this.eventListeners[o[n]]
}
for (var i in this.eventListeners)(this.options.eventsListenerElement || this.svg).addEventListener(i, this.eventListeners[i], !1);
this.options.mouseWheelZoomEnabled && (this.options.mouseWheelZoomEnabled = !1, this.enableMouseWheelZoom())
}, a.prototype.enableMouseWheelZoom = function() {
if (!this.options.mouseWheelZoomEnabled) {
var t = this;
this.wheelListener = function(e) {
return t.handleMouseWheel(e)
}, o.on(this.options.eventsListenerElement || this.svg, this.wheelListener, !1), this.options.mouseWheelZoomEnabled = !0
}
}, a.prototype.disableMouseWheelZoom = function() {
this.options.mouseWheelZoomEnabled && (o.off(this.options.eventsListenerElement || this.svg, this.wheelListener, !1), this.options.mouseWheelZoomEnabled = !1)
}, a.prototype.handleMouseWheel = function(t) {
if (this.options.zoomEnabled && "none" === this.state) {
this.options.preventMouseEventsDefault && (t.preventDefault ? t.preventDefault() : t.returnValue = !1);
var e = t.deltaY || 1,
o = Date.now() - this.lastMouseWheelEventTime,
n = 3 + Math.max(0, 30 - o);
this.lastMouseWheelEventTime = Date.now(), "deltaMode" in t && 0 === t.deltaMode && t.wheelDelta && (e = 0 === t.deltaY ? 0 : Math.abs(t.wheelDelta) / t.deltaY), e = e > -.3 && .3 > e ? e : (e > 0 ? 1 : -1) * Math.log(Math.abs(e) + 10) / n;
var i = this.svg.getScreenCTM().inverse(),
r = s.getEventPoint(t, this.svg).matrixTransform(i),
a = Math.pow(1 + this.options.zoomScaleSensitivity, -1 * e);
this.zoomAtPoint(a, r)
}
}, a.prototype.zoomAtPoint = function(t, e, o) {
var n = this.viewport.getOriginalState();
o ? (t = Math.max(this.options.minZoom * n.zoom, Math.min(this.options.maxZoom * n.zoom, t)), t /= this.getZoom()) : this.getZoom() * t < this.options.minZoom * n.zoom ? t = this.options.minZoom * n.zoom / this.getZoom() : this.getZoom() * t > this.options.maxZoom * n.zoom && (t = this.options.maxZoom * n.zoom / this.getZoom());
var i = this.viewport.getCTM(),
s = e.matrixTransform(i.inverse()),
r = this.svg.createSVGMatrix().translate(s.x, s.y).scale(t).translate(-s.x, -s.y),
a = i.multiply(r);
a.a !== i.a && this.viewport.setCTM(a)
}, a.prototype.zoom = function(t, e) {
this.zoomAtPoint(t, s.getSvgCenterPoint(this.svg, this.width, this.height), e)
}, a.prototype.publicZoom = function(t, e) {
e && (t = this.computeFromRelativeZoom(t)), this.zoom(t, e)
}, a.prototype.publicZoomAtPoint = function(t, e, o) {
if (o && (t = this.computeFromRelativeZoom(t)), !("SVGPoint" !== i.getType(e) && "x" in e && "y" in e)) throw new Error("Given point is invalid");
e = s.createSVGPoint(this.svg, e.x, e.y), this.zoomAtPoint(t, e, o)
}, a.prototype.getZoom = function() {
return this.viewport.getZoom()
}, a.prototype.getRelativeZoom = function() {
return this.viewport.getRelativeZoom()
}, a.prototype.computeFromRelativeZoom = function(t) {
return t * this.viewport.getOriginalState().zoom
}, a.prototype.resetZoom = function() {
var t = this.viewport.getOriginalState();
this.zoom(t.zoom, !0)
}, a.prototype.resetPan = function() {
this.pan(this.viewport.getOriginalState())
}, a.prototype.reset = function() {
this.resetZoom(), this.resetPan()
}, a.prototype.handleDblClick = function(t) {
if (this.options.preventMouseEventsDefault && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), this.options.controlIconsEnabled) {
var e = t.target.getAttribute("class") || "";
if (e.indexOf("svg-pan-zoom-control") > -1) return !1
}
var o;
o = t.shiftKey ? 1 / (2 * (1 + this.options.zoomScaleSensitivity)) : 2 * (1 + this.options.zoomScaleSensitivity);
var n = s.getEventPoint(t, this.svg).matrixTransform(this.svg.getScreenCTM().inverse());
this.zoomAtPoint(o, n)
}, a.prototype.handleMouseDown = function(t, e) {
this.options.preventMouseEventsDefault && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), i.mouseAndTouchNormalize(t, this.svg), this.options.dblClickZoomEnabled && i.isDblClick(t, e) ? this.handleDblClick(t) : (this.state = "pan", this.firstEventCTM = this.viewport.getCTM(), this.stateOrigin = s.getEventPoint(t, this.svg).matrixTransform(this.firstEventCTM.inverse()))
}, a.prototype.handleMouseMove = function(t) {
if (this.options.preventMouseEventsDefault && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), "pan" === this.state && this.options.panEnabled) {
var e = s.getEventPoint(t, this.svg).matrixTransform(this.firstEventCTM.inverse()),
o = this.firstEventCTM.translate(e.x - this.stateOrigin.x, e.y - this.stateOrigin.y);
this.viewport.setCTM(o)
}
}, a.prototype.handleMouseUp = function(t) {
this.options.preventMouseEventsDefault && (t.preventDefault ? t.preventDefault() : t.returnValue = !1), "pan" === this.state && (this.state = "none")
}, a.prototype.fit = function() {
var t = this.viewport.getViewBox(),
e = Math.min(this.width / t.width, this.height / t.height);
this.zoom(e, !0)
}, a.prototype.contain = function() {
var t = this.viewport.getViewBox(),
e = Math.max(this.width / t.width, this.height / t.height);
this.zoom(e, !0)
}, a.prototype.center = function() {
var t = this.viewport.getViewBox(),
e = .5 * (this.width - (t.width + 2 * t.x) * this.getZoom()),
o = .5 * (this.height - (t.height + 2 * t.y) * this.getZoom());
this.getPublicInstance().pan({
x: e,
y: o
})
}, a.prototype.updateBBox = function() {
this.viewport.recacheViewBox()
}, a.prototype.pan = function(t) {
var e = this.viewport.getCTM();
e.e = t.x, e.f = t.y, this.viewport.setCTM(e)
}, a.prototype.panBy = function(t) {
var e = this.viewport.getCTM();
e.e += t.x, e.f += t.y, this.viewport.setCTM(e)
}, a.prototype.getPan = function() {
var t = this.viewport.getState();
return {
x: t.x,
y: t.y
}
}, a.prototype.resize = function() {
var t = s.getBoundingClientRectNormalized(this.svg);
this.width = t.width, this.height = t.height, this.options.controlIconsEnabled && (this.getPublicInstance().disableControlIcons(), this.getPublicInstance().enableControlIcons())
}, a.prototype.destroy = function() {
var t = this;
this.beforeZoom = null, this.onZoom = null, this.beforePan = null, this.onPan = null, null != this.options.customEventsHandler && this.options.customEventsHandler.destroy({
svgElement: this.svg,
eventsListenerElement: this.options.eventsListenerElement,
instance: this.getPublicInstance()
});
for (var e in this.eventListeners)(this.options.eventsListenerElement || this.svg).removeEventListener(e, this.eventListeners[e], !1);
this.disableMouseWheelZoom(), this.getPublicInstance().disableControlIcons(), this.reset(), u = u.filter(function(e) {
return e.svg !== t.svg
}), delete this.options, delete this.publicInstance, delete this.pi, this.getPublicInstance = function() {
return null
}
}, a.prototype.getPublicInstance = function() {
var t = this;
return this.publicInstance || (this.publicInstance = this.pi = {
enablePan: function() {
return t.options.panEnabled = !0, t.pi
},
disablePan: function() {
return t.options.panEnabled = !1, t.pi
},
isPanEnabled: function() {
return !!t.options.panEnabled
},
pan: function(e) {
return t.pan(e), t.pi
},
panBy: function(e) {
return t.panBy(e), t.pi
},
getPan: function() {
return t.getPan()
},
setBeforePan: function(e) {
return t.options.beforePan = null === e ? null : i.proxy(e, t.publicInstance), t.pi
},
setOnPan: function(e) {
return t.options.onPan = null === e ? null : i.proxy(e, t.publicInstance), t.pi
},
enableZoom: function() {
return t.options.zoomEnabled = !0, t.pi
},
disableZoom: function() {
return t.options.zoomEnabled = !1, t.pi
},
isZoomEnabled: function() {
return !!t.options.zoomEnabled
},
enableControlIcons: function() {
return t.options.controlIconsEnabled || (t.options.controlIconsEnabled = !0, n.enable(t)), t.pi
},
disableControlIcons: function() {
return t.options.controlIconsEnabled && (t.options.controlIconsEnabled = !1, n.disable(t)), t.pi
},
isControlIconsEnabled: function() {
return !!t.options.controlIconsEnabled
},
enableDblClickZoom: function() {
return t.options.dblClickZoomEnabled = !0, t.pi
},
disableDblClickZoom: function() {
return t.options.dblClickZoomEnabled = !1, t.pi
},
isDblClickZoomEnabled: function() {
return !!t.options.dblClickZoomEnabled
},
enableMouseWheelZoom: function() {
return t.enableMouseWheelZoom(), t.pi
},
disableMouseWheelZoom: function() {
return t.disableMouseWheelZoom(), t.pi
},
isMouseWheelZoomEnabled: function() {
return !!t.options.mouseWheelZoomEnabled
},
setZoomScaleSensitivity: function(e) {
return t.options.zoomScaleSensitivity = e, t.pi
},
setMinZoom: function(e) {
return t.options.minZoom = e, t.pi
},
setMaxZoom: function(e) {
return t.options.maxZoom = e, t.pi
},
setBeforeZoom: function(e) {
return t.options.beforeZoom = null === e ? null : i.proxy(e, t.publicInstance), t.pi
},
setOnZoom: function(e) {
return t.options.onZoom = null === e ? null : i.proxy(e, t.publicInstance), t.pi
},
zoom: function(e) {
return t.publicZoom(e, !0), t.pi
},
zoomBy: function(e) {
return t.publicZoom(e, !1), t.pi
},
zoomAtPoint: function(e, o) {
return t.publicZoomAtPoint(e, o, !0), t.pi
},
zoomAtPointBy: function(e, o) {
return t.publicZoomAtPoint(e, o, !1), t.pi
},
zoomIn: function() {
return this.zoomBy(1 + t.options.zoomScaleSensitivity), t.pi
},
zoomOut: function() {
return this.zoomBy(1 / (1 + t.options.zoomScaleSensitivity)), t.pi
},
getZoom: function() {
return t.getRelativeZoom()
},
resetZoom: function() {
return t.resetZoom(), t.pi
},
resetPan: function() {
return t.resetPan(), t.pi
},
reset: function() {
return t.reset(), t.pi
},
fit: function() {
return t.fit(), t.pi
},
contain: function() {
return t.contain(), t.pi
},
center: function() {
return t.center(), t.pi
},
updateBBox: function() {
return t.updateBBox(), t.pi
},
resize: function() {
return t.resize(), t.pi
},
getSizes: function() {
return {
width: t.width,
height: t.height,
realZoom: t.getZoom(),
viewBox: t.viewport.getViewBox()
}
},
destroy: function() {
return t.destroy(), t.pi
}
}), this.publicInstance
};
var u = [],
h = function(t, e) {
var o = i.getSvg(t);
if (null === o) return null;
for (var n = u.length - 1; n >= 0; n--)
if (u[n].svg === o) return u[n].instance.getPublicInstance();
return u.push({
svg: o,
instance: new a(o, e)
}), u[u.length - 1].instance.getPublicInstance()
};
e.exports = h
}, {
"./control-icons": 2,
"./shadow-viewport": 3,
"./svg-utilities": 5,
"./uniwheel": 6,
"./utilities": 7
}],
5: [function(t, e) {
var o = t("./utilities"),
n = "unknown";
document.documentMode && (n = "ie"), e.exports = {
svgNS: "http://www.w3.org/2000/svg",
xmlNS: "http://www.w3.org/XML/1998/namespace",
xmlnsNS: "http://www.w3.org/2000/xmlns/",
xlinkNS: "http://www.w3.org/1999/xlink",
evNS: "http://www.w3.org/2001/xml-events",
getBoundingClientRectNormalized: function(t) {
if (t.clientWidth && t.clientHeight) return {
width: t.clientWidth,
height: t.clientHeight
};
if (t.getBoundingClientRect()) return t.getBoundingClientRect();
throw new Error("Cannot get BoundingClientRect for SVG.")
},
getOrCreateViewport: function(t, e) {
var n = null;
if (n = o.isElement(e) ? e : t.querySelector(e), !n) {
var i = Array.prototype.slice.call(t.childNodes || t.children).filter(function(t) {
return "defs" !== t.nodeName && "#text" !== t.nodeName
});
1 === i.length && "g" === i[0].nodeName && null === i[0].getAttribute("transform") && (n = i[0])
}
if (!n) {
var s = "viewport-" + (new Date).toISOString().replace(/\D/g, "");
n = document.createElementNS(this.svgNS, "g"), n.setAttribute("id", s);
var r = t.childNodes || t.children;
if (r && r.length > 0)
for (var a = r.length; a > 0; a--) "defs" !== r[r.length - a].nodeName && n.appendChild(r[r.length - a]);
t.appendChild(n)
}
var l = [];
return n.getAttribute("class") && (l = n.getAttribute("class").split(" ")), ~l.indexOf("svg-pan-zoom_viewport") || (l.push("svg-pan-zoom_viewport"), n.setAttribute("class", l.join(" "))), n
},
setupSvgAttributes: function(t) {
if (t.setAttribute("xmlns", this.svgNS), t.setAttributeNS(this.xmlnsNS, "xmlns:xlink", this.xlinkNS), t.setAttributeNS(this.xmlnsNS, "xmlns:ev", this.evNS), null !== t.parentNode) {
var e = t.getAttribute("style") || ""; - 1 === e.toLowerCase().indexOf("overflow") && t.setAttribute("style", "overflow: hidden; " + e)
}
},
internetExplorerRedisplayInterval: 300,
refreshDefsGlobal: o.throttle(function() {
for (var t = document.querySelectorAll("defs"), e = t.length, o = 0; e > o; o++) {
var n = t[o];
n.parentNode.insertBefore(n, n)
}
}, this.internetExplorerRedisplayInterval),
setCTM: function(t, e, o) {
var i = this,
s = "matrix(" + e.a + "," + e.b + "," + e.c + "," + e.d + "," + e.e + "," + e.f + ")";
t.setAttributeNS(null, "transform", s), "ie" === n && o && (o.parentNode.insertBefore(o, o), window.setTimeout(function() {
i.refreshDefsGlobal()
}, i.internetExplorerRedisplayInterval))
},
getEventPoint: function(t, e) {
var n = e.createSVGPoint();
return o.mouseAndTouchNormalize(t, e), n.x = t.clientX, n.y = t.clientY, n
},
getSvgCenterPoint: function(t, e, o) {
return this.createSVGPoint(t, e / 2, o / 2)
},
createSVGPoint: function(t, e, o) {
var n = t.createSVGPoint();
return n.x = e, n.y = o, n
}
}
}, {
"./utilities": 7
}],
6: [function(t, e) {
e.exports = function() {
function t(t, e, o) {
var n = function(t) {
!t && (t = window.event);
var o = {
originalEvent: t,
target: t.target || t.srcElement,
type: "wheel",
deltaMode: "MozMousePixelScroll" == t.type ? 0 : 1,
deltaX: 0,
delatZ: 0,
preventDefault: function() {
t.preventDefault ? t.preventDefault() : t.returnValue = !1
}
};
return "mousewheel" == u ? (o.deltaY = -1 / 40 * t.wheelDelta, t.wheelDeltaX && (o.deltaX = -1 / 40 * t.wheelDeltaX)) : o.deltaY = t.detail, e(o)
};
return c.push({
element: t,
fn: n,
capture: o
}), n
}
function e(t, e) {
for (var o = 0; o < c.length; o++)
if (c[o].element === t && c[o].capture === e) return c[o].fn;
return function() {}
}
function o(t, e) {
for (var o = 0; o < c.length; o++)
if (c[o].element === t && c[o].capture === e) return c.splice(o, 1)
}
function n(e, o, n, i) {
var s;
s = "wheel" === u ? n : t(e, n, i), e[a](h + o, s, i || !1)
}
function i(t, n, i, s) {
cb = "wheel" === u ? i : e(t, s), t[l](h + n, cb, s || !1), o(t, s)
}
function s(t, e, o) {
n(t, u, e, o), "DOMMouseScroll" == u && n(t, "MozMousePixelScroll", e, o)
}
function r(t, e, o) {
i(t, u, e, o), "DOMMouseScroll" == u && i(t, "MozMousePixelScroll", e, o)
}
var a, l, u, h = "",
c = [];
return window.addEventListener ? (a = "addEventListener", l = "removeEventListener") : (a = "attachEvent", l = "detachEvent", h = "on"), u = "onwheel" in document.createElement("div") ? "wheel" : void 0 !== document.onmousewheel ? "mousewheel" : "DOMMouseScroll", {
on: s,
off: r
}
}()
}, {}],
7: [function(t, e) {
function o(t) {
return function(e) {
window.setTimeout(e, t)
}
}
e.exports = {
extend: function(t, e) {
t = t || {};
for (var o in e) t[o] = this.isObject(e[o]) ? this.extend(t[o], e[o]) : e[o];
return t
},
isElement: function(t) {
return t instanceof HTMLElement || t instanceof SVGElement || t instanceof SVGSVGElement || t && "object" == typeof t && null !== t && 1 === t.nodeType && "string" == typeof t.nodeName
},
isObject: function(t) {
return "[object Object]" === Object.prototype.toString.call(t)
},
isNumber: function(t) {
return !isNaN(parseFloat(t)) && isFinite(t)
},
getSvg: function(t) {
var e, o;
if (this.isElement(t)) e = t;
else {
if (!("string" == typeof t || t instanceof String)) throw new Error("Provided selector is not an HTML object nor String");
if (e = document.querySelector(t), !e) throw new Error("Provided selector did not find any elements. Selector: " + t)
}
if ("svg" === e.tagName.toLowerCase()) o = e;
else if ("object" === e.tagName.toLowerCase()) o = e.contentDocument.documentElement;
else {
if ("embed" !== e.tagName.toLowerCase()) throw new Error("img" === e.tagName.toLowerCase() ? 'Cannot script an SVG in an "img" element. Please use an "object" element or an in-line SVG.' : "Cannot get SVG.");
o = e.getSVGDocument().documentElement
}
return o
},
proxy: function(t, e) {
return function() {
return t.apply(e, arguments)
}
},
getType: function(t) {
return Object.prototype.toString.apply(t).replace(/^\[object\s/, "").replace(/\]$/, "")
},
mouseAndTouchNormalize: function(t, e) {
if (void 0 === t.clientX || null === t.clientX)
if (t.clientX = 0, t.clientY = 0, void 0 !== t.changedTouches && t.changedTouches.length) {
if (void 0 !== t.changedTouches[0].clientX) t.clientX = t.changedTouches[0].clientX, t.clientY = t.changedTouches[0].clientY;
else if (void 0 !== t.changedTouches[0].pageX) {
var o = e.getBoundingClientRect();
t.clientX = t.changedTouches[0].pageX - o.left, t.clientY = t.changedTouches[0].pageY - o.top
}
} else void 0 !== t.originalEvent && void 0 !== t.originalEvent.clientX && (t.clientX = t.originalEvent.clientX, t.clientY = t.originalEvent.clientY)
},
isDblClick: function(t, e) {
if (2 === t.detail) return !0;
if (void 0 !== e && null !== e) {
var o = t.timeStamp - e.timeStamp,
n = Math.sqrt(Math.pow(t.clientX - e.clientX, 2) + Math.pow(t.clientY - e.clientY, 2));
return 250 > o && 10 > n
}
return !1
},
now: Date.now || function() {
return (new Date).getTime()
},
throttle: function(t, e, o) {
var n, i, s, r = this,
a = null,
l = 0;
o || (o = {});
var u = function() {
l = o.leading === !1 ? 0 : r.now(), a = null, s = t.apply(n, i), a || (n = i = null)
};
return function() {
var h = r.now();
l || o.leading !== !1 || (l = h);
var c = e - (h - l);
return n = this, i = arguments, 0 >= c || c > e ? (clearTimeout(a), a = null, l = h, s = t.apply(n, i), a || (n = i = null)) : a || o.trailing === !1 || (a = setTimeout(u, c)), s
}
},
createRequestAnimationFrame: function(t) {
var e = null;
return "auto" !== t && 60 > t && t > 1 && (e = Math.floor(1e3 / t)), null === e ? window.requestAnimationFrame || o(33) : o(e)
}
}
}, {}]
}, {}, [1]);

View File

@@ -0,0 +1,6 @@
/*!
* tablesort v5.1.0 (2018-09-14)
* http://tristen.ca/tablesort/demo/
* Copyright (c) 2018 ; Licensed MIT
*/
!function(){function a(b,c){if(!(this instanceof a))return new a(b,c);if(!b||"TABLE"!==b.tagName)throw new Error("Element must be a table");this.init(b,c||{})}var b=[],c=function(a){var b;return window.CustomEvent&&"function"==typeof window.CustomEvent?b=new CustomEvent(a):(b=document.createEvent("CustomEvent"),b.initCustomEvent(a,!1,!1,void 0)),b},d=function(a){return a.getAttribute("data-sort")||a.textContent||a.innerText||""},e=function(a,b){return a=a.trim().toLowerCase(),b=b.trim().toLowerCase(),a===b?0:a<b?1:-1},f=function(a,b){return function(c,d){var e=a(c.td,d.td);return 0===e?b?d.index-c.index:c.index-d.index:e}};a.extend=function(a,c,d){if("function"!=typeof c||"function"!=typeof d)throw new Error("Pattern and sort must be a function");b.push({name:a,pattern:c,sort:d})},a.prototype={init:function(a,b){var c,d,e,f,g=this;if(g.table=a,g.thead=!1,g.options=b,a.rows&&a.rows.length>0)if(a.tHead&&a.tHead.rows.length>0){for(e=0;e<a.tHead.rows.length;e++)if("thead"===a.tHead.rows[e].getAttribute("data-sort-method")){c=a.tHead.rows[e];break}c||(c=a.tHead.rows[a.tHead.rows.length-1]),g.thead=!0}else c=a.rows[0];if(c){var h=function(){g.current&&g.current!==this&&g.current.removeAttribute("aria-sort"),g.current=this,g.sortTable(this)};for(e=0;e<c.cells.length;e++)f=c.cells[e],f.setAttribute("role","columnheader"),"none"!==f.getAttribute("data-sort-method")&&(f.tabindex=0,f.addEventListener("click",h,!1),null!==f.getAttribute("data-sort-default")&&(d=f));d&&(g.current=d,g.sortTable(d))}},sortTable:function(a,g){var h=this,i=a.cellIndex,j=e,k="",l=[],m=h.thead?0:1,n=a.getAttribute("data-sort-method"),o=a.getAttribute("aria-sort");if(h.table.dispatchEvent(c("beforeSort")),g||(o="ascending"===o?"descending":"descending"===o?"ascending":h.options.descending?"descending":"ascending",a.setAttribute("aria-sort",o)),!(h.table.rows.length<2)){if(!n){for(;l.length<3&&m<h.table.tBodies[0].rows.length;)k=d(h.table.tBodies[0].rows[m].cells[i]),k=k.trim(),k.length>0&&l.push(k),m++;if(!l)return}for(m=0;m<b.length;m++)if(k=b[m],n){if(k.name===n){j=k.sort;break}}else if(l.every(k.pattern)){j=k.sort;break}for(h.col=i,m=0;m<h.table.tBodies.length;m++){var p,q=[],r={},s=0,t=0;if(!(h.table.tBodies[m].rows.length<2)){for(p=0;p<h.table.tBodies[m].rows.length;p++)k=h.table.tBodies[m].rows[p],"none"===k.getAttribute("data-sort-method")?r[s]=k:q.push({tr:k,td:d(k.cells[h.col]),index:s}),s++;for("descending"===o?q.sort(f(j,!0)):(q.sort(f(j,!1)),q.reverse()),p=0;p<s;p++)r[p]?(k=r[p],t++):k=q[p-t].tr,h.table.tBodies[m].appendChild(k)}}h.table.dispatchEvent(c("afterSort"))}},refresh:function(){void 0!==this.current&&this.sortTable(this.current,!0)}},"undefined"!=typeof module&&module.exports?module.exports=a:window.Tablesort=a}();

View File

@@ -0,0 +1,6 @@
/*!
* tablesort v5.1.0 (2018-09-14)
* http://tristen.ca/tablesort/demo/
* Copyright (c) 2018 ; Licensed MIT
*/
!function(){var a=function(a){return a.replace(/[^\-?0-9.]/g,"")},b=function(a,b){return a=parseFloat(a),b=parseFloat(b),a=isNaN(a)?0:a,b=isNaN(b)?0:b,a-b};Tablesort.extend("number",function(a){return a.match(/^[-+]?[£\x24Û¢´€]?\d+\s*([,\.]\d{0,2})/)||a.match(/^[-+]?\d+\s*([,\.]\d{0,2})?[£\x24Û¢´€]/)||a.match(/^[-+]?(\d)*-?([,\.]){0,1}-?(\d)+([E,e][\-+][\d]+)?%?$/)},function(c,d){return c=a(c),d=a(d),b(d,c)})}();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long