@blueking/ai-ui-sdk 0.0.15-beta.2 → 0.0.15-beta.20
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/dist/assets/images/ai.png +0 -0
- package/dist/assets/images/user.png +0 -0
- package/dist/assets/svg/picture-fail.svg +1 -0
- package/dist/common/util.d.ts +10 -0
- package/dist/common/util.js +34 -0
- package/dist/component/render-image/index.script.vue.js +37 -0
- package/dist/component/render-image/index.vue.d.ts +6 -0
- package/dist/component/render-image/index.vue.js +3 -0
- package/dist/component/render-input/index.script.vue.js +205 -0
- package/dist/component/render-input/index.vue.css +134 -0
- package/dist/component/render-input/index.vue.d.ts +18 -0
- package/dist/component/render-input/index.vue.js +5 -0
- package/dist/component/render-input/render-drag.script.vue.js +61 -0
- package/dist/component/render-input/render-drag.vue.css +32 -0
- package/dist/component/render-input/render-drag.vue.d.ts +13 -0
- package/dist/component/render-input/render-drag.vue.js +5 -0
- package/dist/component/render-input/render-quill.script.vue.js +197 -0
- package/dist/component/render-input/render-quill.vue.css +27 -0
- package/dist/component/render-input/render-quill.vue.d.ts +24 -0
- package/dist/component/render-input/render-quill.vue.js +4 -0
- package/dist/component/render-knowledge-icon/index.script.vue.js +40 -0
- package/dist/component/render-knowledge-icon/index.vue.css +4 -0
- package/dist/component/render-knowledge-icon/index.vue.d.ts +14 -0
- package/dist/component/render-knowledge-icon/index.vue.js +5 -0
- package/dist/component/render-markdown/mark-down-code.d.ts +2 -0
- package/dist/component/render-markdown/mark-down-code.js +171 -0
- package/dist/component/render-markdown/mark-down-emoji.d.ts +2 -0
- package/dist/component/render-markdown/mark-down-emoji.js +4 -0
- package/dist/component/render-markdown/mark-down.d.ts +74 -0
- package/dist/component/render-markdown/mark-down.js +147 -0
- package/dist/component/render-markdown/mark-down.postcss.css +131 -0
- package/dist/component/render-message/index.d.ts +61 -0
- package/dist/component/render-message/index.js +110 -0
- package/dist/component/render-message/openai-message.script.vue.js +215 -0
- package/dist/component/render-message/openai-message.vue.css +98 -0
- package/dist/component/render-message/openai-message.vue.d.ts +15 -0
- package/dist/component/render-message/openai-message.vue.js +5 -0
- package/dist/component/render-message/skeleton-message.script.vue.js +7 -0
- package/dist/component/render-message/skeleton-message.vue.css +7 -0
- package/dist/component/render-message/skeleton-message.vue.d.ts +2 -0
- package/dist/component/render-message/skeleton-message.vue.js +6 -0
- package/dist/component/render-message/system-message.script.vue.js +17 -0
- package/dist/component/render-message/system-message.vue.css +20 -0
- package/dist/component/render-message/system-message.vue.d.ts +6 -0
- package/dist/component/render-message/system-message.vue.js +5 -0
- package/dist/component/render-message/time-message.script.vue.js +41 -0
- package/dist/component/render-message/time-message.vue.css +14 -0
- package/dist/component/render-message/time-message.vue.d.ts +6 -0
- package/dist/component/render-message/time-message.vue.js +5 -0
- package/dist/component/render-message/token-expired-message.script.vue.js +78 -0
- package/dist/component/render-message/token-expired-message.vue.css +60 -0
- package/dist/component/render-message/token-expired-message.vue.d.ts +15 -0
- package/dist/component/render-message/token-expired-message.vue.js +5 -0
- package/dist/component/render-message/user-message.script.vue.js +230 -0
- package/dist/component/render-message/user-message.vue.css +100 -0
- package/dist/component/render-message/user-message.vue.d.ts +21 -0
- package/dist/component/render-message/user-message.vue.js +5 -0
- package/dist/component/render-stop/index.script.vue.js +24 -0
- package/dist/component/render-stop/index.vue.css +20 -0
- package/dist/component/render-stop/index.vue.d.ts +6 -0
- package/dist/component/render-stop/index.vue.js +5 -0
- package/dist/css/fonts/iconcool.eot +0 -0
- package/dist/css/fonts/iconcool.svg +30 -0
- package/dist/css/fonts/iconcool.ttf +0 -0
- package/dist/css/fonts/iconcool.woff +0 -0
- package/dist/css/iconcool.js +1 -1
- package/dist/css/style.css +34 -4
- package/dist/event/index.js +2 -1
- package/dist/hooks/use-chat.d.ts +7 -8
- package/dist/hooks/use-chat.js +82 -28
- package/dist/hooks/use-click-proxy.js +1 -1
- package/dist/hooks/use-http.d.ts +1 -0
- package/dist/hooks/use-http.js +4 -0
- package/dist/hooks/use-mouse-drag.d.ts +13 -0
- package/dist/hooks/use-mouse-drag.js +59 -0
- package/dist/hooks/use-reference-doc.js +4 -4
- package/dist/http/fetch/error-interceptor.js +23 -2
- package/dist/http/fetch/index.js +5 -6
- package/dist/http/helper/agent.d.ts +7 -0
- package/dist/http/helper/agent.js +8 -0
- package/dist/http/helper/session.js +1 -1
- package/dist/main.d.ts +5 -0
- package/dist/main.js +6 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-down-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-left-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-left.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-right-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-right.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-double-up-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-down-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-down-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-down.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-left.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-right.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-up-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/angle-up.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/archive-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/arrows-left.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/arrows-right.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/assistant.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/audio-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/bk.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/circle.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/close-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/close.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/code.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/cog-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/collapse-left.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/copy-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/copy.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/data-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/del.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/doc-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/done.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/down-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/down-small.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/edit-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/ellipsis.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/enlarge-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/error.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/excel-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/exclamation-circle-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/eye.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/filliscreen-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/fix-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/fix-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/folder-open.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/folder-shape-open.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/folder-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/folder.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/funnel.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/grag-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/help-document-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/help-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/help.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/image-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/img-error.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/img-placehoulder.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/index.js +113 -0
- package/dist/node_modules/bkui-vue/lib/icon/info-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/info.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/left-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/left-turn-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/loading.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/narrow-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/original.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/pdf-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/play-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/plus.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/ppt-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/qq.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/right-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/right-turn-line.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/search.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/share.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/spinner.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/success.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/switcher-loading.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/text-all.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/text-file.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/text-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/transfer.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/tree-application-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/unfull-screen.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/unvisible.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/up-shape.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/upload.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/video-fill.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/warn.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/weixin-pro.js +191 -0
- package/dist/node_modules/bkui-vue/lib/icon/weixin.js +191 -0
- package/dist/node_modules/bkui-vue/lib/styles/reset.css +309 -0
- package/dist/node_modules/call-bind/index.js +24 -0
- package/dist/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/dist/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/dist/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/dist/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/dist/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/dist/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/dist/node_modules/call-bound/index.js +19 -0
- package/dist/node_modules/deep-equal/index.js +112 -0
- package/dist/node_modules/define-data-property/index.js +56 -0
- package/dist/node_modules/define-properties/index.js +47 -0
- package/dist/node_modules/dunder-proto/get.js +30 -0
- package/dist/node_modules/es-define-property/index.js +14 -0
- package/dist/node_modules/es-errors/eval.js +4 -0
- package/dist/node_modules/es-errors/index.js +4 -0
- package/dist/node_modules/es-errors/range.js +4 -0
- package/dist/node_modules/es-errors/ref.js +4 -0
- package/dist/node_modules/es-errors/syntax.js +4 -0
- package/dist/node_modules/es-errors/type.js +4 -0
- package/dist/node_modules/es-errors/uri.js +4 -0
- package/dist/node_modules/es-object-atoms/index.js +4 -0
- package/dist/node_modules/extend/index.js +117 -0
- package/dist/node_modules/fast-diff/diff.js +738 -0
- package/dist/node_modules/function-bind/implementation.js +84 -0
- package/dist/node_modules/function-bind/index.js +5 -0
- package/dist/node_modules/functions-have-names/index.js +31 -0
- package/dist/node_modules/get-intrinsic/index.js +378 -0
- package/dist/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/dist/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/dist/node_modules/get-proto/index.js +27 -0
- package/dist/node_modules/gopd/gOPD.js +4 -0
- package/dist/node_modules/gopd/index.js +15 -0
- package/dist/node_modules/has-property-descriptors/index.js +22 -0
- package/dist/node_modules/has-symbols/index.js +14 -0
- package/dist/node_modules/has-symbols/shams.js +45 -0
- package/dist/node_modules/has-tostringtag/shams.js +8 -0
- package/dist/node_modules/hasown/index.js +8 -0
- package/dist/node_modules/is-arguments/index.js +44 -0
- package/dist/node_modules/is-date-object/index.js +27 -0
- package/dist/node_modules/is-regex/index.js +69 -0
- package/dist/node_modules/math-intrinsics/abs.js +4 -0
- package/dist/node_modules/math-intrinsics/floor.js +4 -0
- package/dist/node_modules/math-intrinsics/isNaN.js +6 -0
- package/dist/node_modules/math-intrinsics/max.js +4 -0
- package/dist/node_modules/math-intrinsics/min.js +4 -0
- package/dist/node_modules/math-intrinsics/pow.js +4 -0
- package/dist/node_modules/math-intrinsics/round.js +4 -0
- package/dist/node_modules/math-intrinsics/sign.js +11 -0
- package/dist/node_modules/object-is/implementation.js +19 -0
- package/dist/node_modules/object-is/index.js +18 -0
- package/dist/node_modules/object-is/polyfill.js +7 -0
- package/dist/node_modules/object-is/shim.js +14 -0
- package/dist/node_modules/object-keys/implementation.js +122 -0
- package/dist/node_modules/object-keys/index.js +32 -0
- package/dist/node_modules/object-keys/isArguments.js +17 -0
- package/dist/node_modules/quill/dist/quill.js +11562 -0
- package/dist/node_modules/quill/dist/quill.snow.css +945 -0
- package/dist/node_modules/quill-delta/lib/delta.js +344 -0
- package/dist/node_modules/quill-delta/lib/op.js +155 -0
- package/dist/node_modules/regexp.prototype.flags/implementation.js +39 -0
- package/dist/node_modules/regexp.prototype.flags/index.js +18 -0
- package/dist/node_modules/regexp.prototype.flags/polyfill.js +39 -0
- package/dist/node_modules/regexp.prototype.flags/shim.js +26 -0
- package/dist/node_modules/set-function-length/index.js +42 -0
- package/dist/node_modules/set-function-name/index.js +23 -0
- package/dist/node_modules/x-mavon-editor/dist/css/index.css +1 -0
- package/dist/node_modules/x-mavon-editor/dist/font/fontello.eot +0 -0
- package/dist/node_modules/x-mavon-editor/dist/font/fontello.svg +72 -0
- package/dist/node_modules/x-mavon-editor/dist/font/fontello.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/font/fontello.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/font/fontello.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/highlight.min.js +1150 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/bash.min.js +20 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/css.min.js +31 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/go.min.js +14 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/java.min.js +37 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/javascript.min.js +76 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/json.min.js +7 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/markdown.min.js +31 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/perl.min.js +36 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/php.min.js +37 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/python.min.js +42 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/ruby.min.js +48 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/sql.min.js +17 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/swift.min.js +60 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/typescript.min.js +92 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/languages/xml.min.js +28 -0
- package/dist/node_modules/x-mavon-editor/dist/highlightjs/styles/atom-one-dark.min.css +1 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/katex.min.css +1 -0
- package/dist/node_modules/x-mavon-editor/dist/katex/katex.min.js +1 -0
- package/dist/node_modules/x-mavon-editor/dist/markdown/github-markdown.min.css +2 -0
- package/dist/node_modules/x-mavon-editor/dist/mavon-editor.js +31 -0
- package/dist/types/agent.d.ts +8 -0
- package/dist/types/enum.d.ts +6 -1
- package/dist/types/enum.js +7 -1
- package/dist/types/model.d.ts +14 -0
- package/dist/types/session.d.ts +4 -2
- package/package.json +10 -4
@@ -0,0 +1,309 @@
|
|
1
|
+
.scroll-bar-style::-webkit-scrollbar {
|
2
|
+
width: 4px;
|
3
|
+
height: 4px;
|
4
|
+
}
|
5
|
+
.scroll-bar-style::-webkit-scrollbar-thumb {
|
6
|
+
background: #ddd;
|
7
|
+
border-radius: 20px;
|
8
|
+
box-shadow: inset 0 0 6px rgba(204, 204, 204, 0.3);
|
9
|
+
}
|
10
|
+
html,
|
11
|
+
body {
|
12
|
+
padding: 0;
|
13
|
+
margin: 0;
|
14
|
+
}
|
15
|
+
* {
|
16
|
+
box-sizing: border-box;
|
17
|
+
}
|
18
|
+
/**
|
19
|
+
* HTML5 display definitions
|
20
|
+
* ==========================================================================
|
21
|
+
*
|
22
|
+
* Correct `block` display not defined for any HTML5 element in IE 8/9.
|
23
|
+
* Correct `block` display not defined for `details` or `summary` in IE 10/11 and Firefox.
|
24
|
+
* Correct `block` display not defined for `main` in IE 11.
|
25
|
+
*/
|
26
|
+
article,
|
27
|
+
aside,
|
28
|
+
details,
|
29
|
+
figcaption,
|
30
|
+
figure,
|
31
|
+
footer,
|
32
|
+
header,
|
33
|
+
hgroup,
|
34
|
+
main,
|
35
|
+
menu,
|
36
|
+
nav,
|
37
|
+
section,
|
38
|
+
summary {
|
39
|
+
display: block;
|
40
|
+
}
|
41
|
+
/**
|
42
|
+
* 1. Correct `inline-block` display not defined in IE 8/9.
|
43
|
+
* 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera.
|
44
|
+
*/
|
45
|
+
audio,
|
46
|
+
canvas,
|
47
|
+
progress,
|
48
|
+
video {
|
49
|
+
/* 1 */
|
50
|
+
display: inline-block;
|
51
|
+
/* 2 */
|
52
|
+
vertical-align: baseline;
|
53
|
+
}
|
54
|
+
/**
|
55
|
+
* Prevent modern browsers from displaying `audio` without controls.
|
56
|
+
* Remove excess height in iOS 5 devices.
|
57
|
+
*/
|
58
|
+
audio:not([controls]) {
|
59
|
+
display: none;
|
60
|
+
height: 0;
|
61
|
+
}
|
62
|
+
/**
|
63
|
+
* Address `[hidden]` styling not present in IE 8/9/10.
|
64
|
+
* Hide the `template` element in IE 8/9/10/11, Safari, and Firefox < 22.
|
65
|
+
*/
|
66
|
+
[hidden],
|
67
|
+
template {
|
68
|
+
display: none;
|
69
|
+
}
|
70
|
+
/**
|
71
|
+
* Links
|
72
|
+
* ==========================================================================
|
73
|
+
*
|
74
|
+
* Remove the gray background color from active links in IE 10.
|
75
|
+
*/
|
76
|
+
a {
|
77
|
+
background-color: transparent;
|
78
|
+
}
|
79
|
+
/**
|
80
|
+
* Improve readability of focused elements when they are also in an
|
81
|
+
* active/hover state.
|
82
|
+
*/
|
83
|
+
a:active,
|
84
|
+
a:hover {
|
85
|
+
outline: 0;
|
86
|
+
}
|
87
|
+
/**
|
88
|
+
* Text-level semantics
|
89
|
+
* ==========================================================================
|
90
|
+
*
|
91
|
+
* Address styling not present in IE 8/9/10/11, Safari, and Chrome.
|
92
|
+
*/
|
93
|
+
abbr[title] {
|
94
|
+
border-bottom: 1px dotted;
|
95
|
+
}
|
96
|
+
/**
|
97
|
+
* Embedded content
|
98
|
+
* ==========================================================================
|
99
|
+
*
|
100
|
+
* Remove border when inside `a` element in IE 8/9/10.
|
101
|
+
*/
|
102
|
+
img {
|
103
|
+
border: 0;
|
104
|
+
}
|
105
|
+
/**
|
106
|
+
* Correct overflow not hidden in IE 9/10/11.
|
107
|
+
*/
|
108
|
+
svg:not(:root) {
|
109
|
+
overflow: hidden;
|
110
|
+
}
|
111
|
+
/**
|
112
|
+
* Grouping content
|
113
|
+
* ==========================================================================
|
114
|
+
*
|
115
|
+
* Address margin not present in IE 8/9 and Safari.
|
116
|
+
*/
|
117
|
+
figure {
|
118
|
+
margin: 1em 40px;
|
119
|
+
}
|
120
|
+
/**
|
121
|
+
* Address differences between Firefox and other browsers.
|
122
|
+
*/
|
123
|
+
hr {
|
124
|
+
height: 0;
|
125
|
+
box-sizing: content-box;
|
126
|
+
}
|
127
|
+
/**
|
128
|
+
* Address odd `em`-unit font size rendering in all browsers.
|
129
|
+
*
|
130
|
+
* Forms
|
131
|
+
* ==========================================================================
|
132
|
+
*
|
133
|
+
* Known limitation: by default, Chrome and Safari on OS X allow very limited
|
134
|
+
* styling of `select`, unless a `border` property is set.
|
135
|
+
*
|
136
|
+
* 1. Correct color not being inherited.
|
137
|
+
* Known issue: affects color of disabled elements.
|
138
|
+
* 2. Correct font properties not being inherited.
|
139
|
+
* 3. Address margins set differently in Firefox 4+, Safari, and Chrome.
|
140
|
+
*/
|
141
|
+
button,
|
142
|
+
input,
|
143
|
+
optgroup,
|
144
|
+
select,
|
145
|
+
textarea {
|
146
|
+
/* 3 */
|
147
|
+
margin: 0;
|
148
|
+
/* 2 */
|
149
|
+
font: inherit;
|
150
|
+
/* 1 */
|
151
|
+
color: inherit;
|
152
|
+
}
|
153
|
+
/**
|
154
|
+
* Address `overflow` set to `hidden` in IE 8/9/10/11.
|
155
|
+
*/
|
156
|
+
button {
|
157
|
+
overflow: visible;
|
158
|
+
}
|
159
|
+
/**
|
160
|
+
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
161
|
+
* All other form control elements do not inherit `text-transform` values.
|
162
|
+
* Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera.
|
163
|
+
* Correct `select` style inheritance in Firefox.
|
164
|
+
*/
|
165
|
+
button,
|
166
|
+
select {
|
167
|
+
text-transform: none;
|
168
|
+
}
|
169
|
+
/**
|
170
|
+
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` and `video` controls.
|
171
|
+
* 2. Correct inability to style clickable `input` types in iOS.
|
172
|
+
* 3. Improve usability and consistency of cursor style between image-type `input` and others.
|
173
|
+
*/
|
174
|
+
button,
|
175
|
+
html input[type='button'],
|
176
|
+
input[type='reset'],
|
177
|
+
input[type='submit'] {
|
178
|
+
/* 3 */
|
179
|
+
cursor: pointer;
|
180
|
+
/* 2 */
|
181
|
+
appearance: button;
|
182
|
+
}
|
183
|
+
/* Re-set default cursor for disabled elements. */
|
184
|
+
button[disabled],
|
185
|
+
html input[disabled] {
|
186
|
+
cursor: default;
|
187
|
+
}
|
188
|
+
/* Remove inner padding and border in Firefox 4+. */
|
189
|
+
button::-moz-focus-inner,
|
190
|
+
input::-moz-focus-inner {
|
191
|
+
padding: 0;
|
192
|
+
border: 0;
|
193
|
+
}
|
194
|
+
/**
|
195
|
+
* Address Firefox 4+ setting `line-height` on `input` using `!important` in the UA stylesheet.
|
196
|
+
*/
|
197
|
+
input {
|
198
|
+
line-height: normal;
|
199
|
+
}
|
200
|
+
/**
|
201
|
+
* It's recommended that you don't attempt to style these elements.
|
202
|
+
* Firefox's implementation doesn't respect box-sizing, padding, or width.
|
203
|
+
*
|
204
|
+
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
205
|
+
* 2. Remove excess padding in IE 8/9/10.
|
206
|
+
*/
|
207
|
+
input[type='checkbox'],
|
208
|
+
input[type='radio'] {
|
209
|
+
/* 2 */
|
210
|
+
padding: 0;
|
211
|
+
/* 1 */
|
212
|
+
box-sizing: border-box;
|
213
|
+
}
|
214
|
+
/**
|
215
|
+
* Fix the cursor style for Chrome's increment/decrement buttons. For certain
|
216
|
+
* `font-size` values of the `input`, it causes the cursor style of the
|
217
|
+
* decrement button to change from `default` to `text`.
|
218
|
+
*/
|
219
|
+
input[type='number']::-webkit-inner-spin-button,
|
220
|
+
input[type='number']::-webkit-outer-spin-button {
|
221
|
+
height: auto;
|
222
|
+
}
|
223
|
+
::-ms-clear,
|
224
|
+
::-ms-reveal {
|
225
|
+
display: none;
|
226
|
+
}
|
227
|
+
input[type='text']::-ms-clear {
|
228
|
+
display: none;
|
229
|
+
}
|
230
|
+
input[type='text']::-ms-reveal {
|
231
|
+
display: none;
|
232
|
+
}
|
233
|
+
/**
|
234
|
+
* 1. Address `appearance` set to `searchfield` in Safari and Chrome.
|
235
|
+
* 2. Address `box-sizing` set to `border-box` in Safari and Chrome.
|
236
|
+
*/
|
237
|
+
input[type='search'] {
|
238
|
+
/* 2 */
|
239
|
+
box-sizing: content-box;
|
240
|
+
/* 1 */
|
241
|
+
appearance: textfield;
|
242
|
+
}
|
243
|
+
/**
|
244
|
+
* Remove inner padding and search cancel button in Safari and Chrome on OS X.
|
245
|
+
* Safari (but not Chrome) clips the cancel button when the search input has
|
246
|
+
* padding (and `textfield` appearance).
|
247
|
+
*/
|
248
|
+
input[type='search']::-webkit-search-cancel-button,
|
249
|
+
input[type='search']::-webkit-search-decoration {
|
250
|
+
appearance: none;
|
251
|
+
}
|
252
|
+
/**
|
253
|
+
* Define consistent border, margin, and padding.
|
254
|
+
*/
|
255
|
+
fieldset {
|
256
|
+
padding: 0.35em 0.625em 0.75em;
|
257
|
+
margin: 0 2px;
|
258
|
+
border: 1px solid #c0c0c0;
|
259
|
+
}
|
260
|
+
/**
|
261
|
+
* 1. Correct `color` not being inherited in IE 8/9/10/11.
|
262
|
+
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
263
|
+
*/
|
264
|
+
legend {
|
265
|
+
/* 2 */
|
266
|
+
padding: 0;
|
267
|
+
/* 1 */
|
268
|
+
border: 0;
|
269
|
+
}
|
270
|
+
/**
|
271
|
+
* Remove default vertical scrollbar in IE 8/9/10/11.
|
272
|
+
*/
|
273
|
+
textarea {
|
274
|
+
overflow: auto;
|
275
|
+
}
|
276
|
+
/**
|
277
|
+
* Don't inherit the `font-weight` (applied by a rule above).
|
278
|
+
* NOTE: the default cannot safely be changed in Chrome and Safari on OS X.
|
279
|
+
*/
|
280
|
+
optgroup {
|
281
|
+
font-weight: bold;
|
282
|
+
}
|
283
|
+
/**
|
284
|
+
* BK-Scroll-Style
|
285
|
+
*/
|
286
|
+
.bk-scroll-y {
|
287
|
+
overflow-y: auto;
|
288
|
+
}
|
289
|
+
.bk-scroll-y::-webkit-scrollbar {
|
290
|
+
width: 4px;
|
291
|
+
height: 4px;
|
292
|
+
}
|
293
|
+
.bk-scroll-y::-webkit-scrollbar-thumb {
|
294
|
+
background: #ddd;
|
295
|
+
border-radius: 20px;
|
296
|
+
box-shadow: inset 0 0 6px rgba(204, 204, 204, 0.3);
|
297
|
+
}
|
298
|
+
.bk-scroll-x {
|
299
|
+
overflow-x: auto;
|
300
|
+
}
|
301
|
+
.bk-scroll-x::-webkit-scrollbar {
|
302
|
+
width: 4px;
|
303
|
+
height: 4px;
|
304
|
+
}
|
305
|
+
.bk-scroll-x::-webkit-scrollbar-thumb {
|
306
|
+
background: #ddd;
|
307
|
+
border-radius: 20px;
|
308
|
+
box-shadow: inset 0 0 6px rgba(204, 204, 204, 0.3);
|
309
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var setFunctionLength = require('../set-function-length/index.js');
|
4
|
+
|
5
|
+
var $defineProperty = require('../es-define-property/index.js');
|
6
|
+
|
7
|
+
var callBindBasic = require('../call-bind-apply-helpers/index.js');
|
8
|
+
var applyBind = require('../call-bind-apply-helpers/applyBind.js');
|
9
|
+
|
10
|
+
module.exports = function callBind(originalFunction) {
|
11
|
+
var func = callBindBasic(arguments);
|
12
|
+
var adjustedLength = originalFunction.length - (arguments.length - 1);
|
13
|
+
return setFunctionLength(
|
14
|
+
func,
|
15
|
+
1 + (adjustedLength > 0 ? adjustedLength : 0),
|
16
|
+
true
|
17
|
+
);
|
18
|
+
};
|
19
|
+
|
20
|
+
if ($defineProperty) {
|
21
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
22
|
+
} else {
|
23
|
+
module.exports.apply = applyBind;
|
24
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var bind = require('../function-bind/index.js');
|
4
|
+
|
5
|
+
var $apply = require('./functionApply.js');
|
6
|
+
var $call = require('./functionCall.js');
|
7
|
+
var $reflectApply = require('./reflectApply.js');
|
8
|
+
|
9
|
+
/** @type {import('./actualApply')} */
|
10
|
+
module.exports = $reflectApply || bind.call($call, $apply);
|
@@ -0,0 +1,10 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var bind = require('../function-bind/index.js');
|
4
|
+
var $apply = require('./functionApply.js');
|
5
|
+
var actualApply = require('./actualApply.js');
|
6
|
+
|
7
|
+
/** @type {import('./applyBind')} */
|
8
|
+
module.exports = function applyBind() {
|
9
|
+
return actualApply(bind, $apply, arguments);
|
10
|
+
};
|
@@ -0,0 +1,15 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var bind = require('../function-bind/index.js');
|
4
|
+
var $TypeError = require('../es-errors/type.js');
|
5
|
+
|
6
|
+
var $call = require('./functionCall.js');
|
7
|
+
var $actualApply = require('./actualApply.js');
|
8
|
+
|
9
|
+
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
10
|
+
module.exports = function callBindBasic(args) {
|
11
|
+
if (args.length < 1 || typeof args[0] !== 'function') {
|
12
|
+
throw new $TypeError('a function is required');
|
13
|
+
}
|
14
|
+
return $actualApply(bind, $call, args);
|
15
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var GetIntrinsic = require('../get-intrinsic/index.js');
|
4
|
+
|
5
|
+
var callBindBasic = require('../call-bind-apply-helpers/index.js');
|
6
|
+
|
7
|
+
/** @type {(thisArg: string, searchString: string, position?: number) => number} */
|
8
|
+
var $indexOf = callBindBasic([GetIntrinsic('%String.prototype.indexOf%')]);
|
9
|
+
|
10
|
+
/** @type {import('.')} */
|
11
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
12
|
+
/* eslint no-extra-parens: 0 */
|
13
|
+
|
14
|
+
var intrinsic = /** @type {(this: unknown, ...args: unknown[]) => unknown} */ (GetIntrinsic(name, !!allowMissing));
|
15
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
16
|
+
return callBindBasic(/** @type {const} */ ([intrinsic]));
|
17
|
+
}
|
18
|
+
return intrinsic;
|
19
|
+
};
|
@@ -0,0 +1,112 @@
|
|
1
|
+
var objectKeys = require('../object-keys/index.js');
|
2
|
+
var isArguments = require('../is-arguments/index.js');
|
3
|
+
var is = require('../object-is/index.js');
|
4
|
+
var isRegex = require('../is-regex/index.js');
|
5
|
+
var flags = require('../regexp.prototype.flags/index.js');
|
6
|
+
var isDate = require('../is-date-object/index.js');
|
7
|
+
|
8
|
+
var getTime = Date.prototype.getTime;
|
9
|
+
|
10
|
+
function deepEqual(actual, expected, options) {
|
11
|
+
var opts = options || {};
|
12
|
+
|
13
|
+
// 7.1. All identical values are equivalent, as determined by ===.
|
14
|
+
if (opts.strict ? is(actual, expected) : actual === expected) {
|
15
|
+
return true;
|
16
|
+
}
|
17
|
+
|
18
|
+
// 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==.
|
19
|
+
if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) {
|
20
|
+
return opts.strict ? is(actual, expected) : actual == expected;
|
21
|
+
}
|
22
|
+
|
23
|
+
/*
|
24
|
+
* 7.4. For all other Object pairs, including Array objects, equivalence is
|
25
|
+
* determined by having the same number of owned properties (as verified
|
26
|
+
* with Object.prototype.hasOwnProperty.call), the same set of keys
|
27
|
+
* (although not necessarily the same order), equivalent values for every
|
28
|
+
* corresponding key, and an identical 'prototype' property. Note: this
|
29
|
+
* accounts for both named and indexed properties on Arrays.
|
30
|
+
*/
|
31
|
+
// eslint-disable-next-line no-use-before-define
|
32
|
+
return objEquiv(actual, expected, opts);
|
33
|
+
}
|
34
|
+
|
35
|
+
function isUndefinedOrNull(value) {
|
36
|
+
return value === null || value === undefined;
|
37
|
+
}
|
38
|
+
|
39
|
+
function isBuffer(x) {
|
40
|
+
if (!x || typeof x !== 'object' || typeof x.length !== 'number') {
|
41
|
+
return false;
|
42
|
+
}
|
43
|
+
if (typeof x.copy !== 'function' || typeof x.slice !== 'function') {
|
44
|
+
return false;
|
45
|
+
}
|
46
|
+
if (x.length > 0 && typeof x[0] !== 'number') {
|
47
|
+
return false;
|
48
|
+
}
|
49
|
+
return true;
|
50
|
+
}
|
51
|
+
|
52
|
+
function objEquiv(a, b, opts) {
|
53
|
+
/* eslint max-statements: [2, 50] */
|
54
|
+
var i, key;
|
55
|
+
if (typeof a !== typeof b) { return false; }
|
56
|
+
if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) { return false; }
|
57
|
+
|
58
|
+
// an identical 'prototype' property.
|
59
|
+
if (a.prototype !== b.prototype) { return false; }
|
60
|
+
|
61
|
+
if (isArguments(a) !== isArguments(b)) { return false; }
|
62
|
+
|
63
|
+
var aIsRegex = isRegex(a);
|
64
|
+
var bIsRegex = isRegex(b);
|
65
|
+
if (aIsRegex !== bIsRegex) { return false; }
|
66
|
+
if (aIsRegex || bIsRegex) {
|
67
|
+
return a.source === b.source && flags(a) === flags(b);
|
68
|
+
}
|
69
|
+
|
70
|
+
if (isDate(a) && isDate(b)) {
|
71
|
+
return getTime.call(a) === getTime.call(b);
|
72
|
+
}
|
73
|
+
|
74
|
+
var aIsBuffer = isBuffer(a);
|
75
|
+
var bIsBuffer = isBuffer(b);
|
76
|
+
if (aIsBuffer !== bIsBuffer) { return false; }
|
77
|
+
if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here
|
78
|
+
if (a.length !== b.length) { return false; }
|
79
|
+
for (i = 0; i < a.length; i++) {
|
80
|
+
if (a[i] !== b[i]) { return false; }
|
81
|
+
}
|
82
|
+
return true;
|
83
|
+
}
|
84
|
+
|
85
|
+
if (typeof a !== typeof b) { return false; }
|
86
|
+
|
87
|
+
try {
|
88
|
+
var ka = objectKeys(a);
|
89
|
+
var kb = objectKeys(b);
|
90
|
+
} catch (e) { // happens when one is a string literal and the other isn't
|
91
|
+
return false;
|
92
|
+
}
|
93
|
+
// having the same number of owned properties (keys incorporates hasOwnProperty)
|
94
|
+
if (ka.length !== kb.length) { return false; }
|
95
|
+
|
96
|
+
// the same set of keys (although not necessarily the same order),
|
97
|
+
ka.sort();
|
98
|
+
kb.sort();
|
99
|
+
// ~~~cheap key test
|
100
|
+
for (i = ka.length - 1; i >= 0; i--) {
|
101
|
+
if (ka[i] != kb[i]) { return false; }
|
102
|
+
}
|
103
|
+
// equivalent values for every corresponding key, and ~~~possibly expensive deep test
|
104
|
+
for (i = ka.length - 1; i >= 0; i--) {
|
105
|
+
key = ka[i];
|
106
|
+
if (!deepEqual(a[key], b[key], opts)) { return false; }
|
107
|
+
}
|
108
|
+
|
109
|
+
return true;
|
110
|
+
}
|
111
|
+
|
112
|
+
module.exports = deepEqual;
|
@@ -0,0 +1,56 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var $defineProperty = require('../es-define-property/index.js');
|
4
|
+
|
5
|
+
var $SyntaxError = require('../es-errors/syntax.js');
|
6
|
+
var $TypeError = require('../es-errors/type.js');
|
7
|
+
|
8
|
+
var gopd = require('../gopd/index.js');
|
9
|
+
|
10
|
+
/** @type {import('.')} */
|
11
|
+
module.exports = function defineDataProperty(
|
12
|
+
obj,
|
13
|
+
property,
|
14
|
+
value
|
15
|
+
) {
|
16
|
+
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
|
17
|
+
throw new $TypeError('`obj` must be an object or a function`');
|
18
|
+
}
|
19
|
+
if (typeof property !== 'string' && typeof property !== 'symbol') {
|
20
|
+
throw new $TypeError('`property` must be a string or a symbol`');
|
21
|
+
}
|
22
|
+
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
|
23
|
+
throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
|
24
|
+
}
|
25
|
+
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
|
26
|
+
throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
|
27
|
+
}
|
28
|
+
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
|
29
|
+
throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
|
30
|
+
}
|
31
|
+
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
|
32
|
+
throw new $TypeError('`loose`, if provided, must be a boolean');
|
33
|
+
}
|
34
|
+
|
35
|
+
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
|
36
|
+
var nonWritable = arguments.length > 4 ? arguments[4] : null;
|
37
|
+
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
|
38
|
+
var loose = arguments.length > 6 ? arguments[6] : false;
|
39
|
+
|
40
|
+
/* @type {false | TypedPropertyDescriptor<unknown>} */
|
41
|
+
var desc = !!gopd && gopd(obj, property);
|
42
|
+
|
43
|
+
if ($defineProperty) {
|
44
|
+
$defineProperty(obj, property, {
|
45
|
+
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
|
46
|
+
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
|
47
|
+
value: value,
|
48
|
+
writable: nonWritable === null && desc ? desc.writable : !nonWritable
|
49
|
+
});
|
50
|
+
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
|
51
|
+
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
|
52
|
+
obj[property] = value; // eslint-disable-line no-param-reassign
|
53
|
+
} else {
|
54
|
+
throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
|
55
|
+
}
|
56
|
+
};
|
@@ -0,0 +1,47 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var keys = require('../object-keys/index.js');
|
4
|
+
var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
|
5
|
+
|
6
|
+
var toStr = Object.prototype.toString;
|
7
|
+
var concat = Array.prototype.concat;
|
8
|
+
var defineDataProperty = require('../define-data-property/index.js');
|
9
|
+
|
10
|
+
var isFunction = function (fn) {
|
11
|
+
return typeof fn === 'function' && toStr.call(fn) === '[object Function]';
|
12
|
+
};
|
13
|
+
|
14
|
+
var supportsDescriptors = require('../has-property-descriptors/index.js')();
|
15
|
+
|
16
|
+
var defineProperty = function (object, name, value, predicate) {
|
17
|
+
if (name in object) {
|
18
|
+
if (predicate === true) {
|
19
|
+
if (object[name] === value) {
|
20
|
+
return;
|
21
|
+
}
|
22
|
+
} else if (!isFunction(predicate) || !predicate()) {
|
23
|
+
return;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
if (supportsDescriptors) {
|
28
|
+
defineDataProperty(object, name, value, true);
|
29
|
+
} else {
|
30
|
+
defineDataProperty(object, name, value);
|
31
|
+
}
|
32
|
+
};
|
33
|
+
|
34
|
+
var defineProperties = function (object, map) {
|
35
|
+
var predicates = arguments.length > 2 ? arguments[2] : {};
|
36
|
+
var props = keys(map);
|
37
|
+
if (hasSymbols) {
|
38
|
+
props = concat.call(props, Object.getOwnPropertySymbols(map));
|
39
|
+
}
|
40
|
+
for (var i = 0; i < props.length; i += 1) {
|
41
|
+
defineProperty(object, props[i], map[props[i]], predicates[props[i]]);
|
42
|
+
}
|
43
|
+
};
|
44
|
+
|
45
|
+
defineProperties.supportsDescriptors = !!supportsDescriptors;
|
46
|
+
|
47
|
+
module.exports = defineProperties;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
var callBind = require('../call-bind-apply-helpers/index.js');
|
4
|
+
var gOPD = require('../gopd/index.js');
|
5
|
+
|
6
|
+
var hasProtoAccessor;
|
7
|
+
try {
|
8
|
+
// eslint-disable-next-line no-extra-parens, no-proto
|
9
|
+
hasProtoAccessor = /** @type {{ __proto__?: typeof Array.prototype }} */ ([]).__proto__ === Array.prototype;
|
10
|
+
} catch (e) {
|
11
|
+
if (!e || typeof e !== 'object' || !('code' in e) || e.code !== 'ERR_PROTO_ACCESS') {
|
12
|
+
throw e;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
// eslint-disable-next-line no-extra-parens
|
17
|
+
var desc = !!hasProtoAccessor && gOPD && gOPD(Object.prototype, /** @type {keyof typeof Object.prototype} */ ('__proto__'));
|
18
|
+
|
19
|
+
var $Object = Object;
|
20
|
+
var $getPrototypeOf = $Object.getPrototypeOf;
|
21
|
+
|
22
|
+
/** @type {import('./get')} */
|
23
|
+
module.exports = desc && typeof desc.get === 'function'
|
24
|
+
? callBind([desc.get])
|
25
|
+
: typeof $getPrototypeOf === 'function'
|
26
|
+
? /** @type {import('./get')} */ function getDunder(value) {
|
27
|
+
// eslint-disable-next-line eqeqeq
|
28
|
+
return $getPrototypeOf(value == null ? value : $Object(value));
|
29
|
+
}
|
30
|
+
: false;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
/** @type {import('.')} */
|
4
|
+
var $defineProperty = Object.defineProperty || false;
|
5
|
+
if ($defineProperty) {
|
6
|
+
try {
|
7
|
+
$defineProperty({}, 'a', { value: 1 });
|
8
|
+
} catch (e) {
|
9
|
+
// IE 8 has a broken defineProperty
|
10
|
+
$defineProperty = false;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
|
14
|
+
module.exports = $defineProperty;
|