Commit 2dbd8f1f authored by Schaaf's avatar Schaaf
Browse files

Initial commit

parents
This diff is collapsed.
This diff is collapsed.
@import url("../../ThirdParty/dojo-release-1.10.4/dijit/themes/claro/claro.css");
html,
body {
height: 100%;
margin: 0;
overflow: hidden;
padding: 0;
font-family: sans-serif;
}
#loading {
display: table;
position: fixed;
width: 100%;
height: 100%;
z-index: 5000;
background: #eee;
border: none;
text-align: center;
color: #777;
}
#loading span {
display: table-cell;
vertical-align: middle;
}
#appLayout {
width: 100%;
height: 100%;
}
#toolbar,
#galleryContainer {
-ms-user-select: none;
-moz-user-select: -moz-none; /* allows for re-enabling on sub-elements like the search box */
-webkit-user-select: none;
user-select: none;
}
#search {
-ms-user-select: text;
-moz-user-select: text;
-webkit-user-select: text;
user-select: text;
}
.cesiumTitle {
float: right;
}
#codeContainer {
width: 40%;
}
#bottomPanel {
height: 225px;
}
.galleryContainer {
width: 100%;
}
.demosContainer {
overflow: auto;
background: rgba(0, 0, 0, 0.8);
}
.demos {
padding: 0 5px 5px;
white-space: nowrap;
}
.demoTileThumbnail {
max-height: 150px;
max-width: 225px;
height: 100px;
width: auto;
}
.demoTileTitle {
margin: 0 auto 2px auto;
font-size: 0.9em;
}
.demoTooltipType {
text-align: center;
color: #888;
margin-bottom: 5px;
padding-right: 10px;
}
.subInfo {
font-size: 11px;
}
.galleryError {
color: #f88;
}
#docPopup {
display: block;
position: absolute;
left: -999px;
top: 0;
font-family: sans-serif;
font-size: 10pt;
}
#docPopup a,
#docPopup a:visited {
display: block;
text-decoration: none;
line-height: 12pt;
}
#docPopup a:focus,
#docPopup a:hover {
text-decoration: underline;
}
.logContainer {
display: block;
width: 100%;
height: 100%;
overflow-x: auto;
overflow-y: scroll;
}
#logOutput {
white-space: pre-wrap;
padding: 2px 4px;
font-size: 9pt;
font-family: monospace;
}
.consoleError {
color: #f00;
}
.fullFrame {
border: none;
width: 100%;
height: 100%;
transition-property: transform;
transition-duration: 0.5s;
transform-origin: 200px 152px; /* These numbers should be divisible by 4 because of scaling in .makeThumbnail */
}
.makeThumbnail {
width: 900px;
height: 600px;
transform: scale(0.25);
}
.popDownDialog {
width: 360px;
}
a.linkButton,
a.linkButton:visited {
display: inline-block;
}
a.linkButton:focus,
a.linkButton:hover {
text-decoration: none;
}
.CodeMirror,
.CodeMirror-scroll {
height: 100%;
font-size: 13px;
}
.highlightToolbarButton {
background: #fe2;
border-radius: 4px;
}
.claro .bottomPanel {
padding: 0;
overflow: hidden;
}
.bottomPanel #innerPanel_tablist {
max-height: 28px;
overflow: auto !important;
}
.claro .dijitTabContainerTop-tabs .dijitTabChecked .dijitTabContent {
background-position: 0 -103px;
}
.claro .dijitTabContainerTop-dijitContentPane {
padding: 0;
overflow: hidden;
}
.mblScrollBarWrapper > div {
background-color: #9ed3ff !important;
}
.errorMarker {
width: 100%;
height: 100%;
color: #222;
font-weight: bold;
background-color: #f42;
border-radius: 3px;
border: none;
}
.CodeMirror pre.errorLine {
background: rgba(200, 50, 0, 0.2);
}
.hintMarker {
width: 100%;
height: 100%;
color: #222;
font-weight: bold;
background-color: #fe2;
border-radius: 3px;
border: none;
}
.CodeMirror pre.hintLine {
background: rgba(200, 200, 0, 0.2);
}
.highlightMarker {
width: 100%;
height: 100%;
color: #222;
font-weight: bold;
background-color: #2e2;
border-radius: 3px;
border: none;
}
.CodeMirror pre.highlightLine {
background: rgba(0, 200, 0, 0.2);
}
.searchMarker {
width: 100%;
height: 100%;
color: #222;
font-weight: bold;
background-color: #cef;
border-radius: 3px;
border: none;
}
.CodeMirror pre.searchLine {
background: rgba(180, 230, 240, 0.2);
}
.CodeMirror-gutter-text {
cursor: default;
}
.gitHubIcon {
background-image: url("./images/gitHub16px.png");
width: 16px;
height: 16px;
text-align: center;
}
.shareIcon {
background-image: url("./images/share16px.png");
width: 16px;
height: 16px;
text-align: center;
}
This diff is collapsed.
define([
"dijit/_CssStateMixin",
"dijit/_TemplatedMixin",
"dijit/_WidgetBase",
"dojo/_base/declare",
"dojo/dom-class",
"dojo/text!./templates/LinkButton.html",
], function (
_CssStateMixin,
_TemplatedMixin,
_WidgetBase,
declare,
domClass,
template
) {
"use strict";
return declare(
"Sandcastle.LinkButton",
[_WidgetBase, _TemplatedMixin, _CssStateMixin],
{
baseClass: "dijitButton",
templateString: template,
showLabel: true,
_setShowLabelAttr: function (val) {
if (this.containerNode) {
domClass.toggle(this.containerNode, "dijitDisplayNone", !val);
}
this._set("showLabel", val);
},
_setLabelAttr: function (/*String*/ content) {
this._set("label", content);
(this.containerNode || this.focusNode).innerHTML = content;
},
}
);
});
(function () {
"use strict";
window.parent.postMessage("reload", "*");
function defined(value) {
return value !== undefined;
}
function print(value) {
if (value === null) {
return "null";
} else if (defined(value)) {
return value.toString();
}
return "undefined";
}
console.originalLog = console.log;
console.log = function (d1) {
console.originalLog.apply(console, arguments);
window.parent.postMessage(
{
log: print(d1),
},
"*"
);
};
console.originalWarn = console.warn;
console.warn = function (d1) {
console.originalWarn.apply(console, arguments);
window.parent.postMessage(
{
warn: defined(d1) ? d1.toString() : "undefined",
},
"*"
);
};
console.originalError = console.error;
console.error = function (d1) {
console.originalError.apply(console, arguments);
if (!defined(d1)) {
window.parent.postMessage(
{
error: "undefined",
},
"*"
);
return;
}
// Look for d1.stack, "bucket.html:line:char"
var lineNumber = -1;
var errorMsg = d1.toString();
if (typeof d1.stack === "string") {
var stack = d1.stack;
var pos = stack.indexOf(Sandcastle.bucket);
if (pos < 0) {
pos = stack.indexOf("<anonymous>");
}
if (pos >= 0) {
var lineStart = stack.indexOf(":", pos);
if (lineStart > pos) {
var lineEnd1 = stack.indexOf(":", lineStart + 1);
var lineEnd2 = stack.indexOf("\n", lineStart + 1);
if (
lineEnd2 > lineStart &&
(lineEnd2 < lineEnd1 || lineEnd1 < lineStart)
) {
lineEnd1 = lineEnd2;
}
if (lineEnd1 > lineStart) {
/*eslint-disable no-empty*/
try {
lineNumber = parseInt(
stack.substring(lineStart + 1, lineEnd1),
10
);
} catch (ex) {}
/*eslint-enable no-empty*/
}
}
}
}
if (lineNumber >= 0) {
window.parent.postMessage(
{
error: errorMsg,
lineNumber: lineNumber,
},
"*"
);
} else {
window.parent.postMessage(
{
error: errorMsg,
},
"*"
);
}
};
window.onerror = function (errorMsg, url, lineNumber) {
if (defined(lineNumber)) {
if (defined(url) && url.indexOf(Sandcastle.bucket) > -1) {
// if the URL is the bucket itself, ignore it
url = "";
}
if (lineNumber < 1) {
// Change lineNumber to the local one for highlighting.
/*eslint-disable no-empty*/
try {
var pos = errorMsg.indexOf(Sandcastle.bucket + ":");
if (pos < 0) {
pos = errorMsg.indexOf("<anonymous>");
}
if (pos >= 0) {
pos += 12;
lineNumber = parseInt(errorMsg.substring(pos), 10);
}
} catch (ex) {}
/*eslint-enable no-empty*/
}
window.parent.postMessage(
{
error: errorMsg,
url: url,
lineNumber: lineNumber,
},
"*"
);
} else {
window.parent.postMessage(
{
error: errorMsg,
url: url,
},
"*"
);
}
console.originalError.apply(console, [errorMsg]);
return false;
};
Sandcastle.declare = function (obj) {
/*eslint-disable no-empty*/
try {
//Browsers such as IE don't have a stack property until you actually throw the error.
var stack = "";
try {
throw new Error();
} catch (ex) {
stack = ex.stack.toString();
}
var needle = Sandcastle.bucket + ":"; // Firefox
var pos = stack.indexOf(needle);
if (pos < 0) {
needle = " (<anonymous>:"; // Chrome
pos = stack.indexOf(needle);
}
if (pos < 0) {
needle = " (Unknown script code:"; // IE 11
pos = stack.indexOf(needle);
}
if (pos >= 0) {
pos += needle.length;
var lineNumber = parseInt(stack.substring(pos), 10);
Sandcastle.registered.push({
obj: obj,
lineNumber: lineNumber,
});
}
} catch (ex) {}
/*eslint-enable no-empty*/
};
Sandcastle.highlight = function (obj) {
if (typeof obj !== "undefined") {
for (var i = 0, len = Sandcastle.registered.length; i < len; ++i) {
if (
obj === Sandcastle.registered[i].obj ||
obj.primitive === Sandcastle.registered[i].obj
) {
window.parent.postMessage(
{
highlight: Sandcastle.registered[i].lineNumber,
},
"*"
);
return;
}
}
}
window.parent.postMessage(
{
highlight: 0,
},
"*"
);
};
})();
(function () {
"use strict";
var defaultAction;
var bucket = window.location.href;
var pos = bucket.lastIndexOf("/");
if (pos > 0 && pos < bucket.length - 1) {
bucket = bucket.substring(pos + 1);
}
window.Sandcastle = {
bucket: bucket,
declare: function () {},
highlight: function () {},
registered: [],
finishedLoading: function () {
window.Sandcastle.reset();
if (defaultAction) {
window.Sandcastle.highlight(defaultAction);
defaultAction();
defaultAction = undefined;
}
document.body.className = document.body.className.replace(
/(?:\s|^)sandcastle-loading(?:\s|$)/,
" "
);
},
addToggleButton: function (text, checked, onchange, toolbarID) {
window.Sandcastle.declare(onchange);
var input = document.createElement("input");
input.checked = checked;
input.type = "checkbox";
input.style.pointerEvents = "none";
var label = document.createElement("label");
label.appendChild(input);
label.appendChild(document.createTextNode(text));
label.style.pointerEvents = "none";
var button = document.createElement("button");
button.type = "button";
button.className = "cesium-button";
button.appendChild(label);
button.onclick = function () {
window.Sandcastle.reset();
window.Sandcastle.highlight(onchange);
input.checked = !input.checked;
onchange(input.checked);
};
document.getElementById(toolbarID || "toolbar").appendChild(button);
},
addToolbarButton: function (text, onclick, toolbarID) {
window.Sandcastle.declare(onclick);
var button = document.createElement("button");
button.type = "button";
button.className = "cesium-button";
button.onclick = function () {
window.Sandcastle.reset();
window.Sandcastle.highlight(onclick);
onclick();
};
button.textContent = text;
document.getElementById(toolbarID || "toolbar").appendChild(button);
},
addDefaultToolbarButton: function (text, onclick, toolbarID) {
window.Sandcastle.addToolbarButton(text, onclick, toolbarID);
defaultAction = onclick;
},
addDefaultToolbarMenu: function (options, toolbarID) {
window.Sandcastle.addToolbarMenu(options, toolbarID);
defaultAction = options[0].onselect;
},
addToolbarMenu: function (options, toolbarID) {
var menu = document.createElement("select");
menu.className = "cesium-button";
menu.onchange = function () {
window.Sandcastle.reset();
var item = options[menu.selectedIndex];
if (item && typeof item.onselect === "function") {
item.onselect();
}
};
document.getElementById(toolbarID || "toolbar").appendChild(menu);
if (!defaultAction && typeof options[0].onselect === "function") {
defaultAction = options[0].onselect;
}
for (var i = 0, len = options.length; i < len; ++i) {
var option = document.createElement("option");
option.textContent = options[i].text;
option.value = options[i].value;
menu.appendChild(option);
}
},
reset: function () {},
};
if (window.location.protocol === "file:") {
if (
window.confirm(
"You must host this app on a web server.\nSee contributor's guide for more info?"
)
) {
window.location =
"https://github.com/CesiumGS/cesium/wiki/Contributor%27s-Guide";
}
}
})();
(function () {
"use strict";
window.embedInSandcastleTemplate = function (code, addExtraLine) {
return (
"function startup(Cesium) {\n" +
" 'use strict';\n" +
"//Sandcastle_Begin\n" +
(addExtraLine ? "\n" : "") +
code +
"//Sandcastle_End\n" +
" Sandcastle.finishedLoading();\n" +
"}\n" +
"if (typeof Cesium !== 'undefined') {\n" +
" window.startupCalled = true;\n" +
" startup(Cesium);\n" +
"}\n"
);
};
window.decodeBase64Data = function (base64String, pako) {
// data stored in the hash as:
// Base64 encoded, raw DEFLATE compressed JSON array where index 0 is code, index 1 is html
// restore padding
while (base64String.length % 4 !== 0) {
base64String += "=";
}
var jsonString = pako.inflate(atob(base64String), {
raw: true,
to: "string",
});
// we save a few bytes by omitting the leading [" and trailing "] since they are always the same
jsonString = '["' + jsonString + '"]';
var json = JSON.parse(jsonString);
// index 0 is code, index 1 is html
var code = json[0];
var html = json[1];
var baseHref = json[2];
return {
code: code,
html: html,
baseHref: baseHref,
};
};
})();
/*!
* clipboard.js v2.0.0
* https://zenorocha.github.io/clipboard.js
*
* Licensed MIT © Zeno Rocha
*/
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=3)}([function(t,e,n){var o,r,i;!function(a,c){r=[t,n(7)],o=c,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(t){return t&&t.__esModule?t:{default:t}}(e),r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),a=function(){function t(e){n(this,t),this.resolveOptions(e),this.initSelection()}return i(t,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action=t.action,this.container=t.container,this.emitter=t.emitter,this.target=t.target,this.text=t.text,this.trigger=t.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var t=this,e="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return t.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,o.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,o.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(t){this.emitter.emit(t?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=t,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(t){if(void 0!==t){if(!t||"object"!==(void 0===t?"undefined":r(t))||1!==t.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&t.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(t.hasAttribute("readonly")||t.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=t}},get:function(){return this._target}}]),t}();t.exports=a})},function(t,e,n){function o(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!c.string(e))throw new TypeError("Second argument must be a String");if(!c.fn(n))throw new TypeError("Third argument must be a Function");if(c.node(t))return r(t,e,n);if(c.nodeList(t))return i(t,e,n);if(c.string(t))return a(t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function r(t,e,n){return t.addEventListener(e,n),{destroy:function(){t.removeEventListener(e,n)}}}function i(t,e,n){return Array.prototype.forEach.call(t,function(t){t.addEventListener(e,n)}),{destroy:function(){Array.prototype.forEach.call(t,function(t){t.removeEventListener(e,n)})}}}function a(t,e,n){return u(document.body,t,e,n)}var c=n(6),u=n(5);t.exports=o},function(t,e){function n(){}n.prototype={on:function(t,e,n){var o=this.e||(this.e={});return(o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){function o(){r.off(t,o),e.apply(n,arguments)}var r=this;return o._=e,this.on(t,o,n)},emit:function(t){var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;for(o;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,a=o.length;i<a;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=n},function(t,e,n){var o,r,i;!function(a,c){r=[t,n(0),n(2),n(1)],o=c,void 0!==(i="function"==typeof o?o.apply(e,r):o)&&(t.exports=i)}(0,function(t,e,n,o){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function c(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function u(t,e){var n="data-clipboard-"+t;if(e.hasAttribute(n))return e.getAttribute(n)}var l=r(e),s=r(n),f=r(o),d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),p=function(t){function e(t,n){i(this,e);var o=a(this,(e.__proto__||Object.getPrototypeOf(e)).call(this));return o.resolveOptions(n),o.listenClick(t),o}return c(e,t),h(e,[{key:"resolveOptions",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=(0,f.default)(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(e),target:this.target(e),text:this.text(e),container:this.container,trigger:e,emitter:this})}},{key:"defaultAction",value:function(t){return u("action",t)}},{key:"defaultTarget",value:function(t){var e=u("target",t);if(e)return document.querySelector(e)}},{key:"defaultText",value:function(t){return u("text",t)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],e="string"==typeof t?[t]:t,n=!!document.queryCommandSupported;return e.forEach(function(t){n=n&&!!document.queryCommandSupported(t)}),n}}]),e}(s.default);t.exports=p})},function(t,e){function n(t,e){for(;t&&t.nodeType!==o;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode}}var o=9;if("undefined"!=typeof Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=n},function(t,e,n){function o(t,e,n,o,r){var a=i.apply(this,arguments);return t.addEventListener(n,a,r),{destroy:function(){t.removeEventListener(n,a,r)}}}function r(t,e,n,r,i){return"function"==typeof t.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return o(t,e,n,r,i)}))}function i(t,e,n,o){return function(n){n.delegateTarget=a(n.target,e),n.delegateTarget&&o.call(t,n)}}var a=n(4);t.exports=r},function(t,e){e.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},e.nodeList=function(t){var n=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in t&&(0===t.length||e.node(t[0]))},e.string=function(t){return"string"==typeof t||t instanceof String},e.fn=function(t){return"[object Function]"===Object.prototype.toString.call(t)}},function(t,e){function n(t){var e;if("SELECT"===t.nodeName)t.focus(),e=t.value;else if("INPUT"===t.nodeName||"TEXTAREA"===t.nodeName){var n=t.hasAttribute("readonly");n||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),n||t.removeAttribute("readonly"),e=t.value}else{t.hasAttribute("contenteditable")&&t.focus();var o=window.getSelection(),r=document.createRange();r.selectNodeContents(t),o.removeAllRanges(),o.addRange(r),e=o.toString()}return e}t.exports=n}])});
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment