@kg-ui/kg-ui 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/lib/main.common.js +739 -2597
- package/lib/main.css +1 -1
- package/lib/main.umd.js +739 -2597
- package/lib/main.umd.min.js +3 -3
- package/package.json +5 -11
package/lib/main.common.js
CHANGED
|
@@ -3591,7 +3591,7 @@ def dreams_come_true():
|
|
|
3591
3591
|
Have a nice day!!! ^_^
|
|
3592
3592
|
|
|
3593
3593
|
`];
|
|
3594
|
-
const data = tempAns[
|
|
3594
|
+
const data = tempAns[2];
|
|
3595
3595
|
state.msgList.push({
|
|
3596
3596
|
isSend: false,
|
|
3597
3597
|
needPrinting: true,
|
|
@@ -8582,7 +8582,7 @@ module.exports = function (bitmap, value) {
|
|
|
8582
8582
|
// ESM COMPAT FLAG
|
|
8583
8583
|
__webpack_require__.r(__webpack_exports__);
|
|
8584
8584
|
|
|
8585
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
8585
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/Home/main.vue?vue&type=template&id=732a039e&scoped=true
|
|
8586
8586
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"panel common-layout"},[_c('el-container',{staticStyle:{"height":"100%"}},[_c('el-header',{staticClass:"mb-1",staticStyle:{"padding":"0","height":"auto","width":"100%"}},[_c('LFilter',{ref:"LFilter"})],1)],1)],1)
|
|
8587
8587
|
}
|
|
8588
8588
|
var staticRenderFns = []
|
|
@@ -8602,7 +8602,7 @@ var style = __webpack_require__("b943");
|
|
|
8602
8602
|
// EXTERNAL MODULE: ./packages/know_ui_v2/style/tailwind.css
|
|
8603
8603
|
var tailwind = __webpack_require__("e535");
|
|
8604
8604
|
|
|
8605
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
8605
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/Home/LFilter/index.vue?vue&type=template&id=44cc531c&scoped=true
|
|
8606
8606
|
var LFiltervue_type_template_id_44cc531c_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('FilterArea',{ref:"FilterArea"})],1)
|
|
8607
8607
|
}
|
|
8608
8608
|
var LFiltervue_type_template_id_44cc531c_scoped_true_staticRenderFns = []
|
|
@@ -8610,7 +8610,7 @@ var LFiltervue_type_template_id_44cc531c_scoped_true_staticRenderFns = []
|
|
|
8610
8610
|
|
|
8611
8611
|
// CONCATENATED MODULE: ./packages/know_ui_v2/components/Home/LFilter/index.vue?vue&type=template&id=44cc531c&scoped=true
|
|
8612
8612
|
|
|
8613
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
8613
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/Home/LFilter/FilterArea.vue?vue&type=template&id=b4d1465c&scoped=true
|
|
8614
8614
|
var FilterAreavue_type_template_id_b4d1465c_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('transition',{attrs:{"name":"fade"}},[(_vm.selProjectId !== 0)?_c('div',{staticClass:"filterAreaWrap filterWrap bg-white mt-1"},[_c('div',{attrs:{"id":"filterWrap"}},[(_vm.showList.length ===0)?[_c('div')]:[_vm._l((_vm.showList),function(filter,rowIndex){return _c('div',{key:filter.label_id},[(rowIndex < 4)?_c('div',{staticClass:"flex justify-between gap-x-5 rowWrap",class:{
|
|
8615
8615
|
multiple: filter.multipleSel,
|
|
8616
8616
|
xinyuan: filter.kind === _vm.EnumFilterKind.XinYuan,
|
|
@@ -8649,7 +8649,7 @@ var FilterAreavue_type_template_id_b4d1465c_scoped_true_staticRenderFns = []
|
|
|
8649
8649
|
|
|
8650
8650
|
// CONCATENATED MODULE: ./packages/know_ui_v2/components/Home/LFilter/FilterArea.vue?vue&type=template&id=b4d1465c&scoped=true
|
|
8651
8651
|
|
|
8652
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
8652
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/Home/LFilter/FilterItem.vue?vue&type=template&id=3a70deee&scoped=true
|
|
8653
8653
|
var FilterItemvue_type_template_id_3a70deee_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[(!_vm.multipleSel)?[_c('div',{on:{"mouseenter":function($event){return _vm.handleHoverAccount(true)},"mouseleave":function($event){return _vm.handleHoverAccount(false)}}},[_c('el-link',{staticClass:"tagText gap-1.5",attrs:{"size":"small","link":"","type":_vm.selFilterIds.includes(_vm.subFilter.label_id) ? 'warning' : ''},on:{"click":function($event){return _vm.clickFilter(_vm.subFilter)}}},[_c('span',[_vm._v(" "+_vm._s(_vm.subFilter['name_'+_vm.lang])+" ")])]),(_vm.isShowCount)?[(_vm.fliterCount[_vm.subFilter.label_id])?_c('span',{staticClass:"num",staticStyle:{"color":"#aaa"}},[_vm._v(_vm._s(_vm.fliterCount[_vm.subFilter.label_id].toLocaleString()))]):_vm._e()]:_vm._e()],2)]:[_c('div',{staticClass:"flex items-center text-xs text-[#606266]"},[_c('el-checkbox',{model:{value:(_vm.checkOut),callback:function ($$v) {_vm.checkOut=$$v},expression:"checkOut"}},[_c('span',{staticClass:"tagText"},[_vm._v(" "+_vm._s(_vm.subFilter['name_'+_vm.lang]))])])],1)]],2)
|
|
8654
8654
|
}
|
|
8655
8655
|
var FilterItemvue_type_template_id_3a70deee_scoped_true_staticRenderFns = []
|
|
@@ -8732,7 +8732,7 @@ var component = Object(componentNormalizer["a" /* default */])(
|
|
|
8732
8732
|
)
|
|
8733
8733
|
|
|
8734
8734
|
/* harmony default export */ var FilterItem = (component.exports);
|
|
8735
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
8735
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/Home/LFilter/FilterItemIcon.vue?vue&type=template&id=4b83b000&scoped=true
|
|
8736
8736
|
var FilterItemIconvue_type_template_id_4b83b000_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"relative",class:{ hover: _vm.showEdit }},[_c('div',{staticClass:"flex items-end",on:{"mouseenter":function($event){return _vm.handleHoverAccount(true)},"mouseleave":function($event){return _vm.handleHoverAccount(false)}}},[_c('el-link',{staticClass:"tagText gap-1.5",attrs:{"size":"small","type":"text"},on:{"click":function($event){return _vm.clickFilter(_vm.subFilter)}}},[_c('el-image',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showEdit),expression:"!showEdit"}],staticStyle:{"width":"103px","height":"36px"},attrs:{"src":_vm.subFilter.icon,"fit":"none"}},[_c('template',{slot:"error"},[_c('div',{staticClass:"image-slot"},[_vm._v(" "+_vm._s(_vm.subFilter['name_'+_vm.lang])+" ")])])],2),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showEdit),expression:"showEdit"}],staticClass:"truncate flex items-center justify-center",staticStyle:{"width":"103px","height":"36px"}},[_vm._v(" "+_vm._s(_vm.subFilter['name_'+_vm.lang])+" ")])],1),(_vm.isShowCount)?[(_vm.fliterCount[_vm.subFilter.label_id])?_c('span',{staticClass:"num",staticStyle:{"color":"#aaa"}},[_vm._v(_vm._s(_vm.fliterCount[_vm.subFilter.label_id].toLocaleString()))]):_vm._e()]:_vm._e()],2)])
|
|
8737
8737
|
}
|
|
8738
8738
|
var FilterItemIconvue_type_template_id_4b83b000_scoped_true_staticRenderFns = []
|
|
@@ -9513,6 +9513,13 @@ module.exports = function (object, key, method) {
|
|
|
9513
9513
|
};
|
|
9514
9514
|
|
|
9515
9515
|
|
|
9516
|
+
/***/ }),
|
|
9517
|
+
|
|
9518
|
+
/***/ "73dc":
|
|
9519
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
9520
|
+
|
|
9521
|
+
// extracted by mini-css-extract-plugin
|
|
9522
|
+
|
|
9516
9523
|
/***/ }),
|
|
9517
9524
|
|
|
9518
9525
|
/***/ "7418":
|
|
@@ -9533,13 +9540,6 @@ exports.f = Object.getOwnPropertySymbols;
|
|
|
9533
9540
|
|
|
9534
9541
|
/***/ }),
|
|
9535
9542
|
|
|
9536
|
-
/***/ "775c":
|
|
9537
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
9538
|
-
|
|
9539
|
-
// extracted by mini-css-extract-plugin
|
|
9540
|
-
|
|
9541
|
-
/***/ }),
|
|
9542
|
-
|
|
9543
9543
|
/***/ "7839":
|
|
9544
9544
|
/***/ (function(module, exports, __webpack_require__) {
|
|
9545
9545
|
|
|
@@ -9861,7 +9861,7 @@ module.exports = dart;
|
|
|
9861
9861
|
/***/ (function(module, exports, __webpack_require__) {
|
|
9862
9862
|
|
|
9863
9863
|
/**
|
|
9864
|
-
* marked
|
|
9864
|
+
* marked v5.1.2 - a markdown parser
|
|
9865
9865
|
* Copyright (c) 2011-2023, Christopher Jeffrey. (MIT Licensed)
|
|
9866
9866
|
* https://github.com/markedjs/marked
|
|
9867
9867
|
*/
|
|
@@ -9952,6 +9952,16 @@ module.exports = dart;
|
|
|
9952
9952
|
var key = _toPrimitive(arg, "string");
|
|
9953
9953
|
return typeof key === "symbol" ? key : String(key);
|
|
9954
9954
|
}
|
|
9955
|
+
var id = 0;
|
|
9956
|
+
function _classPrivateFieldLooseKey(name) {
|
|
9957
|
+
return "__private_" + id++ + "_" + name;
|
|
9958
|
+
}
|
|
9959
|
+
function _classPrivateFieldLooseBase(receiver, privateKey) {
|
|
9960
|
+
if (!Object.prototype.hasOwnProperty.call(receiver, privateKey)) {
|
|
9961
|
+
throw new TypeError("attempted to use private field on non-instance");
|
|
9962
|
+
}
|
|
9963
|
+
return receiver;
|
|
9964
|
+
}
|
|
9955
9965
|
|
|
9956
9966
|
function getDefaults() {
|
|
9957
9967
|
return {
|
|
@@ -10124,9 +10134,7 @@ module.exports = dart;
|
|
|
10124
10134
|
var row = tableRow.replace(/\|/g, function (match, offset, str) {
|
|
10125
10135
|
var escaped = false,
|
|
10126
10136
|
curr = offset;
|
|
10127
|
-
while (--curr >= 0 && str[curr] === '\\')
|
|
10128
|
-
escaped = !escaped;
|
|
10129
|
-
}
|
|
10137
|
+
while (--curr >= 0 && str[curr] === '\\') escaped = !escaped;
|
|
10130
10138
|
if (escaped) {
|
|
10131
10139
|
// odd number of slashes means | is escaped
|
|
10132
10140
|
// so we leave it alone
|
|
@@ -10149,9 +10157,7 @@ module.exports = dart;
|
|
|
10149
10157
|
if (cells.length > count) {
|
|
10150
10158
|
cells.splice(count);
|
|
10151
10159
|
} else {
|
|
10152
|
-
while (cells.length < count)
|
|
10153
|
-
cells.push('');
|
|
10154
|
-
}
|
|
10160
|
+
while (cells.length < count) cells.push('');
|
|
10155
10161
|
}
|
|
10156
10162
|
for (; i < cells.length; i++) {
|
|
10157
10163
|
// leading or trailing whitespace is ignored per the gfm spec
|
|
@@ -10211,30 +10217,34 @@ module.exports = dart;
|
|
|
10211
10217
|
}
|
|
10212
10218
|
return -1;
|
|
10213
10219
|
}
|
|
10214
|
-
function
|
|
10215
|
-
if (opt
|
|
10220
|
+
function checkDeprecations(opt, callback) {
|
|
10221
|
+
if (!opt || opt.silent) {
|
|
10222
|
+
return;
|
|
10223
|
+
}
|
|
10224
|
+
if (callback) {
|
|
10225
|
+
console.warn('marked(): callback is deprecated since version 5.0.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/using_pro#async');
|
|
10226
|
+
}
|
|
10227
|
+
if (opt.sanitize || opt.sanitizer) {
|
|
10216
10228
|
console.warn('marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options');
|
|
10217
10229
|
}
|
|
10218
|
-
|
|
10219
|
-
|
|
10220
|
-
// copied from https://stackoverflow.com/a/5450113/806777
|
|
10221
|
-
/**
|
|
10222
|
-
* @param {string} pattern
|
|
10223
|
-
* @param {number} count
|
|
10224
|
-
*/
|
|
10225
|
-
function repeatString(pattern, count) {
|
|
10226
|
-
if (count < 1) {
|
|
10227
|
-
return '';
|
|
10230
|
+
if (opt.highlight || opt.langPrefix !== 'language-') {
|
|
10231
|
+
console.warn('marked(): highlight and langPrefix parameters are deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-highlight.');
|
|
10228
10232
|
}
|
|
10229
|
-
|
|
10230
|
-
|
|
10231
|
-
|
|
10232
|
-
|
|
10233
|
-
|
|
10234
|
-
|
|
10235
|
-
|
|
10233
|
+
if (opt.mangle) {
|
|
10234
|
+
console.warn('marked(): mangle parameter is enabled by default, but is deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-mangle, or disable by setting `{mangle: false}`.');
|
|
10235
|
+
}
|
|
10236
|
+
if (opt.baseUrl) {
|
|
10237
|
+
console.warn('marked(): baseUrl parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-base-url.');
|
|
10238
|
+
}
|
|
10239
|
+
if (opt.smartypants) {
|
|
10240
|
+
console.warn('marked(): smartypants parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-smartypants.');
|
|
10241
|
+
}
|
|
10242
|
+
if (opt.xhtml) {
|
|
10243
|
+
console.warn('marked(): xhtml parameter is deprecated since version 5.0.0, should not be used and will be removed in the future. Instead use https://www.npmjs.com/package/marked-xhtml.');
|
|
10244
|
+
}
|
|
10245
|
+
if (opt.headerIds || opt.headerPrefix) {
|
|
10246
|
+
console.warn('marked(): headerIds and headerPrefix parameters enabled by default, but are deprecated since version 5.0.0, and will be removed in the future. To clear this warning, install https://www.npmjs.com/package/marked-gfm-heading-id, or disable by setting `{headerIds: false}`.');
|
|
10236
10247
|
}
|
|
10237
|
-
return result + pattern;
|
|
10238
10248
|
}
|
|
10239
10249
|
|
|
10240
10250
|
function outputLink(cap, link, raw, lexer) {
|
|
@@ -10559,6 +10569,7 @@ module.exports = dart;
|
|
|
10559
10569
|
if (cap) {
|
|
10560
10570
|
var token = {
|
|
10561
10571
|
type: 'html',
|
|
10572
|
+
block: true,
|
|
10562
10573
|
raw: cap[0],
|
|
10563
10574
|
pre: !this.options.sanitizer && (cap[1] === 'pre' || cap[1] === 'script' || cap[1] === 'style'),
|
|
10564
10575
|
text: cap[0]
|
|
@@ -10707,6 +10718,7 @@ module.exports = dart;
|
|
|
10707
10718
|
raw: cap[0],
|
|
10708
10719
|
inLink: this.lexer.state.inLink,
|
|
10709
10720
|
inRawBlock: this.lexer.state.inRawBlock,
|
|
10721
|
+
block: false,
|
|
10710
10722
|
text: this.options.sanitize ? this.options.sanitizer ? this.options.sanitizer(cap[0]) : escape(cap[0]) : cap[0]
|
|
10711
10723
|
};
|
|
10712
10724
|
}
|
|
@@ -10788,9 +10800,9 @@ module.exports = dart;
|
|
|
10788
10800
|
if (!match) return;
|
|
10789
10801
|
|
|
10790
10802
|
// _ can't be between two alphanumerics. \p{L}\p{N} includes non-english alphabet/numbers as well
|
|
10791
|
-
if (match[3] && prevChar.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\
|
|
10803
|
+
if (match[3] && prevChar.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDF50-\uDF59\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEC0-\uDED3\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDCD0-\uDCEB\uDCF0-\uDCF9\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])/)) return;
|
|
10792
10804
|
var nextChar = match[1] || match[2] || '';
|
|
10793
|
-
if (!nextChar ||
|
|
10805
|
+
if (!nextChar || !prevChar || this.rules.inline.punctuation.exec(prevChar)) {
|
|
10794
10806
|
var lLength = match[0].length - 1;
|
|
10795
10807
|
var rDelim,
|
|
10796
10808
|
rLength,
|
|
@@ -10823,7 +10835,7 @@ module.exports = dart;
|
|
|
10823
10835
|
|
|
10824
10836
|
// Remove extra characters. *a*** -> *a*
|
|
10825
10837
|
rLength = Math.min(rLength, rLength + delimTotal + midDelimTotal);
|
|
10826
|
-
var raw = src.slice(0, lLength + match.index +
|
|
10838
|
+
var raw = src.slice(0, lLength + match.index + rLength + 1);
|
|
10827
10839
|
|
|
10828
10840
|
// Create `em` if smallest delimiter has odd char count. *a***
|
|
10829
10841
|
if (Math.min(lLength, rLength) % 2) {
|
|
@@ -10984,7 +10996,7 @@ module.exports = dart;
|
|
|
10984
10996
|
+ ')',
|
|
10985
10997
|
def: /^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/,
|
|
10986
10998
|
table: noopTest,
|
|
10987
|
-
lheading: /^((
|
|
10999
|
+
lheading: /^((?:(?!^bull ).|\n(?!\n|bull ))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,
|
|
10988
11000
|
// regex template, placeholders will be replaced according to different paragraph
|
|
10989
11001
|
// interruption rules of commonmark and the original markdown spec:
|
|
10990
11002
|
_paragraph: /^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,
|
|
@@ -10999,6 +11011,8 @@ module.exports = dart;
|
|
|
10999
11011
|
block._tag = 'address|article|aside|base|basefont|blockquote|body|caption' + '|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption' + '|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe' + '|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option' + '|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr' + '|track|ul';
|
|
11000
11012
|
block._comment = /<!--(?!-?>)[\s\S]*?(?:-->|$)/;
|
|
11001
11013
|
block.html = edit(block.html, 'i').replace('comment', block._comment).replace('tag', block._tag).replace('attribute', / +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex();
|
|
11014
|
+
block.lheading = edit(block.lheading).replace(/bull/g, block.bullet) // lists can interrupt
|
|
11015
|
+
.getRegex();
|
|
11002
11016
|
block.paragraph = edit(block._paragraph).replace('hr', block.hr).replace('heading', ' {0,3}#{1,6} ').replace('|lheading', '') // setex headings don't interrupt commonmark paragraphs
|
|
11003
11017
|
.replace('|table', '').replace('blockquote', ' {0,3}>').replace('fences', ' {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n').replace('list', ' {0,3}(?:[*+-]|1[.)]) ') // only lists starting from 1 can interrupt
|
|
11004
11018
|
.replace('html', '</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)').replace('tag', block._tag) // pars can be interrupted by type (6) html blocks
|
|
@@ -11062,35 +11076,34 @@ module.exports = dart;
|
|
|
11062
11076
|
nolink: /^!?\[(ref)\](?:\[\])?/,
|
|
11063
11077
|
reflinkSearch: 'reflink|nolink(?!\\()',
|
|
11064
11078
|
emStrong: {
|
|
11065
|
-
lDelim: /^(?:\*+(?:([
|
|
11066
|
-
//
|
|
11067
|
-
//
|
|
11068
|
-
rDelimAst: /^
|
|
11069
|
-
rDelimUnd: /^
|
|
11079
|
+
lDelim: /^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,
|
|
11080
|
+
// (1) and (2) can only be a Right Delimiter. (3) and (4) can only be Left. (5) and (6) can be either Left or Right.
|
|
11081
|
+
// | Skip orphan inside strong | Consume to delim | (1) #*** | (2) a***#, a*** | (3) #***a, ***a | (4) ***# | (5) #***# | (6) a***a
|
|
11082
|
+
rDelimAst: /^[^_*]*?__[^_*]*?\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\*)[punct](\*+)(?=[\s]|$)|[^punct\s](\*+)(?!\*)(?=[punct\s]|$)|(?!\*)[punct\s](\*+)(?=[^punct\s])|[\s](\*+)(?!\*)(?=[punct])|(?!\*)[punct](\*+)(?!\*)(?=[punct])|[^punct\s](\*+)(?=[^punct\s])/,
|
|
11083
|
+
rDelimUnd: /^[^_*]*?\*\*[^_*]*?_[^_*]*?(?=\*\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\s]|$)|[^punct\s](_+)(?!_)(?=[punct\s]|$)|(?!_)[punct\s](_+)(?=[^punct\s])|[\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])/ // ^- Not allowed for _
|
|
11070
11084
|
},
|
|
11071
11085
|
|
|
11072
11086
|
code: /^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,
|
|
11073
11087
|
br: /^( {2,}|\\)\n(?!\s*$)/,
|
|
11074
11088
|
del: noopTest,
|
|
11075
11089
|
text: /^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,
|
|
11076
|
-
punctuation: /^([\spunctuation])/
|
|
11090
|
+
punctuation: /^((?![*_])[\spunctuation])/
|
|
11077
11091
|
};
|
|
11078
11092
|
|
|
11079
|
-
// list of punctuation marks from CommonMark spec
|
|
11080
|
-
|
|
11081
|
-
inline.
|
|
11082
|
-
inline.punctuation = edit(inline.punctuation).replace(/punctuation/g, inline._punctuation).getRegex();
|
|
11093
|
+
// list of unicode punctuation marks, plus any missing characters from CommonMark spec
|
|
11094
|
+
inline._punctuation = '\\p{P}$+<=>`^|~';
|
|
11095
|
+
inline.punctuation = edit(inline.punctuation, 'u').replace(/punctuation/g, inline._punctuation).getRegex();
|
|
11083
11096
|
|
|
11084
11097
|
// sequences em should skip over [title](link), `code`, <html>
|
|
11085
|
-
inline.blockSkip = /\[[
|
|
11086
|
-
|
|
11087
|
-
|
|
11088
|
-
inline.escapedEmSt = /(?:^|[^\\])(?:\\\\)*\\[*_]/g;
|
|
11098
|
+
inline.blockSkip = /\[[^[\]]*?\]\([^\(\)]*?\)|`[^`]*?`|<[^<>]*?>/g;
|
|
11099
|
+
inline.anyPunctuation = /\\[punct]/g;
|
|
11100
|
+
inline._escapes = /\\([punct])/g;
|
|
11089
11101
|
inline._comment = edit(block._comment).replace('(?:-->|$)', '-->').getRegex();
|
|
11090
|
-
inline.emStrong.lDelim = edit(inline.emStrong.lDelim).replace(/punct/g, inline._punctuation).getRegex();
|
|
11091
|
-
inline.emStrong.rDelimAst = edit(inline.emStrong.rDelimAst, '
|
|
11092
|
-
inline.emStrong.rDelimUnd = edit(inline.emStrong.rDelimUnd, '
|
|
11093
|
-
inline.
|
|
11102
|
+
inline.emStrong.lDelim = edit(inline.emStrong.lDelim, 'u').replace(/punct/g, inline._punctuation).getRegex();
|
|
11103
|
+
inline.emStrong.rDelimAst = edit(inline.emStrong.rDelimAst, 'gu').replace(/punct/g, inline._punctuation).getRegex();
|
|
11104
|
+
inline.emStrong.rDelimUnd = edit(inline.emStrong.rDelimUnd, 'gu').replace(/punct/g, inline._punctuation).getRegex();
|
|
11105
|
+
inline.anyPunctuation = edit(inline.anyPunctuation, 'gu').replace(/punct/g, inline._punctuation).getRegex();
|
|
11106
|
+
inline._escapes = edit(inline._escapes, 'gu').replace(/punct/g, inline._punctuation).getRegex();
|
|
11094
11107
|
inline._scheme = /[a-zA-Z][a-zA-Z0-9+.-]{1,31}/;
|
|
11095
11108
|
inline._email = /[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/;
|
|
11096
11109
|
inline.autolink = edit(inline.autolink).replace('scheme', inline._scheme).replace('email', inline._email).getRegex();
|
|
@@ -11279,8 +11292,8 @@ module.exports = dart;
|
|
|
11279
11292
|
});
|
|
11280
11293
|
}
|
|
11281
11294
|
var token, lastToken, cutSrc, lastParagraphClipped;
|
|
11282
|
-
|
|
11283
|
-
if (
|
|
11295
|
+
var _loop = function _loop() {
|
|
11296
|
+
if (_this.options.extensions && _this.options.extensions.block && _this.options.extensions.block.some(function (extTokenizer) {
|
|
11284
11297
|
if (token = extTokenizer.call({
|
|
11285
11298
|
lexer: _this
|
|
11286
11299
|
}, src, tokens)) {
|
|
@@ -11290,11 +11303,11 @@ module.exports = dart;
|
|
|
11290
11303
|
}
|
|
11291
11304
|
return false;
|
|
11292
11305
|
})) {
|
|
11293
|
-
continue;
|
|
11306
|
+
return "continue";
|
|
11294
11307
|
}
|
|
11295
11308
|
|
|
11296
11309
|
// newline
|
|
11297
|
-
if (token =
|
|
11310
|
+
if (token = _this.tokenizer.space(src)) {
|
|
11298
11311
|
src = src.substring(token.raw.length);
|
|
11299
11312
|
if (token.raw.length === 1 && tokens.length > 0) {
|
|
11300
11313
|
// if there's a single \n as a spacer, it's terminating the last line,
|
|
@@ -11303,156 +11316,159 @@ module.exports = dart;
|
|
|
11303
11316
|
} else {
|
|
11304
11317
|
tokens.push(token);
|
|
11305
11318
|
}
|
|
11306
|
-
continue;
|
|
11319
|
+
return "continue";
|
|
11307
11320
|
}
|
|
11308
11321
|
|
|
11309
11322
|
// code
|
|
11310
|
-
if (token =
|
|
11323
|
+
if (token = _this.tokenizer.code(src)) {
|
|
11311
11324
|
src = src.substring(token.raw.length);
|
|
11312
11325
|
lastToken = tokens[tokens.length - 1];
|
|
11313
11326
|
// An indented code block cannot interrupt a paragraph.
|
|
11314
11327
|
if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {
|
|
11315
11328
|
lastToken.raw += '\n' + token.raw;
|
|
11316
11329
|
lastToken.text += '\n' + token.text;
|
|
11317
|
-
|
|
11330
|
+
_this.inlineQueue[_this.inlineQueue.length - 1].src = lastToken.text;
|
|
11318
11331
|
} else {
|
|
11319
11332
|
tokens.push(token);
|
|
11320
11333
|
}
|
|
11321
|
-
continue;
|
|
11334
|
+
return "continue";
|
|
11322
11335
|
}
|
|
11323
11336
|
|
|
11324
11337
|
// fences
|
|
11325
|
-
if (token =
|
|
11338
|
+
if (token = _this.tokenizer.fences(src)) {
|
|
11326
11339
|
src = src.substring(token.raw.length);
|
|
11327
11340
|
tokens.push(token);
|
|
11328
|
-
continue;
|
|
11341
|
+
return "continue";
|
|
11329
11342
|
}
|
|
11330
11343
|
|
|
11331
11344
|
// heading
|
|
11332
|
-
if (token =
|
|
11345
|
+
if (token = _this.tokenizer.heading(src)) {
|
|
11333
11346
|
src = src.substring(token.raw.length);
|
|
11334
11347
|
tokens.push(token);
|
|
11335
|
-
continue;
|
|
11348
|
+
return "continue";
|
|
11336
11349
|
}
|
|
11337
11350
|
|
|
11338
11351
|
// hr
|
|
11339
|
-
if (token =
|
|
11352
|
+
if (token = _this.tokenizer.hr(src)) {
|
|
11340
11353
|
src = src.substring(token.raw.length);
|
|
11341
11354
|
tokens.push(token);
|
|
11342
|
-
continue;
|
|
11355
|
+
return "continue";
|
|
11343
11356
|
}
|
|
11344
11357
|
|
|
11345
11358
|
// blockquote
|
|
11346
|
-
if (token =
|
|
11359
|
+
if (token = _this.tokenizer.blockquote(src)) {
|
|
11347
11360
|
src = src.substring(token.raw.length);
|
|
11348
11361
|
tokens.push(token);
|
|
11349
|
-
continue;
|
|
11362
|
+
return "continue";
|
|
11350
11363
|
}
|
|
11351
11364
|
|
|
11352
11365
|
// list
|
|
11353
|
-
if (token =
|
|
11366
|
+
if (token = _this.tokenizer.list(src)) {
|
|
11354
11367
|
src = src.substring(token.raw.length);
|
|
11355
11368
|
tokens.push(token);
|
|
11356
|
-
continue;
|
|
11369
|
+
return "continue";
|
|
11357
11370
|
}
|
|
11358
11371
|
|
|
11359
11372
|
// html
|
|
11360
|
-
if (token =
|
|
11373
|
+
if (token = _this.tokenizer.html(src)) {
|
|
11361
11374
|
src = src.substring(token.raw.length);
|
|
11362
11375
|
tokens.push(token);
|
|
11363
|
-
continue;
|
|
11376
|
+
return "continue";
|
|
11364
11377
|
}
|
|
11365
11378
|
|
|
11366
11379
|
// def
|
|
11367
|
-
if (token =
|
|
11380
|
+
if (token = _this.tokenizer.def(src)) {
|
|
11368
11381
|
src = src.substring(token.raw.length);
|
|
11369
11382
|
lastToken = tokens[tokens.length - 1];
|
|
11370
11383
|
if (lastToken && (lastToken.type === 'paragraph' || lastToken.type === 'text')) {
|
|
11371
11384
|
lastToken.raw += '\n' + token.raw;
|
|
11372
11385
|
lastToken.text += '\n' + token.raw;
|
|
11373
|
-
|
|
11374
|
-
} else if (!
|
|
11375
|
-
|
|
11386
|
+
_this.inlineQueue[_this.inlineQueue.length - 1].src = lastToken.text;
|
|
11387
|
+
} else if (!_this.tokens.links[token.tag]) {
|
|
11388
|
+
_this.tokens.links[token.tag] = {
|
|
11376
11389
|
href: token.href,
|
|
11377
11390
|
title: token.title
|
|
11378
11391
|
};
|
|
11379
11392
|
}
|
|
11380
|
-
continue;
|
|
11393
|
+
return "continue";
|
|
11381
11394
|
}
|
|
11382
11395
|
|
|
11383
11396
|
// table (gfm)
|
|
11384
|
-
if (token =
|
|
11397
|
+
if (token = _this.tokenizer.table(src)) {
|
|
11385
11398
|
src = src.substring(token.raw.length);
|
|
11386
11399
|
tokens.push(token);
|
|
11387
|
-
continue;
|
|
11400
|
+
return "continue";
|
|
11388
11401
|
}
|
|
11389
11402
|
|
|
11390
11403
|
// lheading
|
|
11391
|
-
if (token =
|
|
11404
|
+
if (token = _this.tokenizer.lheading(src)) {
|
|
11392
11405
|
src = src.substring(token.raw.length);
|
|
11393
11406
|
tokens.push(token);
|
|
11394
|
-
continue;
|
|
11407
|
+
return "continue";
|
|
11395
11408
|
}
|
|
11396
11409
|
|
|
11397
11410
|
// top-level paragraph
|
|
11398
11411
|
// prevent paragraph consuming extensions by clipping 'src' to extension start
|
|
11399
11412
|
cutSrc = src;
|
|
11400
|
-
if (
|
|
11401
|
-
|
|
11402
|
-
|
|
11403
|
-
|
|
11404
|
-
|
|
11405
|
-
|
|
11406
|
-
|
|
11407
|
-
|
|
11408
|
-
|
|
11409
|
-
|
|
11410
|
-
startIndex = Math.min(startIndex, tempStart);
|
|
11411
|
-
}
|
|
11412
|
-
});
|
|
11413
|
-
if (startIndex < Infinity && startIndex >= 0) {
|
|
11414
|
-
cutSrc = src.substring(0, startIndex + 1);
|
|
11413
|
+
if (_this.options.extensions && _this.options.extensions.startBlock) {
|
|
11414
|
+
var startIndex = Infinity;
|
|
11415
|
+
var tempSrc = src.slice(1);
|
|
11416
|
+
var tempStart;
|
|
11417
|
+
_this.options.extensions.startBlock.forEach(function (getStartIndex) {
|
|
11418
|
+
tempStart = getStartIndex.call({
|
|
11419
|
+
lexer: this
|
|
11420
|
+
}, tempSrc);
|
|
11421
|
+
if (typeof tempStart === 'number' && tempStart >= 0) {
|
|
11422
|
+
startIndex = Math.min(startIndex, tempStart);
|
|
11415
11423
|
}
|
|
11416
|
-
})
|
|
11424
|
+
});
|
|
11425
|
+
if (startIndex < Infinity && startIndex >= 0) {
|
|
11426
|
+
cutSrc = src.substring(0, startIndex + 1);
|
|
11427
|
+
}
|
|
11417
11428
|
}
|
|
11418
|
-
if (
|
|
11429
|
+
if (_this.state.top && (token = _this.tokenizer.paragraph(cutSrc))) {
|
|
11419
11430
|
lastToken = tokens[tokens.length - 1];
|
|
11420
11431
|
if (lastParagraphClipped && lastToken.type === 'paragraph') {
|
|
11421
11432
|
lastToken.raw += '\n' + token.raw;
|
|
11422
11433
|
lastToken.text += '\n' + token.text;
|
|
11423
|
-
|
|
11424
|
-
|
|
11434
|
+
_this.inlineQueue.pop();
|
|
11435
|
+
_this.inlineQueue[_this.inlineQueue.length - 1].src = lastToken.text;
|
|
11425
11436
|
} else {
|
|
11426
11437
|
tokens.push(token);
|
|
11427
11438
|
}
|
|
11428
11439
|
lastParagraphClipped = cutSrc.length !== src.length;
|
|
11429
11440
|
src = src.substring(token.raw.length);
|
|
11430
|
-
continue;
|
|
11441
|
+
return "continue";
|
|
11431
11442
|
}
|
|
11432
11443
|
|
|
11433
11444
|
// text
|
|
11434
|
-
if (token =
|
|
11445
|
+
if (token = _this.tokenizer.text(src)) {
|
|
11435
11446
|
src = src.substring(token.raw.length);
|
|
11436
11447
|
lastToken = tokens[tokens.length - 1];
|
|
11437
11448
|
if (lastToken && lastToken.type === 'text') {
|
|
11438
11449
|
lastToken.raw += '\n' + token.raw;
|
|
11439
11450
|
lastToken.text += '\n' + token.text;
|
|
11440
|
-
|
|
11441
|
-
|
|
11451
|
+
_this.inlineQueue.pop();
|
|
11452
|
+
_this.inlineQueue[_this.inlineQueue.length - 1].src = lastToken.text;
|
|
11442
11453
|
} else {
|
|
11443
11454
|
tokens.push(token);
|
|
11444
11455
|
}
|
|
11445
|
-
continue;
|
|
11456
|
+
return "continue";
|
|
11446
11457
|
}
|
|
11447
11458
|
if (src) {
|
|
11448
11459
|
var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);
|
|
11449
|
-
if (
|
|
11460
|
+
if (_this.options.silent) {
|
|
11450
11461
|
console.error(errMsg);
|
|
11451
|
-
break;
|
|
11462
|
+
return "break";
|
|
11452
11463
|
} else {
|
|
11453
11464
|
throw new Error(errMsg);
|
|
11454
11465
|
}
|
|
11455
11466
|
}
|
|
11467
|
+
};
|
|
11468
|
+
while (src) {
|
|
11469
|
+
var _ret = _loop();
|
|
11470
|
+
if (_ret === "continue") continue;
|
|
11471
|
+
if (_ret === "break") break;
|
|
11456
11472
|
}
|
|
11457
11473
|
this.state.top = true;
|
|
11458
11474
|
return tokens;
|
|
@@ -11489,29 +11505,28 @@ module.exports = dart;
|
|
|
11489
11505
|
if (links.length > 0) {
|
|
11490
11506
|
while ((match = this.tokenizer.rules.inline.reflinkSearch.exec(maskedSrc)) != null) {
|
|
11491
11507
|
if (links.includes(match[0].slice(match[0].lastIndexOf('[') + 1, -1))) {
|
|
11492
|
-
maskedSrc = maskedSrc.slice(0, match.index) + '[' +
|
|
11508
|
+
maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex);
|
|
11493
11509
|
}
|
|
11494
11510
|
}
|
|
11495
11511
|
}
|
|
11496
11512
|
}
|
|
11497
11513
|
// Mask out other blocks
|
|
11498
11514
|
while ((match = this.tokenizer.rules.inline.blockSkip.exec(maskedSrc)) != null) {
|
|
11499
|
-
maskedSrc = maskedSrc.slice(0, match.index) + '[' +
|
|
11515
|
+
maskedSrc = maskedSrc.slice(0, match.index) + '[' + 'a'.repeat(match[0].length - 2) + ']' + maskedSrc.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);
|
|
11500
11516
|
}
|
|
11501
11517
|
|
|
11502
|
-
// Mask out escaped
|
|
11503
|
-
while ((match = this.tokenizer.rules.inline.
|
|
11504
|
-
maskedSrc = maskedSrc.slice(0, match.index
|
|
11505
|
-
this.tokenizer.rules.inline.escapedEmSt.lastIndex--;
|
|
11518
|
+
// Mask out escaped characters
|
|
11519
|
+
while ((match = this.tokenizer.rules.inline.anyPunctuation.exec(maskedSrc)) != null) {
|
|
11520
|
+
maskedSrc = maskedSrc.slice(0, match.index) + '++' + maskedSrc.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);
|
|
11506
11521
|
}
|
|
11507
|
-
|
|
11522
|
+
var _loop2 = function _loop2() {
|
|
11508
11523
|
if (!keepPrevChar) {
|
|
11509
11524
|
prevChar = '';
|
|
11510
11525
|
}
|
|
11511
11526
|
keepPrevChar = false;
|
|
11512
11527
|
|
|
11513
11528
|
// extensions
|
|
11514
|
-
if (
|
|
11529
|
+
if (_this2.options.extensions && _this2.options.extensions.inline && _this2.options.extensions.inline.some(function (extTokenizer) {
|
|
11515
11530
|
if (token = extTokenizer.call({
|
|
11516
11531
|
lexer: _this2
|
|
11517
11532
|
}, src, tokens)) {
|
|
@@ -11521,18 +11536,18 @@ module.exports = dart;
|
|
|
11521
11536
|
}
|
|
11522
11537
|
return false;
|
|
11523
11538
|
})) {
|
|
11524
|
-
continue;
|
|
11539
|
+
return "continue";
|
|
11525
11540
|
}
|
|
11526
11541
|
|
|
11527
11542
|
// escape
|
|
11528
|
-
if (token =
|
|
11543
|
+
if (token = _this2.tokenizer.escape(src)) {
|
|
11529
11544
|
src = src.substring(token.raw.length);
|
|
11530
11545
|
tokens.push(token);
|
|
11531
|
-
continue;
|
|
11546
|
+
return "continue";
|
|
11532
11547
|
}
|
|
11533
11548
|
|
|
11534
11549
|
// tag
|
|
11535
|
-
if (token =
|
|
11550
|
+
if (token = _this2.tokenizer.tag(src)) {
|
|
11536
11551
|
src = src.substring(token.raw.length);
|
|
11537
11552
|
lastToken = tokens[tokens.length - 1];
|
|
11538
11553
|
if (lastToken && token.type === 'text' && lastToken.type === 'text') {
|
|
@@ -11541,18 +11556,18 @@ module.exports = dart;
|
|
|
11541
11556
|
} else {
|
|
11542
11557
|
tokens.push(token);
|
|
11543
11558
|
}
|
|
11544
|
-
continue;
|
|
11559
|
+
return "continue";
|
|
11545
11560
|
}
|
|
11546
11561
|
|
|
11547
11562
|
// link
|
|
11548
|
-
if (token =
|
|
11563
|
+
if (token = _this2.tokenizer.link(src)) {
|
|
11549
11564
|
src = src.substring(token.raw.length);
|
|
11550
11565
|
tokens.push(token);
|
|
11551
|
-
continue;
|
|
11566
|
+
return "continue";
|
|
11552
11567
|
}
|
|
11553
11568
|
|
|
11554
11569
|
// reflink, nolink
|
|
11555
|
-
if (token =
|
|
11570
|
+
if (token = _this2.tokenizer.reflink(src, _this2.tokens.links)) {
|
|
11556
11571
|
src = src.substring(token.raw.length);
|
|
11557
11572
|
lastToken = tokens[tokens.length - 1];
|
|
11558
11573
|
if (lastToken && token.type === 'text' && lastToken.type === 'text') {
|
|
@@ -11561,73 +11576,71 @@ module.exports = dart;
|
|
|
11561
11576
|
} else {
|
|
11562
11577
|
tokens.push(token);
|
|
11563
11578
|
}
|
|
11564
|
-
continue;
|
|
11579
|
+
return "continue";
|
|
11565
11580
|
}
|
|
11566
11581
|
|
|
11567
11582
|
// em & strong
|
|
11568
|
-
if (token =
|
|
11583
|
+
if (token = _this2.tokenizer.emStrong(src, maskedSrc, prevChar)) {
|
|
11569
11584
|
src = src.substring(token.raw.length);
|
|
11570
11585
|
tokens.push(token);
|
|
11571
|
-
continue;
|
|
11586
|
+
return "continue";
|
|
11572
11587
|
}
|
|
11573
11588
|
|
|
11574
11589
|
// code
|
|
11575
|
-
if (token =
|
|
11590
|
+
if (token = _this2.tokenizer.codespan(src)) {
|
|
11576
11591
|
src = src.substring(token.raw.length);
|
|
11577
11592
|
tokens.push(token);
|
|
11578
|
-
continue;
|
|
11593
|
+
return "continue";
|
|
11579
11594
|
}
|
|
11580
11595
|
|
|
11581
11596
|
// br
|
|
11582
|
-
if (token =
|
|
11597
|
+
if (token = _this2.tokenizer.br(src)) {
|
|
11583
11598
|
src = src.substring(token.raw.length);
|
|
11584
11599
|
tokens.push(token);
|
|
11585
|
-
continue;
|
|
11600
|
+
return "continue";
|
|
11586
11601
|
}
|
|
11587
11602
|
|
|
11588
11603
|
// del (gfm)
|
|
11589
|
-
if (token =
|
|
11604
|
+
if (token = _this2.tokenizer.del(src)) {
|
|
11590
11605
|
src = src.substring(token.raw.length);
|
|
11591
11606
|
tokens.push(token);
|
|
11592
|
-
continue;
|
|
11607
|
+
return "continue";
|
|
11593
11608
|
}
|
|
11594
11609
|
|
|
11595
11610
|
// autolink
|
|
11596
|
-
if (token =
|
|
11611
|
+
if (token = _this2.tokenizer.autolink(src, mangle)) {
|
|
11597
11612
|
src = src.substring(token.raw.length);
|
|
11598
11613
|
tokens.push(token);
|
|
11599
|
-
continue;
|
|
11614
|
+
return "continue";
|
|
11600
11615
|
}
|
|
11601
11616
|
|
|
11602
11617
|
// url (gfm)
|
|
11603
|
-
if (!
|
|
11618
|
+
if (!_this2.state.inLink && (token = _this2.tokenizer.url(src, mangle))) {
|
|
11604
11619
|
src = src.substring(token.raw.length);
|
|
11605
11620
|
tokens.push(token);
|
|
11606
|
-
continue;
|
|
11621
|
+
return "continue";
|
|
11607
11622
|
}
|
|
11608
11623
|
|
|
11609
11624
|
// text
|
|
11610
11625
|
// prevent inlineText consuming extensions by clipping 'src' to extension start
|
|
11611
11626
|
cutSrc = src;
|
|
11612
|
-
if (
|
|
11613
|
-
|
|
11614
|
-
|
|
11615
|
-
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
|
|
11619
|
-
|
|
11620
|
-
|
|
11621
|
-
|
|
11622
|
-
startIndex = Math.min(startIndex, tempStart);
|
|
11623
|
-
}
|
|
11624
|
-
});
|
|
11625
|
-
if (startIndex < Infinity && startIndex >= 0) {
|
|
11626
|
-
cutSrc = src.substring(0, startIndex + 1);
|
|
11627
|
+
if (_this2.options.extensions && _this2.options.extensions.startInline) {
|
|
11628
|
+
var startIndex = Infinity;
|
|
11629
|
+
var tempSrc = src.slice(1);
|
|
11630
|
+
var tempStart;
|
|
11631
|
+
_this2.options.extensions.startInline.forEach(function (getStartIndex) {
|
|
11632
|
+
tempStart = getStartIndex.call({
|
|
11633
|
+
lexer: this
|
|
11634
|
+
}, tempSrc);
|
|
11635
|
+
if (typeof tempStart === 'number' && tempStart >= 0) {
|
|
11636
|
+
startIndex = Math.min(startIndex, tempStart);
|
|
11627
11637
|
}
|
|
11628
|
-
})
|
|
11638
|
+
});
|
|
11639
|
+
if (startIndex < Infinity && startIndex >= 0) {
|
|
11640
|
+
cutSrc = src.substring(0, startIndex + 1);
|
|
11641
|
+
}
|
|
11629
11642
|
}
|
|
11630
|
-
if (token =
|
|
11643
|
+
if (token = _this2.tokenizer.inlineText(cutSrc, smartypants)) {
|
|
11631
11644
|
src = src.substring(token.raw.length);
|
|
11632
11645
|
if (token.raw.slice(-1) !== '_') {
|
|
11633
11646
|
// Track prevChar before string of ____ started
|
|
@@ -11641,17 +11654,22 @@ module.exports = dart;
|
|
|
11641
11654
|
} else {
|
|
11642
11655
|
tokens.push(token);
|
|
11643
11656
|
}
|
|
11644
|
-
continue;
|
|
11657
|
+
return "continue";
|
|
11645
11658
|
}
|
|
11646
11659
|
if (src) {
|
|
11647
11660
|
var errMsg = 'Infinite loop on byte: ' + src.charCodeAt(0);
|
|
11648
|
-
if (
|
|
11661
|
+
if (_this2.options.silent) {
|
|
11649
11662
|
console.error(errMsg);
|
|
11650
|
-
break;
|
|
11663
|
+
return "break";
|
|
11651
11664
|
} else {
|
|
11652
11665
|
throw new Error(errMsg);
|
|
11653
11666
|
}
|
|
11654
11667
|
}
|
|
11668
|
+
};
|
|
11669
|
+
while (src) {
|
|
11670
|
+
var _ret2 = _loop2();
|
|
11671
|
+
if (_ret2 === "continue") continue;
|
|
11672
|
+
if (_ret2 === "break") break;
|
|
11655
11673
|
}
|
|
11656
11674
|
return tokens;
|
|
11657
11675
|
};
|
|
@@ -11697,7 +11715,7 @@ module.exports = dart;
|
|
|
11697
11715
|
_proto.blockquote = function blockquote(quote) {
|
|
11698
11716
|
return "<blockquote>\n" + quote + "</blockquote>\n";
|
|
11699
11717
|
};
|
|
11700
|
-
_proto.html = function html(_html) {
|
|
11718
|
+
_proto.html = function html(_html, block) {
|
|
11701
11719
|
return _html;
|
|
11702
11720
|
}
|
|
11703
11721
|
|
|
@@ -12098,8 +12116,7 @@ module.exports = dart;
|
|
|
12098
12116
|
}
|
|
12099
12117
|
case 'html':
|
|
12100
12118
|
{
|
|
12101
|
-
|
|
12102
|
-
out += this.renderer.html(token.text);
|
|
12119
|
+
out += this.renderer.html(token.text, token.block);
|
|
12103
12120
|
continue;
|
|
12104
12121
|
}
|
|
12105
12122
|
case 'paragraph':
|
|
@@ -12245,39 +12262,263 @@ module.exports = dart;
|
|
|
12245
12262
|
}();
|
|
12246
12263
|
Hooks.passThroughHooks = new Set(['preprocess', 'postprocess']);
|
|
12247
12264
|
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
12252
|
-
|
|
12253
|
-
|
|
12254
|
-
|
|
12255
|
-
|
|
12256
|
-
|
|
12257
|
-
|
|
12258
|
-
|
|
12265
|
+
var _parseMarkdown = /*#__PURE__*/_classPrivateFieldLooseKey("parseMarkdown");
|
|
12266
|
+
var _onError = /*#__PURE__*/_classPrivateFieldLooseKey("onError");
|
|
12267
|
+
var Marked = /*#__PURE__*/function () {
|
|
12268
|
+
function Marked() {
|
|
12269
|
+
Object.defineProperty(this, _onError, {
|
|
12270
|
+
value: _onError2
|
|
12271
|
+
});
|
|
12272
|
+
Object.defineProperty(this, _parseMarkdown, {
|
|
12273
|
+
value: _parseMarkdown2
|
|
12274
|
+
});
|
|
12275
|
+
this.defaults = getDefaults();
|
|
12276
|
+
this.options = this.setOptions;
|
|
12277
|
+
this.parse = _classPrivateFieldLooseBase(this, _parseMarkdown)[_parseMarkdown](Lexer.lex, Parser.parse);
|
|
12278
|
+
this.parseInline = _classPrivateFieldLooseBase(this, _parseMarkdown)[_parseMarkdown](Lexer.lexInline, Parser.parseInline);
|
|
12279
|
+
this.Parser = Parser;
|
|
12280
|
+
this.parser = Parser.parse;
|
|
12281
|
+
this.Renderer = Renderer;
|
|
12282
|
+
this.TextRenderer = TextRenderer;
|
|
12283
|
+
this.Lexer = Lexer;
|
|
12284
|
+
this.lexer = Lexer.lex;
|
|
12285
|
+
this.Tokenizer = Tokenizer;
|
|
12286
|
+
this.Slugger = Slugger;
|
|
12287
|
+
this.Hooks = Hooks;
|
|
12288
|
+
this.use.apply(this, arguments);
|
|
12289
|
+
}
|
|
12290
|
+
var _proto = Marked.prototype;
|
|
12291
|
+
_proto.walkTokens = function walkTokens(tokens, callback) {
|
|
12292
|
+
var _this = this;
|
|
12293
|
+
var values = [];
|
|
12294
|
+
var _loop = function _loop() {
|
|
12295
|
+
var token = _step.value;
|
|
12296
|
+
values = values.concat(callback.call(_this, token));
|
|
12297
|
+
switch (token.type) {
|
|
12298
|
+
case 'table':
|
|
12299
|
+
{
|
|
12300
|
+
for (var _iterator2 = _createForOfIteratorHelperLoose(token.header), _step2; !(_step2 = _iterator2()).done;) {
|
|
12301
|
+
var cell = _step2.value;
|
|
12302
|
+
values = values.concat(_this.walkTokens(cell.tokens, callback));
|
|
12303
|
+
}
|
|
12304
|
+
for (var _iterator3 = _createForOfIteratorHelperLoose(token.rows), _step3; !(_step3 = _iterator3()).done;) {
|
|
12305
|
+
var row = _step3.value;
|
|
12306
|
+
for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) {
|
|
12307
|
+
var _cell = _step4.value;
|
|
12308
|
+
values = values.concat(_this.walkTokens(_cell.tokens, callback));
|
|
12309
|
+
}
|
|
12310
|
+
}
|
|
12311
|
+
break;
|
|
12312
|
+
}
|
|
12313
|
+
case 'list':
|
|
12314
|
+
{
|
|
12315
|
+
values = values.concat(_this.walkTokens(token.items, callback));
|
|
12316
|
+
break;
|
|
12317
|
+
}
|
|
12318
|
+
default:
|
|
12319
|
+
{
|
|
12320
|
+
if (_this.defaults.extensions && _this.defaults.extensions.childTokens && _this.defaults.extensions.childTokens[token.type]) {
|
|
12321
|
+
// Walk any extensions
|
|
12322
|
+
_this.defaults.extensions.childTokens[token.type].forEach(function (childTokens) {
|
|
12323
|
+
values = values.concat(_this.walkTokens(token[childTokens], callback));
|
|
12324
|
+
});
|
|
12325
|
+
} else if (token.tokens) {
|
|
12326
|
+
values = values.concat(_this.walkTokens(token.tokens, callback));
|
|
12327
|
+
}
|
|
12328
|
+
}
|
|
12259
12329
|
}
|
|
12260
|
-
|
|
12261
|
-
|
|
12262
|
-
|
|
12263
|
-
return Promise.reject(e);
|
|
12330
|
+
};
|
|
12331
|
+
for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) {
|
|
12332
|
+
_loop();
|
|
12264
12333
|
}
|
|
12265
|
-
|
|
12266
|
-
|
|
12267
|
-
|
|
12334
|
+
return values;
|
|
12335
|
+
};
|
|
12336
|
+
_proto.use = function use() {
|
|
12337
|
+
var _this2 = this;
|
|
12338
|
+
var extensions = this.defaults.extensions || {
|
|
12339
|
+
renderers: {},
|
|
12340
|
+
childTokens: {}
|
|
12341
|
+
};
|
|
12342
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
12343
|
+
args[_key] = arguments[_key];
|
|
12268
12344
|
}
|
|
12269
|
-
|
|
12345
|
+
args.forEach(function (pack) {
|
|
12346
|
+
// copy options to new object
|
|
12347
|
+
var opts = _extends({}, pack);
|
|
12348
|
+
|
|
12349
|
+
// set async to true if it was set to true before
|
|
12350
|
+
opts.async = _this2.defaults.async || opts.async || false;
|
|
12351
|
+
|
|
12352
|
+
// ==-- Parse "addon" extensions --== //
|
|
12353
|
+
if (pack.extensions) {
|
|
12354
|
+
pack.extensions.forEach(function (ext) {
|
|
12355
|
+
if (!ext.name) {
|
|
12356
|
+
throw new Error('extension name required');
|
|
12357
|
+
}
|
|
12358
|
+
if (ext.renderer) {
|
|
12359
|
+
// Renderer extensions
|
|
12360
|
+
var prevRenderer = extensions.renderers[ext.name];
|
|
12361
|
+
if (prevRenderer) {
|
|
12362
|
+
// Replace extension with func to run new extension but fall back if false
|
|
12363
|
+
extensions.renderers[ext.name] = function () {
|
|
12364
|
+
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
12365
|
+
args[_key2] = arguments[_key2];
|
|
12366
|
+
}
|
|
12367
|
+
var ret = ext.renderer.apply(this, args);
|
|
12368
|
+
if (ret === false) {
|
|
12369
|
+
ret = prevRenderer.apply(this, args);
|
|
12370
|
+
}
|
|
12371
|
+
return ret;
|
|
12372
|
+
};
|
|
12373
|
+
} else {
|
|
12374
|
+
extensions.renderers[ext.name] = ext.renderer;
|
|
12375
|
+
}
|
|
12376
|
+
}
|
|
12377
|
+
if (ext.tokenizer) {
|
|
12378
|
+
// Tokenizer Extensions
|
|
12379
|
+
if (!ext.level || ext.level !== 'block' && ext.level !== 'inline') {
|
|
12380
|
+
throw new Error("extension level must be 'block' or 'inline'");
|
|
12381
|
+
}
|
|
12382
|
+
if (extensions[ext.level]) {
|
|
12383
|
+
extensions[ext.level].unshift(ext.tokenizer);
|
|
12384
|
+
} else {
|
|
12385
|
+
extensions[ext.level] = [ext.tokenizer];
|
|
12386
|
+
}
|
|
12387
|
+
if (ext.start) {
|
|
12388
|
+
// Function to check for start of token
|
|
12389
|
+
if (ext.level === 'block') {
|
|
12390
|
+
if (extensions.startBlock) {
|
|
12391
|
+
extensions.startBlock.push(ext.start);
|
|
12392
|
+
} else {
|
|
12393
|
+
extensions.startBlock = [ext.start];
|
|
12394
|
+
}
|
|
12395
|
+
} else if (ext.level === 'inline') {
|
|
12396
|
+
if (extensions.startInline) {
|
|
12397
|
+
extensions.startInline.push(ext.start);
|
|
12398
|
+
} else {
|
|
12399
|
+
extensions.startInline = [ext.start];
|
|
12400
|
+
}
|
|
12401
|
+
}
|
|
12402
|
+
}
|
|
12403
|
+
}
|
|
12404
|
+
if (ext.childTokens) {
|
|
12405
|
+
// Child tokens to be visited by walkTokens
|
|
12406
|
+
extensions.childTokens[ext.name] = ext.childTokens;
|
|
12407
|
+
}
|
|
12408
|
+
});
|
|
12409
|
+
opts.extensions = extensions;
|
|
12410
|
+
}
|
|
12411
|
+
|
|
12412
|
+
// ==-- Parse "overwrite" extensions --== //
|
|
12413
|
+
if (pack.renderer) {
|
|
12414
|
+
var renderer = _this2.defaults.renderer || new Renderer(_this2.defaults);
|
|
12415
|
+
var _loop2 = function _loop2(prop) {
|
|
12416
|
+
var prevRenderer = renderer[prop];
|
|
12417
|
+
// Replace renderer with func to run extension, but fall back if false
|
|
12418
|
+
renderer[prop] = function () {
|
|
12419
|
+
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
12420
|
+
args[_key3] = arguments[_key3];
|
|
12421
|
+
}
|
|
12422
|
+
var ret = pack.renderer[prop].apply(renderer, args);
|
|
12423
|
+
if (ret === false) {
|
|
12424
|
+
ret = prevRenderer.apply(renderer, args);
|
|
12425
|
+
}
|
|
12426
|
+
return ret;
|
|
12427
|
+
};
|
|
12428
|
+
};
|
|
12429
|
+
for (var prop in pack.renderer) {
|
|
12430
|
+
_loop2(prop);
|
|
12431
|
+
}
|
|
12432
|
+
opts.renderer = renderer;
|
|
12433
|
+
}
|
|
12434
|
+
if (pack.tokenizer) {
|
|
12435
|
+
var tokenizer = _this2.defaults.tokenizer || new Tokenizer(_this2.defaults);
|
|
12436
|
+
var _loop3 = function _loop3(_prop) {
|
|
12437
|
+
var prevTokenizer = tokenizer[_prop];
|
|
12438
|
+
// Replace tokenizer with func to run extension, but fall back if false
|
|
12439
|
+
tokenizer[_prop] = function () {
|
|
12440
|
+
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
12441
|
+
args[_key4] = arguments[_key4];
|
|
12442
|
+
}
|
|
12443
|
+
var ret = pack.tokenizer[_prop].apply(tokenizer, args);
|
|
12444
|
+
if (ret === false) {
|
|
12445
|
+
ret = prevTokenizer.apply(tokenizer, args);
|
|
12446
|
+
}
|
|
12447
|
+
return ret;
|
|
12448
|
+
};
|
|
12449
|
+
};
|
|
12450
|
+
for (var _prop in pack.tokenizer) {
|
|
12451
|
+
_loop3(_prop);
|
|
12452
|
+
}
|
|
12453
|
+
opts.tokenizer = tokenizer;
|
|
12454
|
+
}
|
|
12455
|
+
|
|
12456
|
+
// ==-- Parse Hooks extensions --== //
|
|
12457
|
+
if (pack.hooks) {
|
|
12458
|
+
var hooks = _this2.defaults.hooks || new Hooks();
|
|
12459
|
+
var _loop4 = function _loop4(_prop2) {
|
|
12460
|
+
var prevHook = hooks[_prop2];
|
|
12461
|
+
if (Hooks.passThroughHooks.has(_prop2)) {
|
|
12462
|
+
hooks[_prop2] = function (arg) {
|
|
12463
|
+
if (_this2.defaults.async) {
|
|
12464
|
+
return Promise.resolve(pack.hooks[_prop2].call(hooks, arg)).then(function (ret) {
|
|
12465
|
+
return prevHook.call(hooks, ret);
|
|
12466
|
+
});
|
|
12467
|
+
}
|
|
12468
|
+
var ret = pack.hooks[_prop2].call(hooks, arg);
|
|
12469
|
+
return prevHook.call(hooks, ret);
|
|
12470
|
+
};
|
|
12471
|
+
} else {
|
|
12472
|
+
hooks[_prop2] = function () {
|
|
12473
|
+
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
12474
|
+
args[_key5] = arguments[_key5];
|
|
12475
|
+
}
|
|
12476
|
+
var ret = pack.hooks[_prop2].apply(hooks, args);
|
|
12477
|
+
if (ret === false) {
|
|
12478
|
+
ret = prevHook.apply(hooks, args);
|
|
12479
|
+
}
|
|
12480
|
+
return ret;
|
|
12481
|
+
};
|
|
12482
|
+
}
|
|
12483
|
+
};
|
|
12484
|
+
for (var _prop2 in pack.hooks) {
|
|
12485
|
+
_loop4(_prop2);
|
|
12486
|
+
}
|
|
12487
|
+
opts.hooks = hooks;
|
|
12488
|
+
}
|
|
12489
|
+
|
|
12490
|
+
// ==-- Parse WalkTokens extensions --== //
|
|
12491
|
+
if (pack.walkTokens) {
|
|
12492
|
+
var walkTokens = _this2.defaults.walkTokens;
|
|
12493
|
+
opts.walkTokens = function (token) {
|
|
12494
|
+
var values = [];
|
|
12495
|
+
values.push(pack.walkTokens.call(this, token));
|
|
12496
|
+
if (walkTokens) {
|
|
12497
|
+
values = values.concat(walkTokens.call(this, token));
|
|
12498
|
+
}
|
|
12499
|
+
return values;
|
|
12500
|
+
};
|
|
12501
|
+
}
|
|
12502
|
+
_this2.defaults = _extends({}, _this2.defaults, opts);
|
|
12503
|
+
});
|
|
12504
|
+
return this;
|
|
12270
12505
|
};
|
|
12271
|
-
|
|
12272
|
-
|
|
12506
|
+
_proto.setOptions = function setOptions(opt) {
|
|
12507
|
+
this.defaults = _extends({}, this.defaults, opt);
|
|
12508
|
+
return this;
|
|
12509
|
+
};
|
|
12510
|
+
return Marked;
|
|
12511
|
+
}();
|
|
12512
|
+
function _parseMarkdown2(lexer, parser) {
|
|
12513
|
+
var _this3 = this;
|
|
12273
12514
|
return function (src, opt, callback) {
|
|
12274
12515
|
if (typeof opt === 'function') {
|
|
12275
12516
|
callback = opt;
|
|
12276
12517
|
opt = null;
|
|
12277
12518
|
}
|
|
12278
12519
|
var origOpt = _extends({}, opt);
|
|
12279
|
-
opt = _extends({},
|
|
12280
|
-
var throwError =
|
|
12520
|
+
opt = _extends({}, _this3.defaults, origOpt);
|
|
12521
|
+
var throwError = _classPrivateFieldLooseBase(_this3, _onError)[_onError](opt.silent, opt.async, callback);
|
|
12281
12522
|
|
|
12282
12523
|
// throw error in case of non string input
|
|
12283
12524
|
if (typeof src === 'undefined' || src === null) {
|
|
@@ -12286,7 +12527,7 @@ module.exports = dart;
|
|
|
12286
12527
|
if (typeof src !== 'string') {
|
|
12287
12528
|
return throwError(new Error('marked(): input parameter is of type ' + Object.prototype.toString.call(src) + ', string expected'));
|
|
12288
12529
|
}
|
|
12289
|
-
|
|
12530
|
+
checkDeprecations(opt, callback);
|
|
12290
12531
|
if (opt.hooks) {
|
|
12291
12532
|
opt.hooks.options = opt;
|
|
12292
12533
|
}
|
|
@@ -12306,7 +12547,7 @@ module.exports = dart;
|
|
|
12306
12547
|
if (!err) {
|
|
12307
12548
|
try {
|
|
12308
12549
|
if (opt.walkTokens) {
|
|
12309
|
-
|
|
12550
|
+
_this3.walkTokens(tokens, opt.walkTokens);
|
|
12310
12551
|
}
|
|
12311
12552
|
out = parser(tokens, opt);
|
|
12312
12553
|
if (opt.hooks) {
|
|
@@ -12325,7 +12566,7 @@ module.exports = dart;
|
|
|
12325
12566
|
delete opt.highlight;
|
|
12326
12567
|
if (!tokens.length) return done();
|
|
12327
12568
|
var pending = 0;
|
|
12328
|
-
|
|
12569
|
+
_this3.walkTokens(tokens, function (token) {
|
|
12329
12570
|
if (token.type === 'code') {
|
|
12330
12571
|
pending++;
|
|
12331
12572
|
setTimeout(function () {
|
|
@@ -12354,7 +12595,7 @@ module.exports = dart;
|
|
|
12354
12595
|
return Promise.resolve(opt.hooks ? opt.hooks.preprocess(src) : src).then(function (src) {
|
|
12355
12596
|
return lexer(src, opt);
|
|
12356
12597
|
}).then(function (tokens) {
|
|
12357
|
-
return opt.walkTokens ? Promise.all(
|
|
12598
|
+
return opt.walkTokens ? Promise.all(_this3.walkTokens(tokens, opt.walkTokens)).then(function () {
|
|
12358
12599
|
return tokens;
|
|
12359
12600
|
}) : tokens;
|
|
12360
12601
|
}).then(function (tokens) {
|
|
@@ -12369,7 +12610,7 @@ module.exports = dart;
|
|
|
12369
12610
|
}
|
|
12370
12611
|
var _tokens = lexer(src, opt);
|
|
12371
12612
|
if (opt.walkTokens) {
|
|
12372
|
-
|
|
12613
|
+
_this3.walkTokens(_tokens, opt.walkTokens);
|
|
12373
12614
|
}
|
|
12374
12615
|
var html = parser(_tokens, opt);
|
|
12375
12616
|
if (opt.hooks) {
|
|
@@ -12381,12 +12622,38 @@ module.exports = dart;
|
|
|
12381
12622
|
}
|
|
12382
12623
|
};
|
|
12383
12624
|
}
|
|
12625
|
+
function _onError2(silent, async, callback) {
|
|
12626
|
+
return function (e) {
|
|
12627
|
+
e.message += '\nPlease report this to https://github.com/markedjs/marked.';
|
|
12628
|
+
if (silent) {
|
|
12629
|
+
var msg = '<p>An error occurred:</p><pre>' + escape(e.message + '', true) + '</pre>';
|
|
12630
|
+
if (async) {
|
|
12631
|
+
return Promise.resolve(msg);
|
|
12632
|
+
}
|
|
12633
|
+
if (callback) {
|
|
12634
|
+
callback(null, msg);
|
|
12635
|
+
return;
|
|
12636
|
+
}
|
|
12637
|
+
return msg;
|
|
12638
|
+
}
|
|
12639
|
+
if (async) {
|
|
12640
|
+
return Promise.reject(e);
|
|
12641
|
+
}
|
|
12642
|
+
if (callback) {
|
|
12643
|
+
callback(e);
|
|
12644
|
+
return;
|
|
12645
|
+
}
|
|
12646
|
+
throw e;
|
|
12647
|
+
};
|
|
12648
|
+
}
|
|
12649
|
+
|
|
12650
|
+
var markedInstance = new Marked(exports.defaults);
|
|
12384
12651
|
|
|
12385
12652
|
/**
|
|
12386
12653
|
* Marked
|
|
12387
12654
|
*/
|
|
12388
12655
|
function marked(src, opt, callback) {
|
|
12389
|
-
return
|
|
12656
|
+
return markedInstance.parse(src, opt, callback);
|
|
12390
12657
|
}
|
|
12391
12658
|
|
|
12392
12659
|
/**
|
|
@@ -12394,7 +12661,8 @@ module.exports = dart;
|
|
|
12394
12661
|
*/
|
|
12395
12662
|
|
|
12396
12663
|
marked.options = marked.setOptions = function (opt) {
|
|
12397
|
-
|
|
12664
|
+
markedInstance.setOptions(opt);
|
|
12665
|
+
marked.defaults = markedInstance.defaults;
|
|
12398
12666
|
changeDefaults(marked.defaults);
|
|
12399
12667
|
return marked;
|
|
12400
12668
|
};
|
|
@@ -12406,234 +12674,25 @@ module.exports = dart;
|
|
|
12406
12674
|
*/
|
|
12407
12675
|
|
|
12408
12676
|
marked.use = function () {
|
|
12409
|
-
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12414
|
-
args[_key] = arguments[_key];
|
|
12415
|
-
}
|
|
12416
|
-
args.forEach(function (pack) {
|
|
12417
|
-
// copy options to new object
|
|
12418
|
-
var opts = _extends({}, pack);
|
|
12419
|
-
|
|
12420
|
-
// set async to true if it was set to true before
|
|
12421
|
-
opts.async = marked.defaults.async || opts.async || false;
|
|
12422
|
-
|
|
12423
|
-
// ==-- Parse "addon" extensions --== //
|
|
12424
|
-
if (pack.extensions) {
|
|
12425
|
-
pack.extensions.forEach(function (ext) {
|
|
12426
|
-
if (!ext.name) {
|
|
12427
|
-
throw new Error('extension name required');
|
|
12428
|
-
}
|
|
12429
|
-
if (ext.renderer) {
|
|
12430
|
-
// Renderer extensions
|
|
12431
|
-
var prevRenderer = extensions.renderers[ext.name];
|
|
12432
|
-
if (prevRenderer) {
|
|
12433
|
-
// Replace extension with func to run new extension but fall back if false
|
|
12434
|
-
extensions.renderers[ext.name] = function () {
|
|
12435
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
12436
|
-
args[_key2] = arguments[_key2];
|
|
12437
|
-
}
|
|
12438
|
-
var ret = ext.renderer.apply(this, args);
|
|
12439
|
-
if (ret === false) {
|
|
12440
|
-
ret = prevRenderer.apply(this, args);
|
|
12441
|
-
}
|
|
12442
|
-
return ret;
|
|
12443
|
-
};
|
|
12444
|
-
} else {
|
|
12445
|
-
extensions.renderers[ext.name] = ext.renderer;
|
|
12446
|
-
}
|
|
12447
|
-
}
|
|
12448
|
-
if (ext.tokenizer) {
|
|
12449
|
-
// Tokenizer Extensions
|
|
12450
|
-
if (!ext.level || ext.level !== 'block' && ext.level !== 'inline') {
|
|
12451
|
-
throw new Error("extension level must be 'block' or 'inline'");
|
|
12452
|
-
}
|
|
12453
|
-
if (extensions[ext.level]) {
|
|
12454
|
-
extensions[ext.level].unshift(ext.tokenizer);
|
|
12455
|
-
} else {
|
|
12456
|
-
extensions[ext.level] = [ext.tokenizer];
|
|
12457
|
-
}
|
|
12458
|
-
if (ext.start) {
|
|
12459
|
-
// Function to check for start of token
|
|
12460
|
-
if (ext.level === 'block') {
|
|
12461
|
-
if (extensions.startBlock) {
|
|
12462
|
-
extensions.startBlock.push(ext.start);
|
|
12463
|
-
} else {
|
|
12464
|
-
extensions.startBlock = [ext.start];
|
|
12465
|
-
}
|
|
12466
|
-
} else if (ext.level === 'inline') {
|
|
12467
|
-
if (extensions.startInline) {
|
|
12468
|
-
extensions.startInline.push(ext.start);
|
|
12469
|
-
} else {
|
|
12470
|
-
extensions.startInline = [ext.start];
|
|
12471
|
-
}
|
|
12472
|
-
}
|
|
12473
|
-
}
|
|
12474
|
-
}
|
|
12475
|
-
if (ext.childTokens) {
|
|
12476
|
-
// Child tokens to be visited by walkTokens
|
|
12477
|
-
extensions.childTokens[ext.name] = ext.childTokens;
|
|
12478
|
-
}
|
|
12479
|
-
});
|
|
12480
|
-
opts.extensions = extensions;
|
|
12481
|
-
}
|
|
12482
|
-
|
|
12483
|
-
// ==-- Parse "overwrite" extensions --== //
|
|
12484
|
-
if (pack.renderer) {
|
|
12485
|
-
(function () {
|
|
12486
|
-
var renderer = marked.defaults.renderer || new Renderer();
|
|
12487
|
-
var _loop = function _loop(prop) {
|
|
12488
|
-
var prevRenderer = renderer[prop];
|
|
12489
|
-
// Replace renderer with func to run extension, but fall back if false
|
|
12490
|
-
renderer[prop] = function () {
|
|
12491
|
-
for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
12492
|
-
args[_key3] = arguments[_key3];
|
|
12493
|
-
}
|
|
12494
|
-
var ret = pack.renderer[prop].apply(renderer, args);
|
|
12495
|
-
if (ret === false) {
|
|
12496
|
-
ret = prevRenderer.apply(renderer, args);
|
|
12497
|
-
}
|
|
12498
|
-
return ret;
|
|
12499
|
-
};
|
|
12500
|
-
};
|
|
12501
|
-
for (var prop in pack.renderer) {
|
|
12502
|
-
_loop(prop);
|
|
12503
|
-
}
|
|
12504
|
-
opts.renderer = renderer;
|
|
12505
|
-
})();
|
|
12506
|
-
}
|
|
12507
|
-
if (pack.tokenizer) {
|
|
12508
|
-
(function () {
|
|
12509
|
-
var tokenizer = marked.defaults.tokenizer || new Tokenizer();
|
|
12510
|
-
var _loop2 = function _loop2(prop) {
|
|
12511
|
-
var prevTokenizer = tokenizer[prop];
|
|
12512
|
-
// Replace tokenizer with func to run extension, but fall back if false
|
|
12513
|
-
tokenizer[prop] = function () {
|
|
12514
|
-
for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
12515
|
-
args[_key4] = arguments[_key4];
|
|
12516
|
-
}
|
|
12517
|
-
var ret = pack.tokenizer[prop].apply(tokenizer, args);
|
|
12518
|
-
if (ret === false) {
|
|
12519
|
-
ret = prevTokenizer.apply(tokenizer, args);
|
|
12520
|
-
}
|
|
12521
|
-
return ret;
|
|
12522
|
-
};
|
|
12523
|
-
};
|
|
12524
|
-
for (var prop in pack.tokenizer) {
|
|
12525
|
-
_loop2(prop);
|
|
12526
|
-
}
|
|
12527
|
-
opts.tokenizer = tokenizer;
|
|
12528
|
-
})();
|
|
12529
|
-
}
|
|
12530
|
-
|
|
12531
|
-
// ==-- Parse Hooks extensions --== //
|
|
12532
|
-
if (pack.hooks) {
|
|
12533
|
-
(function () {
|
|
12534
|
-
var hooks = marked.defaults.hooks || new Hooks();
|
|
12535
|
-
var _loop3 = function _loop3(prop) {
|
|
12536
|
-
var prevHook = hooks[prop];
|
|
12537
|
-
if (Hooks.passThroughHooks.has(prop)) {
|
|
12538
|
-
hooks[prop] = function (arg) {
|
|
12539
|
-
if (marked.defaults.async) {
|
|
12540
|
-
return Promise.resolve(pack.hooks[prop].call(hooks, arg)).then(function (ret) {
|
|
12541
|
-
return prevHook.call(hooks, ret);
|
|
12542
|
-
});
|
|
12543
|
-
}
|
|
12544
|
-
var ret = pack.hooks[prop].call(hooks, arg);
|
|
12545
|
-
return prevHook.call(hooks, ret);
|
|
12546
|
-
};
|
|
12547
|
-
} else {
|
|
12548
|
-
hooks[prop] = function () {
|
|
12549
|
-
for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
|
|
12550
|
-
args[_key5] = arguments[_key5];
|
|
12551
|
-
}
|
|
12552
|
-
var ret = pack.hooks[prop].apply(hooks, args);
|
|
12553
|
-
if (ret === false) {
|
|
12554
|
-
ret = prevHook.apply(hooks, args);
|
|
12555
|
-
}
|
|
12556
|
-
return ret;
|
|
12557
|
-
};
|
|
12558
|
-
}
|
|
12559
|
-
};
|
|
12560
|
-
for (var prop in pack.hooks) {
|
|
12561
|
-
_loop3(prop);
|
|
12562
|
-
}
|
|
12563
|
-
opts.hooks = hooks;
|
|
12564
|
-
})();
|
|
12565
|
-
}
|
|
12566
|
-
|
|
12567
|
-
// ==-- Parse WalkTokens extensions --== //
|
|
12568
|
-
if (pack.walkTokens) {
|
|
12569
|
-
var _walkTokens = marked.defaults.walkTokens;
|
|
12570
|
-
opts.walkTokens = function (token) {
|
|
12571
|
-
var values = [];
|
|
12572
|
-
values.push(pack.walkTokens.call(this, token));
|
|
12573
|
-
if (_walkTokens) {
|
|
12574
|
-
values = values.concat(_walkTokens.call(this, token));
|
|
12575
|
-
}
|
|
12576
|
-
return values;
|
|
12577
|
-
};
|
|
12578
|
-
}
|
|
12579
|
-
marked.setOptions(opts);
|
|
12580
|
-
});
|
|
12581
|
-
};
|
|
12677
|
+
markedInstance.use.apply(markedInstance, arguments);
|
|
12678
|
+
marked.defaults = markedInstance.defaults;
|
|
12679
|
+
changeDefaults(marked.defaults);
|
|
12680
|
+
return marked;
|
|
12681
|
+
};
|
|
12582
12682
|
|
|
12583
12683
|
/**
|
|
12584
12684
|
* Run callback for every token
|
|
12585
12685
|
*/
|
|
12586
12686
|
|
|
12587
12687
|
marked.walkTokens = function (tokens, callback) {
|
|
12588
|
-
|
|
12589
|
-
var _loop4 = function _loop4() {
|
|
12590
|
-
var token = _step.value;
|
|
12591
|
-
values = values.concat(callback.call(marked, token));
|
|
12592
|
-
switch (token.type) {
|
|
12593
|
-
case 'table':
|
|
12594
|
-
{
|
|
12595
|
-
for (var _iterator2 = _createForOfIteratorHelperLoose(token.header), _step2; !(_step2 = _iterator2()).done;) {
|
|
12596
|
-
var cell = _step2.value;
|
|
12597
|
-
values = values.concat(marked.walkTokens(cell.tokens, callback));
|
|
12598
|
-
}
|
|
12599
|
-
for (var _iterator3 = _createForOfIteratorHelperLoose(token.rows), _step3; !(_step3 = _iterator3()).done;) {
|
|
12600
|
-
var row = _step3.value;
|
|
12601
|
-
for (var _iterator4 = _createForOfIteratorHelperLoose(row), _step4; !(_step4 = _iterator4()).done;) {
|
|
12602
|
-
var _cell = _step4.value;
|
|
12603
|
-
values = values.concat(marked.walkTokens(_cell.tokens, callback));
|
|
12604
|
-
}
|
|
12605
|
-
}
|
|
12606
|
-
break;
|
|
12607
|
-
}
|
|
12608
|
-
case 'list':
|
|
12609
|
-
{
|
|
12610
|
-
values = values.concat(marked.walkTokens(token.items, callback));
|
|
12611
|
-
break;
|
|
12612
|
-
}
|
|
12613
|
-
default:
|
|
12614
|
-
{
|
|
12615
|
-
if (marked.defaults.extensions && marked.defaults.extensions.childTokens && marked.defaults.extensions.childTokens[token.type]) {
|
|
12616
|
-
// Walk any extensions
|
|
12617
|
-
marked.defaults.extensions.childTokens[token.type].forEach(function (childTokens) {
|
|
12618
|
-
values = values.concat(marked.walkTokens(token[childTokens], callback));
|
|
12619
|
-
});
|
|
12620
|
-
} else if (token.tokens) {
|
|
12621
|
-
values = values.concat(marked.walkTokens(token.tokens, callback));
|
|
12622
|
-
}
|
|
12623
|
-
}
|
|
12624
|
-
}
|
|
12625
|
-
};
|
|
12626
|
-
for (var _iterator = _createForOfIteratorHelperLoose(tokens), _step; !(_step = _iterator()).done;) {
|
|
12627
|
-
_loop4();
|
|
12628
|
-
}
|
|
12629
|
-
return values;
|
|
12688
|
+
return markedInstance.walkTokens(tokens, callback);
|
|
12630
12689
|
};
|
|
12631
12690
|
|
|
12632
12691
|
/**
|
|
12633
12692
|
* Parse Inline
|
|
12634
12693
|
* @param {string} src
|
|
12635
12694
|
*/
|
|
12636
|
-
marked.parseInline =
|
|
12695
|
+
marked.parseInline = markedInstance.parseInline;
|
|
12637
12696
|
|
|
12638
12697
|
/**
|
|
12639
12698
|
* Expose
|
|
@@ -12659,6 +12718,7 @@ module.exports = dart;
|
|
|
12659
12718
|
|
|
12660
12719
|
exports.Hooks = Hooks;
|
|
12661
12720
|
exports.Lexer = Lexer;
|
|
12721
|
+
exports.Marked = Marked;
|
|
12662
12722
|
exports.Parser = Parser;
|
|
12663
12723
|
exports.Renderer = Renderer;
|
|
12664
12724
|
exports.Slugger = Slugger;
|
|
@@ -13864,17 +13924,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
13864
13924
|
releaseTime: 'release time'
|
|
13865
13925
|
});
|
|
13866
13926
|
|
|
13867
|
-
/***/ }),
|
|
13868
|
-
|
|
13869
|
-
/***/ "9277":
|
|
13870
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
13871
|
-
|
|
13872
|
-
"use strict";
|
|
13873
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_readMd_vue_vue_type_style_index_0_id_5ecd3007_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("775c");
|
|
13874
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_readMd_vue_vue_type_style_index_0_id_5ecd3007_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_readMd_vue_vue_type_style_index_0_id_5ecd3007_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
13875
|
-
/* unused harmony reexport * */
|
|
13876
|
-
|
|
13877
|
-
|
|
13878
13927
|
/***/ }),
|
|
13879
13928
|
|
|
13880
13929
|
/***/ "94ca":
|
|
@@ -14415,7 +14464,7 @@ exports.f = DESCRIPTORS ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P
|
|
|
14415
14464
|
// ESM COMPAT FLAG
|
|
14416
14465
|
__webpack_require__.r(__webpack_exports__);
|
|
14417
14466
|
|
|
14418
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
14467
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/main.vue?vue&type=template&id=13ef86c7&scoped=true
|
|
14419
14468
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"wrap",staticStyle:{"height":"100%"}},[_c('div',{staticClass:"copilot-box"},[_c('Dialogue'),_c('div',{staticStyle:{"height":"300px"}}),_c('div',{staticClass:"copilot-bottom-box"},[_c('CopiFooter')],1)],1)])
|
|
14420
14469
|
}
|
|
14421
14470
|
var staticRenderFns = []
|
|
@@ -14423,21 +14472,21 @@ var staticRenderFns = []
|
|
|
14423
14472
|
|
|
14424
14473
|
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/main.vue?vue&type=template&id=13ef86c7&scoped=true
|
|
14425
14474
|
|
|
14426
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
14427
|
-
var
|
|
14475
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/dialogue/index.vue?vue&type=template&id=1bc2ea35&scoped=true
|
|
14476
|
+
var dialoguevue_type_template_id_1bc2ea35_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{ref:"messageBox",staticClass:"message-box"},[_vm._l((_vm.msgList),function(item,index){return _c('div',{key:index,staticClass:"message-group"},[_c('div',{staticClass:"msg-head"},[(item.isSend)?_c('UserHead'):_c('AnswerHead')],1),_vm._l((item.msg),function(msg,index){return _c('div',{key:index,class:{ 'msg-content': true }},[_c('readMd',{attrs:{"text":msg,"isPrinting":item.needPrinting,"showCursor":!item.isSend,"scrollToBottom":_vm.scrollToBottom},on:{"printOk":_vm.printOk,"update:isPrinting":function($event){return _vm.$set(item, "needPrinting", $event)},"update:is-printing":function($event){return _vm.$set(item, "needPrinting", $event)}}}),(!item.isSend)?_c('div',{staticClass:"icon-operates"},[_c('div',{staticClass:"icon-item",attrs:{"title":"点赞"}}),_c('div',{staticClass:"icon-item",attrs:{"title":"不喜欢"}}),_c('div',{staticClass:"icon-item",attrs:{"title":"复制"}}),_c('div',{staticClass:"icon-item",attrs:{"title":"导出"}}),_c('div',{staticClass:"icon-item",attrs:{"title":"播放"}})]):_vm._e()],1)})],2)}),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.stopDialogue),expression:"stopDialogue"}],staticClass:"stop-dialogue"},[_c('div',{staticClass:"gray-line"}),_c('div',{staticClass:"title"},[_vm._v(" 很抱歉,此对话已达到其限制。让我们开始新的聊天。 ")]),_c('div',{staticClass:"gray-line"})])],2)
|
|
14428
14477
|
}
|
|
14429
|
-
var
|
|
14478
|
+
var dialoguevue_type_template_id_1bc2ea35_scoped_true_staticRenderFns = []
|
|
14430
14479
|
|
|
14431
14480
|
|
|
14432
|
-
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/index.vue?vue&type=template&id=
|
|
14481
|
+
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/index.vue?vue&type=template&id=1bc2ea35&scoped=true
|
|
14433
14482
|
|
|
14434
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
14435
|
-
var
|
|
14483
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/dialogue/readMd.vue?vue&type=template&id=d47f3aee&scoped=true
|
|
14484
|
+
var readMdvue_type_template_id_d47f3aee_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_c('div',{directives:[{name:"highlight",rawName:"v-highlight"}],staticClass:"markdown",domProps:{"innerHTML":_vm._s(_vm.vHtml)}})])
|
|
14436
14485
|
}
|
|
14437
|
-
var
|
|
14486
|
+
var readMdvue_type_template_id_d47f3aee_scoped_true_staticRenderFns = []
|
|
14438
14487
|
|
|
14439
14488
|
|
|
14440
|
-
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/readMd.vue?vue&type=template&id=
|
|
14489
|
+
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/readMd.vue?vue&type=template&id=d47f3aee&scoped=true
|
|
14441
14490
|
|
|
14442
14491
|
// EXTERNAL MODULE: ./node_modules/dompurify/dist/purify.js
|
|
14443
14492
|
var purify = __webpack_require__("c0c4");
|
|
@@ -14480,2171 +14529,249 @@ function isInCode(text) {
|
|
|
14480
14529
|
// 遇到转义符,跳过下一个字符
|
|
14481
14530
|
source = source.slice(2);
|
|
14482
14531
|
} else if (char === "`") {
|
|
14483
|
-
// 以 ` 开头。表示小代码块开始。
|
|
14484
|
-
state = States.codeStartSm;
|
|
14485
|
-
source = source.slice(1);
|
|
14486
|
-
} else {
|
|
14487
|
-
// 其他情况,直接消费当前字符
|
|
14488
|
-
source = source.slice(1);
|
|
14489
|
-
}
|
|
14490
|
-
inStart = false;
|
|
14491
|
-
break;
|
|
14492
|
-
case States.codeStartSm:
|
|
14493
|
-
if (char === "`") {
|
|
14494
|
-
// 遇到第二个 `,表示代码块结束
|
|
14495
|
-
state = States.text;
|
|
14496
|
-
source = source.slice(1);
|
|
14497
|
-
} else if (char === "\\") {
|
|
14498
|
-
// 遇到转义符,跳过下一个字符
|
|
14499
|
-
source = source.slice(2);
|
|
14500
|
-
} else {
|
|
14501
|
-
// 其他情况,直接消费当前字符
|
|
14502
|
-
source = source.slice(1);
|
|
14503
|
-
}
|
|
14504
|
-
break;
|
|
14505
|
-
case States.codeStartBig:
|
|
14506
|
-
if (/^\n```/.test(source)) {
|
|
14507
|
-
// 遇到第二个 ```,表示代码块结束
|
|
14508
|
-
state = States.text;
|
|
14509
|
-
source = source.replace(/^\n```/, "");
|
|
14510
|
-
} else {
|
|
14511
|
-
// 其他情况,直接消费当前字符
|
|
14512
|
-
source = source.slice(1);
|
|
14513
|
-
}
|
|
14514
|
-
break;
|
|
14515
|
-
}
|
|
14516
|
-
}
|
|
14517
|
-
return state !== States.text;
|
|
14518
|
-
}
|
|
14519
|
-
/* harmony default export */ var mdInCode = (isInCode);
|
|
14520
|
-
// EXTERNAL MODULE: ./node_modules/vuex/dist/vuex.esm.js
|
|
14521
|
-
var vuex_esm = __webpack_require__("2f62");
|
|
14522
|
-
|
|
14523
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/dialogue/readMd.vue?vue&type=script&lang=js
|
|
14524
|
-
|
|
14525
|
-
|
|
14526
|
-
// 用于判断是否显示光标
|
|
14527
|
-
|
|
14528
|
-
/* harmony default export */ var readMdvue_type_script_lang_js = ({
|
|
14529
|
-
props: {
|
|
14530
|
-
// 输入的 markdown 文本
|
|
14531
|
-
text: {
|
|
14532
|
-
type: String,
|
|
14533
|
-
default: ""
|
|
14534
|
-
},
|
|
14535
|
-
// 是否需要显示光标?比如在消息流结束后是不需要显示光标的
|
|
14536
|
-
showCursor: {
|
|
14537
|
-
type: Boolean,
|
|
14538
|
-
default: false
|
|
14539
|
-
},
|
|
14540
|
-
speed: {
|
|
14541
|
-
type: Number,
|
|
14542
|
-
default: 100
|
|
14543
|
-
},
|
|
14544
|
-
isPrinting: {
|
|
14545
|
-
type: Boolean,
|
|
14546
|
-
default: false
|
|
14547
|
-
},
|
|
14548
|
-
scrollToBottom: {
|
|
14549
|
-
type: Function,
|
|
14550
|
-
default: () => {}
|
|
14551
|
-
}
|
|
14552
|
-
},
|
|
14553
|
-
data() {
|
|
14554
|
-
return {
|
|
14555
|
-
vHtml: '',
|
|
14556
|
-
isShowCursor: false,
|
|
14557
|
-
printInterval: false
|
|
14558
|
-
};
|
|
14559
|
-
},
|
|
14560
|
-
computed: {
|
|
14561
|
-
...Object(vuex_esm["d" /* mapState */])('copilot', ['searchText', 'sendLonding'])
|
|
14562
|
-
},
|
|
14563
|
-
methods: {
|
|
14564
|
-
...Object(vuex_esm["c" /* mapMutations */])('copilot', ['setSendLonding']),
|
|
14565
|
-
printMessage(message) {
|
|
14566
|
-
let index = 0;
|
|
14567
|
-
// 创建定时器
|
|
14568
|
-
this.printInterval = setInterval(() => {
|
|
14569
|
-
// 逐步的给最终展示 vHtml 添加数据
|
|
14570
|
-
this.vHtml += message[index];
|
|
14571
|
-
this.isShowCursor = this.showCursor && !mdInCode(this.vHtml);
|
|
14572
|
-
// 流式打印索引值 ++
|
|
14573
|
-
index++;
|
|
14574
|
-
this.scrollToBottom();
|
|
14575
|
-
// 达到索引上限,或者截止字段 done ,则终止继续展示数据
|
|
14576
|
-
if (index === message.length || this.sendLonding === false) {
|
|
14577
|
-
// 清除定时器
|
|
14578
|
-
clearInterval(this.printInterval);
|
|
14579
|
-
// 定时器定义字段恢复默认值
|
|
14580
|
-
this.printInterval = null;
|
|
14581
|
-
this.$emit('update:isPrinting', false);
|
|
14582
|
-
this.$emit('printOk');
|
|
14583
|
-
this.setSendLonding(false);
|
|
14584
|
-
}
|
|
14585
|
-
}, this.speed); // 每个字符的打印间隔时间,可以调整以控制打印速度
|
|
14586
|
-
},
|
|
14587
|
-
|
|
14588
|
-
// 计算最终要显示的 html 文本
|
|
14589
|
-
getHtml() {
|
|
14590
|
-
// return this.text
|
|
14591
|
-
return purify_default.a.sanitize(marked_umd["marked"].parse(this.text));
|
|
14592
|
-
}
|
|
14593
|
-
},
|
|
14594
|
-
mounted() {
|
|
14595
|
-
this.scrollToBottom(true);
|
|
14596
|
-
if (this.isPrinting) {
|
|
14597
|
-
this.printMessage(this.getHtml());
|
|
14598
|
-
} else {
|
|
14599
|
-
this.vHtml = this.getHtml();
|
|
14600
|
-
this.$emit("printOk");
|
|
14601
|
-
}
|
|
14602
|
-
}
|
|
14603
|
-
});
|
|
14604
|
-
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/readMd.vue?vue&type=script&lang=js
|
|
14605
|
-
/* harmony default export */ var dialogue_readMdvue_type_script_lang_js = (readMdvue_type_script_lang_js);
|
|
14606
|
-
// EXTERNAL MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/readMd.vue?vue&type=style&index=0&id=5ecd3007&prod&lang=scss&scoped=true
|
|
14607
|
-
var readMdvue_type_style_index_0_id_5ecd3007_prod_lang_scss_scoped_true = __webpack_require__("9277");
|
|
14608
|
-
|
|
14609
|
-
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
14610
|
-
var componentNormalizer = __webpack_require__("2877");
|
|
14611
|
-
|
|
14612
|
-
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/readMd.vue
|
|
14613
|
-
|
|
14614
|
-
|
|
14615
|
-
|
|
14616
|
-
|
|
14617
|
-
|
|
14618
|
-
|
|
14619
|
-
/* normalize component */
|
|
14620
|
-
|
|
14621
|
-
var component = Object(componentNormalizer["a" /* default */])(
|
|
14622
|
-
dialogue_readMdvue_type_script_lang_js,
|
|
14623
|
-
readMdvue_type_template_id_5ecd3007_scoped_true_render,
|
|
14624
|
-
readMdvue_type_template_id_5ecd3007_scoped_true_staticRenderFns,
|
|
14625
|
-
false,
|
|
14626
|
-
null,
|
|
14627
|
-
"5ecd3007",
|
|
14628
|
-
null
|
|
14629
|
-
|
|
14630
|
-
)
|
|
14631
|
-
|
|
14632
|
-
/* harmony default export */ var readMd = (component.exports);
|
|
14633
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"04f5ced9-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/CopiContent/UserHead.vue?vue&type=template&id=011b9031&scoped=true
|
|
14634
|
-
var UserHeadvue_type_template_id_011b9031_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"user"},[_c('div',{staticClass:"icon header-avatar rounded-full"},[_c('svg',{attrs:{"viewBox":"0 0 24 24","xmlns":"http://www.w3.org/2000/svg"}},[_c('path',{attrs:{"d":"M17.755 14a2.249 2.249 0 0 1 2.248 2.25v.918a2.75 2.75 0 0 1-.512 1.598c-1.546 2.164-4.07 3.235-7.49 3.235-3.422 0-5.945-1.072-7.487-3.236a2.75 2.75 0 0 1-.51-1.596v-.92A2.249 2.249 0 0 1 6.253 14h11.502ZM12 2.005a5 5 0 1 1 0 10 5 5 0 0 1 0-10Z"}})])]),_c('div',{staticClass:"head-label"},[_vm._v("你")])])
|
|
14635
|
-
}
|
|
14636
|
-
var UserHeadvue_type_template_id_011b9031_scoped_true_staticRenderFns = []
|
|
14637
|
-
|
|
14638
|
-
|
|
14639
|
-
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/UserHead.vue?vue&type=template&id=011b9031&scoped=true
|
|
14640
|
-
|
|
14641
|
-
// EXTERNAL MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/UserHead.vue?vue&type=style&index=0&id=011b9031&prod&scoped=true&lang=scss
|
|
14642
|
-
var UserHeadvue_type_style_index_0_id_011b9031_prod_scoped_true_lang_scss = __webpack_require__("f6da");
|
|
14643
|
-
|
|
14644
|
-
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/UserHead.vue
|
|
14645
|
-
|
|
14646
|
-
var script = {}
|
|
14647
|
-
|
|
14648
|
-
|
|
14649
|
-
|
|
14650
|
-
/* normalize component */
|
|
14651
|
-
|
|
14652
|
-
var UserHead_component = Object(componentNormalizer["a" /* default */])(
|
|
14653
|
-
script,
|
|
14654
|
-
UserHeadvue_type_template_id_011b9031_scoped_true_render,
|
|
14655
|
-
UserHeadvue_type_template_id_011b9031_scoped_true_staticRenderFns,
|
|
14656
|
-
false,
|
|
14657
|
-
null,
|
|
14658
|
-
"011b9031",
|
|
14659
|
-
null
|
|
14660
|
-
|
|
14661
|
-
)
|
|
14662
|
-
|
|
14663
|
-
/* harmony default export */ var UserHead = (UserHead_component.exports);
|
|
14664
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"04f5ced9-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/CopiContent/AnswerHead.vue?vue&type=template&id=9ecf6db6&scoped=true
|
|
14665
|
-
var AnswerHeadvue_type_template_id_9ecf6db6_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"answer"},[_c('div',{staticClass:"icon"},[_c('svg',{attrs:{"viewBox":"0 0 48 48","fill":"none","xmlns":"http://www.w3.org/2000/svg"}},[_c('g',{attrs:{"clip-path":"url(#clip0_3984_10372)"}},[_c('path',{attrs:{"d":"M35.1201 6.46024C34.4524 4.39741 32.5312 3 30.363 3L28.7093 3C26.2926 3 24.2217 4.72855 23.7898 7.10639L21.448 19.9984L22.1587 17.5866C22.7854 15.46 24.7377 14 26.9548 14H35.2947L38.8884 15.7857L42.3527 14H41.1975C39.0293 14 37.1082 12.6026 36.4405 10.5398L35.1201 6.46024Z","fill":"url(#paint0_radial_3984_10372)"}}),_c('path',{attrs:{"d":"M13.3948 41.5178C14.0556 43.5918 15.9822 45 18.1589 45H21.397C24.1428 45 26.3748 42.7858 26.3968 40.0401L26.4921 28.1641L25.8179 30.428C25.1866 32.5478 23.2377 34.0009 21.0259 34.0009L12.623 34.0009L9.54267 31.9459L6.20776 34.0009H7.34528C9.52197 34.0009 11.4486 35.4091 12.1093 37.4831L13.3948 41.5178Z","fill":"url(#paint1_radial_3984_10372)"}}),_c('path',{attrs:{"d":"M30 3H12.5C7.49997 3 4.49997 9.5 2.49997 16C0.13049 23.7008 -2.97003 34 5.99997 34H13.6122C15.8393 34 17.7964 32.5325 18.4179 30.394C19.7318 25.8726 22.0338 17.9871 23.8421 11.9841C24.7611 8.93305 25.5266 6.31272 26.7015 4.68095C27.3602 3.76611 28.458 3 30 3Z","fill":"url(#paint2_linear_3984_10372)"}}),_c('path',{attrs:{"d":"M30 3H12.5C7.49997 3 4.49997 9.5 2.49997 16C0.13049 23.7008 -2.97003 34 5.99997 34H13.6122C15.8393 34 17.7964 32.5325 18.4179 30.394C19.7318 25.8726 22.0338 17.9871 23.8421 11.9841C24.7611 8.93305 25.5266 6.31272 26.7015 4.68095C27.3602 3.76611 28.458 3 30 3Z","fill":"url(#paint3_linear_3984_10372)"}}),_c('path',{attrs:{"d":"M17.9963 45H35.4963C40.4963 45 43.4963 38.5 45.4963 32C47.8658 24.2992 50.9663 14 41.9963 14H34.3841C32.157 14 30.1999 15.4675 29.5784 17.606C28.2645 22.1274 25.9625 30.0129 24.1543 36.0159C23.2352 39.0669 22.4697 41.6873 21.2948 43.319C20.6361 44.2339 19.5383 45 17.9963 45Z","fill":"url(#paint4_radial_3984_10372)"}}),_c('path',{attrs:{"d":"M17.9963 45H35.4963C40.4963 45 43.4963 38.5 45.4963 32C47.8658 24.2992 50.9663 14 41.9963 14H34.3841C32.157 14 30.1999 15.4675 29.5784 17.606C28.2645 22.1274 25.9625 30.0129 24.1543 36.0159C23.2352 39.0669 22.4697 41.6873 21.2948 43.319C20.6361 44.2339 19.5383 45 17.9963 45Z","fill":"url(#paint5_linear_3984_10372)"}})]),_c('defs',[_c('radialGradient',{attrs:{"id":"paint0_radial_3984_10372","cx":"0","cy":"0","r":"1","gradientUnits":"userSpaceOnUse","gradientTransform":"translate(39.3087 20.1095) rotate(-130.498) scale(18.242 17.2825)"}},[_c('stop',{attrs:{"offset":"0.0955758","stop-color":"#00AEFF"}}),_c('stop',{attrs:{"offset":"0.773185","stop-color":"#2253CE"}}),_c('stop',{attrs:{"offset":"1","stop-color":"#0736C4"}})],1),_c('radialGradient',{attrs:{"id":"paint1_radial_3984_10372","cx":"0","cy":"0","r":"1","gradientUnits":"userSpaceOnUse","gradientTransform":"translate(9.88779 33.7078) rotate(50.1259) scale(16.5438 16.2528)"}},[_c('stop',{attrs:{"stop-color":"#FFB657"}}),_c('stop',{attrs:{"offset":"0.633728","stop-color":"#FF5F3D"}}),_c('stop',{attrs:{"offset":"0.923392","stop-color":"#C02B3C"}})],1),_c('linearGradient',{attrs:{"id":"paint2_linear_3984_10372","x1":"11.4526","y1":"6.75624","x2":"13.8689","y2":"35.1765","gradientUnits":"userSpaceOnUse"}},[_c('stop',{attrs:{"offset":"0.156162","stop-color":"#0D91E1"}}),_c('stop',{attrs:{"offset":"0.487484","stop-color":"#52B471"}}),_c('stop',{attrs:{"offset":"0.652394","stop-color":"#98BD42"}}),_c('stop',{attrs:{"offset":"0.937361","stop-color":"#FFC800"}})],1),_c('linearGradient',{attrs:{"id":"paint3_linear_3984_10372","x1":"13.6347","y1":"3","x2":"14.954","y2":"34.0019","gradientUnits":"userSpaceOnUse"}},[_c('stop',{attrs:{"stop-color":"#3DCBFF"}}),_c('stop',{attrs:{"offset":"0.246674","stop-color":"#0588F7","stop-opacity":"0"}})],1),_c('radialGradient',{attrs:{"id":"paint4_radial_3984_10372","cx":"0","cy":"0","r":"1","gradientUnits":"userSpaceOnUse","gradientTransform":"translate(42.8953 10.9649) rotate(109.574) scale(41.2667 50.0822)"}},[_c('stop',{attrs:{"offset":"0.0661714","stop-color":"#8C48FF"}}),_c('stop',{attrs:{"offset":"0.5","stop-color":"#F2598A"}}),_c('stop',{attrs:{"offset":"0.895833","stop-color":"#FFB152"}})],1),_c('linearGradient',{attrs:{"id":"paint5_linear_3984_10372","x1":"44.2778","y1":"12.1074","x2":"44.2606","y2":"20.5507","gradientUnits":"userSpaceOnUse"}},[_c('stop',{attrs:{"offset":"0.0581535","stop-color":"#F8ADFA"}}),_c('stop',{attrs:{"offset":"0.708063","stop-color":"#A86EDD","stop-opacity":"0"}})],1),_c('clipPath',{attrs:{"id":"clip0_3984_10372"}},[_c('rect',{attrs:{"width":"48","height":"48","fill":"white"}})])],1)])]),_c('div',{staticClass:"head-label"},[_vm._v("Copilot")])])
|
|
14666
|
-
}
|
|
14667
|
-
var AnswerHeadvue_type_template_id_9ecf6db6_scoped_true_staticRenderFns = []
|
|
14668
|
-
|
|
14669
|
-
|
|
14670
|
-
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/AnswerHead.vue?vue&type=template&id=9ecf6db6&scoped=true
|
|
14671
|
-
|
|
14672
|
-
// EXTERNAL MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/AnswerHead.vue?vue&type=style&index=0&id=9ecf6db6&prod&scoped=true&lang=scss
|
|
14673
|
-
var AnswerHeadvue_type_style_index_0_id_9ecf6db6_prod_scoped_true_lang_scss = __webpack_require__("605a");
|
|
14674
|
-
|
|
14675
|
-
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/AnswerHead.vue
|
|
14676
|
-
|
|
14677
|
-
var AnswerHead_script = {}
|
|
14678
|
-
|
|
14679
|
-
|
|
14680
|
-
|
|
14681
|
-
/* normalize component */
|
|
14682
|
-
|
|
14683
|
-
var AnswerHead_component = Object(componentNormalizer["a" /* default */])(
|
|
14684
|
-
AnswerHead_script,
|
|
14685
|
-
AnswerHeadvue_type_template_id_9ecf6db6_scoped_true_render,
|
|
14686
|
-
AnswerHeadvue_type_template_id_9ecf6db6_scoped_true_staticRenderFns,
|
|
14687
|
-
false,
|
|
14688
|
-
null,
|
|
14689
|
-
"9ecf6db6",
|
|
14690
|
-
null
|
|
14691
|
-
|
|
14692
|
-
)
|
|
14693
|
-
|
|
14694
|
-
/* harmony default export */ var AnswerHead = (AnswerHead_component.exports);
|
|
14695
|
-
// CONCATENATED MODULE: ./node_modules/@iconify-icons/ph/copy-simple.js
|
|
14696
|
-
const data = {
|
|
14697
|
-
"width": 256,
|
|
14698
|
-
"height": 256,
|
|
14699
|
-
"body": "<path fill=\"currentColor\" d=\"M184 64H40a8 8 0 0 0-8 8v144a8 8 0 0 0 8 8h144a8 8 0 0 0 8-8V72a8 8 0 0 0-8-8Zm-8 144H48V80h128Zm48-168v144a8 8 0 0 1-16 0V48H72a8 8 0 0 1 0-16h144a8 8 0 0 1 8 8Z\"/>"
|
|
14700
|
-
};
|
|
14701
|
-
/* harmony default export */ var copy_simple = (data);
|
|
14702
|
-
|
|
14703
|
-
// CONCATENATED MODULE: ./node_modules/@iconify-icons/ph/speaker-high-light.js
|
|
14704
|
-
const speaker_high_light_data = {
|
|
14705
|
-
"width": 256,
|
|
14706
|
-
"height": 256,
|
|
14707
|
-
"body": "<path fill=\"currentColor\" d=\"M154.64 26.61a6 6 0 0 0-6.32.65L77.94 82H32a14 14 0 0 0-14 14v64a14 14 0 0 0 14 14h45.94l70.38 54.74A6 6 0 0 0 158 224V32a6 6 0 0 0-3.36-5.39ZM30 160V96a2 2 0 0 1 2-2h42v68H32a2 2 0 0 1-2-2Zm116 51.73l-60-46.66V90.93l60-46.66Zm50.53-108.85a38 38 0 0 1 0 50.24a6 6 0 1 1-9-7.94a26 26 0 0 0 0-34.37a6 6 0 0 1 9-7.93ZM246 128a77.86 77.86 0 0 1-19.86 52a6 6 0 1 1-8.94-8a66 66 0 0 0 0-88a6 6 0 1 1 8.94-8A77.86 77.86 0 0 1 246 128Z\"/>"
|
|
14708
|
-
};
|
|
14709
|
-
/* harmony default export */ var speaker_high_light = (speaker_high_light_data);
|
|
14710
|
-
|
|
14711
|
-
// CONCATENATED MODULE: ./node_modules/@iconify-icons/ph/thumbs-up-thin.js
|
|
14712
|
-
const thumbs_up_thin_data = {
|
|
14713
|
-
"width": 256,
|
|
14714
|
-
"height": 256,
|
|
14715
|
-
"body": "<path fill=\"currentColor\" d=\"M231 82.76A20 20 0 0 0 216 76h-60V56a36 36 0 0 0-36-36a4 4 0 0 0-3.58 2.21L77.53 100H32a12 12 0 0 0-12 12v88a12 12 0 0 0 12 12h172a20 20 0 0 0 19.85-17.52l12-96A20 20 0 0 0 231 82.76ZM76 204H32a4 4 0 0 1-4-4v-88a4 4 0 0 1 4-4h44ZM227.91 97.49l-12 96A12 12 0 0 1 204 204H84v-99.06l38.42-76.84A28 28 0 0 1 148 56v24a4 4 0 0 0 4 4h64a12 12 0 0 1 11.91 13.49Z\"/>"
|
|
14716
|
-
};
|
|
14717
|
-
/* harmony default export */ var thumbs_up_thin = (thumbs_up_thin_data);
|
|
14718
|
-
|
|
14719
|
-
// CONCATENATED MODULE: ./node_modules/@iconify-icons/ph/thumbs-down-thin.js
|
|
14720
|
-
const thumbs_down_thin_data = {
|
|
14721
|
-
"width": 256,
|
|
14722
|
-
"height": 256,
|
|
14723
|
-
"body": "<path fill=\"currentColor\" d=\"m235.85 157.52l-12-96A20 20 0 0 0 204 44H32a12 12 0 0 0-12 12v88a12 12 0 0 0 12 12h45.53l38.89 77.79A4 4 0 0 0 120 236a36 36 0 0 0 36-36v-20h60a20 20 0 0 0 19.85-22.48ZM76 148H32a4 4 0 0 1-4-4V56a4 4 0 0 1 4-4h44Zm149 19.94a12 12 0 0 1-9 4.06h-64a4 4 0 0 0-4 4v24a28 28 0 0 1-25.58 27.9L84 151.06V52h120a12 12 0 0 1 11.91 10.51l12 96a12 12 0 0 1-2.91 9.43Z\"/>"
|
|
14724
|
-
};
|
|
14725
|
-
/* harmony default export */ var thumbs_down_thin = (thumbs_down_thin_data);
|
|
14726
|
-
|
|
14727
|
-
// CONCATENATED MODULE: ./node_modules/@iconify-icons/ri/download-line.js
|
|
14728
|
-
const download_line_data = {
|
|
14729
|
-
"width": 24,
|
|
14730
|
-
"height": 24,
|
|
14731
|
-
"body": "<path fill=\"currentColor\" d=\"M3 19h18v2H3v-2zm10-5.828L19.071 7.1l1.414 1.414L12 17L3.515 8.515L4.929 7.1L11 13.17V2h2v11.172z\"/>"
|
|
14732
|
-
};
|
|
14733
|
-
/* harmony default export */ var download_line = (download_line_data);
|
|
14734
|
-
|
|
14735
|
-
// CONCATENATED MODULE: ./node_modules/@iconify-icons/ph/warning-bold.js
|
|
14736
|
-
const warning_bold_data = {
|
|
14737
|
-
"width": 256,
|
|
14738
|
-
"height": 256,
|
|
14739
|
-
"body": "<path fill=\"currentColor\" d=\"M240.26 186.1L152.81 34.23a28.74 28.74 0 0 0-49.62 0L15.74 186.1a27.45 27.45 0 0 0 0 27.71A28.31 28.31 0 0 0 40.55 228h174.9a28.31 28.31 0 0 0 24.79-14.19a27.45 27.45 0 0 0 .02-27.71Zm-20.8 15.7a4.46 4.46 0 0 1-4 2.2H40.55a4.46 4.46 0 0 1-4-2.2a3.56 3.56 0 0 1 0-3.73L124 46.2a4.77 4.77 0 0 1 8 0l87.44 151.87a3.56 3.56 0 0 1 .02 3.73ZM116 136v-32a12 12 0 0 1 24 0v32a12 12 0 0 1-24 0Zm28 40a16 16 0 1 1-16-16a16 16 0 0 1 16 16Z\"/>"
|
|
14740
|
-
};
|
|
14741
|
-
/* harmony default export */ var warning_bold = (warning_bold_data);
|
|
14742
|
-
|
|
14743
|
-
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
14744
|
-
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
|
|
14745
|
-
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
14746
|
-
|
|
14747
|
-
// CONCATENATED MODULE: ./node_modules/@iconify/vue2/dist/iconify.mjs
|
|
14748
|
-
|
|
14749
|
-
|
|
14750
|
-
const matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;
|
|
14751
|
-
const stringToIcon = (value, validate, allowSimpleName, provider = "") => {
|
|
14752
|
-
const colonSeparated = value.split(":");
|
|
14753
|
-
if (value.slice(0, 1) === "@") {
|
|
14754
|
-
if (colonSeparated.length < 2 || colonSeparated.length > 3) {
|
|
14755
|
-
return null;
|
|
14756
|
-
}
|
|
14757
|
-
provider = colonSeparated.shift().slice(1);
|
|
14758
|
-
}
|
|
14759
|
-
if (colonSeparated.length > 3 || !colonSeparated.length) {
|
|
14760
|
-
return null;
|
|
14761
|
-
}
|
|
14762
|
-
if (colonSeparated.length > 1) {
|
|
14763
|
-
const name2 = colonSeparated.pop();
|
|
14764
|
-
const prefix = colonSeparated.pop();
|
|
14765
|
-
const result = {
|
|
14766
|
-
provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
|
|
14767
|
-
prefix,
|
|
14768
|
-
name: name2
|
|
14769
|
-
};
|
|
14770
|
-
return validate && !validateIconName(result) ? null : result;
|
|
14771
|
-
}
|
|
14772
|
-
const name = colonSeparated[0];
|
|
14773
|
-
const dashSeparated = name.split("-");
|
|
14774
|
-
if (dashSeparated.length > 1) {
|
|
14775
|
-
const result = {
|
|
14776
|
-
provider,
|
|
14777
|
-
prefix: dashSeparated.shift(),
|
|
14778
|
-
name: dashSeparated.join("-")
|
|
14779
|
-
};
|
|
14780
|
-
return validate && !validateIconName(result) ? null : result;
|
|
14781
|
-
}
|
|
14782
|
-
if (allowSimpleName && provider === "") {
|
|
14783
|
-
const result = {
|
|
14784
|
-
provider,
|
|
14785
|
-
prefix: "",
|
|
14786
|
-
name
|
|
14787
|
-
};
|
|
14788
|
-
return validate && !validateIconName(result, allowSimpleName) ? null : result;
|
|
14789
|
-
}
|
|
14790
|
-
return null;
|
|
14791
|
-
};
|
|
14792
|
-
const validateIconName = (icon, allowSimpleName) => {
|
|
14793
|
-
if (!icon) {
|
|
14794
|
-
return false;
|
|
14795
|
-
}
|
|
14796
|
-
return !!((icon.provider === "" || icon.provider.match(matchIconName)) && (allowSimpleName && icon.prefix === "" || icon.prefix.match(matchIconName)) && icon.name.match(matchIconName));
|
|
14797
|
-
};
|
|
14798
|
-
|
|
14799
|
-
const defaultIconDimensions = Object.freeze(
|
|
14800
|
-
{
|
|
14801
|
-
left: 0,
|
|
14802
|
-
top: 0,
|
|
14803
|
-
width: 16,
|
|
14804
|
-
height: 16
|
|
14805
|
-
}
|
|
14806
|
-
);
|
|
14807
|
-
const defaultIconTransformations = Object.freeze({
|
|
14808
|
-
rotate: 0,
|
|
14809
|
-
vFlip: false,
|
|
14810
|
-
hFlip: false
|
|
14811
|
-
});
|
|
14812
|
-
const defaultIconProps = Object.freeze({
|
|
14813
|
-
...defaultIconDimensions,
|
|
14814
|
-
...defaultIconTransformations
|
|
14815
|
-
});
|
|
14816
|
-
const defaultExtendedIconProps = Object.freeze({
|
|
14817
|
-
...defaultIconProps,
|
|
14818
|
-
body: "",
|
|
14819
|
-
hidden: false
|
|
14820
|
-
});
|
|
14821
|
-
|
|
14822
|
-
function mergeIconTransformations(obj1, obj2) {
|
|
14823
|
-
const result = {};
|
|
14824
|
-
if (!obj1.hFlip !== !obj2.hFlip) {
|
|
14825
|
-
result.hFlip = true;
|
|
14826
|
-
}
|
|
14827
|
-
if (!obj1.vFlip !== !obj2.vFlip) {
|
|
14828
|
-
result.vFlip = true;
|
|
14829
|
-
}
|
|
14830
|
-
const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;
|
|
14831
|
-
if (rotate) {
|
|
14832
|
-
result.rotate = rotate;
|
|
14833
|
-
}
|
|
14834
|
-
return result;
|
|
14835
|
-
}
|
|
14836
|
-
|
|
14837
|
-
function mergeIconData(parent, child) {
|
|
14838
|
-
const result = mergeIconTransformations(parent, child);
|
|
14839
|
-
for (const key in defaultExtendedIconProps) {
|
|
14840
|
-
if (key in defaultIconTransformations) {
|
|
14841
|
-
if (key in parent && !(key in result)) {
|
|
14842
|
-
result[key] = defaultIconTransformations[key];
|
|
14843
|
-
}
|
|
14844
|
-
} else if (key in child) {
|
|
14845
|
-
result[key] = child[key];
|
|
14846
|
-
} else if (key in parent) {
|
|
14847
|
-
result[key] = parent[key];
|
|
14848
|
-
}
|
|
14849
|
-
}
|
|
14850
|
-
return result;
|
|
14851
|
-
}
|
|
14852
|
-
|
|
14853
|
-
function getIconsTree(data, names) {
|
|
14854
|
-
const icons = data.icons;
|
|
14855
|
-
const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
|
|
14856
|
-
const resolved = /* @__PURE__ */ Object.create(null);
|
|
14857
|
-
function resolve(name) {
|
|
14858
|
-
if (icons[name]) {
|
|
14859
|
-
return resolved[name] = [];
|
|
14860
|
-
}
|
|
14861
|
-
if (!(name in resolved)) {
|
|
14862
|
-
resolved[name] = null;
|
|
14863
|
-
const parent = aliases[name] && aliases[name].parent;
|
|
14864
|
-
const value = parent && resolve(parent);
|
|
14865
|
-
if (value) {
|
|
14866
|
-
resolved[name] = [parent].concat(value);
|
|
14867
|
-
}
|
|
14868
|
-
}
|
|
14869
|
-
return resolved[name];
|
|
14870
|
-
}
|
|
14871
|
-
(names || Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);
|
|
14872
|
-
return resolved;
|
|
14873
|
-
}
|
|
14874
|
-
|
|
14875
|
-
function internalGetIconData(data, name, tree) {
|
|
14876
|
-
const icons = data.icons;
|
|
14877
|
-
const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
|
|
14878
|
-
let currentProps = {};
|
|
14879
|
-
function parse(name2) {
|
|
14880
|
-
currentProps = mergeIconData(
|
|
14881
|
-
icons[name2] || aliases[name2],
|
|
14882
|
-
currentProps
|
|
14883
|
-
);
|
|
14884
|
-
}
|
|
14885
|
-
parse(name);
|
|
14886
|
-
tree.forEach(parse);
|
|
14887
|
-
return mergeIconData(data, currentProps);
|
|
14888
|
-
}
|
|
14889
|
-
|
|
14890
|
-
function parseIconSet(data, callback) {
|
|
14891
|
-
const names = [];
|
|
14892
|
-
if (typeof data !== "object" || typeof data.icons !== "object") {
|
|
14893
|
-
return names;
|
|
14894
|
-
}
|
|
14895
|
-
if (data.not_found instanceof Array) {
|
|
14896
|
-
data.not_found.forEach((name) => {
|
|
14897
|
-
callback(name, null);
|
|
14898
|
-
names.push(name);
|
|
14899
|
-
});
|
|
14900
|
-
}
|
|
14901
|
-
const tree = getIconsTree(data);
|
|
14902
|
-
for (const name in tree) {
|
|
14903
|
-
const item = tree[name];
|
|
14904
|
-
if (item) {
|
|
14905
|
-
callback(name, internalGetIconData(data, name, item));
|
|
14906
|
-
names.push(name);
|
|
14907
|
-
}
|
|
14908
|
-
}
|
|
14909
|
-
return names;
|
|
14910
|
-
}
|
|
14911
|
-
|
|
14912
|
-
const optionalPropertyDefaults = {
|
|
14913
|
-
provider: "",
|
|
14914
|
-
aliases: {},
|
|
14915
|
-
not_found: {},
|
|
14916
|
-
...defaultIconDimensions
|
|
14917
|
-
};
|
|
14918
|
-
function checkOptionalProps(item, defaults) {
|
|
14919
|
-
for (const prop in defaults) {
|
|
14920
|
-
if (prop in item && typeof item[prop] !== typeof defaults[prop]) {
|
|
14921
|
-
return false;
|
|
14922
|
-
}
|
|
14923
|
-
}
|
|
14924
|
-
return true;
|
|
14925
|
-
}
|
|
14926
|
-
function quicklyValidateIconSet(obj) {
|
|
14927
|
-
if (typeof obj !== "object" || obj === null) {
|
|
14928
|
-
return null;
|
|
14929
|
-
}
|
|
14930
|
-
const data = obj;
|
|
14931
|
-
if (typeof data.prefix !== "string" || !obj.icons || typeof obj.icons !== "object") {
|
|
14932
|
-
return null;
|
|
14933
|
-
}
|
|
14934
|
-
if (!checkOptionalProps(obj, optionalPropertyDefaults)) {
|
|
14935
|
-
return null;
|
|
14936
|
-
}
|
|
14937
|
-
const icons = data.icons;
|
|
14938
|
-
for (const name in icons) {
|
|
14939
|
-
const icon = icons[name];
|
|
14940
|
-
if (!name.match(matchIconName) || typeof icon.body !== "string" || !checkOptionalProps(
|
|
14941
|
-
icon,
|
|
14942
|
-
defaultExtendedIconProps
|
|
14943
|
-
)) {
|
|
14944
|
-
return null;
|
|
14945
|
-
}
|
|
14946
|
-
}
|
|
14947
|
-
const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
|
|
14948
|
-
for (const name in aliases) {
|
|
14949
|
-
const icon = aliases[name];
|
|
14950
|
-
const parent = icon.parent;
|
|
14951
|
-
if (!name.match(matchIconName) || typeof parent !== "string" || !icons[parent] && !aliases[parent] || !checkOptionalProps(
|
|
14952
|
-
icon,
|
|
14953
|
-
defaultExtendedIconProps
|
|
14954
|
-
)) {
|
|
14955
|
-
return null;
|
|
14956
|
-
}
|
|
14957
|
-
}
|
|
14958
|
-
return data;
|
|
14959
|
-
}
|
|
14960
|
-
|
|
14961
|
-
const dataStorage = /* @__PURE__ */ Object.create(null);
|
|
14962
|
-
function newStorage(provider, prefix) {
|
|
14963
|
-
return {
|
|
14964
|
-
provider,
|
|
14965
|
-
prefix,
|
|
14966
|
-
icons: /* @__PURE__ */ Object.create(null),
|
|
14967
|
-
missing: /* @__PURE__ */ new Set()
|
|
14968
|
-
};
|
|
14969
|
-
}
|
|
14970
|
-
function getStorage(provider, prefix) {
|
|
14971
|
-
const providerStorage = dataStorage[provider] || (dataStorage[provider] = /* @__PURE__ */ Object.create(null));
|
|
14972
|
-
return providerStorage[prefix] || (providerStorage[prefix] = newStorage(provider, prefix));
|
|
14973
|
-
}
|
|
14974
|
-
function addIconSet(storage, data) {
|
|
14975
|
-
if (!quicklyValidateIconSet(data)) {
|
|
14976
|
-
return [];
|
|
14977
|
-
}
|
|
14978
|
-
return parseIconSet(data, (name, icon) => {
|
|
14979
|
-
if (icon) {
|
|
14980
|
-
storage.icons[name] = icon;
|
|
14981
|
-
} else {
|
|
14982
|
-
storage.missing.add(name);
|
|
14983
|
-
}
|
|
14984
|
-
});
|
|
14985
|
-
}
|
|
14986
|
-
function addIconToStorage(storage, name, icon) {
|
|
14987
|
-
try {
|
|
14988
|
-
if (typeof icon.body === "string") {
|
|
14989
|
-
storage.icons[name] = { ...icon };
|
|
14990
|
-
return true;
|
|
14991
|
-
}
|
|
14992
|
-
} catch (err) {
|
|
14993
|
-
}
|
|
14994
|
-
return false;
|
|
14995
|
-
}
|
|
14996
|
-
function listIcons(provider, prefix) {
|
|
14997
|
-
let allIcons = [];
|
|
14998
|
-
const providers = typeof provider === "string" ? [provider] : Object.keys(dataStorage);
|
|
14999
|
-
providers.forEach((provider2) => {
|
|
15000
|
-
const prefixes = typeof provider2 === "string" && typeof prefix === "string" ? [prefix] : Object.keys(dataStorage[provider2] || {});
|
|
15001
|
-
prefixes.forEach((prefix2) => {
|
|
15002
|
-
const storage = getStorage(provider2, prefix2);
|
|
15003
|
-
allIcons = allIcons.concat(
|
|
15004
|
-
Object.keys(storage.icons).map(
|
|
15005
|
-
(name) => (provider2 !== "" ? "@" + provider2 + ":" : "") + prefix2 + ":" + name
|
|
15006
|
-
)
|
|
15007
|
-
);
|
|
15008
|
-
});
|
|
15009
|
-
});
|
|
15010
|
-
return allIcons;
|
|
15011
|
-
}
|
|
15012
|
-
|
|
15013
|
-
let simpleNames = false;
|
|
15014
|
-
function allowSimpleNames(allow) {
|
|
15015
|
-
if (typeof allow === "boolean") {
|
|
15016
|
-
simpleNames = allow;
|
|
15017
|
-
}
|
|
15018
|
-
return simpleNames;
|
|
15019
|
-
}
|
|
15020
|
-
function getIconData(name) {
|
|
15021
|
-
const icon = typeof name === "string" ? stringToIcon(name, true, simpleNames) : name;
|
|
15022
|
-
if (icon) {
|
|
15023
|
-
const storage = getStorage(icon.provider, icon.prefix);
|
|
15024
|
-
const iconName = icon.name;
|
|
15025
|
-
return storage.icons[iconName] || (storage.missing.has(iconName) ? null : void 0);
|
|
15026
|
-
}
|
|
15027
|
-
}
|
|
15028
|
-
function addIcon(name, data) {
|
|
15029
|
-
const icon = stringToIcon(name, true, simpleNames);
|
|
15030
|
-
if (!icon) {
|
|
15031
|
-
return false;
|
|
15032
|
-
}
|
|
15033
|
-
const storage = getStorage(icon.provider, icon.prefix);
|
|
15034
|
-
return addIconToStorage(storage, icon.name, data);
|
|
15035
|
-
}
|
|
15036
|
-
function addCollection(data, provider) {
|
|
15037
|
-
if (typeof data !== "object") {
|
|
15038
|
-
return false;
|
|
15039
|
-
}
|
|
15040
|
-
if (typeof provider !== "string") {
|
|
15041
|
-
provider = data.provider || "";
|
|
15042
|
-
}
|
|
15043
|
-
if (simpleNames && !provider && !data.prefix) {
|
|
15044
|
-
let added = false;
|
|
15045
|
-
if (quicklyValidateIconSet(data)) {
|
|
15046
|
-
data.prefix = "";
|
|
15047
|
-
parseIconSet(data, (name, icon) => {
|
|
15048
|
-
if (icon && addIcon(name, icon)) {
|
|
15049
|
-
added = true;
|
|
15050
|
-
}
|
|
15051
|
-
});
|
|
15052
|
-
}
|
|
15053
|
-
return added;
|
|
15054
|
-
}
|
|
15055
|
-
const prefix = data.prefix;
|
|
15056
|
-
if (!validateIconName({
|
|
15057
|
-
provider,
|
|
15058
|
-
prefix,
|
|
15059
|
-
name: "a"
|
|
15060
|
-
})) {
|
|
15061
|
-
return false;
|
|
15062
|
-
}
|
|
15063
|
-
const storage = getStorage(provider, prefix);
|
|
15064
|
-
return !!addIconSet(storage, data);
|
|
15065
|
-
}
|
|
15066
|
-
function iconExists(name) {
|
|
15067
|
-
return !!getIconData(name);
|
|
15068
|
-
}
|
|
15069
|
-
function getIcon(name) {
|
|
15070
|
-
const result = getIconData(name);
|
|
15071
|
-
return result ? {
|
|
15072
|
-
...defaultIconProps,
|
|
15073
|
-
...result
|
|
15074
|
-
} : null;
|
|
15075
|
-
}
|
|
15076
|
-
|
|
15077
|
-
const defaultIconSizeCustomisations = Object.freeze({
|
|
15078
|
-
width: null,
|
|
15079
|
-
height: null
|
|
15080
|
-
});
|
|
15081
|
-
const defaultIconCustomisations = Object.freeze({
|
|
15082
|
-
...defaultIconSizeCustomisations,
|
|
15083
|
-
...defaultIconTransformations
|
|
15084
|
-
});
|
|
15085
|
-
|
|
15086
|
-
const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
|
|
15087
|
-
const unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
15088
|
-
function calculateSize(size, ratio, precision) {
|
|
15089
|
-
if (ratio === 1) {
|
|
15090
|
-
return size;
|
|
15091
|
-
}
|
|
15092
|
-
precision = precision || 100;
|
|
15093
|
-
if (typeof size === "number") {
|
|
15094
|
-
return Math.ceil(size * ratio * precision) / precision;
|
|
15095
|
-
}
|
|
15096
|
-
if (typeof size !== "string") {
|
|
15097
|
-
return size;
|
|
15098
|
-
}
|
|
15099
|
-
const oldParts = size.split(unitsSplit);
|
|
15100
|
-
if (oldParts === null || !oldParts.length) {
|
|
15101
|
-
return size;
|
|
15102
|
-
}
|
|
15103
|
-
const newParts = [];
|
|
15104
|
-
let code = oldParts.shift();
|
|
15105
|
-
let isNumber = unitsTest.test(code);
|
|
15106
|
-
while (true) {
|
|
15107
|
-
if (isNumber) {
|
|
15108
|
-
const num = parseFloat(code);
|
|
15109
|
-
if (isNaN(num)) {
|
|
15110
|
-
newParts.push(code);
|
|
15111
|
-
} else {
|
|
15112
|
-
newParts.push(Math.ceil(num * ratio * precision) / precision);
|
|
15113
|
-
}
|
|
15114
|
-
} else {
|
|
15115
|
-
newParts.push(code);
|
|
15116
|
-
}
|
|
15117
|
-
code = oldParts.shift();
|
|
15118
|
-
if (code === void 0) {
|
|
15119
|
-
return newParts.join("");
|
|
15120
|
-
}
|
|
15121
|
-
isNumber = !isNumber;
|
|
15122
|
-
}
|
|
15123
|
-
}
|
|
15124
|
-
|
|
15125
|
-
const isUnsetKeyword = (value) => value === "unset" || value === "undefined" || value === "none";
|
|
15126
|
-
function iconToSVG(icon, customisations) {
|
|
15127
|
-
const fullIcon = {
|
|
15128
|
-
...defaultIconProps,
|
|
15129
|
-
...icon
|
|
15130
|
-
};
|
|
15131
|
-
const fullCustomisations = {
|
|
15132
|
-
...defaultIconCustomisations,
|
|
15133
|
-
...customisations
|
|
15134
|
-
};
|
|
15135
|
-
const box = {
|
|
15136
|
-
left: fullIcon.left,
|
|
15137
|
-
top: fullIcon.top,
|
|
15138
|
-
width: fullIcon.width,
|
|
15139
|
-
height: fullIcon.height
|
|
15140
|
-
};
|
|
15141
|
-
let body = fullIcon.body;
|
|
15142
|
-
[fullIcon, fullCustomisations].forEach((props) => {
|
|
15143
|
-
const transformations = [];
|
|
15144
|
-
const hFlip = props.hFlip;
|
|
15145
|
-
const vFlip = props.vFlip;
|
|
15146
|
-
let rotation = props.rotate;
|
|
15147
|
-
if (hFlip) {
|
|
15148
|
-
if (vFlip) {
|
|
15149
|
-
rotation += 2;
|
|
15150
|
-
} else {
|
|
15151
|
-
transformations.push(
|
|
15152
|
-
"translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")"
|
|
15153
|
-
);
|
|
15154
|
-
transformations.push("scale(-1 1)");
|
|
15155
|
-
box.top = box.left = 0;
|
|
15156
|
-
}
|
|
15157
|
-
} else if (vFlip) {
|
|
15158
|
-
transformations.push(
|
|
15159
|
-
"translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")"
|
|
15160
|
-
);
|
|
15161
|
-
transformations.push("scale(1 -1)");
|
|
15162
|
-
box.top = box.left = 0;
|
|
15163
|
-
}
|
|
15164
|
-
let tempValue;
|
|
15165
|
-
if (rotation < 0) {
|
|
15166
|
-
rotation -= Math.floor(rotation / 4) * 4;
|
|
15167
|
-
}
|
|
15168
|
-
rotation = rotation % 4;
|
|
15169
|
-
switch (rotation) {
|
|
15170
|
-
case 1:
|
|
15171
|
-
tempValue = box.height / 2 + box.top;
|
|
15172
|
-
transformations.unshift(
|
|
15173
|
-
"rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")"
|
|
15174
|
-
);
|
|
15175
|
-
break;
|
|
15176
|
-
case 2:
|
|
15177
|
-
transformations.unshift(
|
|
15178
|
-
"rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")"
|
|
15179
|
-
);
|
|
15180
|
-
break;
|
|
15181
|
-
case 3:
|
|
15182
|
-
tempValue = box.width / 2 + box.left;
|
|
15183
|
-
transformations.unshift(
|
|
15184
|
-
"rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")"
|
|
15185
|
-
);
|
|
15186
|
-
break;
|
|
15187
|
-
}
|
|
15188
|
-
if (rotation % 2 === 1) {
|
|
15189
|
-
if (box.left !== box.top) {
|
|
15190
|
-
tempValue = box.left;
|
|
15191
|
-
box.left = box.top;
|
|
15192
|
-
box.top = tempValue;
|
|
15193
|
-
}
|
|
15194
|
-
if (box.width !== box.height) {
|
|
15195
|
-
tempValue = box.width;
|
|
15196
|
-
box.width = box.height;
|
|
15197
|
-
box.height = tempValue;
|
|
15198
|
-
}
|
|
15199
|
-
}
|
|
15200
|
-
if (transformations.length) {
|
|
15201
|
-
body = '<g transform="' + transformations.join(" ") + '">' + body + "</g>";
|
|
15202
|
-
}
|
|
15203
|
-
});
|
|
15204
|
-
const customisationsWidth = fullCustomisations.width;
|
|
15205
|
-
const customisationsHeight = fullCustomisations.height;
|
|
15206
|
-
const boxWidth = box.width;
|
|
15207
|
-
const boxHeight = box.height;
|
|
15208
|
-
let width;
|
|
15209
|
-
let height;
|
|
15210
|
-
if (customisationsWidth === null) {
|
|
15211
|
-
height = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
|
|
15212
|
-
width = calculateSize(height, boxWidth / boxHeight);
|
|
15213
|
-
} else {
|
|
15214
|
-
width = customisationsWidth === "auto" ? boxWidth : customisationsWidth;
|
|
15215
|
-
height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
|
|
15216
|
-
}
|
|
15217
|
-
const attributes = {};
|
|
15218
|
-
const setAttr = (prop, value) => {
|
|
15219
|
-
if (!isUnsetKeyword(value)) {
|
|
15220
|
-
attributes[prop] = value.toString();
|
|
15221
|
-
}
|
|
15222
|
-
};
|
|
15223
|
-
setAttr("width", width);
|
|
15224
|
-
setAttr("height", height);
|
|
15225
|
-
attributes.viewBox = box.left.toString() + " " + box.top.toString() + " " + boxWidth.toString() + " " + boxHeight.toString();
|
|
15226
|
-
return {
|
|
15227
|
-
attributes,
|
|
15228
|
-
body
|
|
15229
|
-
};
|
|
15230
|
-
}
|
|
15231
|
-
|
|
15232
|
-
const regex = /\sid="(\S+)"/g;
|
|
15233
|
-
const randomPrefix = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
15234
|
-
let counter = 0;
|
|
15235
|
-
function replaceIDs(body, prefix = randomPrefix) {
|
|
15236
|
-
const ids = [];
|
|
15237
|
-
let match;
|
|
15238
|
-
while (match = regex.exec(body)) {
|
|
15239
|
-
ids.push(match[1]);
|
|
15240
|
-
}
|
|
15241
|
-
if (!ids.length) {
|
|
15242
|
-
return body;
|
|
15243
|
-
}
|
|
15244
|
-
const suffix = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
15245
|
-
ids.forEach((id) => {
|
|
15246
|
-
const newID = typeof prefix === "function" ? prefix(id) : prefix + (counter++).toString();
|
|
15247
|
-
const escapedID = id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
15248
|
-
body = body.replace(
|
|
15249
|
-
new RegExp('([#;"])(' + escapedID + ')([")]|\\.[a-z])', "g"),
|
|
15250
|
-
"$1" + newID + suffix + "$3"
|
|
15251
|
-
);
|
|
15252
|
-
});
|
|
15253
|
-
body = body.replace(new RegExp(suffix, "g"), "");
|
|
15254
|
-
return body;
|
|
15255
|
-
}
|
|
15256
|
-
|
|
15257
|
-
const storage = /* @__PURE__ */ Object.create(null);
|
|
15258
|
-
function setAPIModule(provider, item) {
|
|
15259
|
-
storage[provider] = item;
|
|
15260
|
-
}
|
|
15261
|
-
function getAPIModule(provider) {
|
|
15262
|
-
return storage[provider] || storage[""];
|
|
15263
|
-
}
|
|
15264
|
-
|
|
15265
|
-
function createAPIConfig(source) {
|
|
15266
|
-
let resources;
|
|
15267
|
-
if (typeof source.resources === "string") {
|
|
15268
|
-
resources = [source.resources];
|
|
15269
|
-
} else {
|
|
15270
|
-
resources = source.resources;
|
|
15271
|
-
if (!(resources instanceof Array) || !resources.length) {
|
|
15272
|
-
return null;
|
|
15273
|
-
}
|
|
15274
|
-
}
|
|
15275
|
-
const result = {
|
|
15276
|
-
resources,
|
|
15277
|
-
path: source.path || "/",
|
|
15278
|
-
maxURL: source.maxURL || 500,
|
|
15279
|
-
rotate: source.rotate || 750,
|
|
15280
|
-
timeout: source.timeout || 5e3,
|
|
15281
|
-
random: source.random === true,
|
|
15282
|
-
index: source.index || 0,
|
|
15283
|
-
dataAfterTimeout: source.dataAfterTimeout !== false
|
|
15284
|
-
};
|
|
15285
|
-
return result;
|
|
15286
|
-
}
|
|
15287
|
-
const configStorage = /* @__PURE__ */ Object.create(null);
|
|
15288
|
-
const fallBackAPISources = [
|
|
15289
|
-
"https://api.simplesvg.com",
|
|
15290
|
-
"https://api.unisvg.com"
|
|
15291
|
-
];
|
|
15292
|
-
const fallBackAPI = [];
|
|
15293
|
-
while (fallBackAPISources.length > 0) {
|
|
15294
|
-
if (fallBackAPISources.length === 1) {
|
|
15295
|
-
fallBackAPI.push(fallBackAPISources.shift());
|
|
15296
|
-
} else {
|
|
15297
|
-
if (Math.random() > 0.5) {
|
|
15298
|
-
fallBackAPI.push(fallBackAPISources.shift());
|
|
15299
|
-
} else {
|
|
15300
|
-
fallBackAPI.push(fallBackAPISources.pop());
|
|
15301
|
-
}
|
|
15302
|
-
}
|
|
15303
|
-
}
|
|
15304
|
-
configStorage[""] = createAPIConfig({
|
|
15305
|
-
resources: ["https://api.iconify.design"].concat(fallBackAPI)
|
|
15306
|
-
});
|
|
15307
|
-
function addAPIProvider(provider, customConfig) {
|
|
15308
|
-
const config = createAPIConfig(customConfig);
|
|
15309
|
-
if (config === null) {
|
|
15310
|
-
return false;
|
|
15311
|
-
}
|
|
15312
|
-
configStorage[provider] = config;
|
|
15313
|
-
return true;
|
|
15314
|
-
}
|
|
15315
|
-
function getAPIConfig(provider) {
|
|
15316
|
-
return configStorage[provider];
|
|
15317
|
-
}
|
|
15318
|
-
function listAPIProviders() {
|
|
15319
|
-
return Object.keys(configStorage);
|
|
15320
|
-
}
|
|
15321
|
-
|
|
15322
|
-
const detectFetch = () => {
|
|
15323
|
-
let callback;
|
|
15324
|
-
try {
|
|
15325
|
-
callback = fetch;
|
|
15326
|
-
if (typeof callback === "function") {
|
|
15327
|
-
return callback;
|
|
15328
|
-
}
|
|
15329
|
-
} catch (err) {
|
|
15330
|
-
}
|
|
15331
|
-
};
|
|
15332
|
-
let fetchModule = detectFetch();
|
|
15333
|
-
function setFetch(fetch2) {
|
|
15334
|
-
fetchModule = fetch2;
|
|
15335
|
-
}
|
|
15336
|
-
function getFetch() {
|
|
15337
|
-
return fetchModule;
|
|
15338
|
-
}
|
|
15339
|
-
function calculateMaxLength(provider, prefix) {
|
|
15340
|
-
const config = getAPIConfig(provider);
|
|
15341
|
-
if (!config) {
|
|
15342
|
-
return 0;
|
|
15343
|
-
}
|
|
15344
|
-
let result;
|
|
15345
|
-
if (!config.maxURL) {
|
|
15346
|
-
result = 0;
|
|
15347
|
-
} else {
|
|
15348
|
-
let maxHostLength = 0;
|
|
15349
|
-
config.resources.forEach((item) => {
|
|
15350
|
-
const host = item;
|
|
15351
|
-
maxHostLength = Math.max(maxHostLength, host.length);
|
|
15352
|
-
});
|
|
15353
|
-
const url = prefix + ".json?icons=";
|
|
15354
|
-
result = config.maxURL - maxHostLength - config.path.length - url.length;
|
|
15355
|
-
}
|
|
15356
|
-
return result;
|
|
15357
|
-
}
|
|
15358
|
-
function shouldAbort(status) {
|
|
15359
|
-
return status === 404;
|
|
15360
|
-
}
|
|
15361
|
-
const prepare = (provider, prefix, icons) => {
|
|
15362
|
-
const results = [];
|
|
15363
|
-
const maxLength = calculateMaxLength(provider, prefix);
|
|
15364
|
-
const type = "icons";
|
|
15365
|
-
let item = {
|
|
15366
|
-
type,
|
|
15367
|
-
provider,
|
|
15368
|
-
prefix,
|
|
15369
|
-
icons: []
|
|
15370
|
-
};
|
|
15371
|
-
let length = 0;
|
|
15372
|
-
icons.forEach((name, index) => {
|
|
15373
|
-
length += name.length + 1;
|
|
15374
|
-
if (length >= maxLength && index > 0) {
|
|
15375
|
-
results.push(item);
|
|
15376
|
-
item = {
|
|
15377
|
-
type,
|
|
15378
|
-
provider,
|
|
15379
|
-
prefix,
|
|
15380
|
-
icons: []
|
|
15381
|
-
};
|
|
15382
|
-
length = name.length;
|
|
15383
|
-
}
|
|
15384
|
-
item.icons.push(name);
|
|
15385
|
-
});
|
|
15386
|
-
results.push(item);
|
|
15387
|
-
return results;
|
|
15388
|
-
};
|
|
15389
|
-
function getPath(provider) {
|
|
15390
|
-
if (typeof provider === "string") {
|
|
15391
|
-
const config = getAPIConfig(provider);
|
|
15392
|
-
if (config) {
|
|
15393
|
-
return config.path;
|
|
15394
|
-
}
|
|
15395
|
-
}
|
|
15396
|
-
return "/";
|
|
15397
|
-
}
|
|
15398
|
-
const send = (host, params, callback) => {
|
|
15399
|
-
if (!fetchModule) {
|
|
15400
|
-
callback("abort", 424);
|
|
15401
|
-
return;
|
|
15402
|
-
}
|
|
15403
|
-
let path = getPath(params.provider);
|
|
15404
|
-
switch (params.type) {
|
|
15405
|
-
case "icons": {
|
|
15406
|
-
const prefix = params.prefix;
|
|
15407
|
-
const icons = params.icons;
|
|
15408
|
-
const iconsList = icons.join(",");
|
|
15409
|
-
const urlParams = new URLSearchParams({
|
|
15410
|
-
icons: iconsList
|
|
15411
|
-
});
|
|
15412
|
-
path += prefix + ".json?" + urlParams.toString();
|
|
15413
|
-
break;
|
|
15414
|
-
}
|
|
15415
|
-
case "custom": {
|
|
15416
|
-
const uri = params.uri;
|
|
15417
|
-
path += uri.slice(0, 1) === "/" ? uri.slice(1) : uri;
|
|
15418
|
-
break;
|
|
15419
|
-
}
|
|
15420
|
-
default:
|
|
15421
|
-
callback("abort", 400);
|
|
15422
|
-
return;
|
|
15423
|
-
}
|
|
15424
|
-
let defaultError = 503;
|
|
15425
|
-
fetchModule(host + path).then((response) => {
|
|
15426
|
-
const status = response.status;
|
|
15427
|
-
if (status !== 200) {
|
|
15428
|
-
setTimeout(() => {
|
|
15429
|
-
callback(shouldAbort(status) ? "abort" : "next", status);
|
|
15430
|
-
});
|
|
15431
|
-
return;
|
|
15432
|
-
}
|
|
15433
|
-
defaultError = 501;
|
|
15434
|
-
return response.json();
|
|
15435
|
-
}).then((data) => {
|
|
15436
|
-
if (typeof data !== "object" || data === null) {
|
|
15437
|
-
setTimeout(() => {
|
|
15438
|
-
if (data === 404) {
|
|
15439
|
-
callback("abort", data);
|
|
15440
|
-
} else {
|
|
15441
|
-
callback("next", defaultError);
|
|
15442
|
-
}
|
|
15443
|
-
});
|
|
15444
|
-
return;
|
|
15445
|
-
}
|
|
15446
|
-
setTimeout(() => {
|
|
15447
|
-
callback("success", data);
|
|
15448
|
-
});
|
|
15449
|
-
}).catch(() => {
|
|
15450
|
-
callback("next", defaultError);
|
|
15451
|
-
});
|
|
15452
|
-
};
|
|
15453
|
-
const fetchAPIModule = {
|
|
15454
|
-
prepare,
|
|
15455
|
-
send
|
|
15456
|
-
};
|
|
15457
|
-
|
|
15458
|
-
function sortIcons(icons) {
|
|
15459
|
-
const result = {
|
|
15460
|
-
loaded: [],
|
|
15461
|
-
missing: [],
|
|
15462
|
-
pending: []
|
|
15463
|
-
};
|
|
15464
|
-
const storage = /* @__PURE__ */ Object.create(null);
|
|
15465
|
-
icons.sort((a, b) => {
|
|
15466
|
-
if (a.provider !== b.provider) {
|
|
15467
|
-
return a.provider.localeCompare(b.provider);
|
|
15468
|
-
}
|
|
15469
|
-
if (a.prefix !== b.prefix) {
|
|
15470
|
-
return a.prefix.localeCompare(b.prefix);
|
|
15471
|
-
}
|
|
15472
|
-
return a.name.localeCompare(b.name);
|
|
15473
|
-
});
|
|
15474
|
-
let lastIcon = {
|
|
15475
|
-
provider: "",
|
|
15476
|
-
prefix: "",
|
|
15477
|
-
name: ""
|
|
15478
|
-
};
|
|
15479
|
-
icons.forEach((icon) => {
|
|
15480
|
-
if (lastIcon.name === icon.name && lastIcon.prefix === icon.prefix && lastIcon.provider === icon.provider) {
|
|
15481
|
-
return;
|
|
15482
|
-
}
|
|
15483
|
-
lastIcon = icon;
|
|
15484
|
-
const provider = icon.provider;
|
|
15485
|
-
const prefix = icon.prefix;
|
|
15486
|
-
const name = icon.name;
|
|
15487
|
-
const providerStorage = storage[provider] || (storage[provider] = /* @__PURE__ */ Object.create(null));
|
|
15488
|
-
const localStorage = providerStorage[prefix] || (providerStorage[prefix] = getStorage(provider, prefix));
|
|
15489
|
-
let list;
|
|
15490
|
-
if (name in localStorage.icons) {
|
|
15491
|
-
list = result.loaded;
|
|
15492
|
-
} else if (prefix === "" || localStorage.missing.has(name)) {
|
|
15493
|
-
list = result.missing;
|
|
15494
|
-
} else {
|
|
15495
|
-
list = result.pending;
|
|
15496
|
-
}
|
|
15497
|
-
const item = {
|
|
15498
|
-
provider,
|
|
15499
|
-
prefix,
|
|
15500
|
-
name
|
|
15501
|
-
};
|
|
15502
|
-
list.push(item);
|
|
15503
|
-
});
|
|
15504
|
-
return result;
|
|
15505
|
-
}
|
|
15506
|
-
|
|
15507
|
-
function removeCallback(storages, id) {
|
|
15508
|
-
storages.forEach((storage) => {
|
|
15509
|
-
const items = storage.loaderCallbacks;
|
|
15510
|
-
if (items) {
|
|
15511
|
-
storage.loaderCallbacks = items.filter((row) => row.id !== id);
|
|
15512
|
-
}
|
|
15513
|
-
});
|
|
15514
|
-
}
|
|
15515
|
-
function updateCallbacks(storage) {
|
|
15516
|
-
if (!storage.pendingCallbacksFlag) {
|
|
15517
|
-
storage.pendingCallbacksFlag = true;
|
|
15518
|
-
setTimeout(() => {
|
|
15519
|
-
storage.pendingCallbacksFlag = false;
|
|
15520
|
-
const items = storage.loaderCallbacks ? storage.loaderCallbacks.slice(0) : [];
|
|
15521
|
-
if (!items.length) {
|
|
15522
|
-
return;
|
|
15523
|
-
}
|
|
15524
|
-
let hasPending = false;
|
|
15525
|
-
const provider = storage.provider;
|
|
15526
|
-
const prefix = storage.prefix;
|
|
15527
|
-
items.forEach((item) => {
|
|
15528
|
-
const icons = item.icons;
|
|
15529
|
-
const oldLength = icons.pending.length;
|
|
15530
|
-
icons.pending = icons.pending.filter((icon) => {
|
|
15531
|
-
if (icon.prefix !== prefix) {
|
|
15532
|
-
return true;
|
|
15533
|
-
}
|
|
15534
|
-
const name = icon.name;
|
|
15535
|
-
if (storage.icons[name]) {
|
|
15536
|
-
icons.loaded.push({
|
|
15537
|
-
provider,
|
|
15538
|
-
prefix,
|
|
15539
|
-
name
|
|
15540
|
-
});
|
|
15541
|
-
} else if (storage.missing.has(name)) {
|
|
15542
|
-
icons.missing.push({
|
|
15543
|
-
provider,
|
|
15544
|
-
prefix,
|
|
15545
|
-
name
|
|
15546
|
-
});
|
|
15547
|
-
} else {
|
|
15548
|
-
hasPending = true;
|
|
15549
|
-
return true;
|
|
15550
|
-
}
|
|
15551
|
-
return false;
|
|
15552
|
-
});
|
|
15553
|
-
if (icons.pending.length !== oldLength) {
|
|
15554
|
-
if (!hasPending) {
|
|
15555
|
-
removeCallback([storage], item.id);
|
|
15556
|
-
}
|
|
15557
|
-
item.callback(
|
|
15558
|
-
icons.loaded.slice(0),
|
|
15559
|
-
icons.missing.slice(0),
|
|
15560
|
-
icons.pending.slice(0),
|
|
15561
|
-
item.abort
|
|
15562
|
-
);
|
|
15563
|
-
}
|
|
15564
|
-
});
|
|
15565
|
-
});
|
|
15566
|
-
}
|
|
15567
|
-
}
|
|
15568
|
-
let idCounter = 0;
|
|
15569
|
-
function storeCallback(callback, icons, pendingSources) {
|
|
15570
|
-
const id = idCounter++;
|
|
15571
|
-
const abort = removeCallback.bind(null, pendingSources, id);
|
|
15572
|
-
if (!icons.pending.length) {
|
|
15573
|
-
return abort;
|
|
15574
|
-
}
|
|
15575
|
-
const item = {
|
|
15576
|
-
id,
|
|
15577
|
-
icons,
|
|
15578
|
-
callback,
|
|
15579
|
-
abort
|
|
15580
|
-
};
|
|
15581
|
-
pendingSources.forEach((storage) => {
|
|
15582
|
-
(storage.loaderCallbacks || (storage.loaderCallbacks = [])).push(item);
|
|
15583
|
-
});
|
|
15584
|
-
return abort;
|
|
15585
|
-
}
|
|
15586
|
-
|
|
15587
|
-
function listToIcons(list, validate = true, simpleNames = false) {
|
|
15588
|
-
const result = [];
|
|
15589
|
-
list.forEach((item) => {
|
|
15590
|
-
const icon = typeof item === "string" ? stringToIcon(item, validate, simpleNames) : item;
|
|
15591
|
-
if (icon) {
|
|
15592
|
-
result.push(icon);
|
|
15593
|
-
}
|
|
15594
|
-
});
|
|
15595
|
-
return result;
|
|
15596
|
-
}
|
|
15597
|
-
|
|
15598
|
-
// src/config.ts
|
|
15599
|
-
var defaultConfig = {
|
|
15600
|
-
resources: [],
|
|
15601
|
-
index: 0,
|
|
15602
|
-
timeout: 2e3,
|
|
15603
|
-
rotate: 750,
|
|
15604
|
-
random: false,
|
|
15605
|
-
dataAfterTimeout: false
|
|
15606
|
-
};
|
|
15607
|
-
|
|
15608
|
-
// src/query.ts
|
|
15609
|
-
function sendQuery(config, payload, query, done) {
|
|
15610
|
-
const resourcesCount = config.resources.length;
|
|
15611
|
-
const startIndex = config.random ? Math.floor(Math.random() * resourcesCount) : config.index;
|
|
15612
|
-
let resources;
|
|
15613
|
-
if (config.random) {
|
|
15614
|
-
let list = config.resources.slice(0);
|
|
15615
|
-
resources = [];
|
|
15616
|
-
while (list.length > 1) {
|
|
15617
|
-
const nextIndex = Math.floor(Math.random() * list.length);
|
|
15618
|
-
resources.push(list[nextIndex]);
|
|
15619
|
-
list = list.slice(0, nextIndex).concat(list.slice(nextIndex + 1));
|
|
15620
|
-
}
|
|
15621
|
-
resources = resources.concat(list);
|
|
15622
|
-
} else {
|
|
15623
|
-
resources = config.resources.slice(startIndex).concat(config.resources.slice(0, startIndex));
|
|
15624
|
-
}
|
|
15625
|
-
const startTime = Date.now();
|
|
15626
|
-
let status = "pending";
|
|
15627
|
-
let queriesSent = 0;
|
|
15628
|
-
let lastError;
|
|
15629
|
-
let timer = null;
|
|
15630
|
-
let queue = [];
|
|
15631
|
-
let doneCallbacks = [];
|
|
15632
|
-
if (typeof done === "function") {
|
|
15633
|
-
doneCallbacks.push(done);
|
|
15634
|
-
}
|
|
15635
|
-
function resetTimer() {
|
|
15636
|
-
if (timer) {
|
|
15637
|
-
clearTimeout(timer);
|
|
15638
|
-
timer = null;
|
|
15639
|
-
}
|
|
15640
|
-
}
|
|
15641
|
-
function abort() {
|
|
15642
|
-
if (status === "pending") {
|
|
15643
|
-
status = "aborted";
|
|
15644
|
-
}
|
|
15645
|
-
resetTimer();
|
|
15646
|
-
queue.forEach((item) => {
|
|
15647
|
-
if (item.status === "pending") {
|
|
15648
|
-
item.status = "aborted";
|
|
15649
|
-
}
|
|
15650
|
-
});
|
|
15651
|
-
queue = [];
|
|
15652
|
-
}
|
|
15653
|
-
function subscribe(callback, overwrite) {
|
|
15654
|
-
if (overwrite) {
|
|
15655
|
-
doneCallbacks = [];
|
|
15656
|
-
}
|
|
15657
|
-
if (typeof callback === "function") {
|
|
15658
|
-
doneCallbacks.push(callback);
|
|
15659
|
-
}
|
|
15660
|
-
}
|
|
15661
|
-
function getQueryStatus() {
|
|
15662
|
-
return {
|
|
15663
|
-
startTime,
|
|
15664
|
-
payload,
|
|
15665
|
-
status,
|
|
15666
|
-
queriesSent,
|
|
15667
|
-
queriesPending: queue.length,
|
|
15668
|
-
subscribe,
|
|
15669
|
-
abort
|
|
15670
|
-
};
|
|
15671
|
-
}
|
|
15672
|
-
function failQuery() {
|
|
15673
|
-
status = "failed";
|
|
15674
|
-
doneCallbacks.forEach((callback) => {
|
|
15675
|
-
callback(void 0, lastError);
|
|
15676
|
-
});
|
|
15677
|
-
}
|
|
15678
|
-
function clearQueue() {
|
|
15679
|
-
queue.forEach((item) => {
|
|
15680
|
-
if (item.status === "pending") {
|
|
15681
|
-
item.status = "aborted";
|
|
15682
|
-
}
|
|
15683
|
-
});
|
|
15684
|
-
queue = [];
|
|
15685
|
-
}
|
|
15686
|
-
function moduleResponse(item, response, data) {
|
|
15687
|
-
const isError = response !== "success";
|
|
15688
|
-
queue = queue.filter((queued) => queued !== item);
|
|
15689
|
-
switch (status) {
|
|
15690
|
-
case "pending":
|
|
15691
|
-
break;
|
|
15692
|
-
case "failed":
|
|
15693
|
-
if (isError || !config.dataAfterTimeout) {
|
|
15694
|
-
return;
|
|
15695
|
-
}
|
|
15696
|
-
break;
|
|
15697
|
-
default:
|
|
15698
|
-
return;
|
|
15699
|
-
}
|
|
15700
|
-
if (response === "abort") {
|
|
15701
|
-
lastError = data;
|
|
15702
|
-
failQuery();
|
|
15703
|
-
return;
|
|
15704
|
-
}
|
|
15705
|
-
if (isError) {
|
|
15706
|
-
lastError = data;
|
|
15707
|
-
if (!queue.length) {
|
|
15708
|
-
if (!resources.length) {
|
|
15709
|
-
failQuery();
|
|
15710
|
-
} else {
|
|
15711
|
-
execNext();
|
|
15712
|
-
}
|
|
15713
|
-
}
|
|
15714
|
-
return;
|
|
15715
|
-
}
|
|
15716
|
-
resetTimer();
|
|
15717
|
-
clearQueue();
|
|
15718
|
-
if (!config.random) {
|
|
15719
|
-
const index = config.resources.indexOf(item.resource);
|
|
15720
|
-
if (index !== -1 && index !== config.index) {
|
|
15721
|
-
config.index = index;
|
|
15722
|
-
}
|
|
15723
|
-
}
|
|
15724
|
-
status = "completed";
|
|
15725
|
-
doneCallbacks.forEach((callback) => {
|
|
15726
|
-
callback(data);
|
|
15727
|
-
});
|
|
15728
|
-
}
|
|
15729
|
-
function execNext() {
|
|
15730
|
-
if (status !== "pending") {
|
|
15731
|
-
return;
|
|
15732
|
-
}
|
|
15733
|
-
resetTimer();
|
|
15734
|
-
const resource = resources.shift();
|
|
15735
|
-
if (resource === void 0) {
|
|
15736
|
-
if (queue.length) {
|
|
15737
|
-
timer = setTimeout(() => {
|
|
15738
|
-
resetTimer();
|
|
15739
|
-
if (status === "pending") {
|
|
15740
|
-
clearQueue();
|
|
15741
|
-
failQuery();
|
|
15742
|
-
}
|
|
15743
|
-
}, config.timeout);
|
|
15744
|
-
return;
|
|
15745
|
-
}
|
|
15746
|
-
failQuery();
|
|
15747
|
-
return;
|
|
15748
|
-
}
|
|
15749
|
-
const item = {
|
|
15750
|
-
status: "pending",
|
|
15751
|
-
resource,
|
|
15752
|
-
callback: (status2, data) => {
|
|
15753
|
-
moduleResponse(item, status2, data);
|
|
15754
|
-
}
|
|
15755
|
-
};
|
|
15756
|
-
queue.push(item);
|
|
15757
|
-
queriesSent++;
|
|
15758
|
-
timer = setTimeout(execNext, config.rotate);
|
|
15759
|
-
query(resource, payload, item.callback);
|
|
15760
|
-
}
|
|
15761
|
-
setTimeout(execNext);
|
|
15762
|
-
return getQueryStatus;
|
|
15763
|
-
}
|
|
15764
|
-
|
|
15765
|
-
// src/index.ts
|
|
15766
|
-
function initRedundancy(cfg) {
|
|
15767
|
-
const config = {
|
|
15768
|
-
...defaultConfig,
|
|
15769
|
-
...cfg
|
|
15770
|
-
};
|
|
15771
|
-
let queries = [];
|
|
15772
|
-
function cleanup() {
|
|
15773
|
-
queries = queries.filter((item) => item().status === "pending");
|
|
15774
|
-
}
|
|
15775
|
-
function query(payload, queryCallback, doneCallback) {
|
|
15776
|
-
const query2 = sendQuery(
|
|
15777
|
-
config,
|
|
15778
|
-
payload,
|
|
15779
|
-
queryCallback,
|
|
15780
|
-
(data, error) => {
|
|
15781
|
-
cleanup();
|
|
15782
|
-
if (doneCallback) {
|
|
15783
|
-
doneCallback(data, error);
|
|
15784
|
-
}
|
|
15785
|
-
}
|
|
15786
|
-
);
|
|
15787
|
-
queries.push(query2);
|
|
15788
|
-
return query2;
|
|
15789
|
-
}
|
|
15790
|
-
function find(callback) {
|
|
15791
|
-
return queries.find((value) => {
|
|
15792
|
-
return callback(value);
|
|
15793
|
-
}) || null;
|
|
15794
|
-
}
|
|
15795
|
-
const instance = {
|
|
15796
|
-
query,
|
|
15797
|
-
find,
|
|
15798
|
-
setIndex: (index) => {
|
|
15799
|
-
config.index = index;
|
|
15800
|
-
},
|
|
15801
|
-
getIndex: () => config.index,
|
|
15802
|
-
cleanup
|
|
15803
|
-
};
|
|
15804
|
-
return instance;
|
|
15805
|
-
}
|
|
15806
|
-
|
|
15807
|
-
function emptyCallback$1() {
|
|
15808
|
-
}
|
|
15809
|
-
const redundancyCache = /* @__PURE__ */ Object.create(null);
|
|
15810
|
-
function getRedundancyCache(provider) {
|
|
15811
|
-
if (!redundancyCache[provider]) {
|
|
15812
|
-
const config = getAPIConfig(provider);
|
|
15813
|
-
if (!config) {
|
|
15814
|
-
return;
|
|
15815
|
-
}
|
|
15816
|
-
const redundancy = initRedundancy(config);
|
|
15817
|
-
const cachedReundancy = {
|
|
15818
|
-
config,
|
|
15819
|
-
redundancy
|
|
15820
|
-
};
|
|
15821
|
-
redundancyCache[provider] = cachedReundancy;
|
|
15822
|
-
}
|
|
15823
|
-
return redundancyCache[provider];
|
|
15824
|
-
}
|
|
15825
|
-
function sendAPIQuery(target, query, callback) {
|
|
15826
|
-
let redundancy;
|
|
15827
|
-
let send;
|
|
15828
|
-
if (typeof target === "string") {
|
|
15829
|
-
const api = getAPIModule(target);
|
|
15830
|
-
if (!api) {
|
|
15831
|
-
callback(void 0, 424);
|
|
15832
|
-
return emptyCallback$1;
|
|
15833
|
-
}
|
|
15834
|
-
send = api.send;
|
|
15835
|
-
const cached = getRedundancyCache(target);
|
|
15836
|
-
if (cached) {
|
|
15837
|
-
redundancy = cached.redundancy;
|
|
15838
|
-
}
|
|
15839
|
-
} else {
|
|
15840
|
-
const config = createAPIConfig(target);
|
|
15841
|
-
if (config) {
|
|
15842
|
-
redundancy = initRedundancy(config);
|
|
15843
|
-
const moduleKey = target.resources ? target.resources[0] : "";
|
|
15844
|
-
const api = getAPIModule(moduleKey);
|
|
15845
|
-
if (api) {
|
|
15846
|
-
send = api.send;
|
|
15847
|
-
}
|
|
15848
|
-
}
|
|
15849
|
-
}
|
|
15850
|
-
if (!redundancy || !send) {
|
|
15851
|
-
callback(void 0, 424);
|
|
15852
|
-
return emptyCallback$1;
|
|
15853
|
-
}
|
|
15854
|
-
return redundancy.query(query, send, callback)().abort;
|
|
15855
|
-
}
|
|
15856
|
-
|
|
15857
|
-
const browserCacheVersion = "iconify2";
|
|
15858
|
-
const browserCachePrefix = "iconify";
|
|
15859
|
-
const browserCacheCountKey = browserCachePrefix + "-count";
|
|
15860
|
-
const browserCacheVersionKey = browserCachePrefix + "-version";
|
|
15861
|
-
const browserStorageHour = 36e5;
|
|
15862
|
-
const browserStorageCacheExpiration = 168;
|
|
15863
|
-
|
|
15864
|
-
function getStoredItem(func, key) {
|
|
15865
|
-
try {
|
|
15866
|
-
return func.getItem(key);
|
|
15867
|
-
} catch (err) {
|
|
15868
|
-
}
|
|
15869
|
-
}
|
|
15870
|
-
function setStoredItem(func, key, value) {
|
|
15871
|
-
try {
|
|
15872
|
-
func.setItem(key, value);
|
|
15873
|
-
return true;
|
|
15874
|
-
} catch (err) {
|
|
15875
|
-
}
|
|
15876
|
-
}
|
|
15877
|
-
function removeStoredItem(func, key) {
|
|
15878
|
-
try {
|
|
15879
|
-
func.removeItem(key);
|
|
15880
|
-
} catch (err) {
|
|
15881
|
-
}
|
|
15882
|
-
}
|
|
15883
|
-
|
|
15884
|
-
function setBrowserStorageItemsCount(storage, value) {
|
|
15885
|
-
return setStoredItem(storage, browserCacheCountKey, value.toString());
|
|
15886
|
-
}
|
|
15887
|
-
function getBrowserStorageItemsCount(storage) {
|
|
15888
|
-
return parseInt(getStoredItem(storage, browserCacheCountKey)) || 0;
|
|
15889
|
-
}
|
|
15890
|
-
|
|
15891
|
-
const browserStorageConfig = {
|
|
15892
|
-
local: true,
|
|
15893
|
-
session: true
|
|
15894
|
-
};
|
|
15895
|
-
const browserStorageEmptyItems = {
|
|
15896
|
-
local: /* @__PURE__ */ new Set(),
|
|
15897
|
-
session: /* @__PURE__ */ new Set()
|
|
15898
|
-
};
|
|
15899
|
-
let browserStorageStatus = false;
|
|
15900
|
-
function setBrowserStorageStatus(status) {
|
|
15901
|
-
browserStorageStatus = status;
|
|
15902
|
-
}
|
|
15903
|
-
|
|
15904
|
-
let _window = typeof window === "undefined" ? {} : window;
|
|
15905
|
-
function getBrowserStorage(key) {
|
|
15906
|
-
const attr = key + "Storage";
|
|
15907
|
-
try {
|
|
15908
|
-
if (_window && _window[attr] && typeof _window[attr].length === "number") {
|
|
15909
|
-
return _window[attr];
|
|
15910
|
-
}
|
|
15911
|
-
} catch (err) {
|
|
15912
|
-
}
|
|
15913
|
-
browserStorageConfig[key] = false;
|
|
15914
|
-
}
|
|
15915
|
-
|
|
15916
|
-
function iterateBrowserStorage(key, callback) {
|
|
15917
|
-
const func = getBrowserStorage(key);
|
|
15918
|
-
if (!func) {
|
|
15919
|
-
return;
|
|
15920
|
-
}
|
|
15921
|
-
const version = getStoredItem(func, browserCacheVersionKey);
|
|
15922
|
-
if (version !== browserCacheVersion) {
|
|
15923
|
-
if (version) {
|
|
15924
|
-
const total2 = getBrowserStorageItemsCount(func);
|
|
15925
|
-
for (let i = 0; i < total2; i++) {
|
|
15926
|
-
removeStoredItem(func, browserCachePrefix + i.toString());
|
|
15927
|
-
}
|
|
15928
|
-
}
|
|
15929
|
-
setStoredItem(func, browserCacheVersionKey, browserCacheVersion);
|
|
15930
|
-
setBrowserStorageItemsCount(func, 0);
|
|
15931
|
-
return;
|
|
15932
|
-
}
|
|
15933
|
-
const minTime = Math.floor(Date.now() / browserStorageHour) - browserStorageCacheExpiration;
|
|
15934
|
-
const parseItem = (index) => {
|
|
15935
|
-
const name = browserCachePrefix + index.toString();
|
|
15936
|
-
const item = getStoredItem(func, name);
|
|
15937
|
-
if (typeof item !== "string") {
|
|
15938
|
-
return;
|
|
15939
|
-
}
|
|
15940
|
-
try {
|
|
15941
|
-
const data = JSON.parse(item);
|
|
15942
|
-
if (typeof data === "object" && typeof data.cached === "number" && data.cached > minTime && typeof data.provider === "string" && typeof data.data === "object" && typeof data.data.prefix === "string" && callback(data, index)) {
|
|
15943
|
-
return true;
|
|
15944
|
-
}
|
|
15945
|
-
} catch (err) {
|
|
15946
|
-
}
|
|
15947
|
-
removeStoredItem(func, name);
|
|
15948
|
-
};
|
|
15949
|
-
let total = getBrowserStorageItemsCount(func);
|
|
15950
|
-
for (let i = total - 1; i >= 0; i--) {
|
|
15951
|
-
if (!parseItem(i)) {
|
|
15952
|
-
if (i === total - 1) {
|
|
15953
|
-
total--;
|
|
15954
|
-
setBrowserStorageItemsCount(func, total);
|
|
15955
|
-
} else {
|
|
15956
|
-
browserStorageEmptyItems[key].add(i);
|
|
15957
|
-
}
|
|
15958
|
-
}
|
|
15959
|
-
}
|
|
15960
|
-
}
|
|
15961
|
-
|
|
15962
|
-
function initBrowserStorage() {
|
|
15963
|
-
if (browserStorageStatus) {
|
|
15964
|
-
return;
|
|
15965
|
-
}
|
|
15966
|
-
setBrowserStorageStatus(true);
|
|
15967
|
-
for (const key in browserStorageConfig) {
|
|
15968
|
-
iterateBrowserStorage(key, (item) => {
|
|
15969
|
-
const iconSet = item.data;
|
|
15970
|
-
const provider = item.provider;
|
|
15971
|
-
const prefix = iconSet.prefix;
|
|
15972
|
-
const storage = getStorage(
|
|
15973
|
-
provider,
|
|
15974
|
-
prefix
|
|
15975
|
-
);
|
|
15976
|
-
if (!addIconSet(storage, iconSet).length) {
|
|
15977
|
-
return false;
|
|
15978
|
-
}
|
|
15979
|
-
const lastModified = iconSet.lastModified || -1;
|
|
15980
|
-
storage.lastModifiedCached = storage.lastModifiedCached ? Math.min(storage.lastModifiedCached, lastModified) : lastModified;
|
|
15981
|
-
return true;
|
|
15982
|
-
});
|
|
15983
|
-
}
|
|
15984
|
-
}
|
|
15985
|
-
|
|
15986
|
-
function updateLastModified(storage, lastModified) {
|
|
15987
|
-
const lastValue = storage.lastModifiedCached;
|
|
15988
|
-
if (lastValue && lastValue >= lastModified) {
|
|
15989
|
-
return lastValue === lastModified;
|
|
15990
|
-
}
|
|
15991
|
-
storage.lastModifiedCached = lastModified;
|
|
15992
|
-
if (lastValue) {
|
|
15993
|
-
for (const key in browserStorageConfig) {
|
|
15994
|
-
iterateBrowserStorage(key, (item) => {
|
|
15995
|
-
const iconSet = item.data;
|
|
15996
|
-
return item.provider !== storage.provider || iconSet.prefix !== storage.prefix || iconSet.lastModified === lastModified;
|
|
15997
|
-
});
|
|
15998
|
-
}
|
|
15999
|
-
}
|
|
16000
|
-
return true;
|
|
16001
|
-
}
|
|
16002
|
-
function storeInBrowserStorage(storage, data) {
|
|
16003
|
-
if (!browserStorageStatus) {
|
|
16004
|
-
initBrowserStorage();
|
|
16005
|
-
}
|
|
16006
|
-
function store(key) {
|
|
16007
|
-
let func;
|
|
16008
|
-
if (!browserStorageConfig[key] || !(func = getBrowserStorage(key))) {
|
|
16009
|
-
return;
|
|
16010
|
-
}
|
|
16011
|
-
const set = browserStorageEmptyItems[key];
|
|
16012
|
-
let index;
|
|
16013
|
-
if (set.size) {
|
|
16014
|
-
set.delete(index = Array.from(set).shift());
|
|
16015
|
-
} else {
|
|
16016
|
-
index = getBrowserStorageItemsCount(func);
|
|
16017
|
-
if (!setBrowserStorageItemsCount(func, index + 1)) {
|
|
16018
|
-
return;
|
|
16019
|
-
}
|
|
16020
|
-
}
|
|
16021
|
-
const item = {
|
|
16022
|
-
cached: Math.floor(Date.now() / browserStorageHour),
|
|
16023
|
-
provider: storage.provider,
|
|
16024
|
-
data
|
|
16025
|
-
};
|
|
16026
|
-
return setStoredItem(
|
|
16027
|
-
func,
|
|
16028
|
-
browserCachePrefix + index.toString(),
|
|
16029
|
-
JSON.stringify(item)
|
|
16030
|
-
);
|
|
16031
|
-
}
|
|
16032
|
-
if (data.lastModified && !updateLastModified(storage, data.lastModified)) {
|
|
16033
|
-
return;
|
|
16034
|
-
}
|
|
16035
|
-
if (!Object.keys(data.icons).length) {
|
|
16036
|
-
return;
|
|
16037
|
-
}
|
|
16038
|
-
if (data.not_found) {
|
|
16039
|
-
data = Object.assign({}, data);
|
|
16040
|
-
delete data.not_found;
|
|
16041
|
-
}
|
|
16042
|
-
if (!store("local")) {
|
|
16043
|
-
store("session");
|
|
16044
|
-
}
|
|
16045
|
-
}
|
|
16046
|
-
|
|
16047
|
-
function emptyCallback() {
|
|
16048
|
-
}
|
|
16049
|
-
function loadedNewIcons(storage) {
|
|
16050
|
-
if (!storage.iconsLoaderFlag) {
|
|
16051
|
-
storage.iconsLoaderFlag = true;
|
|
16052
|
-
setTimeout(() => {
|
|
16053
|
-
storage.iconsLoaderFlag = false;
|
|
16054
|
-
updateCallbacks(storage);
|
|
16055
|
-
});
|
|
16056
|
-
}
|
|
16057
|
-
}
|
|
16058
|
-
function loadNewIcons(storage, icons) {
|
|
16059
|
-
if (!storage.iconsToLoad) {
|
|
16060
|
-
storage.iconsToLoad = icons;
|
|
16061
|
-
} else {
|
|
16062
|
-
storage.iconsToLoad = storage.iconsToLoad.concat(icons).sort();
|
|
16063
|
-
}
|
|
16064
|
-
if (!storage.iconsQueueFlag) {
|
|
16065
|
-
storage.iconsQueueFlag = true;
|
|
16066
|
-
setTimeout(() => {
|
|
16067
|
-
storage.iconsQueueFlag = false;
|
|
16068
|
-
const { provider, prefix } = storage;
|
|
16069
|
-
const icons2 = storage.iconsToLoad;
|
|
16070
|
-
delete storage.iconsToLoad;
|
|
16071
|
-
let api;
|
|
16072
|
-
if (!icons2 || !(api = getAPIModule(provider))) {
|
|
16073
|
-
return;
|
|
16074
|
-
}
|
|
16075
|
-
const params = api.prepare(provider, prefix, icons2);
|
|
16076
|
-
params.forEach((item) => {
|
|
16077
|
-
sendAPIQuery(provider, item, (data) => {
|
|
16078
|
-
if (typeof data !== "object") {
|
|
16079
|
-
item.icons.forEach((name) => {
|
|
16080
|
-
storage.missing.add(name);
|
|
16081
|
-
});
|
|
16082
|
-
} else {
|
|
16083
|
-
try {
|
|
16084
|
-
const parsed = addIconSet(
|
|
16085
|
-
storage,
|
|
16086
|
-
data
|
|
16087
|
-
);
|
|
16088
|
-
if (!parsed.length) {
|
|
16089
|
-
return;
|
|
16090
|
-
}
|
|
16091
|
-
const pending = storage.pendingIcons;
|
|
16092
|
-
if (pending) {
|
|
16093
|
-
parsed.forEach((name) => {
|
|
16094
|
-
pending.delete(name);
|
|
16095
|
-
});
|
|
16096
|
-
}
|
|
16097
|
-
storeInBrowserStorage(storage, data);
|
|
16098
|
-
} catch (err) {
|
|
16099
|
-
console.error(err);
|
|
16100
|
-
}
|
|
16101
|
-
}
|
|
16102
|
-
loadedNewIcons(storage);
|
|
16103
|
-
});
|
|
16104
|
-
});
|
|
16105
|
-
});
|
|
16106
|
-
}
|
|
16107
|
-
}
|
|
16108
|
-
const loadIcons = (icons, callback) => {
|
|
16109
|
-
const cleanedIcons = listToIcons(icons, true, allowSimpleNames());
|
|
16110
|
-
const sortedIcons = sortIcons(cleanedIcons);
|
|
16111
|
-
if (!sortedIcons.pending.length) {
|
|
16112
|
-
let callCallback = true;
|
|
16113
|
-
if (callback) {
|
|
16114
|
-
setTimeout(() => {
|
|
16115
|
-
if (callCallback) {
|
|
16116
|
-
callback(
|
|
16117
|
-
sortedIcons.loaded,
|
|
16118
|
-
sortedIcons.missing,
|
|
16119
|
-
sortedIcons.pending,
|
|
16120
|
-
emptyCallback
|
|
16121
|
-
);
|
|
16122
|
-
}
|
|
16123
|
-
});
|
|
16124
|
-
}
|
|
16125
|
-
return () => {
|
|
16126
|
-
callCallback = false;
|
|
16127
|
-
};
|
|
16128
|
-
}
|
|
16129
|
-
const newIcons = /* @__PURE__ */ Object.create(null);
|
|
16130
|
-
const sources = [];
|
|
16131
|
-
let lastProvider, lastPrefix;
|
|
16132
|
-
sortedIcons.pending.forEach((icon) => {
|
|
16133
|
-
const { provider, prefix } = icon;
|
|
16134
|
-
if (prefix === lastPrefix && provider === lastProvider) {
|
|
16135
|
-
return;
|
|
16136
|
-
}
|
|
16137
|
-
lastProvider = provider;
|
|
16138
|
-
lastPrefix = prefix;
|
|
16139
|
-
sources.push(getStorage(provider, prefix));
|
|
16140
|
-
const providerNewIcons = newIcons[provider] || (newIcons[provider] = /* @__PURE__ */ Object.create(null));
|
|
16141
|
-
if (!providerNewIcons[prefix]) {
|
|
16142
|
-
providerNewIcons[prefix] = [];
|
|
16143
|
-
}
|
|
16144
|
-
});
|
|
16145
|
-
sortedIcons.pending.forEach((icon) => {
|
|
16146
|
-
const { provider, prefix, name } = icon;
|
|
16147
|
-
const storage = getStorage(provider, prefix);
|
|
16148
|
-
const pendingQueue = storage.pendingIcons || (storage.pendingIcons = /* @__PURE__ */ new Set());
|
|
16149
|
-
if (!pendingQueue.has(name)) {
|
|
16150
|
-
pendingQueue.add(name);
|
|
16151
|
-
newIcons[provider][prefix].push(name);
|
|
16152
|
-
}
|
|
16153
|
-
});
|
|
16154
|
-
sources.forEach((storage) => {
|
|
16155
|
-
const { provider, prefix } = storage;
|
|
16156
|
-
if (newIcons[provider][prefix].length) {
|
|
16157
|
-
loadNewIcons(storage, newIcons[provider][prefix]);
|
|
16158
|
-
}
|
|
16159
|
-
});
|
|
16160
|
-
return callback ? storeCallback(callback, sortedIcons, sources) : emptyCallback;
|
|
16161
|
-
};
|
|
16162
|
-
const loadIcon = (icon) => {
|
|
16163
|
-
return new Promise((fulfill, reject) => {
|
|
16164
|
-
const iconObj = typeof icon === "string" ? stringToIcon(icon, true) : icon;
|
|
16165
|
-
if (!iconObj) {
|
|
16166
|
-
reject(icon);
|
|
16167
|
-
return;
|
|
16168
|
-
}
|
|
16169
|
-
loadIcons([iconObj || icon], (loaded) => {
|
|
16170
|
-
if (loaded.length && iconObj) {
|
|
16171
|
-
const data = getIconData(iconObj);
|
|
16172
|
-
if (data) {
|
|
16173
|
-
fulfill({
|
|
16174
|
-
...defaultIconProps,
|
|
16175
|
-
...data
|
|
16176
|
-
});
|
|
16177
|
-
return;
|
|
16178
|
-
}
|
|
16179
|
-
}
|
|
16180
|
-
reject(icon);
|
|
16181
|
-
});
|
|
16182
|
-
});
|
|
16183
|
-
};
|
|
16184
|
-
|
|
16185
|
-
function toggleBrowserCache(storage, value) {
|
|
16186
|
-
switch (storage) {
|
|
16187
|
-
case "local":
|
|
16188
|
-
case "session":
|
|
16189
|
-
browserStorageConfig[storage] = value;
|
|
16190
|
-
break;
|
|
16191
|
-
case "all":
|
|
16192
|
-
for (const key in browserStorageConfig) {
|
|
16193
|
-
browserStorageConfig[key] = value;
|
|
16194
|
-
}
|
|
16195
|
-
break;
|
|
16196
|
-
}
|
|
16197
|
-
}
|
|
16198
|
-
|
|
16199
|
-
function mergeCustomisations(defaults, item) {
|
|
16200
|
-
const result = {
|
|
16201
|
-
...defaults
|
|
16202
|
-
};
|
|
16203
|
-
for (const key in item) {
|
|
16204
|
-
const value = item[key];
|
|
16205
|
-
const valueType = typeof value;
|
|
16206
|
-
if (key in defaultIconSizeCustomisations) {
|
|
16207
|
-
if (value === null || value && (valueType === "string" || valueType === "number")) {
|
|
16208
|
-
result[key] = value;
|
|
16209
|
-
}
|
|
16210
|
-
} else if (valueType === typeof result[key]) {
|
|
16211
|
-
result[key] = key === "rotate" ? value % 4 : value;
|
|
16212
|
-
}
|
|
16213
|
-
}
|
|
16214
|
-
return result;
|
|
16215
|
-
}
|
|
16216
|
-
|
|
16217
|
-
const separator = /[\s,]+/;
|
|
16218
|
-
function flipFromString(custom, flip) {
|
|
16219
|
-
flip.split(separator).forEach((str) => {
|
|
16220
|
-
const value = str.trim();
|
|
16221
|
-
switch (value) {
|
|
16222
|
-
case "horizontal":
|
|
16223
|
-
custom.hFlip = true;
|
|
16224
|
-
break;
|
|
16225
|
-
case "vertical":
|
|
16226
|
-
custom.vFlip = true;
|
|
16227
|
-
break;
|
|
16228
|
-
}
|
|
16229
|
-
});
|
|
16230
|
-
}
|
|
16231
|
-
|
|
16232
|
-
function rotateFromString(value, defaultValue = 0) {
|
|
16233
|
-
const units = value.replace(/^-?[0-9.]*/, "");
|
|
16234
|
-
function cleanup(value2) {
|
|
16235
|
-
while (value2 < 0) {
|
|
16236
|
-
value2 += 4;
|
|
16237
|
-
}
|
|
16238
|
-
return value2 % 4;
|
|
16239
|
-
}
|
|
16240
|
-
if (units === "") {
|
|
16241
|
-
const num = parseInt(value);
|
|
16242
|
-
return isNaN(num) ? 0 : cleanup(num);
|
|
16243
|
-
} else if (units !== value) {
|
|
16244
|
-
let split = 0;
|
|
16245
|
-
switch (units) {
|
|
16246
|
-
case "%":
|
|
16247
|
-
split = 25;
|
|
16248
|
-
break;
|
|
16249
|
-
case "deg":
|
|
16250
|
-
split = 90;
|
|
16251
|
-
}
|
|
16252
|
-
if (split) {
|
|
16253
|
-
let num = parseFloat(value.slice(0, value.length - units.length));
|
|
16254
|
-
if (isNaN(num)) {
|
|
16255
|
-
return 0;
|
|
16256
|
-
}
|
|
16257
|
-
num = num / split;
|
|
16258
|
-
return num % 1 === 0 ? cleanup(num) : 0;
|
|
16259
|
-
}
|
|
16260
|
-
}
|
|
16261
|
-
return defaultValue;
|
|
16262
|
-
}
|
|
16263
|
-
|
|
16264
|
-
const defaultExtendedIconCustomisations = {
|
|
16265
|
-
...defaultIconCustomisations,
|
|
16266
|
-
inline: false,
|
|
16267
|
-
};
|
|
16268
|
-
|
|
16269
|
-
/**
|
|
16270
|
-
* Default SVG attributes
|
|
16271
|
-
*/
|
|
16272
|
-
const svgDefaults = {
|
|
16273
|
-
'xmlns': 'http://www.w3.org/2000/svg',
|
|
16274
|
-
'xmlns:xlink': 'http://www.w3.org/1999/xlink',
|
|
16275
|
-
'aria-hidden': true,
|
|
16276
|
-
'role': 'img',
|
|
16277
|
-
};
|
|
16278
|
-
/**
|
|
16279
|
-
* Aliases for customisations.
|
|
16280
|
-
* In Vue 'v-' properties are reserved, so v-flip must be renamed
|
|
16281
|
-
*/
|
|
16282
|
-
const customisationAliases = {};
|
|
16283
|
-
['horizontal', 'vertical'].forEach((prefix) => {
|
|
16284
|
-
const attr = prefix.slice(0, 1) + 'Flip';
|
|
16285
|
-
// vertical-flip
|
|
16286
|
-
customisationAliases[prefix + '-flip'] = attr;
|
|
16287
|
-
// v-flip
|
|
16288
|
-
customisationAliases[prefix.slice(0, 1) + '-flip'] = attr;
|
|
16289
|
-
// verticalFlip
|
|
16290
|
-
customisationAliases[prefix + 'Flip'] = attr;
|
|
16291
|
-
});
|
|
16292
|
-
/**
|
|
16293
|
-
* Render icon
|
|
16294
|
-
*/
|
|
16295
|
-
const iconify_render = (createElement,
|
|
16296
|
-
// context.props
|
|
16297
|
-
props,
|
|
16298
|
-
// context.data
|
|
16299
|
-
contextData,
|
|
16300
|
-
// Icon must be validated before calling this function
|
|
16301
|
-
icon) => {
|
|
16302
|
-
// Split properties
|
|
16303
|
-
const customisations = mergeCustomisations(defaultExtendedIconCustomisations, props);
|
|
16304
|
-
const componentProps = { ...svgDefaults };
|
|
16305
|
-
// Style in Vue 2 components is always passed to rendered component, so no point in parsing it
|
|
16306
|
-
const style = {};
|
|
16307
|
-
// Get element properties
|
|
16308
|
-
for (let key in props) {
|
|
16309
|
-
const value = props[key];
|
|
16310
|
-
if (value === void 0) {
|
|
16311
|
-
continue;
|
|
16312
|
-
}
|
|
16313
|
-
switch (key) {
|
|
16314
|
-
// Properties to ignore
|
|
16315
|
-
case 'icon':
|
|
16316
|
-
case 'style':
|
|
16317
|
-
case 'onLoad':
|
|
16318
|
-
break;
|
|
16319
|
-
// Boolean attributes
|
|
16320
|
-
case 'inline':
|
|
16321
|
-
case 'hFlip':
|
|
16322
|
-
case 'vFlip':
|
|
16323
|
-
customisations[key] =
|
|
16324
|
-
value === true || value === 'true' || value === 1;
|
|
16325
|
-
break;
|
|
16326
|
-
// Flip as string: 'horizontal,vertical'
|
|
16327
|
-
case 'flip':
|
|
16328
|
-
if (typeof value === 'string') {
|
|
16329
|
-
flipFromString(customisations, value);
|
|
16330
|
-
}
|
|
16331
|
-
break;
|
|
16332
|
-
// Color: override style
|
|
16333
|
-
case 'color':
|
|
16334
|
-
style.color = value;
|
|
16335
|
-
break;
|
|
16336
|
-
// Rotation as string
|
|
16337
|
-
case 'rotate':
|
|
16338
|
-
if (typeof value === 'string') {
|
|
16339
|
-
customisations[key] = rotateFromString(value);
|
|
16340
|
-
}
|
|
16341
|
-
else if (typeof value === 'number') {
|
|
16342
|
-
customisations[key] = value;
|
|
16343
|
-
}
|
|
16344
|
-
break;
|
|
16345
|
-
// Remove aria-hidden
|
|
16346
|
-
case 'ariaHidden':
|
|
16347
|
-
case 'aria-hidden':
|
|
16348
|
-
// Vue transforms 'aria-hidden' property to 'ariaHidden'
|
|
16349
|
-
if (value !== true && value !== 'true') {
|
|
16350
|
-
delete componentProps['aria-hidden'];
|
|
16351
|
-
}
|
|
16352
|
-
break;
|
|
16353
|
-
default:
|
|
16354
|
-
const alias = customisationAliases[key];
|
|
16355
|
-
if (alias) {
|
|
16356
|
-
// Aliases for boolean customisations
|
|
16357
|
-
if (value === true || value === 'true' || value === 1) {
|
|
16358
|
-
customisations[alias] = true;
|
|
16359
|
-
}
|
|
16360
|
-
}
|
|
16361
|
-
else if (defaultExtendedIconCustomisations[key] === void 0) {
|
|
16362
|
-
// Copy missing property if it does not exist in customisations
|
|
16363
|
-
componentProps[key] = value;
|
|
16364
|
-
}
|
|
16365
|
-
}
|
|
16366
|
-
}
|
|
16367
|
-
// Generate icon
|
|
16368
|
-
const item = iconToSVG(icon, customisations);
|
|
16369
|
-
// Add icon stuff
|
|
16370
|
-
for (let key in item.attributes) {
|
|
16371
|
-
componentProps[key] = item.attributes[key];
|
|
16372
|
-
}
|
|
16373
|
-
if (customisations.inline) {
|
|
16374
|
-
style.verticalAlign = '-0.125em';
|
|
16375
|
-
}
|
|
16376
|
-
// Counter for ids based on "id" property to render icons consistently on server and client
|
|
16377
|
-
let localCounter = 0;
|
|
16378
|
-
let id = props.id;
|
|
16379
|
-
if (typeof id === 'string') {
|
|
16380
|
-
// Convert '-' to '_' to avoid errors in animations
|
|
16381
|
-
id = id.replace(/-/g, '_');
|
|
16382
|
-
}
|
|
16383
|
-
// Generate node data
|
|
16384
|
-
const data = {
|
|
16385
|
-
attrs: componentProps,
|
|
16386
|
-
domProps: {
|
|
16387
|
-
innerHTML: replaceIDs(item.body, id ? () => id + 'ID' + localCounter++ : 'iconifyVue'),
|
|
16388
|
-
},
|
|
16389
|
-
};
|
|
16390
|
-
if (Object.keys(style).length > 0) {
|
|
16391
|
-
data.style = style;
|
|
16392
|
-
}
|
|
16393
|
-
if (contextData) {
|
|
16394
|
-
['on', 'ref'].forEach((attr) => {
|
|
16395
|
-
if (contextData[attr] !== void 0) {
|
|
16396
|
-
data[attr] = contextData[attr];
|
|
16397
|
-
}
|
|
16398
|
-
});
|
|
16399
|
-
['staticClass', 'class'].forEach((attr) => {
|
|
16400
|
-
if (contextData[attr] !== void 0) {
|
|
16401
|
-
data.class = contextData[attr];
|
|
16402
|
-
}
|
|
16403
|
-
});
|
|
16404
|
-
}
|
|
16405
|
-
// Render icon
|
|
16406
|
-
return createElement('svg', data);
|
|
16407
|
-
};
|
|
16408
|
-
|
|
16409
|
-
/**
|
|
16410
|
-
* Enable cache
|
|
16411
|
-
*/
|
|
16412
|
-
function enableCache(storage) {
|
|
16413
|
-
toggleBrowserCache(storage, true);
|
|
16414
|
-
}
|
|
16415
|
-
/**
|
|
16416
|
-
* Disable cache
|
|
16417
|
-
*/
|
|
16418
|
-
function disableCache(storage) {
|
|
16419
|
-
toggleBrowserCache(storage, false);
|
|
16420
|
-
}
|
|
16421
|
-
/**
|
|
16422
|
-
* Initialise stuff
|
|
16423
|
-
*/
|
|
16424
|
-
// Enable short names
|
|
16425
|
-
allowSimpleNames(true);
|
|
16426
|
-
// Set API module
|
|
16427
|
-
setAPIModule('', fetchAPIModule);
|
|
16428
|
-
/**
|
|
16429
|
-
* Browser stuff
|
|
16430
|
-
*/
|
|
16431
|
-
if (typeof document !== 'undefined' && typeof window !== 'undefined') {
|
|
16432
|
-
// Set cache and load existing cache
|
|
16433
|
-
initBrowserStorage();
|
|
16434
|
-
const _window = window;
|
|
16435
|
-
// Load icons from global "IconifyPreload"
|
|
16436
|
-
if (_window.IconifyPreload !== void 0) {
|
|
16437
|
-
const preload = _window.IconifyPreload;
|
|
16438
|
-
const err = 'Invalid IconifyPreload syntax.';
|
|
16439
|
-
if (typeof preload === 'object' && preload !== null) {
|
|
16440
|
-
(preload instanceof Array ? preload : [preload]).forEach((item) => {
|
|
16441
|
-
try {
|
|
16442
|
-
if (
|
|
16443
|
-
// Check if item is an object and not null/array
|
|
16444
|
-
typeof item !== 'object' ||
|
|
16445
|
-
item === null ||
|
|
16446
|
-
item instanceof Array ||
|
|
16447
|
-
// Check for 'icons' and 'prefix'
|
|
16448
|
-
typeof item.icons !== 'object' ||
|
|
16449
|
-
typeof item.prefix !== 'string' ||
|
|
16450
|
-
// Add icon set
|
|
16451
|
-
!addCollection(item)) {
|
|
16452
|
-
console.error(err);
|
|
16453
|
-
}
|
|
16454
|
-
}
|
|
16455
|
-
catch (e) {
|
|
16456
|
-
console.error(err);
|
|
16457
|
-
}
|
|
16458
|
-
});
|
|
14532
|
+
// 以 ` 开头。表示小代码块开始。
|
|
14533
|
+
state = States.codeStartSm;
|
|
14534
|
+
source = source.slice(1);
|
|
14535
|
+
} else {
|
|
14536
|
+
// 其他情况,直接消费当前字符
|
|
14537
|
+
source = source.slice(1);
|
|
16459
14538
|
}
|
|
16460
|
-
|
|
16461
|
-
|
|
16462
|
-
|
|
16463
|
-
|
|
16464
|
-
|
|
16465
|
-
|
|
16466
|
-
|
|
16467
|
-
|
|
16468
|
-
|
|
16469
|
-
|
|
16470
|
-
|
|
16471
|
-
|
|
16472
|
-
|
|
16473
|
-
|
|
16474
|
-
|
|
16475
|
-
|
|
16476
|
-
|
|
16477
|
-
|
|
16478
|
-
|
|
16479
|
-
|
|
16480
|
-
|
|
16481
|
-
|
|
14539
|
+
inStart = false;
|
|
14540
|
+
break;
|
|
14541
|
+
case States.codeStartSm:
|
|
14542
|
+
if (char === "`") {
|
|
14543
|
+
// 遇到第二个 `,表示代码块结束
|
|
14544
|
+
state = States.text;
|
|
14545
|
+
source = source.slice(1);
|
|
14546
|
+
} else if (char === "\\") {
|
|
14547
|
+
// 遇到转义符,跳过下一个字符
|
|
14548
|
+
source = source.slice(2);
|
|
14549
|
+
} else {
|
|
14550
|
+
// 其他情况,直接消费当前字符
|
|
14551
|
+
source = source.slice(1);
|
|
14552
|
+
}
|
|
14553
|
+
break;
|
|
14554
|
+
case States.codeStartBig:
|
|
14555
|
+
if (/^\n```/.test(source)) {
|
|
14556
|
+
// 遇到第二个 ```,表示代码块结束
|
|
14557
|
+
state = States.text;
|
|
14558
|
+
source = source.replace(/^\n```/, "");
|
|
14559
|
+
} else {
|
|
14560
|
+
// 其他情况,直接消费当前字符
|
|
14561
|
+
source = source.slice(1);
|
|
16482
14562
|
}
|
|
14563
|
+
break;
|
|
16483
14564
|
}
|
|
14565
|
+
}
|
|
14566
|
+
return state !== States.text;
|
|
16484
14567
|
}
|
|
16485
|
-
|
|
16486
|
-
|
|
16487
|
-
|
|
16488
|
-
|
|
16489
|
-
|
|
16490
|
-
|
|
16491
|
-
|
|
16492
|
-
|
|
16493
|
-
|
|
16494
|
-
|
|
16495
|
-
|
|
16496
|
-
|
|
16497
|
-
|
|
16498
|
-
|
|
16499
|
-
|
|
16500
|
-
};
|
|
14568
|
+
/* harmony default export */ var mdInCode = (isInCode);
|
|
14569
|
+
// EXTERNAL MODULE: ./node_modules/vuex/dist/vuex.esm.js
|
|
14570
|
+
var vuex_esm = __webpack_require__("2f62");
|
|
14571
|
+
|
|
14572
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/dialogue/readMd.vue?vue&type=script&lang=js
|
|
14573
|
+
|
|
14574
|
+
|
|
14575
|
+
// 用于判断是否显示光标
|
|
14576
|
+
|
|
14577
|
+
/* harmony default export */ var readMdvue_type_script_lang_js = ({
|
|
14578
|
+
props: {
|
|
14579
|
+
// 输入的 markdown 文本
|
|
14580
|
+
text: {
|
|
14581
|
+
type: String,
|
|
14582
|
+
default: ""
|
|
16501
14583
|
},
|
|
16502
|
-
|
|
16503
|
-
|
|
16504
|
-
|
|
16505
|
-
|
|
16506
|
-
this._loadingIcon = null;
|
|
16507
|
-
// Mark as mounted
|
|
16508
|
-
this.iconMounted = true;
|
|
14584
|
+
// 是否需要显示光标?比如在消息流结束后是不需要显示光标的
|
|
14585
|
+
showCursor: {
|
|
14586
|
+
type: Boolean,
|
|
14587
|
+
default: false
|
|
16509
14588
|
},
|
|
16510
|
-
|
|
16511
|
-
|
|
14589
|
+
speed: {
|
|
14590
|
+
type: Number,
|
|
14591
|
+
default: 100
|
|
16512
14592
|
},
|
|
16513
|
-
|
|
16514
|
-
|
|
16515
|
-
|
|
16516
|
-
this._loadingIcon.abort();
|
|
16517
|
-
this._loadingIcon = null;
|
|
16518
|
-
}
|
|
16519
|
-
},
|
|
16520
|
-
// Get data for icon to render or null
|
|
16521
|
-
getIcon(icon, onload) {
|
|
16522
|
-
// Icon is an object
|
|
16523
|
-
if (typeof icon === 'object' &&
|
|
16524
|
-
icon !== null &&
|
|
16525
|
-
typeof icon.body === 'string') {
|
|
16526
|
-
// Stop loading
|
|
16527
|
-
this._name = '';
|
|
16528
|
-
this.abortLoading();
|
|
16529
|
-
return {
|
|
16530
|
-
data: icon,
|
|
16531
|
-
};
|
|
16532
|
-
}
|
|
16533
|
-
// Invalid icon?
|
|
16534
|
-
let iconName;
|
|
16535
|
-
if (typeof icon !== 'string' ||
|
|
16536
|
-
(iconName = stringToIcon(icon, false, true)) === null) {
|
|
16537
|
-
this.abortLoading();
|
|
16538
|
-
return null;
|
|
16539
|
-
}
|
|
16540
|
-
// Load icon
|
|
16541
|
-
const data = getIconData(iconName);
|
|
16542
|
-
if (!data) {
|
|
16543
|
-
// Icon data is not available
|
|
16544
|
-
if (!this._loadingIcon || this._loadingIcon.name !== icon) {
|
|
16545
|
-
// New icon to load
|
|
16546
|
-
this.abortLoading();
|
|
16547
|
-
this._name = '';
|
|
16548
|
-
if (data !== null) {
|
|
16549
|
-
// Icon was not loaded
|
|
16550
|
-
this._loadingIcon = {
|
|
16551
|
-
name: icon,
|
|
16552
|
-
abort: loadIcons([iconName], () => {
|
|
16553
|
-
this.$forceUpdate();
|
|
16554
|
-
}),
|
|
16555
|
-
};
|
|
16556
|
-
}
|
|
16557
|
-
}
|
|
16558
|
-
return null;
|
|
16559
|
-
}
|
|
16560
|
-
// Icon data is available
|
|
16561
|
-
this.abortLoading();
|
|
16562
|
-
if (this._name !== icon) {
|
|
16563
|
-
this._name = icon;
|
|
16564
|
-
if (onload) {
|
|
16565
|
-
onload(icon);
|
|
16566
|
-
}
|
|
16567
|
-
}
|
|
16568
|
-
// Add classes
|
|
16569
|
-
const classes = ['iconify'];
|
|
16570
|
-
if (iconName.prefix !== '') {
|
|
16571
|
-
classes.push('iconify--' + iconName.prefix);
|
|
16572
|
-
}
|
|
16573
|
-
if (iconName.provider !== '') {
|
|
16574
|
-
classes.push('iconify--' + iconName.provider);
|
|
16575
|
-
}
|
|
16576
|
-
return { data, classes };
|
|
16577
|
-
},
|
|
14593
|
+
isPrinting: {
|
|
14594
|
+
type: Boolean,
|
|
14595
|
+
default: false
|
|
16578
14596
|
},
|
|
16579
|
-
|
|
16580
|
-
|
|
16581
|
-
|
|
16582
|
-
|
|
16583
|
-
|
|
16584
|
-
|
|
16585
|
-
|
|
16586
|
-
|
|
16587
|
-
|
|
16588
|
-
|
|
16589
|
-
|
|
16590
|
-
|
|
16591
|
-
|
|
16592
|
-
|
|
16593
|
-
|
|
16594
|
-
|
|
16595
|
-
|
|
16596
|
-
|
|
16597
|
-
|
|
16598
|
-
|
|
14597
|
+
scrollToBottom: {
|
|
14598
|
+
type: Function,
|
|
14599
|
+
default: () => {}
|
|
14600
|
+
}
|
|
14601
|
+
},
|
|
14602
|
+
data() {
|
|
14603
|
+
return {
|
|
14604
|
+
vHtml: '',
|
|
14605
|
+
isShowCursor: false,
|
|
14606
|
+
printInterval: false
|
|
14607
|
+
};
|
|
14608
|
+
},
|
|
14609
|
+
computed: {
|
|
14610
|
+
...Object(vuex_esm["d" /* mapState */])('copilot', ['searchText', 'sendLonding'])
|
|
14611
|
+
},
|
|
14612
|
+
methods: {
|
|
14613
|
+
...Object(vuex_esm["c" /* mapMutations */])('copilot', ['setSendLonding']),
|
|
14614
|
+
printMessage(message) {
|
|
14615
|
+
let index = 0;
|
|
14616
|
+
// 创建定时器
|
|
14617
|
+
this.printInterval = setInterval(() => {
|
|
14618
|
+
// 逐步的给最终展示 vHtml 添加数据
|
|
14619
|
+
this.vHtml += message[index];
|
|
14620
|
+
this.isShowCursor = this.showCursor && !mdInCode(this.vHtml);
|
|
14621
|
+
// 流式打印索引值 ++
|
|
14622
|
+
index++;
|
|
14623
|
+
this.scrollToBottom();
|
|
14624
|
+
// 达到索引上限,或者截止字段 done ,则终止继续展示数据
|
|
14625
|
+
if (index === message.length || this.sendLonding === false) {
|
|
14626
|
+
// 清除定时器
|
|
14627
|
+
clearInterval(this.printInterval);
|
|
14628
|
+
// 定时器定义字段恢复默认值
|
|
14629
|
+
this.printInterval = null;
|
|
14630
|
+
this.$emit('update:isPrinting', false);
|
|
14631
|
+
this.$emit('printOk');
|
|
14632
|
+
this.setSendLonding(false);
|
|
16599
14633
|
}
|
|
16600
|
-
|
|
16601
|
-
return iconify_render(createElement, props, context, icon.data);
|
|
14634
|
+
}, this.speed); // 每个字符的打印间隔时间,可以调整以控制打印速度
|
|
16602
14635
|
},
|
|
14636
|
+
|
|
14637
|
+
// 计算最终要显示的 html 文本
|
|
14638
|
+
getHtml() {
|
|
14639
|
+
return purify_default.a.sanitize(marked_umd["marked"].parse(this.text));
|
|
14640
|
+
}
|
|
14641
|
+
},
|
|
14642
|
+
mounted() {
|
|
14643
|
+
this.scrollToBottom(true);
|
|
14644
|
+
if (this.isPrinting) {
|
|
14645
|
+
this.printMessage(this.getHtml());
|
|
14646
|
+
} else {
|
|
14647
|
+
this.vHtml = this.getHtml();
|
|
14648
|
+
this.$emit("printOk");
|
|
14649
|
+
}
|
|
14650
|
+
}
|
|
16603
14651
|
});
|
|
16604
|
-
|
|
16605
|
-
|
|
16606
|
-
|
|
16607
|
-
|
|
16608
|
-
getAPIConfig,
|
|
16609
|
-
setAPIModule,
|
|
16610
|
-
sendAPIQuery,
|
|
16611
|
-
setFetch,
|
|
16612
|
-
getFetch,
|
|
16613
|
-
listAPIProviders,
|
|
16614
|
-
};
|
|
14652
|
+
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/readMd.vue?vue&type=script&lang=js
|
|
14653
|
+
/* harmony default export */ var dialogue_readMdvue_type_script_lang_js = (readMdvue_type_script_lang_js);
|
|
14654
|
+
// EXTERNAL MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/readMd.vue?vue&type=style&index=0&id=d47f3aee&prod&lang=scss&scoped=true
|
|
14655
|
+
var readMdvue_type_style_index_0_id_d47f3aee_prod_lang_scss_scoped_true = __webpack_require__("e9a9");
|
|
16615
14656
|
|
|
14657
|
+
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
|
|
14658
|
+
var componentNormalizer = __webpack_require__("2877");
|
|
16616
14659
|
|
|
14660
|
+
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/readMd.vue
|
|
16617
14661
|
|
|
16618
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/dialogue/index.vue?vue&type=script&lang=js
|
|
16619
14662
|
|
|
16620
14663
|
|
|
16621
14664
|
|
|
16622
14665
|
|
|
16623
14666
|
|
|
14667
|
+
/* normalize component */
|
|
14668
|
+
|
|
14669
|
+
var component = Object(componentNormalizer["a" /* default */])(
|
|
14670
|
+
dialogue_readMdvue_type_script_lang_js,
|
|
14671
|
+
readMdvue_type_template_id_d47f3aee_scoped_true_render,
|
|
14672
|
+
readMdvue_type_template_id_d47f3aee_scoped_true_staticRenderFns,
|
|
14673
|
+
false,
|
|
14674
|
+
null,
|
|
14675
|
+
"d47f3aee",
|
|
14676
|
+
null
|
|
14677
|
+
|
|
14678
|
+
)
|
|
14679
|
+
|
|
14680
|
+
/* harmony default export */ var readMd = (component.exports);
|
|
14681
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/CopiContent/UserHead.vue?vue&type=template&id=011b9031&scoped=true
|
|
14682
|
+
var UserHeadvue_type_template_id_011b9031_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"user"},[_c('div',{staticClass:"icon header-avatar rounded-full"},[_c('svg',{attrs:{"viewBox":"0 0 24 24","xmlns":"http://www.w3.org/2000/svg"}},[_c('path',{attrs:{"d":"M17.755 14a2.249 2.249 0 0 1 2.248 2.25v.918a2.75 2.75 0 0 1-.512 1.598c-1.546 2.164-4.07 3.235-7.49 3.235-3.422 0-5.945-1.072-7.487-3.236a2.75 2.75 0 0 1-.51-1.596v-.92A2.249 2.249 0 0 1 6.253 14h11.502ZM12 2.005a5 5 0 1 1 0 10 5 5 0 0 1 0-10Z"}})])]),_c('div',{staticClass:"head-label"},[_vm._v("你")])])
|
|
14683
|
+
}
|
|
14684
|
+
var UserHeadvue_type_template_id_011b9031_scoped_true_staticRenderFns = []
|
|
14685
|
+
|
|
14686
|
+
|
|
14687
|
+
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/UserHead.vue?vue&type=template&id=011b9031&scoped=true
|
|
14688
|
+
|
|
14689
|
+
// EXTERNAL MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/UserHead.vue?vue&type=style&index=0&id=011b9031&prod&scoped=true&lang=scss
|
|
14690
|
+
var UserHeadvue_type_style_index_0_id_011b9031_prod_scoped_true_lang_scss = __webpack_require__("f6da");
|
|
14691
|
+
|
|
14692
|
+
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/UserHead.vue
|
|
14693
|
+
|
|
14694
|
+
var script = {}
|
|
14695
|
+
|
|
14696
|
+
|
|
14697
|
+
|
|
14698
|
+
/* normalize component */
|
|
14699
|
+
|
|
14700
|
+
var UserHead_component = Object(componentNormalizer["a" /* default */])(
|
|
14701
|
+
script,
|
|
14702
|
+
UserHeadvue_type_template_id_011b9031_scoped_true_render,
|
|
14703
|
+
UserHeadvue_type_template_id_011b9031_scoped_true_staticRenderFns,
|
|
14704
|
+
false,
|
|
14705
|
+
null,
|
|
14706
|
+
"011b9031",
|
|
14707
|
+
null
|
|
14708
|
+
|
|
14709
|
+
)
|
|
14710
|
+
|
|
14711
|
+
/* harmony default export */ var UserHead = (UserHead_component.exports);
|
|
14712
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/CopiContent/AnswerHead.vue?vue&type=template&id=9ecf6db6&scoped=true
|
|
14713
|
+
var AnswerHeadvue_type_template_id_9ecf6db6_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"answer"},[_c('div',{staticClass:"icon"},[_c('svg',{attrs:{"viewBox":"0 0 48 48","fill":"none","xmlns":"http://www.w3.org/2000/svg"}},[_c('g',{attrs:{"clip-path":"url(#clip0_3984_10372)"}},[_c('path',{attrs:{"d":"M35.1201 6.46024C34.4524 4.39741 32.5312 3 30.363 3L28.7093 3C26.2926 3 24.2217 4.72855 23.7898 7.10639L21.448 19.9984L22.1587 17.5866C22.7854 15.46 24.7377 14 26.9548 14H35.2947L38.8884 15.7857L42.3527 14H41.1975C39.0293 14 37.1082 12.6026 36.4405 10.5398L35.1201 6.46024Z","fill":"url(#paint0_radial_3984_10372)"}}),_c('path',{attrs:{"d":"M13.3948 41.5178C14.0556 43.5918 15.9822 45 18.1589 45H21.397C24.1428 45 26.3748 42.7858 26.3968 40.0401L26.4921 28.1641L25.8179 30.428C25.1866 32.5478 23.2377 34.0009 21.0259 34.0009L12.623 34.0009L9.54267 31.9459L6.20776 34.0009H7.34528C9.52197 34.0009 11.4486 35.4091 12.1093 37.4831L13.3948 41.5178Z","fill":"url(#paint1_radial_3984_10372)"}}),_c('path',{attrs:{"d":"M30 3H12.5C7.49997 3 4.49997 9.5 2.49997 16C0.13049 23.7008 -2.97003 34 5.99997 34H13.6122C15.8393 34 17.7964 32.5325 18.4179 30.394C19.7318 25.8726 22.0338 17.9871 23.8421 11.9841C24.7611 8.93305 25.5266 6.31272 26.7015 4.68095C27.3602 3.76611 28.458 3 30 3Z","fill":"url(#paint2_linear_3984_10372)"}}),_c('path',{attrs:{"d":"M30 3H12.5C7.49997 3 4.49997 9.5 2.49997 16C0.13049 23.7008 -2.97003 34 5.99997 34H13.6122C15.8393 34 17.7964 32.5325 18.4179 30.394C19.7318 25.8726 22.0338 17.9871 23.8421 11.9841C24.7611 8.93305 25.5266 6.31272 26.7015 4.68095C27.3602 3.76611 28.458 3 30 3Z","fill":"url(#paint3_linear_3984_10372)"}}),_c('path',{attrs:{"d":"M17.9963 45H35.4963C40.4963 45 43.4963 38.5 45.4963 32C47.8658 24.2992 50.9663 14 41.9963 14H34.3841C32.157 14 30.1999 15.4675 29.5784 17.606C28.2645 22.1274 25.9625 30.0129 24.1543 36.0159C23.2352 39.0669 22.4697 41.6873 21.2948 43.319C20.6361 44.2339 19.5383 45 17.9963 45Z","fill":"url(#paint4_radial_3984_10372)"}}),_c('path',{attrs:{"d":"M17.9963 45H35.4963C40.4963 45 43.4963 38.5 45.4963 32C47.8658 24.2992 50.9663 14 41.9963 14H34.3841C32.157 14 30.1999 15.4675 29.5784 17.606C28.2645 22.1274 25.9625 30.0129 24.1543 36.0159C23.2352 39.0669 22.4697 41.6873 21.2948 43.319C20.6361 44.2339 19.5383 45 17.9963 45Z","fill":"url(#paint5_linear_3984_10372)"}})]),_c('defs',[_c('radialGradient',{attrs:{"id":"paint0_radial_3984_10372","cx":"0","cy":"0","r":"1","gradientUnits":"userSpaceOnUse","gradientTransform":"translate(39.3087 20.1095) rotate(-130.498) scale(18.242 17.2825)"}},[_c('stop',{attrs:{"offset":"0.0955758","stop-color":"#00AEFF"}}),_c('stop',{attrs:{"offset":"0.773185","stop-color":"#2253CE"}}),_c('stop',{attrs:{"offset":"1","stop-color":"#0736C4"}})],1),_c('radialGradient',{attrs:{"id":"paint1_radial_3984_10372","cx":"0","cy":"0","r":"1","gradientUnits":"userSpaceOnUse","gradientTransform":"translate(9.88779 33.7078) rotate(50.1259) scale(16.5438 16.2528)"}},[_c('stop',{attrs:{"stop-color":"#FFB657"}}),_c('stop',{attrs:{"offset":"0.633728","stop-color":"#FF5F3D"}}),_c('stop',{attrs:{"offset":"0.923392","stop-color":"#C02B3C"}})],1),_c('linearGradient',{attrs:{"id":"paint2_linear_3984_10372","x1":"11.4526","y1":"6.75624","x2":"13.8689","y2":"35.1765","gradientUnits":"userSpaceOnUse"}},[_c('stop',{attrs:{"offset":"0.156162","stop-color":"#0D91E1"}}),_c('stop',{attrs:{"offset":"0.487484","stop-color":"#52B471"}}),_c('stop',{attrs:{"offset":"0.652394","stop-color":"#98BD42"}}),_c('stop',{attrs:{"offset":"0.937361","stop-color":"#FFC800"}})],1),_c('linearGradient',{attrs:{"id":"paint3_linear_3984_10372","x1":"13.6347","y1":"3","x2":"14.954","y2":"34.0019","gradientUnits":"userSpaceOnUse"}},[_c('stop',{attrs:{"stop-color":"#3DCBFF"}}),_c('stop',{attrs:{"offset":"0.246674","stop-color":"#0588F7","stop-opacity":"0"}})],1),_c('radialGradient',{attrs:{"id":"paint4_radial_3984_10372","cx":"0","cy":"0","r":"1","gradientUnits":"userSpaceOnUse","gradientTransform":"translate(42.8953 10.9649) rotate(109.574) scale(41.2667 50.0822)"}},[_c('stop',{attrs:{"offset":"0.0661714","stop-color":"#8C48FF"}}),_c('stop',{attrs:{"offset":"0.5","stop-color":"#F2598A"}}),_c('stop',{attrs:{"offset":"0.895833","stop-color":"#FFB152"}})],1),_c('linearGradient',{attrs:{"id":"paint5_linear_3984_10372","x1":"44.2778","y1":"12.1074","x2":"44.2606","y2":"20.5507","gradientUnits":"userSpaceOnUse"}},[_c('stop',{attrs:{"offset":"0.0581535","stop-color":"#F8ADFA"}}),_c('stop',{attrs:{"offset":"0.708063","stop-color":"#A86EDD","stop-opacity":"0"}})],1),_c('clipPath',{attrs:{"id":"clip0_3984_10372"}},[_c('rect',{attrs:{"width":"48","height":"48","fill":"white"}})])],1)])]),_c('div',{staticClass:"head-label"},[_vm._v("Copilot")])])
|
|
14714
|
+
}
|
|
14715
|
+
var AnswerHeadvue_type_template_id_9ecf6db6_scoped_true_staticRenderFns = []
|
|
14716
|
+
|
|
14717
|
+
|
|
14718
|
+
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/AnswerHead.vue?vue&type=template&id=9ecf6db6&scoped=true
|
|
14719
|
+
|
|
14720
|
+
// EXTERNAL MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/AnswerHead.vue?vue&type=style&index=0&id=9ecf6db6&prod&scoped=true&lang=scss
|
|
14721
|
+
var AnswerHeadvue_type_style_index_0_id_9ecf6db6_prod_scoped_true_lang_scss = __webpack_require__("605a");
|
|
14722
|
+
|
|
14723
|
+
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiContent/AnswerHead.vue
|
|
14724
|
+
|
|
14725
|
+
var AnswerHead_script = {}
|
|
14726
|
+
|
|
14727
|
+
|
|
14728
|
+
|
|
14729
|
+
/* normalize component */
|
|
14730
|
+
|
|
14731
|
+
var AnswerHead_component = Object(componentNormalizer["a" /* default */])(
|
|
14732
|
+
AnswerHead_script,
|
|
14733
|
+
AnswerHeadvue_type_template_id_9ecf6db6_scoped_true_render,
|
|
14734
|
+
AnswerHeadvue_type_template_id_9ecf6db6_scoped_true_staticRenderFns,
|
|
14735
|
+
false,
|
|
14736
|
+
null,
|
|
14737
|
+
"9ecf6db6",
|
|
14738
|
+
null
|
|
14739
|
+
|
|
14740
|
+
)
|
|
16624
14741
|
|
|
14742
|
+
/* harmony default export */ var AnswerHead = (AnswerHead_component.exports);
|
|
14743
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/dialogue/index.vue?vue&type=script&lang=js
|
|
16625
14744
|
|
|
16626
14745
|
|
|
16627
14746
|
|
|
14747
|
+
// import copySimple from "@iconify-icons/ph/copy-simple";
|
|
14748
|
+
// import speaker from "@iconify-icons/ph/speaker-high-light";
|
|
14749
|
+
// import thumbsUp from "@iconify-icons/ph/thumbs-up-thin";
|
|
14750
|
+
// import thumbsDown from "@iconify-icons/ph/thumbs-down-thin";
|
|
14751
|
+
// import downloadLine from "@iconify-icons/ri/download-line";
|
|
14752
|
+
// import warningBold from "@iconify-icons/ph/warning-bold";
|
|
14753
|
+
// import { Icon } from '@iconify/vue2';
|
|
16628
14754
|
|
|
16629
14755
|
|
|
16630
14756
|
/* harmony default export */ var dialoguevue_type_script_lang_js = ({
|
|
16631
14757
|
components: {
|
|
16632
14758
|
readMd: readMd,
|
|
16633
14759
|
UserHead: UserHead,
|
|
16634
|
-
AnswerHead: AnswerHead
|
|
16635
|
-
|
|
14760
|
+
AnswerHead: AnswerHead
|
|
14761
|
+
// Icon
|
|
16636
14762
|
},
|
|
14763
|
+
|
|
16637
14764
|
computed: {
|
|
16638
14765
|
...Object(vuex_esm["d" /* mapState */])('copilot', ['stopDialogue', 'msgList'])
|
|
16639
14766
|
},
|
|
16640
14767
|
data() {
|
|
16641
14768
|
return {
|
|
16642
|
-
copySimple
|
|
16643
|
-
speaker
|
|
16644
|
-
thumbsUp
|
|
16645
|
-
thumbsDown
|
|
16646
|
-
downloadLine
|
|
16647
|
-
warningBold
|
|
14769
|
+
// copySimple,
|
|
14770
|
+
// speaker,
|
|
14771
|
+
// thumbsUp,
|
|
14772
|
+
// thumbsDown,
|
|
14773
|
+
// downloadLine,
|
|
14774
|
+
// warningBold
|
|
16648
14775
|
};
|
|
16649
14776
|
},
|
|
16650
14777
|
methods: {
|
|
@@ -16655,6 +14782,7 @@ const _api = {
|
|
|
16655
14782
|
},
|
|
16656
14783
|
scrollToBottom(force = false) {
|
|
16657
14784
|
const messageBox = this.$refs.messageBox;
|
|
14785
|
+
if (!messageBox) return;
|
|
16658
14786
|
if (force) {
|
|
16659
14787
|
messageBox.scrollTop = messageBox.scrollHeight;
|
|
16660
14788
|
return;
|
|
@@ -16667,8 +14795,8 @@ const _api = {
|
|
|
16667
14795
|
});
|
|
16668
14796
|
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/index.vue?vue&type=script&lang=js
|
|
16669
14797
|
/* harmony default export */ var KgCopilot_dialoguevue_type_script_lang_js = (dialoguevue_type_script_lang_js);
|
|
16670
|
-
// EXTERNAL MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/index.vue?vue&type=style&index=0&id=
|
|
16671
|
-
var
|
|
14798
|
+
// EXTERNAL MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/index.vue?vue&type=style&index=0&id=1bc2ea35&prod&scoped=true&lang=scss
|
|
14799
|
+
var dialoguevue_type_style_index_0_id_1bc2ea35_prod_scoped_true_lang_scss = __webpack_require__("9d25");
|
|
16672
14800
|
|
|
16673
14801
|
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/dialogue/index.vue
|
|
16674
14802
|
|
|
@@ -16681,17 +14809,17 @@ var dialoguevue_type_style_index_0_id_34353152_prod_scoped_true_lang_scss = __we
|
|
|
16681
14809
|
|
|
16682
14810
|
var dialogue_component = Object(componentNormalizer["a" /* default */])(
|
|
16683
14811
|
KgCopilot_dialoguevue_type_script_lang_js,
|
|
16684
|
-
|
|
16685
|
-
|
|
14812
|
+
dialoguevue_type_template_id_1bc2ea35_scoped_true_render,
|
|
14813
|
+
dialoguevue_type_template_id_1bc2ea35_scoped_true_staticRenderFns,
|
|
16686
14814
|
false,
|
|
16687
14815
|
null,
|
|
16688
|
-
"
|
|
14816
|
+
"1bc2ea35",
|
|
16689
14817
|
null
|
|
16690
14818
|
|
|
16691
14819
|
)
|
|
16692
14820
|
|
|
16693
14821
|
/* harmony default export */ var dialogue = (dialogue_component.exports);
|
|
16694
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
14822
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/CopiFooter/index.vue?vue&type=template&id=01034c3a&scoped=true
|
|
16695
14823
|
var CopiFootervue_type_template_id_01034c3a_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('div',{staticClass:"copilot-footer"},[_c('div',{staticClass:"root"},[_c('NewTheme'),_c('SearchInput')],1)])
|
|
16696
14824
|
}
|
|
16697
14825
|
var CopiFootervue_type_template_id_01034c3a_scoped_true_staticRenderFns = []
|
|
@@ -16699,7 +14827,11 @@ var CopiFootervue_type_template_id_01034c3a_scoped_true_staticRenderFns = []
|
|
|
16699
14827
|
|
|
16700
14828
|
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiFooter/index.vue?vue&type=template&id=01034c3a&scoped=true
|
|
16701
14829
|
|
|
16702
|
-
//
|
|
14830
|
+
// EXTERNAL MODULE: external {"commonjs":"vue","commonjs2":"vue","root":"Vue"}
|
|
14831
|
+
var external_commonjs_vue_commonjs2_vue_root_Vue_ = __webpack_require__("8bbf");
|
|
14832
|
+
var external_commonjs_vue_commonjs2_vue_root_Vue_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_vue_commonjs2_vue_root_Vue_);
|
|
14833
|
+
|
|
14834
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/CopiFooter/components/NewTheme.vue?vue&type=template&id=ba86e06e&scoped=true
|
|
16703
14835
|
var NewThemevue_type_template_id_ba86e06e_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"outside-left-container"},[_c('button',{staticClass:"button-compose",style:({ width: _vm.newthemeWidth + 'px' }),attrs:{"type":"button","aria-label":"新主题"},on:{"mouseenter":_vm.mouseEnterBtn,"mouseleave":_vm.mouseLeaveBtn,"click":_vm.getNewTheme}},[_c('div',{staticClass:"button-compose-content"},[_c('div',{staticClass:"button-compose-icon"},[_c('svg',{staticClass:"button-compose-icon",attrs:{"width":"24","viewBox":"0 0 24 24","xmlns":"http://www.w3.org/2000/svg"}},[_c('path',{attrs:{"fill":"#fff","d":"M12 2C17.5228 2 22 6.47715 22 12C22 12.2628 21.9899 12.5232 21.97 12.7809C21.5319 12.3658 21.0361 12.0111 20.4958 11.73C20.3532 7.16054 16.6041 3.5 12 3.5C7.30558 3.5 3.5 7.30558 3.5 12C3.5 13.4696 3.87277 14.8834 4.57303 16.1375L4.72368 16.4072L3.61096 20.3914L7.59755 19.2792L7.86709 19.4295C9.04305 20.0852 10.3592 20.4531 11.73 20.4958C12.0111 21.0361 12.3658 21.5319 12.7809 21.97C12.5232 21.9899 12.2628 22 12 22C10.3817 22 8.81782 21.6146 7.41286 20.888L3.58704 21.9553C2.92212 22.141 2.23258 21.7525 2.04691 21.0876C1.98546 20.8676 1.98549 20.6349 2.04695 20.4151L3.11461 16.5922C2.38637 15.186 2 13.6203 2 12C2 6.47715 6.47715 2 12 2ZM23 17.5C23 14.4624 20.5376 12 17.5 12C14.4624 12 12 14.4624 12 17.5C12 20.5376 14.4624 23 17.5 23C20.5376 23 23 20.5376 23 17.5ZM18.0006 18L18.0011 20.5035C18.0011 20.7797 17.7773 21.0035 17.5011 21.0035C17.225 21.0035 17.0011 20.7797 17.0011 20.5035L17.0006 18H14.4956C14.2197 18 13.9961 17.7762 13.9961 17.5C13.9961 17.2239 14.2197 17 14.4956 17H17.0005L17 14.4993C17 14.2231 17.2239 13.9993 17.5 13.9993C17.7761 13.9993 18 14.2231 18 14.4993L18.0005 17H20.4966C20.7725 17 20.9961 17.2239 20.9961 17.5C20.9961 17.7762 20.7725 18 20.4966 18H18.0006Z"}})])]),_c('div',{staticClass:"button-compose-text"},[_vm._v("新主题")])])])])
|
|
16704
14836
|
}
|
|
16705
14837
|
var NewThemevue_type_template_id_ba86e06e_scoped_true_staticRenderFns = []
|
|
@@ -16767,7 +14899,7 @@ var NewTheme_component = Object(componentNormalizer["a" /* default */])(
|
|
|
16767
14899
|
)
|
|
16768
14900
|
|
|
16769
14901
|
/* harmony default export */ var NewTheme = (NewTheme_component.exports);
|
|
16770
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
14902
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/CopiFooter/components/SearchInput/index.vue?vue&type=template&id=318e5968&scoped=true
|
|
16771
14903
|
var SearchInputvue_type_template_id_318e5968_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"input-container"},[_c('SelectPlugin'),(_vm.sendLonding)?_c('button',{staticClass:"stop-responding-button",on:{"click":_vm.handleClickStopBtn}},[_c('div',{staticClass:"stop-icon"}),_c('span',[_vm._v("停止响应")])]):_vm._e(),_c('SelectPluginByKey',{attrs:{"isShowSelect":_vm.isShowSelect},on:{"close":_vm.closeSelection,"deleteText":_vm.deleteText}}),(_vm.checkedPluginBykey)?_c('div',{staticClass:"plugin-town"},[_vm._v(" "+_vm._s(_vm.checkedPluginBykey)+" "),_c('div',{staticClass:"close-plugin",on:{"click":_vm.deletePlugin}},[_c('i',{staticClass:"el-icon-close"})])]):_vm._e(),_c('div',{staticClass:"input-row"},[_c('div',{ref:"coptInput",staticClass:"text-area",attrs:{"contenteditable":true,"placeholder":"有问题请尽管问我。。。"},on:{"input":_vm.myInput,"keydown":[function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter"))return null;return _vm.send.apply(null, arguments)},_vm.handleKeyDown]}})]),_c('div',{staticClass:"bottom-controls"},[_c('div',{staticClass:"bottom-left-controls"}),_c('div',{staticClass:"bottom-right-controls"},[_c('span',{staticClass:"text-sum"},[_c('span',[_vm._v(_vm._s(_vm.textLength))]),_vm._v("/2000")]),_c('button',{staticClass:"send-button",on:{"click":_vm.send}},[_c('i',{staticClass:"el-icon-s-promotion",class:['icon'],style:({ color: _vm.textLength && !_vm.sendLonding ? '#1e56ea' : '#dbdbdb' })})])])]),(_vm.stopDialogue)?_c('div',{staticClass:"disable",attrs:{"click.stop":""}}):_vm._e()],1)
|
|
16772
14904
|
}
|
|
16773
14905
|
var SearchInputvue_type_template_id_318e5968_scoped_true_staticRenderFns = []
|
|
@@ -16775,7 +14907,7 @@ var SearchInputvue_type_template_id_318e5968_scoped_true_staticRenderFns = []
|
|
|
16775
14907
|
|
|
16776
14908
|
// CONCATENATED MODULE: ./packages/know_ui_v2/components/KgCopilot/CopiFooter/components/SearchInput/index.vue?vue&type=template&id=318e5968&scoped=true
|
|
16777
14909
|
|
|
16778
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
14910
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/CopiFooter/components/SearchInput/SelectPlugin.vue?vue&type=template&id=35b53b6b&scoped=true
|
|
16779
14911
|
var SelectPluginvue_type_template_id_35b53b6b_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"select-plugin-box"},[(!_vm.sendLonding)?_c('button',{staticClass:"select-button",on:{"click":function($event){$event.stopPropagation();return _vm.selectPlugin.apply(null, arguments)}}},[_vm._v(" 选择插件 "),_c('i',{staticClass:"el-icon-circle-plus-outline",class:['plusicon', _vm.isShowSelection && 'rotated']})]):_vm._e(),(_vm.isShowSelection)?_c('div',{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:(_vm.onClickOutside),expression:"onClickOutside"}],staticClass:"selection"},[_c('div',{staticClass:"input-container"},[_c('input',{staticClass:"select-input",attrs:{"type":"text","placeholder":"请输入插件名"},on:{"input":_vm.searchPlugin}})]),_c('div',{staticClass:"plugin-content"},_vm._l((_vm.selectPluginList),function(plugin,index){return _c('div',{key:index,staticClass:"plugin-item",on:{"click":function($event){return _vm.choosePlugin(plugin)}}},[_c('span',[_vm._v(_vm._s(plugin))]),_c('div',{staticClass:"select-radio",class:[_vm.checkedPluginByBtn.includes(plugin) && 'active-radio']},[_c('i',{staticClass:"el-icon-check",class:['checkicon']})])])}),0)]):_vm._e()])
|
|
16780
14912
|
}
|
|
16781
14913
|
var SelectPluginvue_type_template_id_35b53b6b_scoped_true_staticRenderFns = []
|
|
@@ -17169,7 +15301,7 @@ var SelectPlugin_component = Object(componentNormalizer["a" /* default */])(
|
|
|
17169
15301
|
)
|
|
17170
15302
|
|
|
17171
15303
|
/* harmony default export */ var SelectPlugin = (SelectPlugin_component.exports);
|
|
17172
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
15304
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/KgCopilot/CopiFooter/components/SearchInput/SelectPluginByKey.vue?vue&type=template&id=661b00ed&scoped=true
|
|
17173
15305
|
var SelectPluginByKeyvue_type_template_id_661b00ed_scoped_true_render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.isShowSelect)?_c('div',{directives:[{name:"clickoutside",rawName:"v-clickoutside",value:(_vm.onClickOutside),expression:"onClickOutside"}],staticClass:"selection"},[_c('div',{staticClass:"input-container"},[_c('input',{staticClass:"select-input",attrs:{"type":"text","placeholder":"请输入插件名"},on:{"input":_vm.searchPlugin}})]),_c('div',{staticClass:"plugin-content"},_vm._l((_vm.selectPluginList),function(plugin,index){return _c('div',{key:index,staticClass:"plugin-item",on:{"click":function($event){return _vm.choosePlugin(plugin)}}},[_c('span',[_vm._v(_vm._s(plugin))])])}),0)]):_vm._e()
|
|
17174
15306
|
}
|
|
17175
15307
|
var SelectPluginByKeyvue_type_template_id_661b00ed_scoped_true_staticRenderFns = []
|
|
@@ -17495,6 +15627,17 @@ var main_component = Object(componentNormalizer["a" /* default */])(
|
|
|
17495
15627
|
|
|
17496
15628
|
/* harmony default export */ var main = __webpack_exports__["default"] = (main_component.exports);
|
|
17497
15629
|
|
|
15630
|
+
/***/ }),
|
|
15631
|
+
|
|
15632
|
+
/***/ "9d25":
|
|
15633
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
15634
|
+
|
|
15635
|
+
"use strict";
|
|
15636
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_1bc2ea35_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("dd23");
|
|
15637
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_1bc2ea35_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_1bc2ea35_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
|
|
15638
|
+
/* unused harmony reexport * */
|
|
15639
|
+
|
|
15640
|
+
|
|
17498
15641
|
/***/ }),
|
|
17499
15642
|
|
|
17500
15643
|
/***/ "9d5e":
|
|
@@ -18222,17 +16365,6 @@ module.exports = function (O, options) {
|
|
|
18222
16365
|
};
|
|
18223
16366
|
|
|
18224
16367
|
|
|
18225
|
-
/***/ }),
|
|
18226
|
-
|
|
18227
|
-
/***/ "ab77":
|
|
18228
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
18229
|
-
|
|
18230
|
-
"use strict";
|
|
18231
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_34353152_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("d1f1");
|
|
18232
|
-
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_34353152_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_index_vue_vue_type_style_index_0_id_34353152_prod_scoped_true_lang_scss__WEBPACK_IMPORTED_MODULE_0__);
|
|
18233
|
-
/* unused harmony reexport * */
|
|
18234
|
-
|
|
18235
|
-
|
|
18236
16368
|
/***/ }),
|
|
18237
16369
|
|
|
18238
16370
|
/***/ "aeb0":
|
|
@@ -19168,7 +17300,7 @@ module.exports = typescript;
|
|
|
19168
17300
|
// ESM COMPAT FLAG
|
|
19169
17301
|
__webpack_require__.r(__webpack_exports__);
|
|
19170
17302
|
|
|
19171
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
17303
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./packages/know_ui_v2/components/TimePicker/main.vue?vue&type=template&id=0a74c46e&scoped=true
|
|
19172
17304
|
var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"k-time-picker"},[_c('el-dropdown',{attrs:{"trigger":"click","hide-on-click":false},on:{"command":_vm.command,"visible-change":_vm.visibleChange}},[_c('span',{attrs:{"title":_vm.languages['releaseTime'] + ':' + _vm.timeTitleResult}},[_c('span',[_vm._v(_vm._s(_vm.timeTitleResult))]),_c('i',{directives:[{name:"show",rawName:"v-show",value:(!_vm.dropDownVisible),expression:"!dropDownVisible"}],staticClass:"el-icon-arrow-down el-icon--right"}),_c('i',{directives:[{name:"show",rawName:"v-show",value:(_vm.dropDownVisible),expression:"dropDownVisible"}],staticClass:"el-icon-arrow-up el-icon--right"})]),_c('el-dropdown-menu',{staticClass:"dedup-dropdown",attrs:{"slot":"dropdown"},slot:"dropdown"},[_vm._l((_vm.pureTimeTypeList),function(item){return _c('el-dropdown-item',{key:item,attrs:{"command":item}},[_c('el-radio',{attrs:{"label":item},model:{value:(_vm.currentTimeType),callback:function ($$v) {_vm.currentTimeType=$$v},expression:"currentTimeType"}},[_vm._v(" "+_vm._s(_vm.languages[item])+" ")])],1)}),_c('div',{staticClass:"custom_redio"},[_c('el-radio',{attrs:{"label":_vm.customType},model:{value:(_vm.currentTimeType),callback:function ($$v) {_vm.currentTimeType=$$v},expression:"currentTimeType"}},[_vm._v(" "+_vm._s(_vm.languages['custom'])+" ")])],1),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.currentTimeType === _vm.customType),expression:"currentTimeType === customType"}],staticClass:"datepicker_area"},[_c('div',{staticClass:"back_now"},[_c('span',{on:{"click":_vm.datepickerBackNow}},[_c('i',{staticClass:"el-icon-refresh-right"}),_vm._v(" "+_vm._s(_vm.languages['backNow'])+" ")])]),_c('vue-datepicker-local',{attrs:{"clearable":false,"range-separator":"至","format":"YYYY-MM-DD HH:mm:ss"},on:{"confirm":_vm.getCustomerTime,"input":_vm.getCustomerTime},model:{value:(_vm.range),callback:function ($$v) {_vm.range=$$v},expression:"range"}})],1)],2)],1)],1)
|
|
19173
17305
|
}
|
|
19174
17306
|
var staticRenderFns = []
|
|
@@ -19179,7 +17311,7 @@ var staticRenderFns = []
|
|
|
19179
17311
|
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.error.cause.js
|
|
19180
17312
|
var es_error_cause = __webpack_require__("d9e2");
|
|
19181
17313
|
|
|
19182
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
17314
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/vue-datepicker-local/src/VueDatepickerLocal.vue?vue&type=template&id=48749f78
|
|
19183
17315
|
var VueDatepickerLocalvue_type_template_id_48749f78_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:"datepicker",class:{'datepicker-range':_vm.range,'datepicker__clearable':_vm.clearable&&_vm.text&&!_vm.disabled}},[(_vm.type!=='inline')?_c('input',{class:[_vm.show ? 'focus' : '', _vm.inputClass],attrs:{"readonly":"","disabled":_vm.disabled,"placeholder":_vm.placeholder,"name":_vm.name},domProps:{"value":_vm.text}}):_vm._e(),_c('a',{staticClass:"datepicker-close",on:{"click":function($event){$event.stopPropagation();return _vm.cls.apply(null, arguments)}}}),_c('transition',{attrs:{"name":"datepicker-anim"}},[(_vm.show||_vm.type==='inline')?_c('div',{staticClass:"datepicker-popup",class:[_vm.popupClass,{'datepicker-inline':_vm.type==='inline'}],attrs:{"tabindex":"-1"}},[(_vm.range)?[_c('vue-datepicker-local-calendar',{attrs:{"left":true},model:{value:(_vm.dates[0]),callback:function ($$v) {_vm.$set(_vm.dates, 0, $$v)},expression:"dates[0]"}}),_c('vue-datepicker-local-calendar',{attrs:{"right":true},model:{value:(_vm.dates[1]),callback:function ($$v) {_vm.$set(_vm.dates, 1, $$v)},expression:"dates[1]"}})]:[_c('vue-datepicker-local-calendar',{model:{value:(_vm.dates[0]),callback:function ($$v) {_vm.$set(_vm.dates, 0, $$v)},expression:"dates[0]"}})],(_vm.showButtons)?_c('div',{staticClass:"datepicker__buttons"},[_c('button',{staticClass:"datepicker__button-cancel",on:{"click":function($event){$event.preventDefault();$event.stopPropagation();return _vm.cancel.apply(null, arguments)}}},[_vm._v(_vm._s(this.local.cancelTip))]),_c('button',{staticClass:"datepicker__button-select",on:{"click":function($event){$event.preventDefault();$event.stopPropagation();return _vm.submit.apply(null, arguments)}}},[_vm._v(_vm._s(this.local.submitTip))])]):_vm._e()],2):_vm._e()])],1)
|
|
19184
17316
|
}
|
|
19185
17317
|
var VueDatepickerLocalvue_type_template_id_48749f78_staticRenderFns = []
|
|
@@ -19187,7 +17319,7 @@ var VueDatepickerLocalvue_type_template_id_48749f78_staticRenderFns = []
|
|
|
19187
17319
|
|
|
19188
17320
|
// CONCATENATED MODULE: ./node_modules/vue-datepicker-local/src/VueDatepickerLocal.vue?vue&type=template&id=48749f78
|
|
19189
17321
|
|
|
19190
|
-
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"
|
|
17322
|
+
// CONCATENATED MODULE: ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"5f0d548b-vue-loader-template"}!./node_modules/vue-loader/lib/loaders/templateLoader.js??ref--5!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader/lib??vue-loader-options!./node_modules/vue-datepicker-local/src/VueDatepickerLocalCalendar.vue?vue&type=template&id=29da1c58
|
|
19191
17323
|
var VueDatepickerLocalCalendarvue_type_template_id_29da1c58_render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{class:`${_vm.pre}`},[_c('div',{class:`${_vm.pre}-head`},[_c('a',{directives:[{name:"show",rawName:"v-show",value:(_vm.showYears),expression:"showYears"}],class:`${_vm.pre}-prev-decade-btn`,on:{"click":function($event){_vm.year-=10}}},[_vm._v("«")]),_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showYears),expression:"!showYears"}],class:`${_vm.pre}-prev-year-btn`,on:{"click":function($event){_vm.year--}}},[_vm._v("«")]),_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showYears&&!_vm.showMonths),expression:"!showYears&&!showMonths"}],class:`${_vm.pre}-prev-month-btn`,on:{"click":_vm.pm}},[_vm._v("‹")]),_c('a',{directives:[{name:"show",rawName:"v-show",value:(_vm.showYears),expression:"showYears"}],class:`${_vm.pre}-year-select`},[_vm._v(_vm._s(_vm.ys+'-'+_vm.ye))]),(_vm.local.yearSuffix)?[_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showYears),expression:"!showYears"}],class:`${_vm.pre}-year-select`,on:{"click":function($event){_vm.showYears=!_vm.showYears}}},[_vm._v(_vm._s(_vm.year)+_vm._s(_vm.local.yearSuffix))]),_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showYears&&!_vm.showMonths),expression:"!showYears&&!showMonths"}],class:`${_vm.pre}-month-select`,on:{"click":function($event){_vm.showMonths=!_vm.showMonths}}},[_vm._v(_vm._s(_vm.local.monthsHead[_vm.month]))])]:[_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showYears&&!_vm.showMonths),expression:"!showYears&&!showMonths"}],class:`${_vm.pre}-month-select`,on:{"click":function($event){_vm.showMonths=!_vm.showMonths}}},[_vm._v(_vm._s(_vm.local.monthsHead[_vm.month]))]),_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showYears),expression:"!showYears"}],class:`${_vm.pre}-year-select`,on:{"click":function($event){_vm.showYears=!_vm.showYears}}},[_vm._v(_vm._s(_vm.year))])],_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showYears&&!_vm.showMonths),expression:"!showYears&&!showMonths"}],class:`${_vm.pre}-next-month-btn`,on:{"click":_vm.nm}},[_vm._v("›")]),_c('a',{directives:[{name:"show",rawName:"v-show",value:(!_vm.showYears),expression:"!showYears"}],class:`${_vm.pre}-next-year-btn`,on:{"click":function($event){_vm.year++}}},[_vm._v("»")]),_c('a',{directives:[{name:"show",rawName:"v-show",value:(_vm.showYears),expression:"showYears"}],class:`${_vm.pre}-next-decade-btn`,on:{"click":function($event){_vm.year+=10}}},[_vm._v("»")])],2),_c('div',{class:`${_vm.pre}-body`},[_c('div',{class:`${_vm.pre}-days`},[_vm._l((_vm.local.weeks),function(i){return _c('a',{key:i,class:`${_vm.pre}-week`},[_vm._v(_vm._s(i))])}),_vm._l((_vm.days),function(j,i){return _c('a',{key:i,class:[(j.p||j.n)?`${_vm.pre}-date-out`:'',_vm.status(j.y,j.m,j.i,_vm.hour,_vm.minute,_vm.second,'YYYYMMDD')],on:{"click":function($event){_vm.is($event)&&(_vm.day=j.i,_vm.ok(j))}}},[_vm._v(_vm._s(j.i))])})],2),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showMonths),expression:"showMonths"}],class:`${_vm.pre}-months`},_vm._l((_vm.local.months),function(i,j){return _c('a',{key:j,class:[_vm.status(_vm.year,j,_vm.day,_vm.hour,_vm.minute,_vm.second,'YYYYMM')],on:{"click":function($event){_vm.is($event)&&(_vm.showMonths=(_vm.m==='M'),_vm.month=j,(_vm.m==='M'&&_vm.ok('m')))}}},[_vm._v(_vm._s(i))])}),0),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showYears),expression:"showYears"}],class:`${_vm.pre}-years`},_vm._l((_vm.years),function(i,j){return _c('a',{key:j,class:[(j===0||j===11)?`${_vm.pre}-date-out`:'',_vm.status(i,_vm.month,_vm.day,_vm.hour,_vm.minute,_vm.second,'YYYY')],on:{"click":function($event){_vm.is($event)&&(_vm.showYears=(_vm.m==='Y'),_vm.year=i,(_vm.m==='Y'&&_vm.ok('y')))}}},[_vm._v(_vm._s(i))])}),0),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showHours),expression:"showHours"}],class:`${_vm.pre}-hours`},[_c('div',{class:`${_vm.pre}-title`},[_vm._v(_vm._s(_vm.local.hourTip))]),_vm._l((24),function(j,i){return _c('a',{key:i,class:[_vm.status(_vm.year,_vm.month,_vm.day,i,_vm.minute,_vm.second,'YYYYMMDDHH')],on:{"click":function($event){_vm.is($event)&&(_vm.showHours=false,_vm.hour=i,_vm.ok('h'))}}},[_vm._v(_vm._s(i))])})],2),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showMinutes),expression:"showMinutes"}],class:`${_vm.pre}-minutes`},[_c('div',{class:`${_vm.pre}-title`},[_vm._v(_vm._s(_vm.local.minuteTip))]),_vm._l((60),function(j,i){return _c('a',{key:i,class:[_vm.status(_vm.year,_vm.month,_vm.day,_vm.hour,i,_vm.second,'YYYYMMDDHHmm')],on:{"click":function($event){_vm.is($event)&&(_vm.showMinutes=false,_vm.minute=i,_vm.ok('h'))}}},[_vm._v(_vm._s(i))])})],2),_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.showSeconds),expression:"showSeconds"}],class:`${_vm.pre}-seconds`},[_c('div',{class:`${_vm.pre}-title`},[_vm._v(_vm._s(_vm.local.secondTip))]),_vm._l((60),function(j,i){return _c('a',{key:i,class:[_vm.status(_vm.year,_vm.month,_vm.day,_vm.hour,_vm.minute,i,'YYYYMMDDHHmmss')],on:{"click":function($event){_vm.is($event)&&(_vm.showSeconds=false,_vm.second=i,_vm.ok('h'))}}},[_vm._v(_vm._s(i))])})],2)]),(_vm.m==='H')?_c('div',{class:`${_vm.pre}-foot`},[_c('div',{class:`${_vm.pre}-hour`},[_c('a',{class:{on:_vm.showHours},attrs:{"title":_vm.local.hourTip},on:{"click":function($event){_vm.showHours=!_vm.showHours,_vm.showMinutes=_vm.showSeconds=false}}},[_vm._v(_vm._s(_vm._f("dd")(_vm.hour)))]),_c('span',[_vm._v(":")]),_c('a',{class:{on:_vm.showMinutes},attrs:{"title":_vm.local.minuteTip},on:{"click":function($event){_vm.showMinutes=!_vm.showMinutes,_vm.showHours=_vm.showSeconds=false}}},[_vm._v(_vm._s(_vm._f("dd")(_vm.minute)))]),_c('span',[_vm._v(":")]),_c('a',{class:{on:_vm.showSeconds},attrs:{"title":_vm.local.secondTip},on:{"click":function($event){_vm.showSeconds=!_vm.showSeconds,_vm.showHours=_vm.showMinutes=false}}},[_vm._v(_vm._s(_vm._f("dd")(_vm.second)))])])]):_vm._e()])
|
|
19192
17324
|
}
|
|
19193
17325
|
var VueDatepickerLocalCalendarvue_type_template_id_29da1c58_staticRenderFns = []
|
|
@@ -23096,13 +21228,6 @@ exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
|
23096
21228
|
} : $propertyIsEnumerable;
|
|
23097
21229
|
|
|
23098
21230
|
|
|
23099
|
-
/***/ }),
|
|
23100
|
-
|
|
23101
|
-
/***/ "d1f1":
|
|
23102
|
-
/***/ (function(module, exports, __webpack_require__) {
|
|
23103
|
-
|
|
23104
|
-
// extracted by mini-css-extract-plugin
|
|
23105
|
-
|
|
23106
21231
|
/***/ }),
|
|
23107
21232
|
|
|
23108
21233
|
/***/ "d248":
|
|
@@ -23423,6 +21548,13 @@ module.exports = function (V, P) {
|
|
|
23423
21548
|
};
|
|
23424
21549
|
|
|
23425
21550
|
|
|
21551
|
+
/***/ }),
|
|
21552
|
+
|
|
21553
|
+
/***/ "dd23":
|
|
21554
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
21555
|
+
|
|
21556
|
+
// extracted by mini-css-extract-plugin
|
|
21557
|
+
|
|
23426
21558
|
/***/ }),
|
|
23427
21559
|
|
|
23428
21560
|
/***/ "e330":
|
|
@@ -23579,6 +21711,17 @@ module.exports = Array.isArray || function isArray(argument) {
|
|
|
23579
21711
|
};
|
|
23580
21712
|
|
|
23581
21713
|
|
|
21714
|
+
/***/ }),
|
|
21715
|
+
|
|
21716
|
+
/***/ "e9a9":
|
|
21717
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
21718
|
+
|
|
21719
|
+
"use strict";
|
|
21720
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_readMd_vue_vue_type_style_index_0_id_d47f3aee_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("73dc");
|
|
21721
|
+
/* harmony import */ var _node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_readMd_vue_vue_type_style_index_0_id_d47f3aee_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_mini_css_extract_plugin_dist_loader_js_ref_8_oneOf_1_0_node_modules_css_loader_dist_cjs_js_ref_8_oneOf_1_1_node_modules_vue_loader_lib_loaders_stylePostLoader_js_node_modules_postcss_loader_src_index_js_ref_8_oneOf_1_2_node_modules_sass_loader_lib_loader_js_ref_8_oneOf_1_3_node_modules_cache_loader_dist_cjs_js_ref_0_0_node_modules_vue_loader_lib_index_js_vue_loader_options_readMd_vue_vue_type_style_index_0_id_d47f3aee_prod_lang_scss_scoped_true__WEBPACK_IMPORTED_MODULE_0__);
|
|
21722
|
+
/* unused harmony reexport * */
|
|
21723
|
+
|
|
21724
|
+
|
|
23582
21725
|
/***/ }),
|
|
23583
21726
|
|
|
23584
21727
|
/***/ "eb5c":
|
|
@@ -25522,7 +23665,6 @@ const packages_install = function (Vue, options = {}) {
|
|
|
25522
23665
|
const {
|
|
25523
23666
|
store
|
|
25524
23667
|
} = options;
|
|
25525
|
-
debugger;
|
|
25526
23668
|
if (store) {
|
|
25527
23669
|
setStoreMoudles(store);
|
|
25528
23670
|
} else {
|