290 lines
5.7 MiB
JavaScript
290 lines
5.7 MiB
JavaScript
|
|
|
||
|
|
/**
|
||
|
|
* Sun editor min.js code from cdn if needed to update then paste the code in this section below the
|
||
|
|
* latest code from suneditor cdn i.e suneditor.min.js
|
||
|
|
*/
|
||
|
|
!function (e) { var t = {}; function n(i) { if (t[i]) return t[i].exports; var l = t[i] = { i: i, l: !1, exports: {} }; return e[i].call(l.exports, l, l.exports, n), l.l = !0, l.exports } n.m = e, n.c = t, n.d = function (e, t, i) { n.o(e, t) || Object.defineProperty(e, t, { enumerable: !0, get: i }) }, n.r = function (e) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e, "__esModule", { value: !0 }) }, n.t = function (e, t) { if (1 & t && (e = n(e)), 8 & t) return e; if (4 & t && "object" == typeof e && e && e.__esModule) return e; var i = Object.create(null); if (n.r(i), Object.defineProperty(i, "default", { enumerable: !0, value: e }), 2 & t && "string" != typeof e) for (var l in e) n.d(i, l, function (t) { return e[t] }.bind(null, l)); return i }, n.n = function (e) { var t = e && e.__esModule ? function () { return e.default } : function () { return e }; return n.d(t, "a", t), t }, n.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, n.p = "", n(n.s = "XJR1") }({ "1kvd": function (e, t, n) { "use strict"; var i, l; i = "undefined" != typeof window ? window : this, l = function (e, t) { const n = { name: "dialog", add: function (e) { const t = e.context; t.dialog = { kind: "", updateModal: !1, _closeSignal: !1 }; let n = e.util.createElement("DIV"); n.className = "se-dialog sun-editor-common"; let i = e.util.createElement("DIV"); i.className = "se-dialog-back", i.style.display = "none"; let l = e.util.createElement("DIV"); l.className = "se-dialog-inner", l.style.display = "none", n.appendChild(i), n.appendChild(l), t.dialog.modalArea = n, t.dialog.back = i, t.dialog.modal = l, t.dialog.modal.addEventListener("mousedown", this._onMouseDown_dialog.bind(e)), t.dialog.modal.addEventListener("click", this._onClick_dialog.bind(e)), t.element.relative.appendChild(n), n = null, i = null, l = null }, _onMouseDown_dialog: function (e) { /se-dialog-inner/.test(e.target.className) ? this.context.dialog._closeSignal = !0 : this.context.dialog._closeSignal = !1 }, _onClick_dialog: function (e) { (/close/.test(e.target.getAttribute("data-command")) || this.context.dialog._closeSignal) && this.plugins.dialog.close.call(this) }, open: function (e, t) { if (this.modalForm) return !1; this.plugins.dialog._bindClose && (this._d.removeEventListener("keydown", this.plugins.dialog._bindClose), this.plugins.dialog._bindClose = null), this.plugins.dialog._bindClose = function (e) { /27/.test(e.keyCode) && this.plugins.dialog.close.call(this) }.bind(this), this._d.addEventListener("keydown", this.plugins.dialog._bindClose), this.context.dialog.updateModal = t, "full" === this.options.popupDisplay ? this.context.dialog.modalArea.style.position = "fixed" : this.context.dialog.modalArea.style.position = "absolute", this.context.dialog.kind = e, this.modalForm = this.context[e].modal; const n = this.context[e].focusElement; "function" == typeof this.plugins[e].on && this.plugins[e].on.call(this, t), this.context.dialog.modalArea.style.display = "block", this.context.dialog.back.style.display = "block", this.context.dialog.modal.style.display = "block", this.modalForm.style.display = "block", n && n.focus() }, _bindClose: null, close: function () { this.plugins.dialog._bindClose && (this._d.removeEventListener("keydown", this.plugins.dialog._bindClose), this.plugins.dialog._bindClose = null); const e = this.context.dialog.kind; this.modalForm.style.display = "none", this.context.dialog.back.style.display = "none", this.context.dialog.modalArea.style.display = "none", this.context.dialog.updateModal = !1, "function" == typeof this.plugins[e].init && this.plugins[e].init.call(this), this.context.dialog.kind = "", this.modalForm = null, this.focus() } }; return void 0 === t && (e.SUNEDITOR_MODULES || Object.defineProperty(e, "SUNEDITOR_MODULES", { enumerable: !0, writable: !1, configurable: !1, value: {} }), Object.defineProperty(e.SUNEDITOR_MODULES, "dialog", { enumerable: !0, writable: !1, configurable: !1, value: n })), n }, "
|
||
|
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvbW9kdWxlcy9kaWFsb2cuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvbW9kdWxlcy9maWxlQnJvd3Nlci5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvbGFuZy9lbi5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvcGx1Z2lucy9tb2R1bGVzL19jb2xvclBpY2tlci5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvcGx1Z2lucy9zdWJtZW51L2ZvbnRDb2xvci5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvcGx1Z2lucy9zdWJtZW51L2hpbGl0ZUNvbG9yLmpzIiwid2VicGFjazovLy8uL3NyYy9wbHVnaW5zL3N1Ym1lbnUvdGVtcGxhdGUuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvbW9kdWxlcy9fc2VsZWN0TWVudS5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvcGx1Z2lucy9tb2R1bGVzL19hbmNob3IuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvZGlhbG9nL2xpbmsuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvZGlhbG9nL2ltYWdlLmpzIiwid2VicGFjazovLy8uL3NyYy9wbHVnaW5zL2RpYWxvZy92aWRlby5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvcGx1Z2lucy9kaWFsb2cvYXVkaW8uanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvZGlhbG9nL21hdGguanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvaW5kZXguanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvY29tbWFuZC9ibG9ja3F1b3RlLmpzIiwid2VicGFjazovLy8uL3NyYy9wbHVnaW5zL3N1Ym1lbnUvYWxpZ24uanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvc3VibWVudS9mb250LmpzIiwid2VicGFjazovLy8uL3NyYy9wbHVnaW5zL3N1Ym1lbnUvZm9udFNpemUuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvc3VibWVudS9ob3Jpem9udGFsUnVsZS5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvcGx1Z2lucy9zdWJtZW51L2xpc3QuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvc3VibWVudS90YWJsZS5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvcGx1Z2lucy9zdWJtZW51L2Zvcm1hdEJsb2NrLmpzIiwid2VicGFjazovLy8uL3NyYy9wbHVnaW5zL3N1Ym1lbnUvbGluZUhlaWdodC5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvcGx1Z2lucy9zdWJtZW51L3BhcmFncmFwaFN0eWxlLmpzIiwid2VicGFjazovLy8uL3NyYy9wbHVnaW5zL3N1Ym1lbnUvdGV4dFN0eWxlLmpzIiwid2VicGFjazovLy8uL3NyYy9wbHVnaW5zL2ZpbGVCcm93c2VyL2ltYWdlR2FsbGVyeS5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvYXNzZXRzL2RlZmF1bHRJY29ucy5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvbGliL3V0aWwuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL2xpYi9jb25zdHJ1Y3Rvci5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvbGliL2NvbnRleHQuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvbW9kdWxlcy9fbm90aWNlLmpzIiwid2VicGFjazovLy8uL3NyYy9zdW5lZGl0b3IuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL2xpYi9jb3JlLmpzIiwid2VicGFjazovLy8uL3NyYy9saWIvaGlzdG9yeS5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvc3VuZWRpdG9yX2J1aWxkLmpzIiwid2VicGFjazovLy8uL3NyYy9wbHVnaW5zL21vZHVsZXMvY29tcG9uZW50LmpzIiwid2VicGFjazovLy8uL3NyYy9wbHVnaW5zL21vZHVsZXMvcmVzaXppbmcuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvbW9kdWxlcy9maWxlTWFuYWdlci5qcyJdLCJuYW1lcyI6WyJpbnN0YWxsZWRNb2R1bGVzIiwiX193ZWJwYWNrX3JlcXVpcmVfXyIsIm1vZHVsZUlkIiwiZXhwb3J0cyIsIm1vZHVsZSIsImkiLCJsIiwibW9kdWxlcyIsImNhbGwiLCJtIiwiYyIsImQiLCJuYW1lIiwiZ2V0dGVyIiwibyIsIk9iamVjdCIsImRlZmluZVByb3BlcnR5IiwiZW51bWVyYWJsZSIsImdldCIsInIiLCJTeW1ib2wiLCJ0b1N0cmluZ1RhZyIsInZhbHVlIiwidCIsIm1vZGUiLCJfX2VzTW9kdWxlIiwibnMiLCJjcmVhdGUiLCJrZXkiLCJiaW5kIiwibiIsIm9iamVjdCIsInByb3BlcnR5IiwicHJvdG90eXBlIiwiaGFzT3duUHJvcGVydHkiLCJwIiwicyIsImdsb2JhbCIsImZhY3RvcnkiLCJ3aW5kb3ciLCJ0aGlzIiwibm9HbG9iYWwiLCJkaWFsb2ciLCJhZGQiLCJjb3JlIiwiY29udGV4dCIsImtpbmQiLCJ1cGRhdGVNb2RhbCIsIl9jbG9zZVNpZ25hbCIsImRpYWxvZ19kaXYiLCJ1dGlsIiwiY3JlYXRlRWxlbWVudCIsImNsYXNzTmFtZSIsImRpYWxvZ19iYWNrIiwic3R5bGUiLCJkaXNwbGF5IiwiZGlhbG9nX2FyZWEiLCJhcHBlbmRDaGlsZCIsIm1vZGFsQXJlYSIsImJhY2siLCJtb2RhbCIsImFkZEV2ZW50TGlzdGVuZXIiLCJfb25Nb3VzZURvd25fZGlhbG9nIiwiX29uQ2xpY2tfZGlhbG9nIiwiZWxlbWVudCIsInJlbGF0aXZlIiwiZSIsInRlc3QiLCJ0YXJnZXQiLCJnZXRBdHRyaWJ1dGUiLCJwbHVnaW5zIiwiY2xvc2UiLCJvcGVuIiwidXBkYXRlIiwibW9kYWxGb3JtIiwiX2JpbmRDbG9zZSIsIl9kIiwicmVtb3ZlRXZlbnRMaXN0ZW5lciIsImtleUNvZGUiLCJvcHRpb25zIiwicG9wdXBEaXNwbGF5IiwicG9zaXRpb24iLCJmb2N1c0VsZW1lbnQiLCJvbiIsImZvY3VzIiwiaW5pdCIsIlNVTkVESVRPUl9NT0RVTEVTIiwid3JpdGFibGUiLCJjb25maWd1cmFibGUiLCJkb2N1bWVudCIsInciLCJFcnJvciIsImZpbGVCcm93c2VyIiwiX3htbEh0dHAiLCJfbG9hZGluZyIsImFyZWEiLCJoZWFkZXIiLCJ0YWdBcmVhIiwiYm9keSIsImxpc3QiLCJ0YWdFbGVtZW50cyIsIml0ZW1zIiwic2VsZWN0ZWRUYWdzIiwic2VsZWN0b3JIYW5kbGVyIiwiY29udGV4dFBsdWdpbiIsImNvbHVtblNpemUiLCJicm93c2VyX2RpdiIsImNvbnRlbnQiLCJpbm5lckhUTUwiLCJzZXRfYnJvd3NlciIsInF1ZXJ5U2VsZWN0b3IiLCJ0aXRsZUFyZWEiLCJvbkNsaWNrVGFnIiwib25DbGlja0ZpbGUiLCJfb25Nb3VzZURvd25fYnJvd3NlciIsIl9vbkNsaWNrX2Jyb3dzZXIiLCJsYW5nIiwiZGlhbG9nQm9
|
||
|
|
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Suneditor ko.js code from cdn
|
||
|
|
*/
|
||
|
|
|
||
|
|
/*
|
||
|
|
* wysiwyg web editor
|
||
|
|
*
|
||
|
|
* suneditor.js
|
||
|
|
* Copyright 2017 JiHong Lee.
|
||
|
|
* MIT license.
|
||
|
|
*/
|
||
|
|
'use strict';
|
||
|
|
|
||
|
|
(function (global, factory) {
|
||
|
|
if (typeof module === 'object' && typeof module.exports === 'object') {
|
||
|
|
module.exports = global.document ?
|
||
|
|
factory(global, true) :
|
||
|
|
function (w) {
|
||
|
|
if (!w.document) {
|
||
|
|
throw new Error('SUNEDITOR_LANG a window with a document');
|
||
|
|
}
|
||
|
|
return factory(w);
|
||
|
|
};
|
||
|
|
} else {
|
||
|
|
factory(global);
|
||
|
|
}
|
||
|
|
}(typeof window !== 'undefined' ? window : this, function (window, noGlobal) {
|
||
|
|
const lang = {
|
||
|
|
code: 'ko',
|
||
|
|
toolbar: {
|
||
|
|
default: '기본값',
|
||
|
|
save: '저장',
|
||
|
|
font: '글꼴',
|
||
|
|
formats: '문단 형식',
|
||
|
|
fontSize: '크기',
|
||
|
|
bold: '굵게',
|
||
|
|
underline: '밑줄',
|
||
|
|
italic: '기울임',
|
||
|
|
strike: '취소선',
|
||
|
|
subscript: '아래 첨자',
|
||
|
|
superscript: '위 첨자',
|
||
|
|
removeFormat: '형식 제거',
|
||
|
|
fontColor: '글자색',
|
||
|
|
hiliteColor: '배경색',
|
||
|
|
indent: '들여쓰기',
|
||
|
|
outdent: '내어쓰기',
|
||
|
|
align: '정렬',
|
||
|
|
alignLeft: '왼쪽 정렬',
|
||
|
|
alignRight: '오른쪽 정렬',
|
||
|
|
alignCenter: '가운데 정렬',
|
||
|
|
alignJustify: '양쪽 정렬',
|
||
|
|
list: '리스트',
|
||
|
|
orderList: '숫자형 리스트',
|
||
|
|
unorderList: '원형 리스트',
|
||
|
|
horizontalRule: '가로 줄 삽입',
|
||
|
|
hr_solid: '실선',
|
||
|
|
hr_dotted: '점선',
|
||
|
|
hr_dashed: '대시',
|
||
|
|
table: '테이블',
|
||
|
|
link: '링크',
|
||
|
|
math: '수식',
|
||
|
|
image: '이미지',
|
||
|
|
video: '동영상',
|
||
|
|
audio: '오디오',
|
||
|
|
fullScreen: '전체 화면',
|
||
|
|
showBlocks: '블록 보기',
|
||
|
|
codeView: 'HTML 편집',
|
||
|
|
undo: '실행 취소',
|
||
|
|
redo: '다시 실행',
|
||
|
|
preview: '미리보기',
|
||
|
|
print: '인쇄',
|
||
|
|
tag_p: '본문',
|
||
|
|
tag_div: '기본 (DIV)',
|
||
|
|
tag_h: '제목',
|
||
|
|
tag_blockquote: '인용문',
|
||
|
|
tag_pre: '코드',
|
||
|
|
template: '템플릿',
|
||
|
|
lineHeight: '줄 높이',
|
||
|
|
paragraphStyle: '문단 스타일',
|
||
|
|
textStyle: '글자 스타일',
|
||
|
|
imageGallery: '이미지 갤러리',
|
||
|
|
mention: '멘션'
|
||
|
|
},
|
||
|
|
dialogBox: {
|
||
|
|
linkBox: {
|
||
|
|
title: '링크 삽입',
|
||
|
|
url: '인터넷 주소',
|
||
|
|
text: '화면 텍스트',
|
||
|
|
newWindowCheck: '새창으로 열기',
|
||
|
|
downloadLinkCheck: '다운로드 링크',
|
||
|
|
bookmark: '북마크'
|
||
|
|
},
|
||
|
|
mathBox: {
|
||
|
|
title: '수식',
|
||
|
|
inputLabel: '수학적 표기법',
|
||
|
|
fontSizeLabel: '글자 크기',
|
||
|
|
previewLabel: '미리보기'
|
||
|
|
},
|
||
|
|
imageBox: {
|
||
|
|
title: '이미지 삽입',
|
||
|
|
file: '파일 선택',
|
||
|
|
url: '이미지 주소',
|
||
|
|
altText: '대체 문자열'
|
||
|
|
},
|
||
|
|
videoBox: {
|
||
|
|
title: '동영상 삽입',
|
||
|
|
file: '파일 선택',
|
||
|
|
url: '미디어 임베드 주소, 유튜브/비메오'
|
||
|
|
},
|
||
|
|
audioBox: {
|
||
|
|
title: '오디오 삽입',
|
||
|
|
file: '파일 선택',
|
||
|
|
url: '오디오 파일 주소'
|
||
|
|
},
|
||
|
|
browser: {
|
||
|
|
tags: '태그',
|
||
|
|
search: '검색',
|
||
|
|
},
|
||
|
|
caption: '설명 넣기',
|
||
|
|
close: '닫기',
|
||
|
|
submitButton: '확인',
|
||
|
|
revertButton: '되돌리기',
|
||
|
|
proportion: '비율 맞춤',
|
||
|
|
basic: '기본',
|
||
|
|
left: '왼쪽',
|
||
|
|
right: '오른쪽',
|
||
|
|
center: '가운데',
|
||
|
|
width: '가로',
|
||
|
|
height: '세로',
|
||
|
|
size: '크기',
|
||
|
|
ratio: '비율'
|
||
|
|
},
|
||
|
|
controller: {
|
||
|
|
edit: '편집',
|
||
|
|
unlink: '링크 해제',
|
||
|
|
remove: '삭제',
|
||
|
|
insertRowAbove: '위에 행 삽입',
|
||
|
|
insertRowBelow: '아래에 행 삽입',
|
||
|
|
deleteRow: '행 삭제',
|
||
|
|
insertColumnBefore: '왼쪽에 열 삽입',
|
||
|
|
insertColumnAfter: '오른쪽에 열 삽입',
|
||
|
|
deleteColumn: '열 삭제',
|
||
|
|
fixedColumnWidth: '고정 된 열 너비',
|
||
|
|
resize100: '100% 크기',
|
||
|
|
resize75: '75% 크기',
|
||
|
|
resize50: '50% 크기',
|
||
|
|
resize25: '25% 크기',
|
||
|
|
autoSize: '자동 크기',
|
||
|
|
mirrorHorizontal: '좌우 반전',
|
||
|
|
mirrorVertical: '상하 반전',
|
||
|
|
rotateLeft: '왼쪽으로 회전',
|
||
|
|
rotateRight: '오른쪽으로 회전',
|
||
|
|
maxSize: '최대화',
|
||
|
|
minSize: '최소화',
|
||
|
|
tableHeader: '테이블 제목',
|
||
|
|
mergeCells: '셀 병합',
|
||
|
|
splitCells: '셀 분할',
|
||
|
|
HorizontalSplit: '가로 분할',
|
||
|
|
VerticalSplit: '세로 분할'
|
||
|
|
},
|
||
|
|
menu: {
|
||
|
|
spaced: '글자 간격',
|
||
|
|
bordered: '경계선',
|
||
|
|
neon: '네온',
|
||
|
|
translucent: '반투명',
|
||
|
|
shadow: '그림자',
|
||
|
|
code: '코드'
|
||
|
|
}
|
||
|
|
};
|
||
|
|
|
||
|
|
if (typeof noGlobal === typeof undefined) {
|
||
|
|
if (!window.SUNEDITOR_LANG) {
|
||
|
|
Object.defineProperty(window, 'SUNEDITOR_LANG', {
|
||
|
|
enumerable: true,
|
||
|
|
writable: false,
|
||
|
|
configurable: false,
|
||
|
|
value: {}
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
Object.defineProperty(window.SUNEDITOR_LANG, 'ko', {
|
||
|
|
enumerable: true,
|
||
|
|
writable: true,
|
||
|
|
configurable: true,
|
||
|
|
value: lang
|
||
|
|
});
|
||
|
|
}
|
||
|
|
|
||
|
|
return lang;
|
||
|
|
}));
|
||
|
|
/**
|
||
|
|
* Luckysheet plugin.js cdn code if needed to update then paste the code in this section below the
|
||
|
|
* latest code from luckysheet cdn i.e plugin.js
|
||
|
|
*/
|
||
|
|
!function (t, e) { "object" == typeof module && "object" == typeof module.exports ? module.exports = t.document ? e(t, !0) : function (t) { if (!t.document) throw new Error("jQuery requires a window with a document"); return e(t) } : e(t) }("undefined" != typeof window ? window : this, function (x, t) { function e(t, e) { return e.toUpperCase() } var n = [], C = x.document, l = n.slice, g = n.concat, a = n.push, i = n.indexOf, r = {}, o = r.toString, d = r.hasOwnProperty, m = {}, s = "2.2.4", k = function (t, e) { return new k.fn.init(t, e) }, u = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, c = /^-ms-/, h = /-([\da-z])/gi; function f(t) { var e = !!t && "length" in t && t.length, n = k.type(t); return "function" !== n && !k.isWindow(t) && ("array" === n || 0 === e || "number" == typeof e && 0 < e && e - 1 in t) } k.fn = k.prototype = { jquery: s, constructor: k, selector: "", length: 0, toArray: function () { return l.call(this) }, get: function (t) { return null != t ? t < 0 ? this[t + this.length] : this[t] : l.call(this) }, pushStack: function (t) { t = k.merge(this.constructor(), t); return t.prevObject = this, t.context = this.context, t }, each: function (t) { return k.each(this, t) }, map: function (n) { return this.pushStack(k.map(this, function (t, e) { return n.call(t, e, t) })) }, slice: function () { return this.pushStack(l.apply(this, arguments)) }, first: function () { return this.eq(0) }, last: function () { return this.eq(-1) }, eq: function (t) { var e = this.length, t = +t + (t < 0 ? e : 0); return this.pushStack(0 <= t && t < e ? [this[t]] : []) }, end: function () { return this.prevObject || this.constructor() }, push: a, sort: n.sort, splice: n.splice }, k.extend = k.fn.extend = function () { var t, e, n, r, i, o = arguments[0] || {}, s = 1, a = arguments.length, u = !1; for ("boolean" == typeof o && (u = o, o = arguments[s] || {}, s++), "object" == typeof o || k.isFunction(o) || (o = {}), s === a && (o = this, s--); s < a; s++)if (null != (t = arguments[s])) for (e in t) i = o[e], n = t[e], o !== n && (u && n && (k.isPlainObject(n) || (r = k.isArray(n))) ? (i = r ? (r = !1, i && k.isArray(i) ? i : []) : i && k.isPlainObject(i) ? i : {}, o[e] = k.extend(u, i, n)) : void 0 !== n && (o[e] = n)); return o }, k.extend({ expando: "jQuery" + (s + Math.random()).replace(/\D/g, ""), isReady: !0, error: function (t) { throw new Error(t) }, noop: function () { }, isFunction: function (t) { return "function" === k.type(t) }, isArray: Array.isArray, isWindow: function (t) { return null != t && t === t.window }, isNumeric: function (t) { var e = t && t.toString(); return !k.isArray(t) && 0 <= e - parseFloat(e) + 1 }, isPlainObject: function (t) { if ("object" !== k.type(t) || t.nodeType || k.isWindow(t)) return !1; if (t.constructor && !d.call(t, "constructor") && !d.call(t.constructor.prototype || {}, "isPrototypeOf")) return !1; for (var e in t); return void 0 === e || d.call(t, e) }, isEmptyObject: function (t) { for (var e in t) return !1; return !0 }, type: function (t) { return null == t ? t + "" : "object" == typeof t || "function" == typeof t ? r[o.call(t)] || "object" : typeof t }, globalEval: function (t) { var e, n = eval; (t = k.trim(t)) && (1 === t.indexOf("use strict") ? ((e = C.createElement("script")).text = t, C.head.appendChild(e).parentNode.removeChild(e)) : n(t)) }, camelCase: function (t) { return t.replace(c, "ms-").replace(h, e) }, nodeName: function (t, e) { return t.nodeName && t.nodeName.toLowerCase() === e.toLowerCase() }, each: function (t, e) { var n, r = 0; if (f(t)) for (n = t.length; r < n && !1 !== e.call(t[r], r, t[r]); r++); else for (r in t) if (!1 === e.call(t[r], r, t[r])) break; return t }, trim: function (t) { return null == t ? "" : (t + "").replace(u, "") }, makeArray: function (t, e) { e = e || []; return null != t && (f(Object(t)) ? k.merge(e, "string" == typeof t ? [t] : t) : a.call(e, t)), e }, inArray: function (t, e, n) { return null == e ? -1 : i.call(e, t, n) }, merge: function (t, e) { for (var n = +e.length, r = 0, i = t.length; r < n; r++)t[i++] = e[r]; return t.len
|
||
|
|
|
||
|
|
/**
|
||
|
|
* luckysheet umd.js cdn code if needed to update then paste the code in this section below the
|
||
|
|
* latest code from luckysheet cdn i.e umd.js
|
||
|
|
*/
|
||
|
|
!function (e, t) { "object" == typeof exports && "undefined" != typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define(t) : (e = "undefined" != typeof globalThis ? globalThis : e || self).luckysheet = t() }(this, (function () {
|
||
|
|
"use strict"; var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {}; function t(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e } function a(e, t, a) { return e(a = { path: t, exports: {}, require: function (e, t) { return function () { throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs") }(null == t && a.path) } }, a.exports), a.exports } var n = function (e) { return e && e.Math == Math && e }, l = n("object" == typeof globalThis && globalThis) || n("object" == typeof window && window) || n("object" == typeof self && self) || n("object" == typeof e && e) || Function("return this")(), o = function (e) { try { return !!e() } catch (e) { return !0 } }, s = !o((function () { return 7 != Object.defineProperty({}, 1, { get: function () { return 7 } })[1] })), u = {}.propertyIsEnumerable, d = Object.getOwnPropertyDescriptor, h = { f: d && !u.call({ 1: 2 }, 1) ? function (e) { var t = d(this, e); return !!t && t.enumerable } : u }, m = function (e, t) { return { enumerable: !(1 & e), configurable: !(2 & e), writable: !(4 & e), value: t } }, p = {}.toString, f = function (e) { return p.call(e).slice(8, -1) }, g = "".split, v = o((function () { return !Object("z").propertyIsEnumerable(0) })) ? function (e) { return "String" == f(e) ? g.call(e, "") : Object(e) } : Object, y = function (e) { if (null == e) throw TypeError("Can't call method on " + e); return e }, b = function (e) { return v(y(e)) }, k = function (e) { return "object" == typeof e ? null !== e : "function" == typeof e }, x = function (e, t) { if (!k(e)) return e; var a, r; if (t && "function" == typeof (a = e.toString) && !k(r = a.call(e))) return r; if ("function" == typeof (a = e.valueOf) && !k(r = a.call(e))) return r; if (!t && "function" == typeof (a = e.toString) && !k(r = a.call(e))) return r; throw TypeError("Can't convert object to primitive value") }, w = {}.hasOwnProperty, _ = function (e, t) { return w.call(e, t) }, C = l.document, T = k(C) && k(C.createElement), A = function (e) { return T ? C.createElement(e) : {} }, S = !s && !o((function () { return 7 != Object.defineProperty(A("div"), "a", { get: function () { return 7 } }).a })), I = Object.getOwnPropertyDescriptor, R = { f: s ? I : function (e, t) { if (e = b(e), t = x(t, !0), S) try { return I(e, t) } catch (e) { } if (_(e, t)) return m(!h.f.call(e, t), e[t]) } }, q = function (e) { if (!k(e)) throw TypeError(String(e) + " is not an object"); return e }, D = Object.defineProperty, F = { f: s ? D : function (e, t, a) { if (q(e), t = x(t, !0), q(a), S) try { return D(e, t, a) } catch (e) { } if ("get" in a || "set" in a) throw TypeError("Accessors not supported"); return "value" in a && (e[t] = a.value), e } }, E = s ? function (e, t, a) { return F.f(e, t, m(1, a)) } : function (e, t, a) { return e[t] = a, e }, M = function (e, t) { try { E(l, e, t) } catch (a) { l[e] = t } return t }, N = l["__core-js_shared__"] || M("__core-js_shared__", {}), P = Function.toString; "function" != typeof N.inspectSource && (N.inspectSource = function (e) { return P.call(e) }); var z, L, O, B = N.inspectSource, V = l.WeakMap, H = "function" == typeof V && /native code/.test(B(V)), U = a((function (e) { (e.exports = function (e, t) { return N[e] || (N[e] = void 0 !== t ? t : {}) })("versions", []).push({ version: "3.6.5", mode: "global", copyright: "© 2020 Denis Pushkarev (zloirock.ru)" }) })), j = 0, G = Math.random(), W = function (e) { return "Symbol(" + String(void 0 === e ? "" : e) + ")_" + (++j + G).toString(36) }, Y = U("keys"), X = function (e) { return Y[e] || (Y[e] = W(e)) }, K = {}, Z = l.WeakMap; if (H) { var Q = new Z, J = Q.get, ee = Q.has, te = Q.set; z = function (e, t) { return te.call(Q, e, t), t }, L = function (e) { return J.call(Q, e) || {} }, O = function (e) { return ee.call(Q, e) } } else { var ae = X("state"); K[ae] = !0, z = function (e, t) { return E(e, ae, t), t }, L = functio
|
||
|
|
/*! @preserve
|
||
|
|
* numeral.js
|
||
|
|
* version : 2.0.6
|
||
|
|
* author : Adam Draper
|
||
|
|
* license : MIT
|
||
|
|
* http://adamwdraper.github.com/Numeral-js/
|
||
|
|
*/
|
||
|
|
!function (e, a) { t.exports ? t.exports = a() : e.numeral = a() }(e, (function () { var e, t, a, r, n, l = {}, i = {}, o = { currentLocale: "en", zeroFormat: null, nullFormat: null, defaultFormat: "0,0", scalePercentBy100: !0 }, s = { currentLocale: o.currentLocale, zeroFormat: o.zeroFormat, nullFormat: o.nullFormat, defaultFormat: o.defaultFormat, scalePercentBy100: o.scalePercentBy100 }; function c(e, t) { this._input = e, this._value = t } return (e = function (a) { var r, n, i, o; if (e.isNumeral(a)) r = a.value(); else if (0 === a || void 0 === a) r = 0; else if (null === a || t.isNaN(a)) r = null; else if ("string" == typeof a) if (s.zeroFormat && a === s.zeroFormat) r = 0; else if (s.nullFormat && a === s.nullFormat || !a.replace(/[^0-9]+/g, "").length) r = null; else { for (n in l) if ((o = "function" == typeof l[n].regexps.unformat ? l[n].regexps.unformat() : l[n].regexps.unformat) && a.match(o)) { i = l[n].unformat; break } r = (i = i || e._.stringToNumber)(a) } else r = Number(a) || null; return new c(a, r) }).version = "2.0.6", e.isNumeral = function (e) { return e instanceof c }, e._ = t = { numberToFormat: function (t, a, r) { var n, l, o, s, c, u, d, h, m = i[e.options.currentLocale], p = !1, f = !1, g = "", v = "", y = !1; if (t = t || 0, o = Math.abs(t), e._.includes(a, "(") ? (p = !0, a = a.replace(/[\(|\)]/g, "")) : (e._.includes(a, "+") || e._.includes(a, "-")) && (u = e._.includes(a, "+") ? a.indexOf("+") : t < 0 ? a.indexOf("-") : -1, a = a.replace(/[\+|\-]/g, "")), e._.includes(a, "a") && (l = !!(l = a.match(/a(k|m|b|t)?/)) && l[1], e._.includes(a, " a") && (g = " "), a = a.replace(new RegExp(g + "a[kmbt]?"), ""), o >= 1e12 && !l || "t" === l ? (g += m.abbreviations.trillion, t /= 1e12) : o < 1e12 && o >= 1e9 && !l || "b" === l ? (g += m.abbreviations.billion, t /= 1e9) : o < 1e9 && o >= 1e6 && !l || "m" === l ? (g += m.abbreviations.million, t /= 1e6) : (o < 1e6 && o >= 1e3 && !l || "k" === l) && (g += m.abbreviations.thousand, t /= 1e3)), e._.includes(a, "[.]") && (f = !0, a = a.replace("[.]", ".")), s = t.toString().split(".")[0], c = a.split(".")[1], d = a.indexOf(","), n = (a.split(".")[0].split(",")[0].match(/0/g) || []).length, c ? (e._.includes(c, "[") ? (c = (c = c.replace("]", "")).split("["), v = e._.toFixed(t, c[0].length + c[1].length, r, c[1].length)) : v = e._.toFixed(t, c.length, r), s = v.split(".")[0], v = e._.includes(v, ".") ? m.delimiters.decimal + v.split(".")[1] : "", f && 0 === Number(v.slice(1)) && (v = "")) : s = e._.toFixed(t, 0, r), g && !l && Number(s) >= 1e3 && g !== m.abbreviations.trillion) switch (s = String(Number(s) / 1e3), g) { case m.abbreviations.thousand: g = m.abbreviations.million; break; case m.abbreviations.million: g = m.abbreviations.billion; break; case m.abbreviations.billion: g = m.abbreviations.trillion }if (e._.includes(s, "-") && (s = s.slice(1), y = !0), s.length < n) for (var b = n - s.length; b > 0; b--)s = "0" + s; return d > -1 && (s = s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1" + m.delimiters.thousands)), 0 === a.indexOf(".") && (s = ""), h = s + v + (g || ""), p ? h = (p && y ? "(" : "") + h + (p && y ? ")" : "") : u >= 0 ? h = 0 === u ? (y ? "-" : "+") + h : h + (y ? "-" : "+") : y && (h = "-" + h), h }, stringToNumber: function (e) { var t, a, r, n = i[s.currentLocale], l = e, o = { thousand: 3, million: 6, billion: 9, trillion: 12 }; if (s.zeroFormat && e === s.zeroFormat) a = 0; else if (s.nullFormat && e === s.nullFormat || !e.replace(/[^0-9]+/g, "").length) a = null; else { for (t in a = 1, "." !== n.delimiters.decimal && (e = e.replace(/\./g, "").replace(n.delimiters.decimal, ".")), o) if (r = new RegExp("[^a-zA-Z]" + n.abbreviations[t] + "(?:\\)|(\\" + n.currency.symbol + ")?(?:\\))?)?$"), l.match(r)) { a *= Math.pow(10, o[t]); break } a *= (e.split("-").length + Math.min(e.split("(").length - 1, e.split(")").length - 1)) % 2 ? 1 : -1, e = e.replace(/[^0-9\.]+/g, ""), a *= Number(e) } return a }, isNaN: function (e) { return "number" == typeof e && isNaN(e) }, includes: function (e, t) { return -1 !== e.indexOf(t)
|
||
|
|
})), gs = {}; !function (e) { function t(e) { for (var t = "", a = e.length - 1; a >= 0;)t += e.charAt(a--); return t } function a(e, t) { for (var a = ""; a.length < t;)a += e; return a } function r(e, t) { var r = "" + e; return r.length >= t ? r : a("0", t - r.length) + r } function n(e, t) { var r = "" + e; return r.length >= t ? r : a(" ", t - r.length) + r } function l(e, t) { var r = "" + e; return r.length >= t ? r : r + a(" ", t - r.length) } e.version = "0.11.2"; var i = Math.pow(2, 32); function o(e, t) { return e > i || e < -i ? function (e, t) { var r = "" + Math.round(e); return r.length >= t ? r : a("0", t - r.length) + r }(e, t) : function (e, t) { var r = "" + e; return r.length >= t ? r : a("0", t - r.length) + r }(Math.round(e), t) } function s(e, t) { return t = t || 0, e.length >= 7 + t && 103 == (32 | e.charCodeAt(t)) && 101 == (32 | e.charCodeAt(t + 1)) && 110 == (32 | e.charCodeAt(t + 2)) && 101 == (32 | e.charCodeAt(t + 3)) && 114 == (32 | e.charCodeAt(t + 4)) && 97 == (32 | e.charCodeAt(t + 5)) && 108 == (32 | e.charCodeAt(t + 6)) } var c = [["Sun", "Sunday"], ["Mon", "Monday"], ["Tue", "Tuesday"], ["Wed", "Wednesday"], ["Thu", "Thursday"], ["Fri", "Friday"], ["Sat", "Saturday"]], u = [["J", "Jan", "January"], ["F", "Feb", "February"], ["M", "Mar", "March"], ["A", "Apr", "April"], ["M", "May", "May"], ["J", "Jun", "June"], ["J", "Jul", "July"], ["A", "Aug", "August"], ["S", "Sep", "September"], ["O", "Oct", "October"], ["N", "Nov", "November"], ["D", "Dec", "December"]]; function d(e) { e[0] = "General", e[1] = "0", e[2] = "0.00", e[3] = "#,##0", e[4] = "#,##0.00", e[9] = "0%", e[10] = "0.00%", e[11] = "0.00E+00", e[12] = "# ?/?", e[13] = "# ??/??", e[14] = "m/d/yy", e[15] = "d-mmm-yy", e[16] = "d-mmm", e[17] = "mmm-yy", e[18] = "h:mm AM/PM", e[19] = "h:mm:ss AM/PM", e[20] = "h:mm", e[21] = "h:mm:ss", e[22] = "m/d/yy h:mm", e[37] = "#,##0 ;(#,##0)", e[38] = "#,##0 ;[Red](#,##0)", e[39] = "#,##0.00;(#,##0.00)", e[40] = "#,##0.00;[Red](#,##0.00)", e[45] = "mm:ss", e[46] = "[h]:mm:ss", e[47] = "mmss.0", e[48] = "##0.0E+0", e[49] = "@", e[56] = '"上午/下午 "hh"時"mm"分"ss"秒 "', e[65535] = "General" } var h = {}; d(h); var m = [], p = 0; for (p = 5; p <= 8; ++p)m[p] = 32 + p; for (p = 23; p <= 26; ++p)m[p] = 0; for (p = 27; p <= 31; ++p)m[p] = 14; for (p = 50; p <= 58; ++p)m[p] = 14; for (p = 59; p <= 62; ++p)m[p] = p - 58; for (p = 67; p <= 68; ++p)m[p] = p - 58; for (p = 72; p <= 75; ++p)m[p] = p - 58; for (p = 67; p <= 68; ++p)m[p] = p - 57; for (p = 76; p <= 78; ++p)m[p] = p - 56; for (p = 79; p <= 81; ++p)m[p] = p - 34; var f = []; function g(e, t, a) { for (var r = e < 0 ? -1 : 1, n = e * r, l = 0, i = 1, o = 0, s = 1, c = 0, u = 0, d = Math.floor(n); c < t && (o = (d = Math.floor(n)) * i + l, u = d * c + s, !(n - d < 5e-8));)n = 1 / (n - d), l = i, i = o, s = c, c = u; if (u > t && (c > t ? (u = s, o = l) : (u = c, o = i)), !a) return [0, r * o, u]; var h = Math.floor(r * o / u); return [h, r * o - h * u, u] } function v(e, t, a) { if (e > 2958465 || e < 0) return null; var r = 0 | e, n = Math.floor(86400 * (e - r)), l = 0, i = [], o = { D: r, T: n, u: 86400 * (e - r) - n, y: 0, m: 0, d: 0, H: 0, M: 0, S: 0, q: 0 }; if (Math.abs(o.u) < 1e-6 && (o.u = 0), t && t.date1904 && (r += 1462), o.u > .9999 && (o.u = 0, 86400 == ++n && (o.T = n = 0, ++r, ++o.D)), 60 === r) i = a ? [1317, 10, 29] : [1900, 2, 29], l = 3; else if (0 === r) i = a ? [1317, 8, 29] : [1900, 1, 0], l = 6; else { r > 60 && --r; var s = new Date(1900, 0, 1); s.setDate(s.getDate() + r - 1), i = [s.getFullYear(), s.getMonth() + 1, s.getDate()], l = s.getDay(), r < 60 && (l = (l + 6) % 7), a && (l = function (e, t) { t[0] -= 581; var a = e.getDay(); e < 60 && (a = (a + 6) % 7); return a }(s, i)) } return o.y = i[0], o.m = i[1], o.d = i[2], o.S = n % 60, n = Math.floor(n / 60), o.M = n % 60, n = Math.floor(n / 60), o.H = n, o.q = l, o } f[5] = f[63] = '"$"#,##0_);\\("$"#,##0\\)', f[6] = f[64] = '"$"#,##0_);[Red]\\("$"#,##0\\)', f[7] = f[65] = '"$"#,##0.00_);\\("$"#,##0.00\\)', f[8] = f[66] = '"$"#,##0.00_);[Red]\\("$"#,#
|
||
|
|
/* flatpickr v4.6.6, @license MIT */
|
||
|
|
e.exports = function () {
|
||
|
|
/*! *****************************************************************************
|
||
|
|
Copyright (c) Microsoft Corporation.
|
||
|
|
|
||
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
||
|
|
purpose with or without fee is hereby granted.
|
||
|
|
|
||
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||
|
|
PERFORMANCE OF THIS SOFTWARE.
|
||
|
|
***************************************************************************** */
|
||
|
|
var e = function () { return (e = Object.assign || function (e) { for (var t, a = 1, r = arguments.length; a < r; a++)for (var n in t = arguments[a]) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]); return e }).apply(this, arguments) }; function t() { for (var e = 0, t = 0, a = arguments.length; t < a; t++)e += arguments[t].length; var r = Array(e), n = 0; for (t = 0; t < a; t++)for (var l = arguments[t], i = 0, o = l.length; i < o; i++, n++)r[n] = l[i]; return r } var a = ["onChange", "onClose", "onDayCreate", "onDestroy", "onKeyDown", "onMonthChange", "onOpen", "onParseConfig", "onReady", "onValueUpdate", "onYearChange", "onPreCalendarPosition"], r = { _disable: [], _enable: [], allowInput: !1, allowInvalidPreload: !1, altFormat: "F j, Y", altInput: !1, altInputClass: "form-control input", animate: "object" == typeof window && -1 === window.navigator.userAgent.indexOf("MSIE"), ariaDateFormat: "F j, Y", autoFillDefaultTime: !0, clickOpens: !0, closeOnSelect: !0, conjunction: ", ", dateFormat: "Y-m-d", defaultHour: 12, defaultMinute: 0, defaultSeconds: 0, disable: [], disableMobile: !1, enable: [], enableSeconds: !1, enableTime: !1, errorHandler: function (e) { return "undefined" != typeof console && console.warn(e) }, getWeek: function (e) { var t = new Date(e.getTime()); t.setHours(0, 0, 0, 0), t.setDate(t.getDate() + 3 - (t.getDay() + 6) % 7); var a = new Date(t.getFullYear(), 0, 4); return 1 + Math.round(((t.getTime() - a.getTime()) / 864e5 - 3 + (a.getDay() + 6) % 7) / 7) }, hourIncrement: 1, ignoredFocusElements: [], inline: !1, locale: "default", minuteIncrement: 5, mode: "single", monthSelectorType: "dropdown", nextArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>", noCalendar: !1, now: new Date, onChange: [], onClose: [], onDayCreate: [], onDestroy: [], onKeyDown: [], onMonthChange: [], onOpen: [], onParseConfig: [], onReady: [], onValueUpdate: [], onYearChange: [], onPreCalendarPosition: [], plugins: [], position: "auto", positionElement: void 0, prevArrow: "<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>", shorthandCurrentMonth: !1, showMonths: 1, static: !1, time_24hr: !1, weekNumbers: !1, wrap: !1 }, n = { weekdays: { shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], longhand: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"] }, months: { shorthand: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], longhand: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"] }, daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], firstDayOfWeek: 0, ordinal: function (e) { var t = e % 100; if (t > 3 && t < 21) return "th"; switch (t % 10) { case 1: return "st"; case 2: return "nd"; case 3: return "rd"; default: return "th" } }, rangeSeparator: " to ", weekAbbreviation: "Wk", scrollTitle: "Scroll to increment", toggleTitle: "Click to toggle", amPM: ["AM", "PM"], yearAriaLabel: "Year", monthAriaLabel: "Month", hourAriaLabel: "Hour", minuteAriaLabel: "Minute", time_24hr: !1 }, l = function (e, t) { return void 0 === t && (t = 2), ("000" + e).slice(-1 * t) }, i = function (e) { return !0 === e ? 1 : 0 }; function o(e, t, a) { var r; return void 0 === a && (a = !1), function () { var n = this, l = arguments; null !== r && clearTimeout(r), r = window.setTimeout((function () { r = null, a || e.apply(n, l) }), t), a && !r && e.apply(n, l) } } var s = function (e) { return e instanceof Array ? e : [e] }; function c(e, t, a) { if (!0 === a) return e.classList.add(t); e.classList.remove(t) } function u(e, t, a) { var r = window.document.createElement(e); return t = t || "", a = a || "", r.clas
|
||
|
|
}()
|
||
|
|
})), Hh = Math.sign || function (e) { return 0 == (e = +e) || e != e ? e : e < 0 ? -1 : 1 }, Uh = Math.abs, jh = Math.pow; function Gh(e) { var t = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : "redo"; if (null != e) { var a = e.data; "undo" == t && (a = e.curdata); for (var r = 0; r < e.range.length; r++)for (var n = e.range[r].row[0], l = e.range[r].row[1], i = e.range[r].column[0], o = e.range[r].column[1], s = n; s < l + 1; s++)for (var c = i; c < o + 1 && !(s > a.length - 1); c++)null == a[s][c] || null == a[s][c].f || "" == a[s][c].f ? Ih.delFunctionGroup(s, c, e.sheetIndex) : null != a[s][c] && null != a[s][c].f && a[s][c].f.length > 0 && Ih.insertUpdateFunctionGroup(s, c, e.sheetIndex) } } Ee({ target: "Math", stat: !0 }, { cbrt: function (e) { return Hh(e = +e) * jh(Uh(e), 1 / 3) } }); var Wh = function (e) { if (0 != ga.jfredo.length) { var t = ga.jfredo.pop(); if (ga.jfundo.push(t), ga.clearjfundo = !1, Sh.hasSheet(t.sheetIndex) && ga.currentSheetIndex != t.sheetIndex && Sh.changeSheetExec(t.sheetIndex), "datachange" == t.type) { Gh(t); var a = { cfg: t.config, RowlChange: t.RowlChange, cdformat: t.cdformat, dataVerification: t.dataVerification, dynamicArray: t.dynamicArray }; id(t.data, t.range, a) } else if ("pasteCut" == t.type) { dd({ sheetIndex: t.source.sheetIndex, data: t.source.curData, curData: t.source.data, config: t.source.curConfig, curConfig: t.source.config, cdformat: t.source.curCdformat, curCdformat: t.source.cdformat, dataVerification: t.source.curDataVerification, curDataVerification: t.source.dataVerification, range: t.source.range }, { sheetIndex: t.target.sheetIndex, data: t.target.curData, curData: t.target.data, config: t.target.curConfig, curConfig: t.target.config, cdformat: t.target.curCdformat, curCdformat: t.target.cdformat, dataVerification: t.target.curDataVerification, curDataVerification: t.target.dataVerification, range: t.target.range }, t.RowlChange) } else if ("rangechange" == t.type) Gh(t), sd(t.data, t.range, t.cdformat); else if ("resize" == t.type) { ga.config = t.config, ga.luckysheetfile[_l(t.sheetIndex)].config = ga.config, "resizeR" == t.ctrlType ? pd.saveParam("cg", t.sheetIndex, t.config.rowlen, { k: "rowlen" }) : "resizeC" == t.ctrlType && pd.saveParam("cg", t.sheetIndex, t.config.columnlen, { k: "columnlen" }); var r = $.extend(!0, {}, t.images); ga.luckysheetfile[_l(t.sheetIndex)].images = r, pd.saveParam("all", t.sheetIndex, r, { k: "images" }), Rc.images = r, Rc.allImagesShow(), hd(ga.flowdata.length, ga.flowdata[0].length) } else if ("cellRowChange" == t.type) od(t.data[0].length, t.data.length, t.data, t.config, t.range, t.ctrlType, t.ctrlValue, t.cdformat); else if ("extend" == t.type) od(t.data[0].length, t.data.length, t.data, t.config, t.range, "dele", t.ctrlValue); else if ("dele" == t.type) { var n = $.extend(!0, {}, t.ctrlValue); n.restore = !0, od(t.data[0].length, t.data.length, t.data, t.config, t.range, "extend", n) } else if ("addRC" == t.type) { var l = $.extend(!0, {}, t.ctrlValue); "rightbottom" == l.direction && (l.index = l.index + 1), cd(t.data, t.config, "delRC", l, t.calc, t.filterObj, t.cf, t.af, t.freezen, t.dataVerification, t.hyperlink) } else if ("delRC" == t.type) { var i = $.extend(!0, {}, t.ctrlValue); i.restore = !0, i.direction = "lefttop", cd(t.data, t.config, "addRC", i, t.calc, t.filterObj, t.cf, t.af, t.freezen, t.dataVerification, t.hyperlink) } else if ("deleteCell" == t.type) ud(t.data, t.config, t.ctrl, t.calc, t.filterObj, t.cf, t.dataVerification, t.hyperlink); else if ("showHidRows" == t.type) ga.config = t.config, ga.luckysheetfile[_l(t.sheetIndex)].config = t.config, pd.saveParam("cg", t.sheetIndex, t.config.rowhidden, { k: "rowhidden" }), hd(ga.flowdata.length, ga.flowdata[0].length); else if ("showHidCols" == t.type) ga.config = t.config, ga.luckysheetfile[_l(t.sheetIndex)].config = t.config, pd.saveParam("cg", t.sheetIndex, t.config.colhidden, { k: "colhidden" }), hd(ga.flowdata.length, ga.flowdata[0].length); else if ("datachangeAll" == t.type) Ih.execFunctionGroup(), od(t.data[0].length
|
||
|
|
}));
|
||
|
|
//# sourceMappingURL=luckysheet.umd.js.map
|
||
|
|
|
||
|
|
/**
|
||
|
|
* mkd-image-upload.js code below
|
||
|
|
*/
|
||
|
|
!function (t) { var e = {}; function i(a) { if (e[a]) return e[a].exports; var n = e[a] = { i: a, l: !1, exports: {} }; return t[a].call(n.exports, n, n.exports, i), n.l = !0, n.exports } i.m = t, i.c = e, i.d = function (t, e, a) { i.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: a }) }, i.r = function (t) { "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(t, "__esModule", { value: !0 }) }, i.t = function (t, e) { if (1 & e && (t = i(t)), 8 & e) return t; if (4 & e && "object" == typeof t && t && t.__esModule) return t; var a = Object.create(null); if (i.r(a), Object.defineProperty(a, "default", { enumerable: !0, value: t }), 2 & e && "string" != typeof t) for (var n in t) i.d(a, n, function (e) { return t[e] }.bind(null, n)); return a }, i.n = function (t) { var e = t && t.__esModule ? function () { return t.default } : function () { return t }; return i.d(e, "a", e), e }, i.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, i.p = "", i(i.s = 7) }([function (t, e, i) {
|
||
|
|
/*!
|
||
|
|
* Cropper.js v1.5.6
|
||
|
|
* https://fengyuanchen.github.io/cropperjs
|
||
|
|
*
|
||
|
|
* Copyright 2015-present Chen Fengyuan
|
||
|
|
* Released under the MIT license
|
||
|
|
*
|
||
|
|
* Date: 2019-10-04T04:33:48.372Z
|
||
|
|
*/
|
||
|
|
t.exports = function () { "use strict"; function t(e) { return (t = "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 })(e) } function e(t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") } function i(t, e) { for (var i = 0; i < e.length; i++) { var a = e[i]; a.enumerable = a.enumerable || !1, a.configurable = !0, "value" in a && (a.writable = !0), Object.defineProperty(t, a.key, a) } } function a(t, e, i) { return e in t ? Object.defineProperty(t, e, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = i, t } function n(t, e) { var i = Object.keys(t); if (Object.getOwnPropertySymbols) { var a = Object.getOwnPropertySymbols(t); e && (a = a.filter((function (e) { return Object.getOwnPropertyDescriptor(t, e).enumerable }))), i.push.apply(i, a) } return i } function r(t) { for (var e = 1; e < arguments.length; e++) { var i = null != arguments[e] ? arguments[e] : {}; e % 2 ? n(i, !0).forEach((function (e) { a(t, e, i[e]) })) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : n(i).forEach((function (e) { Object.defineProperty(t, e, Object.getOwnPropertyDescriptor(i, e)) })) } return t } function o(t) { return function (t) { if (Array.isArray(t)) { for (var e = 0, i = new Array(t.length); e < t.length; e++)i[e] = t[e]; return i } }(t) || function (t) { if (Symbol.iterator in Object(t) || "[object Arguments]" === Object.prototype.toString.call(t)) return Array.from(t) }(t) || function () { throw new TypeError("Invalid attempt to spread non-iterable instance") }() } var s = "undefined" != typeof window && void 0 !== window.document, l = s ? window : {}, c = !!s && "ontouchstart" in l.document.documentElement, h = !!s && "PointerEvent" in l, p = "".concat("cropper", "-crop"), d = "".concat("cropper", "-disabled"), u = "".concat("cropper", "-hidden"), f = "".concat("cropper", "-hide"), m = "".concat("cropper", "-invisible"), v = "".concat("cropper", "-modal"), g = "".concat("cropper", "-move"), w = "".concat("cropper", "Action"), y = "".concat("cropper", "Preview"), b = c ? "touchstart" : "mousedown", x = c ? "touchmove" : "mousemove", $ = c ? "touchend touchcancel" : "mouseup", k = h ? "pointerdown" : b, _ = h ? "pointermove" : x, S = h ? "pointerup pointercancel" : $, R = /^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/, z = /^data:/, E = /^data:image\/jpeg;base64,/, L = /^img|canvas$/i, C = { viewMode: 0, dragMode: "crop", initialAspectRatio: NaN, aspectRatio: NaN, data: null, preview: "", responsive: !0, restore: !0, checkCrossOrigin: !0, checkOrientation: !0, modal: !0, guides: !0, center: !0, highlight: !0, background: !0, autoCrop: !0, autoCropArea: .8, movable: !0, rotatable: !0, scalable: !0, zoomable: !0, zoomOnTouch: !0, zoomOnWheel: !0, wheelZoomRatio: .1, cropBoxMovable: !0, cropBoxResizable: !0, toggleDragModeOnDblclick: !0, minCanvasWidth: 0, minCanvasHeight: 0, minCropBoxWidth: 0, minCropBoxHeight: 0, minContainerWidth: 200, minContainerHeight: 100, ready: null, cropstart: null, cropmove: null, cropend: null, crop: null, zoom: null }, M = Number.isNaN || l.isNaN; function A(t) { return "number" == typeof t && !M(t) } var T = function (t) { return t > 0 && t < 1 / 0 }; function B(t) { return void 0 === t } function D(e) { return "object" === t(e) && null !== e } var U = Object.prototype.hasOwnProperty; function H(t) { if (!D(t)) return !1; try { var e = t.constructor, i = e.prototype; return e && i && U.call(i, "isPrototypeOf") } catch (t) { return !1 } } function O(t) { return "function" == typeof t } var P = Array.prototype.slice; function q(t) { return Array.from ? Array.from(t) : P.call(t) } function F(t, e) { return t && O(e) && (Array.isArray(t) || A(t.length) ? q(t).forEach((function (i, a) { e.call(t, i, a, t) })) : D(t) && Object.keys(t).forEach((function (i) { e.call(t, t[i], i, t) }))), t } var I = Object.assign || funct
|
||
|
|
}, function (t, e, i) { var a, n, r = i(5), o = i(6), s = (n = [], { activateTrap: function (t) { if (n.length > 0) { var e = n[n.length - 1]; e !== t && e.pause() } var i = n.indexOf(t); -1 === i ? n.push(t) : (n.splice(i, 1), n.push(t)) }, deactivateTrap: function (t) { var e = n.indexOf(t); -1 !== e && n.splice(e, 1), n.length > 0 && n[n.length - 1].unpause() } }); function l(t) { return setTimeout(t, 0) } t.exports = function (t, e) { var i = document, n = "string" == typeof t ? i.querySelector(t) : t, c = o({ returnFocusOnDeactivate: !0, escapeDeactivates: !0 }, e), h = { firstTabbableNode: null, lastTabbableNode: null, nodeFocusedBeforeActivation: null, mostRecentlyFocusedNode: null, active: !1, paused: !1 }, p = { activate: function (t) { if (h.active) return; x(), h.active = !0, h.paused = !1, h.nodeFocusedBeforeActivation = i.activeElement; var e = t && t.onActivate ? t.onActivate : c.onActivate; e && e(); return u(), p }, deactivate: d, pause: function () { if (h.paused || !h.active) return; h.paused = !0, f() }, unpause: function () { if (!h.paused || !h.active) return; h.paused = !1, x(), u() } }; return p; function d(t) { if (h.active) { clearTimeout(a), f(), h.active = !1, h.paused = !1, s.deactivateTrap(p); var e = t && void 0 !== t.onDeactivate ? t.onDeactivate : c.onDeactivate; return e && e(), (t && void 0 !== t.returnFocus ? t.returnFocus : c.returnFocusOnDeactivate) && l((function () { var t; $((t = h.nodeFocusedBeforeActivation, m("setReturnFocus") || t)) })), p } } function u() { if (h.active) return s.activateTrap(p), a = l((function () { $(v()) })), i.addEventListener("focusin", w, !0), i.addEventListener("mousedown", g, { capture: !0, passive: !1 }), i.addEventListener("touchstart", g, { capture: !0, passive: !1 }), i.addEventListener("click", b, { capture: !0, passive: !1 }), i.addEventListener("keydown", y, { capture: !0, passive: !1 }), p } function f() { if (h.active) return i.removeEventListener("focusin", w, !0), i.removeEventListener("mousedown", g, !0), i.removeEventListener("touchstart", g, !0), i.removeEventListener("click", b, !0), i.removeEventListener("keydown", y, !0), p } function m(t) { var e = c[t], a = e; if (!e) return null; if ("string" == typeof e && !(a = i.querySelector(e))) throw new Error("`" + t + "` refers to no known node"); if ("function" == typeof e && !(a = e())) throw new Error("`" + t + "` did not return a node"); return a } function v() { var t; if (!(t = null !== m("initialFocus") ? m("initialFocus") : n.contains(i.activeElement) ? i.activeElement : h.firstTabbableNode || m("fallbackFocus"))) throw new Error("Your focus-trap needs to have at least one focusable element"); return t } function g(t) { n.contains(t.target) || (c.clickOutsideDeactivates ? d({ returnFocus: !r.isFocusable(t.target) }) : c.allowOutsideClick && c.allowOutsideClick(t) || t.preventDefault()) } function w(t) { n.contains(t.target) || t.target instanceof Document || (t.stopImmediatePropagation(), $(h.mostRecentlyFocusedNode || v())) } function y(t) { if (!1 !== c.escapeDeactivates && function (t) { return "Escape" === t.key || "Esc" === t.key || 27 === t.keyCode }(t)) return t.preventDefault(), void d(); (function (t) { return "Tab" === t.key || 9 === t.keyCode })(t) && function (t) { if (x(), t.shiftKey && t.target === h.firstTabbableNode) return t.preventDefault(), void $(h.lastTabbableNode); if (!t.shiftKey && t.target === h.lastTabbableNode) t.preventDefault(), $(h.firstTabbableNode) }(t) } function b(t) { c.clickOutsideDeactivates || n.contains(t.target) || c.allowOutsideClick && c.allowOutsideClick(t) || (t.preventDefault(), t.stopImmediatePropagation()) } function x() { var t = r(n); h.firstTabbableNode = t[0] || v(), h.lastTabbableNode = t[t.length - 1] || v() } function $(t) { t !== i.activeElement && (t && t.focus ? (t.focus(), h.mostRecentlyFocusedNode = t, function (t) { return t.tagName && "input" === t.tagName.toLowerCase() && "function" == typeof t.select }(t) && t.select()) : $(v())) } } }, function (t, e, i) {
|
||
|
|
(function (e, i) {
|
||
|
|
/*!
|
||
|
|
* @overview es6-promise - a tiny implementation of Promises/A+.
|
||
|
|
* @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)
|
||
|
|
* @license Licensed under MIT license
|
||
|
|
* See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE
|
||
|
|
* @version v4.2.8+1e68dce6
|
||
|
|
*/var a; a = function () { "use strict"; function t(t) { return "function" == typeof t } var a = Array.isArray ? Array.isArray : function (t) { return "[object Array]" === Object.prototype.toString.call(t) }, n = 0, r = void 0, o = void 0, s = function (t, e) { f[n] = t, f[n + 1] = e, 2 === (n += 2) && (o ? o(m) : b()) }, l = "undefined" != typeof window ? window : void 0, c = l || {}, h = c.MutationObserver || c.WebKitMutationObserver, p = "undefined" == typeof self && void 0 !== e && "[object process]" === {}.toString.call(e), d = "undefined" != typeof Uint8ClampedArray && "undefined" != typeof importScripts && "undefined" != typeof MessageChannel; function u() { var t = setTimeout; return function () { return t(m, 1) } } var f = new Array(1e3); function m() { for (var t = 0; t < n; t += 2)(0, f[t])(f[t + 1]), f[t] = void 0, f[t + 1] = void 0; n = 0 } var v, g, w, y, b = void 0; function x(t, e) { var i = this, a = new this.constructor(_); void 0 === a[k] && B(a); var n = i._state; if (n) { var r = arguments[n - 1]; s((function () { return A(n, a, r, i._result) })) } else C(i, a, t, e); return a } function $(t) { if (t && "object" == typeof t && t.constructor === this) return t; var e = new this(_); return R(e, t), e } p ? b = function () { return e.nextTick(m) } : h ? (g = 0, w = new h(m), y = document.createTextNode(""), w.observe(y, { characterData: !0 }), b = function () { y.data = g = ++g % 2 }) : d ? ((v = new MessageChannel).port1.onmessage = m, b = function () { return v.port2.postMessage(0) }) : b = void 0 === l ? function () { try { var t = Function("return this")().require("vertx"); return void 0 !== (r = t.runOnLoop || t.runOnContext) ? function () { r(m) } : u() } catch (t) { return u() } }() : u(); var k = Math.random().toString(36).substring(2); function _() { } function S(e, i, a) { i.constructor === e.constructor && a === x && i.constructor.resolve === $ ? function (t, e) { 1 === e._state ? E(t, e._result) : 2 === e._state ? L(t, e._result) : C(e, void 0, (function (e) { return R(t, e) }), (function (e) { return L(t, e) })) }(e, i) : void 0 === a ? E(e, i) : t(a) ? function (t, e, i) { s((function (t) { var a = !1, n = function (t, e, i, a) { try { t.call(e, i, a) } catch (t) { return t } }(i, e, (function (i) { a || (a = !0, e !== i ? R(t, i) : E(t, i)) }), (function (e) { a || (a = !0, L(t, e)) }), t._label); !a && n && (a = !0, L(t, n)) }), t) }(e, i, a) : E(e, i) } function R(t, e) { if (t === e) L(t, new TypeError("You cannot resolve a promise with itself")); else if (n = typeof (a = e), null === a || "object" !== n && "function" !== n) E(t, e); else { var i = void 0; try { i = e.then } catch (e) { return void L(t, e) } S(t, e, i) } var a, n } function z(t) { t._onerror && t._onerror(t._result), M(t) } function E(t, e) { void 0 === t._state && (t._result = e, t._state = 1, 0 !== t._subscribers.length && s(M, t)) } function L(t, e) { void 0 === t._state && (t._state = 2, t._result = e, s(z, t)) } function C(t, e, i, a) { var n = t._subscribers, r = n.length; t._onerror = null, n[r] = e, n[r + 1] = i, n[r + 2] = a, 0 === r && t._state && s(M, t) } function M(t) { var e = t._subscribers, i = t._state; if (0 !== e.length) { for (var a = void 0, n = void 0, r = t._result, o = 0; o < e.length; o += 3)a = e[o], n = e[o + i], a ? A(i, a, n, r) : n(r); t._subscribers.length = 0 } } function A(e, i, a, n) { var r = t(a), o = void 0, s = void 0, l = !0; if (r) { try { o = a(n) } catch (t) { l = !1, s = t } if (i === o) return void L(i, new TypeError("A promises callback cannot return that same promise.")) } else o = n; void 0 !== i._state || (r && l ? R(i, o) : !1 === l ? L(i, s) : 1 === e ? E(i, o) : 2 === e && L(i, o)) } var T = 0; function B(t) { t[k] = T++, t._state = void 0, t._result = void 0, t._subscribers = [] } var D = function () { function t(t, e) { this._instanceConstructor = t, this.promise = new t(_), this.promise[k] || B(this.promise), a(e) ? (this.length = e.length, this._remaining = e.length, this._result = new Array(this.length), 0 === this.length ? E(this.promise, this._result) : (thi
|
||
|
|
}).call(this, i(3), i(4))
|
||
|
|
}, function (t, e) { var i, a, n = t.exports = {}; function r() { throw new Error("setTimeout has not been defined") } function o() { throw new Error("clearTimeout has not been defined") } function s(t) { if (i === setTimeout) return setTimeout(t, 0); if ((i === r || !i) && setTimeout) return i = setTimeout, setTimeout(t, 0); try { return i(t, 0) } catch (e) { try { return i.call(null, t, 0) } catch (e) { return i.call(this, t, 0) } } } !function () { try { i = "function" == typeof setTimeout ? setTimeout : r } catch (t) { i = r } try { a = "function" == typeof clearTimeout ? clearTimeout : o } catch (t) { a = o } }(); var l, c = [], h = !1, p = -1; function d() { h && l && (h = !1, l.length ? c = l.concat(c) : p = -1, c.length && u()) } function u() { if (!h) { var t = s(d); h = !0; for (var e = c.length; e;) { for (l = c, c = []; ++p < e;)l && l[p].run(); p = -1, e = c.length } l = null, h = !1, function (t) { if (a === clearTimeout) return clearTimeout(t); if ((a === o || !a) && clearTimeout) return a = clearTimeout, clearTimeout(t); try { a(t) } catch (e) { try { return a.call(null, t) } catch (e) { return a.call(this, t) } } }(t) } } function f(t, e) { this.fun = t, this.array = e } function m() { } n.nextTick = function (t) { var e = new Array(arguments.length - 1); if (arguments.length > 1) for (var i = 1; i < arguments.length; i++)e[i - 1] = arguments[i]; c.push(new f(t, e)), 1 !== c.length || h || s(u) }, f.prototype.run = function () { this.fun.apply(null, this.array) }, n.title = "browser", n.browser = !0, n.env = {}, n.argv = [], n.version = "", n.versions = {}, n.on = m, n.addListener = m, n.once = m, n.off = m, n.removeListener = m, n.removeAllListeners = m, n.emit = m, n.prependListener = m, n.prependOnceListener = m, n.listeners = function (t) { return [] }, n.binding = function (t) { throw new Error("process.binding is not supported") }, n.cwd = function () { return "/" }, n.chdir = function (t) { throw new Error("process.chdir is not supported") }, n.umask = function () { return 0 } }, function (t, e) { var i; i = function () { return this }(); try { i = i || new Function("return this")() } catch (t) { "object" == typeof window && (i = window) } t.exports = i }, function (t, e) { var i = ["input", "select", "textarea", "a[href]", "button", "[tabindex]", "audio[controls]", "video[controls]", '[contenteditable]:not([contenteditable="false"])'], a = i.join(","), n = "undefined" == typeof Element ? function () { } : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector; function r(t, e) { e = e || {}; var i, r, s, l = [], p = [], d = t.querySelectorAll(a); for (e.includeContainer && n.call(t, a) && (d = Array.prototype.slice.apply(d)).unshift(t), i = 0; i < d.length; i++)o(r = d[i]) && (0 === (s = c(r)) ? l.push(r) : p.push({ documentOrder: i, tabIndex: s, node: r })); return p.sort(h).map((function (t) { return t.node })).concat(l) } function o(t) { return !(!s(t) || function (t) { return function (t) { return p(t) && "radio" === t.type }(t) && !function (t) { if (!t.name) return !0; var e = function (t) { for (var e = 0; e < t.length; e++)if (t[e].checked) return t[e] }(t.ownerDocument.querySelectorAll('input[type="radio"][name="' + t.name + '"]')); return !e || e === t }(t) }(t) || c(t) < 0) } function s(t) { return !(t.disabled || function (t) { return p(t) && "hidden" === t.type }(t) || function (t) { return null === t.offsetParent || "hidden" === getComputedStyle(t).visibility }(t)) } r.isTabbable = function (t) { if (!t) throw new Error("No node provided"); return !1 !== n.call(t, a) && o(t) }, r.isFocusable = function (t) { if (!t) throw new Error("No node provided"); return !1 !== n.call(t, l) && s(t) }; var l = i.concat("iframe").join(","); function c(t) { var e = parseInt(t.getAttribute("tabindex"), 10); return isNaN(e) ? function (t) { return "true" === t.contentEditable }(t) ? 0 : t.tabIndex : e } function h(t, e) { return t.tabIndex === e.tabIndex ? t.documentOrder - e.documentOrder : t.tabIndex - e.tabIndex } function p(t) { return "INPUT
|
||
|
|
|
||
|
|
/*************************
|
||
|
|
* Croppie
|
||
|
|
* Copyright 2019
|
||
|
|
* Foliotek
|
||
|
|
* Version: 2.6.5
|
||
|
|
*************************/
|
||
|
|
|
||
|
|
!function (e, t) { "function" == typeof define && define.amd ? define(t) : "object" == typeof exports && "string" != typeof exports.nodeName ? module.exports = t() : e.Croppie = t() }("undefined" != typeof self ? self : this, function () { "function" != typeof Promise && function (e) { function n(e, t) { return function () { e.apply(t, arguments) } } function r(e) { if ("object" != typeof this) throw new TypeError("Promises must be constructed via new"); if ("function" != typeof e) throw new TypeError("not a function"); this._state = null, this._value = null, this._deferreds = [], u(e, n(i, this), n(o, this)) } function a(n) { var i = this; return null === this._state ? void this._deferreds.push(n) : void c(function () { var e = i._state ? n.onFulfilled : n.onRejected; if (null !== e) { var t; try { t = e(i._value) } catch (e) { return void n.reject(e) } n.resolve(t) } else (i._state ? n.resolve : n.reject)(i._value) }) } function i(e) { try { if (e === this) throw new TypeError("A promise cannot be resolved with itself."); if (e && ("object" == typeof e || "function" == typeof e)) { var t = e.then; if ("function" == typeof t) return void u(n(t, e), n(i, this), n(o, this)) } this._state = !0, this._value = e, s.call(this) } catch (e) { o.call(this, e) } } function o(e) { this._state = !1, this._value = e, s.call(this) } function s() { for (var e = 0, t = this._deferreds.length; e < t; e++)a.call(this, this._deferreds[e]); this._deferreds = null } function l(e, t, n, i) { this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof t ? t : null, this.resolve = n, this.reject = i } function u(e, t, n) { var i = !1; try { e(function (e) { i || (i = !0, t(e)) }, function (e) { i || (i = !0, n(e)) }) } catch (e) { if (i) return; i = !0, n(e) } } var t = setTimeout, c = "function" == typeof setImmediate && setImmediate || function (e) { t(e, 1) }, h = Array.isArray || function (e) { return "[object Array]" === Object.prototype.toString.call(e) }; r.prototype.catch = function (e) { return this.then(null, e) }, r.prototype.then = function (n, i) { var o = this; return new r(function (e, t) { a.call(o, new l(n, i, e, t)) }) }, r.all = function () { var s = Array.prototype.slice.call(1 === arguments.length && h(arguments[0]) ? arguments[0] : arguments); return new r(function (i, o) { function r(t, e) { try { if (e && ("object" == typeof e || "function" == typeof e)) { var n = e.then; if ("function" == typeof n) return void n.call(e, function (e) { r(t, e) }, o) } s[t] = e, 0 == --a && i(s) } catch (e) { o(e) } } if (0 === s.length) return i([]); for (var a = s.length, e = 0; e < s.length; e++)r(e, s[e]) }) }, r.resolve = function (t) { return t && "object" == typeof t && t.constructor === r ? t : new r(function (e) { e(t) }) }, r.reject = function (n) { return new r(function (e, t) { t(n) }) }, r.race = function (o) { return new r(function (e, t) { for (var n = 0, i = o.length; n < i; n++)o[n].then(e, t) }) }, r._setImmediateFn = function (e) { c = e }, "undefined" != typeof module && module.exports ? module.exports = r : e.Promise || (e.Promise = r) }(this), "function" != typeof window.CustomEvent && function () { function e(e, t) { t = t || { bubbles: !1, cancelable: !1, detail: void 0 }; var n = document.createEvent("CustomEvent"); return n.initCustomEvent(e, t.bubbles, t.cancelable, t.detail), n } e.prototype = window.Event.prototype, window.CustomEvent = e }(), HTMLCanvasElement.prototype.toBlob || Object.defineProperty(HTMLCanvasElement.prototype, "toBlob", { value: function (e, t, n) { for (var i = atob(this.toDataURL(t, n).split(",")[1]), o = i.length, r = new Uint8Array(o), a = 0; a < o; a++)r[a] = i.charCodeAt(a); e(new Blob([r], { type: t || "image/png" })) } }); var v, g, w, i = ["Webkit", "Moz", "ms"], o = document.createElement("div").style, l = [1, 8, 3, 6], u = [2, 7, 4, 5]; function e(e) { if (e in o) return e; for (var t = e[0].toUpperCase() + e.slice(1), n = i.length; n--;)if ((e = i[n] + t) in o) return e } function p(e, t) { for (var n in e = e || {}, t) t[n] && t[n].constructo
|
||
|
|
|
||
|
|
/*
|
||
|
|
Convert table to responsive cards
|
||
|
|
by @kushalcodes
|
||
|
|
*/
|
||
|
|
/*
|
||
|
|
Convert table to responsive cards
|
||
|
|
by @kushalcodes
|
||
|
|
*/
|
||
|
|
let TABLE_KONVERTER = { referenceTableIdOrClassName: "", referenceTableParentEl: null, isReferenceIdOrClass: function () { return "#" === this.referenceTableIdOrClassName.substring(0, 1) ? "id" : "." === this.referenceTableIdOrClassName.substring(0, 1) && "class" }, konvert: function () { this.hideTable(); const e = this.isReferenceIdOrClass(); e ? ("id" === e && this.handleId(), "class" === e && this.handleClass()) : console.error("Invalid id or class name provided to run table konverter!"), TABLE_KONVERTER.handleWindowWidthChange(window.innerWidth), window.addEventListener("resize", function (e) { TABLE_KONVERTER.handleWindowWidthChange(e.target.innerWidth) }) }, tableHeadingTitles: [], tableBodyTRs: [], tableCard: [], handleId: function () { const e = this.referenceTableIdOrClassName.substring(1), t = document.getElementById(e); this.referenceTableParentEl = t.parentElement; const n = t.getElementsByTagName("thead")[0], s = t.getElementsByTagName("tbody")[0], a = n.getElementsByTagName("th"); for (let e = 0; e < a.length; e++) { const t = a[e]; this.tableHeadingTitles.push(t.innerText) } const l = s.getElementsByTagName("tr"); this.tableBodyTRs = l, this.generateTableCard(), this.generateCardElement() }, handleClass: function () { const e = this.referenceTableIdOrClassName.substring(1), t = document.getElementsByClassName(e); for (let e = 0; e < t.length; e++) { const n = t[e]; if (n.id && n.id.length > 0) { console.error(`Id already exists for table: <table class='${n.className}'></table> \n \n You are using css initialization\n \n We basically convert table elements initialization with cssm to have generated ids and use that id to convert using the id.\n \n Hence its basically id initialization\n `); break } const s = "konverted-table-" + e; n.id = s, TABLE_KONVERTER.init("#" + s, TABLE_KONVERTER.options) } }, generateTableCard: function () { for (let e = 0; e < this.tableBodyTRs.length; e++) { const t = this.tableBodyTRs[e].getElementsByTagName("td"); let n = {}; for (let e = 0; e < t.length; e++) { const s = t[e]; n[this.tableHeadingTitles[e].toLowerCase().replace(" ", "_")] = s.innerHTML } this.tableCard.push(n) } }, insertAfter: function (e, t) { e.parentNode.insertBefore(t, e.nextSibling) }, generateCardElement: function () { for (let e = 0; e < this.tableCard.length; e++) { const t = this.tableCard[e], n = this.generateCardSingle(t); this.referenceTableParentEl && this.insertAfter(this.referenceTableParentEl, n) } }, generateCardSingle: function (e) { let t = document.createElement("div"); t.className = "card table-card", t.style.width = "100%", t.style.margin = "0 auto", t.style.marginBottom = "5px", t.style.marginTop = "5px"; for (const n in e) if (Object.hasOwnProperty.call(e, n)) { const s = e[n]; let a = "string" == typeof n ? this.capitalize(n).replace("_", " ") : n, l = document.createElement("div"); l.className = "card-body", this.options.stickyHeader && this.options.stickyHeader.tableHeadingName && a.toLowerCase() === this.options.stickyHeader.tableHeadingName.toLowerCase() && (l.className = "card-body card-sticky", l.style.position = "sticky", l.style.top = 0), l.innerHTML += "<h5 class='card-title'>" + ("id" === a.toLowerCase() ? "ID" : a) + "</h5>", l.innerHTML += "<div class='card-text'>" + s + "</div>", t.appendChild(l) } return t }, capitalize: function (e) { return 0 === e.length ? "" : e[0].toUpperCase() + e.slice(1) }, hideTable: function () { const e = this.isReferenceIdOrClass(); if (e) { const t = this.referenceTableIdOrClassName.substring(1); if ("id" === e && (document.getElementById(t).style.display = "none"), "class" === e) { const e = document.getElementsByClassName(t); for (let t = 0; t < e.length; t++)e[t].style.display = "none" } const n = document.getElementsByClassName("table-card"); for (let e = 0; e < n.length; e++)n[e].style.display = "block" } }, showTable: function () { const e = this.isReferenceIdOrClass(); if (e) { const t = this.referenceTableIdOrClassName.substring(1); if ("id" === e && (document.getElementById(t).style.display = "table"), "c
|
||
|
|
TABLE_KONVERTER.init(".mkd-table-container", {
|
||
|
|
style: "simple"
|
||
|
|
});
|