@codernote/record-tree 2.8.5 → 2.8.6
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/index.js +379 -378
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.color-panel[data-v-d2cde42f]{background:#fff;border:1px solid #f2f2f2;width:164px;padding:5px 5px 0}.color-panel ul[data-v-d2cde42f]{list-style-type:none;margin:0}.color-panel ul li[data-v-d2cde42f]{display:inline-block;margin:0 5px;width:20px;height:20px;border-radius:100%;border:1px solid #f2f2f2;display:inline-flex;align-items:center;justify-content:center}.node-complex[data-v-6cfd6a1b]{display:flex;flex-direction:row;align-self:center;outline:none}.holder[data-v-6cfd6a1b]{width:0px;overflow:hidden;border-width:1px;border-style:solid;border-color:transparent;outline:none}.node-element[data-v-6cfd6a1b]{display:inline-block;position:relative;margin:5px 1px}.node-element:hover .node-del[data-v-6cfd6a1b]{display:block}.node-image img[data-v-6cfd6a1b]{outline:none}.node-audio[data-v-6cfd6a1b]{width:300px}.node-audio audio[data-v-6cfd6a1b]{width:300px;outline:none}.node-video video[data-v-6cfd6a1b]{outline:none;-o-object-fit:cover;object-fit:cover;background-color:#000}.node-del[data-v-6cfd6a1b]{cursor:pointer;display:none;width:15px;height:15px;position:absolute;top:-3px;right:-3px;background-color:#e6f7ff;background-size:100% 100%;border-radius:50%}.node-del[data-v-6cfd6a1b]:before,.node-del[data-v-6cfd6a1b]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:10px;background-color:#595959}.node-del[data-v-6cfd6a1b]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-6cfd6a1b]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-file-wrap[data-v-6cfd6a1b]{width:260px;padding:10px 16px;display:flex;background:#f2f2f2;border-radius:5px;justify-content:center;align-items:center}.node-file-left[data-v-6cfd6a1b]{flex:1}.node-file-left h6[data-v-6cfd6a1b]{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;white-space:nowrap}.node-file-left p[data-v-6cfd6a1b]{margin:0;padding:0;font-size:12px;color:#999}.node-file-right a[data-v-6cfd6a1b]{color:#52a770;font-size:14px}@keyframes blinkBorder-6cfd6a1b{0%,to{border-color:transparent}50%{border-color:#333}}.node-complex .holder[data-v-6cfd6a1b]:focus{animation:blinkBorder-6cfd6a1b 1s infinite}.fullscreen-handle[data-v-6cfd6a1b]{width:15px;height:15px;position:absolute;bottom:0;right:16px;cursor:pointer;background:#fff9}.resize-handle[data-v-6cfd6a1b]{width:15px;height:15px;position:absolute;bottom:0;right:0;cursor:se-resize;transform:rotate(90deg);background:#fff9}.resize-handle svg[data-v-6cfd6a1b]{cursor:se-resize}.media-placeholder[data-v-6cfd6a1b]{-o-object-fit:contain;object-fit:contain;border:1px dashed #d0d0d0;border-radius:4px;background:#fafafa;display:flex;align-items:center;justify-content:center;width:50px;height:50px}.media-placeholder img[data-v-6cfd6a1b]{width:20px;height:20px;animation:bounce-6cfd6a1b 1s ease-in-out infinite}.media-fail[data-v-6cfd6a1b]{-o-object-fit:contain;object-fit:contain;border-radius:4px;display:flex;align-items:center;justify-content:center}.media-fail img[data-v-6cfd6a1b]{width:40px;height:40px}@keyframes bounce-6cfd6a1b{0%,to{transform:translateY(0)}50%{transform:translateY(-8px)}}.ProseMirror{outline:none}.node-div[data-v-40ce1bbb]{display:flex;align-items:center;position:relative;margin-bottom:8px}.node-div>div[data-v-40ce1bbb]{flex:1}.node-icon[data-v-40ce1bbb]{touch-action:manipulation;position:relative;width:21px;height:21px;border-radius:100%;box-sizing:border-box;border:5px solid #fff;background-color:#fff;cursor:pointer;align-self:flex-start}.node-icon-with-children[data-v-40ce1bbb]:before{content:"";position:absolute;top:-20px;right:-30px;bottom:-10px;left:-20px;z-index:5}.node-icon-todo[data-v-40ce1bbb]{border-radius:0}.node-icon .node-circle[data-v-40ce1bbb]{display:block;position:absolute;width:7px;height:7px;left:50%;top:50%;transform:translate(-50%) translateY(-50%);border-radius:10px;background-color:#eee}.node-finished[data-v-40ce1bbb]{text-decoration:line-through;color:#999}.node-ul[data-v-76360f51]{display:grid;grid-template-rows:1fr;transition:.25s grid-template-rows ease}.node-ul ul[data-v-76360f51]{background-color:#fff;margin:0;padding:0;list-style:none;overflow:hidden}.node-li[data-v-76360f51]{padding:0;list-style:none;margin:0;line-height:1.5;position:relative;overflow:hidden}[data-v-76360f51] .sublevel .node-li{margin-left:15px}[data-v-76360f51] .drag-over-top:before{content:"";width:100%;height:1px;top:0;background-color:#eee;position:absolute;z-index:100}[data-v-76360f51] .drag-over-center{background-color:#eee}[data-v-76360f51] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#eee;position:absolute;bottom:0;z-index:100}[data-v-76360f51] .has-child:not(.collapsed) .drag-over-bottom:after{left:15px}.collapsed>.node-ul[data-v-76360f51]{grid-template-rows:0fr}[data-v-76360f51] .collapsed .node-icon .node-line{display:none}[data-v-76360f51] .collapsed.has-child>.node-div>.node-icon{background-color:#ddd}.tree-title[data-v-76360f51]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-76360f51] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}[data-v-76360f51] .node-li.dragging .node-icon .node-line{display:none}[data-v-76360f51] .has-child>.node-div>.node-icon .node-line{content:"";position:absolute;top:20px;left:50%;height:9999px;width:1px;background-color:#f2f2f2}[data-v-76360f51] .has-child>.node-div>.node-icon:hover .node-line{background-color:var(--line-color)}.dragging-image{max-width:300px;opacity:.5}.record-tree-popper-content{display:flex;flex-wrap:wrap;padding:10px;box-shadow:0 2px 12px #1d1c1c1f;border:1px solid rgba(29,28,28,.12);border-radius:5px;overflow:hidden;background:#fff;z-index:9999}.record-tree-popper-content-item{padding:8px 10px;display:flex;align-items:center;justify-content:center;cursor:pointer}.record-tree-popper-content-item.active{background:#f2f2f2}.record-tree-title-bar{position:relative;display:flex;padding:3px 0 5px}.record-tree-title{padding-left:25px;font-weight:700;outline:none;font-size:18px;line-height:1.5;width:100%}.record-tree-popper-reference{display:flex;position:absolute;top:0;left:0;text-align:center;border-radius:9999px;color:#fff}.record-tree-empty-icon{display:inline-block;border-radius:9999px}.record-tree-title .node-text{margin-left:0!important}.record-tree-title-bar .popper{transform:translate3d(0,22px,0)!important}.record-tree-title-finished{text-decoration:line-through;color:#999}.record-audio[data-v-e59bd63b]{position:absolute;background:#fff;padding:20px;width:400px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.record-audio .recwave[data-v-e59bd63b]{width:300px;height:40px}.record-audio .audio-item[data-v-e59bd63b]{margin-top:10px;display:flex;align-items:center}.record-audio .audio-item a[data-v-e59bd63b]{color:#52a770;margin-left:10px;font-size:12px;cursor:pointer}.record-audio .audio-text[data-v-e59bd63b]{background:#f5f5f5;margin-top:10px;padding:8px 12px;border-radius:5px}.record-audio .buttons[data-v-e59bd63b]{margin-top:10px;display:flex;align-items:center}.record-audio .buttons .btn[data-v-e59bd63b]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.record-audio .buttons .finish[data-v-e59bd63b]{color:#fff;background:#1677ff;border:1px solid #1677ff}.record-audio .buttons .disabled[data-v-e59bd63b]{background:#eee;cursor:default;border-color:#eee}.record-audio .buttons .cancel[data-v-e59bd63b]{border:1px solid #eee}.record-audio .buttons .oper[data-v-e59bd63b]{margin-right:10px}.record-audio .main[data-v-e59bd63b]{display:flex;align-items:center}.record-audio .duration[data-v-e59bd63b]{width:60px;margin-left:10px;color:#999;font-size:12px}.wrap[data-v-e59bd63b]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-e59bd63b]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-audio-mobile[data-v-e59bd63b]{display:flex;width:100vw;position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);z-index:999;align-items:center}.record-audio-mobile .recwave[data-v-e59bd63b]{flex:1;height:30px}.record-audio-mobile .oper[data-v-e59bd63b]{margin-right:10px}.record-video[data-v-9c809fcc]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-9c809fcc]{width:300px}.buttons[data-v-9c809fcc]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-9c809fcc]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-9c809fcc]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-9c809fcc]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-9c809fcc]{border:1px solid #eee}.buttons .oper[data-v-9c809fcc]{margin-right:10px}.wrap[data-v-9c809fcc]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-9c809fcc]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-video[data-v-69fc6ef1]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;width:452px;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-69fc6ef1]{width:200px}.img-item[data-v-69fc6ef1]{width:200px;height:150px;border:1px dashed #eee;margin-left:10px}.img-item img[data-v-69fc6ef1]{width:200px}.record-content[data-v-69fc6ef1]{display:flex}.buttons[data-v-69fc6ef1]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-69fc6ef1]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-69fc6ef1]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-69fc6ef1]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-69fc6ef1]{border:1px solid #eee}.buttons .oper[data-v-69fc6ef1]{margin-right:10px}.wrap[data-v-69fc6ef1]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-69fc6ef1]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-tree-mobile .record-tree{height:calc(100vh - 45px);overflow-y:scroll}.record-tree-mobile .record-tree-main{padding-left:0;padding-right:0}.record-tree-mobile .record-tree-options{padding:12px 0;display:flex;position:fixed}.record-tree-mobile .node-icon{margin-right:8px;border:3px solid #fff}.record-tree-mobile .node-icon .node-circle{width:10px;height:10px}.record-tree-mobile .node-file-wrap{width:200px}.record-tree-mobile .node-file-right{display:none}.record-tree-mobile .node-image img{width:auto;max-height:80px}.record-tree-mobile .node-audio,.record-tree-mobile .node-video{width:200px}.record-tree-mobile .node-audio audio{width:200px;outline:none}.record-tree-mobile .node-video video{width:200px;outline:none}.record-tree-container{position:relative;height:100%}.record-tree-main{padding-left:15px;padding-right:15px;overflow:scroll;flex:1}.record-tree{position:relative;padding-bottom:40px;display:flex;flex-direction:column;overflow:hidden;height:100%}.record-tree.record-tree-nobar{padding-bottom:0}.record-tree-options{position:absolute;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;padding:5px 0;background:#fff;border-top:1px dotted #ddd;align-items:center}.record-tree-option-left{display:flex;flex:1}.record-tree-option-left-fixed{display:flex;position:relative;align-items:center;padding:0 10px}.record-tree-option-left-fixed:after{content:"";position:absolute;right:0;width:1px;background:#eee;height:20px;top:50%;transform:translateY(-50%)}.record-tree-option-left-scroll{display:flex;padding:0 10px;flex:1;align-items:center}.record-tree-option-left-scroll::-webkit-scrollbar{display:none}.record-tree-option-left-scroll-mobile{overflow-x:scroll}.record-tree-option-right{display:flex;align-items:center;justify-content:center;padding:0 10px;font-size:16px;position:relative}.record-tree-option-right:before{content:"";position:absolute;left:0;width:1px;background:#eee;height:20px;top:50%;transform:translateY(-50%)}.record-tree-option-item{margin:0 5px;cursor:pointer;display:flex;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}img:fullscreen{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;-o-object-fit:contain;object-fit:contain}.record-tree .node-text{flex:1;border:none;outline:none;word-break:break-all;overflow:hidden;-webkit-user-select:text;-moz-user-select:text;user-select:text}.record-tree .node-text a{color:#0076ff;cursor:pointer}.record-tree .node-text mark{background-color:transparent;text-decoration:underline;text-decoration-color:#9acd32;text-decoration-thickness:2px;text-underline-offset:2px}.record-tree .node-text p{line-height:1.3}.date-popover{display:block;padding:5px 10px;background:#333;border-radius:4px;position:fixed;z-index:9999;transform:translate(-50%,-120%);font-size:12px;color:#666;text-align:center;transition:opacity .3s;color:#fff}.date-popover:after{content:"";position:absolute;top:95%;left:50%;transform:translate(-50%);border-width:6px;border-style:solid;border-color:#333 transparent transparent transparent}.date-popover.date-popover--bottom{transform:translate(-50%,20%)}.date-popover.date-popover--bottom:after{top:auto;bottom:95%;border-color:transparent transparent #333 transparent}.tiptap p.is-editor-empty:first-child:before{color:#adb5bd;content:attr(data-placeholder);float:left;height:0;pointer-events:none}.top-bar{display:flex}.top-bar-left{flex:1}.top-bar-right{width:80px;display:flex;justify-content:center;align-items:center}.record-tree-lock{position:absolute;left:0;right:0;top:0;background:#fff;opacity:.5;pointer-events:none;height:100%}.record-tree-clipboard{position:fixed;left:0;top:0;right:0;display:flex;justify-content:space-between;background:#eee;padding:8px 20px;z-index:999}.record-tree-clipboard-text{flex:1;font-size:12px;color:#333;min-width:0}.record-tree-clipboard-text p{color:#999}.record-tree-clipboard-text div{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.record-tree-clipboard-operation{display:flex;align-items:center;justify-content:center}.record-tree-context-menu{position:fixed;z-index:10000;background:#fff;border-radius:6px;box-shadow:0 2px 12px #00000026;padding:4px 0;min-width:120px}.record-tree-context-menu .context-menu-item{display:flex;align-items:center;padding:8px 12px;cursor:pointer;font-size:14px;color:#333;transition:background-color .2s}.record-tree-context-menu .context-menu-item:hover{background-color:#f5f5f5}.record-tree-context-menu .context-menu-item svg{margin-right:8px}.record-tree-context-menu .context-menu-item span{white-space:nowrap}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { openBlock as tt, createElementBlock as ut, createElementVNode as Ze, createVNode as
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.color-panel[data-v-d2cde42f]{background:#fff;border:1px solid #f2f2f2;width:164px;padding:5px 5px 0}.color-panel ul[data-v-d2cde42f]{list-style-type:none;margin:0}.color-panel ul li[data-v-d2cde42f]{display:inline-block;margin:0 5px;width:20px;height:20px;border-radius:100%;border:1px solid #f2f2f2;display:inline-flex;align-items:center;justify-content:center}.node-complex[data-v-6cfd6a1b]{display:flex;flex-direction:row;align-self:center;outline:none}.holder[data-v-6cfd6a1b]{width:0px;overflow:hidden;border-width:1px;border-style:solid;border-color:transparent;outline:none}.node-element[data-v-6cfd6a1b]{display:inline-block;position:relative;margin:5px 1px}.node-element:hover .node-del[data-v-6cfd6a1b]{display:block}.node-image img[data-v-6cfd6a1b]{outline:none}.node-audio[data-v-6cfd6a1b]{width:300px}.node-audio audio[data-v-6cfd6a1b]{width:300px;outline:none}.node-video video[data-v-6cfd6a1b]{outline:none;-o-object-fit:cover;object-fit:cover;background-color:#000}.node-del[data-v-6cfd6a1b]{cursor:pointer;display:none;width:15px;height:15px;position:absolute;top:-3px;right:-3px;background-color:#e6f7ff;background-size:100% 100%;border-radius:50%}.node-del[data-v-6cfd6a1b]:before,.node-del[data-v-6cfd6a1b]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:10px;background-color:#595959}.node-del[data-v-6cfd6a1b]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-6cfd6a1b]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-file-wrap[data-v-6cfd6a1b]{width:260px;padding:10px 16px;display:flex;background:#f2f2f2;border-radius:5px;justify-content:center;align-items:center}.node-file-left[data-v-6cfd6a1b]{flex:1}.node-file-left h6[data-v-6cfd6a1b]{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;white-space:nowrap}.node-file-left p[data-v-6cfd6a1b]{margin:0;padding:0;font-size:12px;color:#999}.node-file-right a[data-v-6cfd6a1b]{color:#52a770;font-size:14px}@keyframes blinkBorder-6cfd6a1b{0%,to{border-color:transparent}50%{border-color:#333}}.node-complex .holder[data-v-6cfd6a1b]:focus{animation:blinkBorder-6cfd6a1b 1s infinite}.fullscreen-handle[data-v-6cfd6a1b]{width:15px;height:15px;position:absolute;bottom:0;right:16px;cursor:pointer;background:#fff9}.resize-handle[data-v-6cfd6a1b]{width:15px;height:15px;position:absolute;bottom:0;right:0;cursor:se-resize;transform:rotate(90deg);background:#fff9}.resize-handle svg[data-v-6cfd6a1b]{cursor:se-resize}.media-placeholder[data-v-6cfd6a1b]{-o-object-fit:contain;object-fit:contain;border:1px dashed #d0d0d0;border-radius:4px;background:#fafafa;display:flex;align-items:center;justify-content:center;width:50px;height:50px}.media-placeholder img[data-v-6cfd6a1b]{width:20px;height:20px;animation:bounce-6cfd6a1b 1s ease-in-out infinite}.media-fail[data-v-6cfd6a1b]{-o-object-fit:contain;object-fit:contain;border-radius:4px;display:flex;align-items:center;justify-content:center}.media-fail img[data-v-6cfd6a1b]{width:40px;height:40px}@keyframes bounce-6cfd6a1b{0%,to{transform:translateY(0)}50%{transform:translateY(-8px)}}.ProseMirror{outline:none}.node-div[data-v-40ce1bbb]{display:flex;align-items:center;position:relative;margin-bottom:8px}.node-div>div[data-v-40ce1bbb]{flex:1}.node-icon[data-v-40ce1bbb]{touch-action:manipulation;position:relative;width:21px;height:21px;border-radius:100%;box-sizing:border-box;border:5px solid #fff;background-color:#fff;cursor:pointer;align-self:flex-start}.node-icon-with-children[data-v-40ce1bbb]:before{content:"";position:absolute;top:-20px;right:-30px;bottom:-10px;left:-20px;z-index:5}.node-icon-todo[data-v-40ce1bbb]{border-radius:0}.node-icon .node-circle[data-v-40ce1bbb]{display:block;position:absolute;width:7px;height:7px;left:50%;top:50%;transform:translate(-50%) translateY(-50%);border-radius:10px;background-color:#eee}.node-finished[data-v-40ce1bbb]{text-decoration:line-through;color:#999}.node-ul[data-v-dc61c4c0]{display:grid;grid-template-rows:1fr;transition:.25s grid-template-rows ease}.node-ul ul[data-v-dc61c4c0]{background-color:#fff;margin:0;padding:0;list-style:none;overflow:hidden}.node-li[data-v-dc61c4c0]{padding:0;list-style:none;margin:0;line-height:1.5;position:relative;overflow:hidden}[data-v-dc61c4c0] .sublevel .node-li{margin-left:15px}[data-v-dc61c4c0] .drag-over-top:before{content:"";width:100%;height:1px;top:0;background-color:#eee;position:absolute;z-index:100}[data-v-dc61c4c0] .drag-over-center{background-color:#eee}[data-v-dc61c4c0] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#eee;position:absolute;bottom:0;z-index:100}[data-v-dc61c4c0] .has-child:not(.collapsed) .drag-over-bottom:after{left:15px}.collapsed>.node-ul[data-v-dc61c4c0]{grid-template-rows:0fr}[data-v-dc61c4c0] .collapsed .node-icon .node-line{display:none}[data-v-dc61c4c0] .collapsed.has-child>.node-div>.node-icon{background-color:#ddd}.tree-title[data-v-dc61c4c0]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-dc61c4c0] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}[data-v-dc61c4c0] .node-li.dragging .node-icon .node-line{display:none}[data-v-dc61c4c0] .has-child>.node-div>.node-icon .node-line{content:"";position:absolute;top:20px;left:50%;height:9999px;width:1px;background-color:#f2f2f2}[data-v-dc61c4c0] .has-child>.node-div>.node-icon:hover .node-line{background-color:var(--line-color)}.dragging-image{max-width:300px;opacity:.5}.record-tree-popper-content{display:flex;flex-wrap:wrap;padding:10px;box-shadow:0 2px 12px #1d1c1c1f;border:1px solid rgba(29,28,28,.12);border-radius:5px;overflow:hidden;background:#fff;z-index:9999}.record-tree-popper-content-item{padding:8px 10px;display:flex;align-items:center;justify-content:center;cursor:pointer}.record-tree-popper-content-item.active{background:#f2f2f2}.record-tree-title-bar{position:relative;display:flex;padding:3px 0 5px}.record-tree-title{padding-left:25px;font-weight:700;outline:none;font-size:18px;line-height:1.5;width:100%}.record-tree-popper-reference{display:flex;position:absolute;top:0;left:0;text-align:center;border-radius:9999px;color:#fff}.record-tree-empty-icon{display:inline-block;border-radius:9999px}.record-tree-title .node-text{margin-left:0!important}.record-tree-title-bar .popper{transform:translate3d(0,22px,0)!important}.record-tree-title-finished{text-decoration:line-through;color:#999}.record-audio[data-v-e59bd63b]{position:absolute;background:#fff;padding:20px;width:400px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.record-audio .recwave[data-v-e59bd63b]{width:300px;height:40px}.record-audio .audio-item[data-v-e59bd63b]{margin-top:10px;display:flex;align-items:center}.record-audio .audio-item a[data-v-e59bd63b]{color:#52a770;margin-left:10px;font-size:12px;cursor:pointer}.record-audio .audio-text[data-v-e59bd63b]{background:#f5f5f5;margin-top:10px;padding:8px 12px;border-radius:5px}.record-audio .buttons[data-v-e59bd63b]{margin-top:10px;display:flex;align-items:center}.record-audio .buttons .btn[data-v-e59bd63b]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.record-audio .buttons .finish[data-v-e59bd63b]{color:#fff;background:#1677ff;border:1px solid #1677ff}.record-audio .buttons .disabled[data-v-e59bd63b]{background:#eee;cursor:default;border-color:#eee}.record-audio .buttons .cancel[data-v-e59bd63b]{border:1px solid #eee}.record-audio .buttons .oper[data-v-e59bd63b]{margin-right:10px}.record-audio .main[data-v-e59bd63b]{display:flex;align-items:center}.record-audio .duration[data-v-e59bd63b]{width:60px;margin-left:10px;color:#999;font-size:12px}.wrap[data-v-e59bd63b]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-e59bd63b]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-audio-mobile[data-v-e59bd63b]{display:flex;width:100vw;position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);z-index:999;align-items:center}.record-audio-mobile .recwave[data-v-e59bd63b]{flex:1;height:30px}.record-audio-mobile .oper[data-v-e59bd63b]{margin-right:10px}.record-video[data-v-9c809fcc]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-9c809fcc]{width:300px}.buttons[data-v-9c809fcc]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-9c809fcc]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-9c809fcc]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-9c809fcc]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-9c809fcc]{border:1px solid #eee}.buttons .oper[data-v-9c809fcc]{margin-right:10px}.wrap[data-v-9c809fcc]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-9c809fcc]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-video[data-v-69fc6ef1]{position:absolute;background:#fff;padding:20px;left:50%;top:50%;width:452px;transform:translate(-50%,-50%);border-radius:10px;z-index:999;box-shadow:0 4px 6px #0000001a,0 1px 3px #00000014}.video-item[data-v-69fc6ef1]{width:200px}.img-item[data-v-69fc6ef1]{width:200px;height:150px;border:1px dashed #eee;margin-left:10px}.img-item img[data-v-69fc6ef1]{width:200px}.record-content[data-v-69fc6ef1]{display:flex}.buttons[data-v-69fc6ef1]{margin-top:10px;display:flex;align-items:center}.buttons .btn[data-v-69fc6ef1]{margin-right:10px;font-size:14px;width:80px;padding:6px 0;text-align:center;cursor:pointer;border-radius:20px}.buttons .finish[data-v-69fc6ef1]{color:#fff;background:#1677ff;border:1px solid #1677ff}.buttons .disabled[data-v-69fc6ef1]{background:#eee;cursor:default;border-color:#eee}.buttons .cancel[data-v-69fc6ef1]{border:1px solid #eee}.buttons .oper[data-v-69fc6ef1]{margin-right:10px}.wrap[data-v-69fc6ef1]{position:fixed;left:0;top:0;bottom:0;z-index:9999}.mask[data-v-69fc6ef1]{position:absolute;left:0;top:0;right:0;bottom:0;background:#fffc}.record-tree-mobile .record-tree{height:calc(100vh - 45px);overflow-y:scroll}.record-tree-mobile .record-tree-main{padding-left:0;padding-right:0}.record-tree-mobile .record-tree-options{padding:12px 0;display:flex;position:fixed}.record-tree-mobile .node-icon{margin-right:8px;border:3px solid #fff}.record-tree-mobile .node-icon .node-circle{width:10px;height:10px}.record-tree-mobile .node-file-wrap{width:200px}.record-tree-mobile .node-file-right{display:none}.record-tree-mobile .node-image img{width:auto;max-height:80px}.record-tree-mobile .node-audio,.record-tree-mobile .node-video{width:200px}.record-tree-mobile .node-audio audio{width:200px;outline:none}.record-tree-mobile .node-video video{width:200px;outline:none}.record-tree-container{position:relative;height:100%}.record-tree-main{padding-left:15px;padding-right:15px;overflow:scroll;flex:1}.record-tree{position:relative;padding-bottom:40px;display:flex;flex-direction:column;overflow:hidden;height:100%}.record-tree.record-tree-nobar{padding-bottom:0}.record-tree-options{position:absolute;bottom:0;left:0;width:100%;display:flex;justify-content:space-between;padding:5px 0;background:#fff;border-top:1px dotted #ddd;align-items:center}.record-tree-option-left{display:flex;flex:1}.record-tree-option-left-fixed{display:flex;position:relative;align-items:center;padding:0 10px}.record-tree-option-left-fixed:after{content:"";position:absolute;right:0;width:1px;background:#eee;height:20px;top:50%;transform:translateY(-50%)}.record-tree-option-left-scroll{display:flex;padding:0 10px;flex:1;align-items:center}.record-tree-option-left-scroll::-webkit-scrollbar{display:none}.record-tree-option-left-scroll-mobile{overflow-x:scroll}.record-tree-option-right{display:flex;align-items:center;justify-content:center;padding:0 10px;font-size:16px;position:relative}.record-tree-option-right:before{content:"";position:absolute;left:0;width:1px;background:#eee;height:20px;top:50%;transform:translateY(-50%)}.record-tree-option-item{margin:0 5px;cursor:pointer;display:flex;justify-content:center;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}img:fullscreen{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;-o-object-fit:contain;object-fit:contain}.record-tree .node-text{flex:1;border:none;outline:none;word-break:break-all;overflow:hidden;-webkit-user-select:text;-moz-user-select:text;user-select:text}.record-tree .node-text a{color:#0076ff;cursor:pointer}.record-tree .node-text mark{background-color:transparent;text-decoration:underline;text-decoration-color:#9acd32;text-decoration-thickness:2px;text-underline-offset:2px}.record-tree .node-text p{line-height:1.3}.date-popover{display:block;padding:5px 10px;background:#333;border-radius:4px;position:fixed;z-index:9999;transform:translate(-50%,-120%);font-size:12px;color:#666;text-align:center;transition:opacity .3s;color:#fff}.date-popover:after{content:"";position:absolute;top:95%;left:50%;transform:translate(-50%);border-width:6px;border-style:solid;border-color:#333 transparent transparent transparent}.date-popover.date-popover--bottom{transform:translate(-50%,20%)}.date-popover.date-popover--bottom:after{top:auto;bottom:95%;border-color:transparent transparent #333 transparent}.tiptap p.is-editor-empty:first-child:before{color:#adb5bd;content:attr(data-placeholder);float:left;height:0;pointer-events:none}.top-bar{display:flex}.top-bar-left{flex:1}.top-bar-right{width:80px;display:flex;justify-content:center;align-items:center}.record-tree-lock{position:absolute;left:0;right:0;top:0;background:#fff;opacity:.5;pointer-events:none;height:100%}.record-tree-clipboard{position:fixed;left:0;top:0;right:0;display:flex;justify-content:space-between;background:#eee;padding:8px 20px;z-index:999}.record-tree-clipboard-text{flex:1;font-size:12px;color:#333;min-width:0}.record-tree-clipboard-text p{color:#999}.record-tree-clipboard-text div{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.record-tree-clipboard-operation{display:flex;align-items:center;justify-content:center}.record-tree-context-menu{position:fixed;z-index:10000;background:#fff;border-radius:6px;box-shadow:0 2px 12px #00000026;padding:4px 0;min-width:120px}.record-tree-context-menu .context-menu-item{display:flex;align-items:center;padding:8px 12px;cursor:pointer;font-size:14px;color:#333;transition:background-color .2s}.record-tree-context-menu .context-menu-item:hover{background-color:#f5f5f5}.record-tree-context-menu .context-menu-item svg{margin-right:8px}.record-tree-context-menu .context-menu-item span{white-space:nowrap}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
import { openBlock as tt, createElementBlock as ut, createElementVNode as Ze, createVNode as bt, unref as We, Fragment as S0, renderList as T0, normalizeStyle as Pt, reactive as La, ref as ot, watch as Wt, withModifiers as Dt, normalizeClass as Ot, createCommentVNode as Tt, toDisplayString as Jt, nextTick as Ht, onMounted as G0, onBeforeUnmount as q0, createBlock as Ut, onUnmounted as _0, computed as e0, resolveComponent as Ia, createSlots as ca, withCtx as M0, pushScopeId as Oa, popScopeId as Fa, Teleport as Na } from "vue";
|
|
3
3
|
import da from "vue3-popper";
|
|
4
4
|
import At from "vue-inline-svg";
|
|
5
|
-
import { detectDeviceType as W0, truncateString as Ha, formatBytes as Ya, getTag as fa, isTodoTag as va, getExt as R0, getTagStyle as ha, uuid as
|
|
5
|
+
import { detectDeviceType as W0, truncateString as Ha, formatBytes as Ya, getTag as fa, isTodoTag as va, getExt as R0, getTagStyle as ha, uuid as zt, getTagStyleById as Va, parseMimeType as ma, getSize as _a, oss as pa } from "@codernote/utils";
|
|
6
6
|
import Pa from "mitt";
|
|
7
7
|
import { useEditor as Ua, EditorContent as za } from "@tiptap/vue-3";
|
|
8
8
|
import Ga from "@tiptap/extension-link";
|
|
@@ -79,7 +79,7 @@ const Qa = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
79
79
|
return (B, ne) => (tt(), ut("div", gr, [
|
|
80
80
|
Ze("ul", null, [
|
|
81
81
|
Ze("li", null, [
|
|
82
|
-
|
|
82
|
+
bt(We(At), {
|
|
83
83
|
src: We(xt).clear,
|
|
84
84
|
width: 16,
|
|
85
85
|
height: 16,
|
|
@@ -311,24 +311,24 @@ const Cr = ["contenteditable"], kr = {
|
|
|
311
311
|
function y(q) {
|
|
312
312
|
if (q.currentTarget !== V.value)
|
|
313
313
|
return;
|
|
314
|
-
const z = q.clientX, Ae = q.clientY,
|
|
314
|
+
const z = q.clientX, Ae = q.clientY, Pe = parseInt(
|
|
315
315
|
document.defaultView.getComputedStyle(me.value).width,
|
|
316
316
|
10
|
|
317
|
-
),
|
|
317
|
+
), Ye = parseInt(
|
|
318
318
|
document.defaultView.getComputedStyle(me.value).height,
|
|
319
319
|
10
|
|
320
|
-
), Je =
|
|
321
|
-
let
|
|
320
|
+
), Je = Pe / Ye;
|
|
321
|
+
let Ve = Pe, U = Ye;
|
|
322
322
|
const ht = (Se) => {
|
|
323
|
-
let Re =
|
|
324
|
-
const { origWidth:
|
|
325
|
-
|
|
323
|
+
let Re = Pe + Se.clientX - z, Ue = Ye + Se.clientY - Ae;
|
|
324
|
+
const { origWidth: He, origHeight: ie } = B.data.size || {};
|
|
325
|
+
He && ie && (Re = Math.min(Re, He), Ue = Math.min(Ue, ie)), Re = Math.max(Re, 50), Ue = Math.max(Ue, 50), Re / Ue > Je ? (Ve = Ue * Je, U = Ue, me.value.style.height = U + "px", me.value.style.width = Ve + "px") : (Ve = Re, U = Re / Je, me.value.style.width = Re + "px", me.value.style.height = U + "px");
|
|
326
326
|
}, et = () => {
|
|
327
327
|
document.documentElement.removeEventListener("mousemove", ht, !1), document.documentElement.removeEventListener("mouseup", et, !1), ue("change", {
|
|
328
328
|
...B.data,
|
|
329
329
|
size: {
|
|
330
330
|
...B.data.size || {},
|
|
331
|
-
width:
|
|
331
|
+
width: Ve,
|
|
332
332
|
height: U
|
|
333
333
|
}
|
|
334
334
|
});
|
|
@@ -414,7 +414,7 @@ const Cr = ["contenteditable"], kr = {
|
|
|
414
414
|
ref: V,
|
|
415
415
|
onMousedown: Dt(y, ["prevent", "stop"])
|
|
416
416
|
}, [
|
|
417
|
-
|
|
417
|
+
bt(We(At), {
|
|
418
418
|
src: We(xt).resize,
|
|
419
419
|
width: 15,
|
|
420
420
|
height: 15
|
|
@@ -427,7 +427,7 @@ const Cr = ["contenteditable"], kr = {
|
|
|
427
427
|
ref: J,
|
|
428
428
|
onMousedown: Dt(ce, ["prevent", "stop"])
|
|
429
429
|
}, [
|
|
430
|
-
|
|
430
|
+
bt(We(At), {
|
|
431
431
|
src: We(xt).fullscreen,
|
|
432
432
|
width: 15,
|
|
433
433
|
height: 15
|
|
@@ -644,11 +644,11 @@ const Ur = new RegExp(`(${xa.join("|")})`, "g"), zr = /<\/?mark>/g, Sa = (_) =>
|
|
|
644
644
|
spellcheck: "false"
|
|
645
645
|
},
|
|
646
646
|
handleKeyDown(ce, y) {
|
|
647
|
-
const { selection: oe, doc: pe } = ce.state, { from: q, to: z } = oe, Ae = pe.content.size - 1,
|
|
647
|
+
const { selection: oe, doc: pe } = ce.state, { from: q, to: z } = oe, Ae = pe.content.size - 1, Pe = q === 1 && z === 1, Ye = q === Ae && z === Ae;
|
|
648
648
|
return dt.pos = q, // 回车,缩进,光标上下移动
|
|
649
649
|
["Enter", "Tab", "ArrowUp", "ArrowDown"].includes(y.key) || // 行首生效: 删除,和光标左移到上一行仅在
|
|
650
|
-
["Backspace", "ArrowLeft"].includes(y.key) &&
|
|
651
|
-
["ArrowRight"].includes(y.key) &&
|
|
650
|
+
["Backspace", "ArrowLeft"].includes(y.key) && Pe || // 行尾生效:光标右移到下一行
|
|
651
|
+
["ArrowRight"].includes(y.key) && Ye ? (B("keydown", y), !0) : !1;
|
|
652
652
|
}
|
|
653
653
|
},
|
|
654
654
|
onUpdate() {
|
|
@@ -715,7 +715,7 @@ const Ur = new RegExp(`(${xa.join("|")})`, "g"), zr = /<\/?mark>/g, Sa = (_) =>
|
|
|
715
715
|
focus: Be,
|
|
716
716
|
bold: W,
|
|
717
717
|
color: ve
|
|
718
|
-
}), (ce, y) => (tt(),
|
|
718
|
+
}), (ce, y) => (tt(), Ut(We(za), {
|
|
719
719
|
editor: We(J),
|
|
720
720
|
ref_key: "container",
|
|
721
721
|
ref: b,
|
|
@@ -786,7 +786,7 @@ const Ur = new RegExp(`(${xa.join("|")})`, "g"), zr = /<\/?mark>/g, Sa = (_) =>
|
|
|
786
786
|
return X({
|
|
787
787
|
focus,
|
|
788
788
|
dispatch: Be
|
|
789
|
-
}), (Me, G) => _.data.type ? (tt(),
|
|
789
|
+
}), (Me, G) => _.data.type ? (tt(), Ut(We(Yr), {
|
|
790
790
|
key: `media-${_.data.type}`,
|
|
791
791
|
ref_key: "mediaEditor",
|
|
792
792
|
ref: ue,
|
|
@@ -796,7 +796,7 @@ const Ur = new RegExp(`(${xa.join("|")})`, "g"), zr = /<\/?mark>/g, Sa = (_) =>
|
|
|
796
796
|
onKeydown: V,
|
|
797
797
|
onFocus: me,
|
|
798
798
|
onRemove: be
|
|
799
|
-
}, null, 8, ["data", "readOnly"])) : (tt(),
|
|
799
|
+
}, null, 8, ["data", "readOnly"])) : (tt(), Ut(We(qr), {
|
|
800
800
|
key: "text",
|
|
801
801
|
ref_key: "textEditor",
|
|
802
802
|
ref: b,
|
|
@@ -859,22 +859,22 @@ const Ur = new RegExp(`(${xa.join("|")})`, "g"), zr = /<\/?mark>/g, Sa = (_) =>
|
|
|
859
859
|
function be() {
|
|
860
860
|
const z = (/* @__PURE__ */ new Date()).getTime(), Ae = z - ue;
|
|
861
861
|
clearTimeout(B);
|
|
862
|
-
const
|
|
863
|
-
Ae <
|
|
862
|
+
const Pe = 500;
|
|
863
|
+
Ae < Pe && Ae > 0 ? (ue = 0, b("change", {
|
|
864
864
|
...$.node,
|
|
865
865
|
collapsed: !$.node.collapsed
|
|
866
866
|
})) : (B = setTimeout(() => {
|
|
867
867
|
if (me.value) {
|
|
868
|
-
const
|
|
868
|
+
const Ye = R0($.node);
|
|
869
869
|
q({
|
|
870
870
|
...$.node,
|
|
871
871
|
ext: {
|
|
872
|
-
...
|
|
873
|
-
finished: !
|
|
872
|
+
...Ye,
|
|
873
|
+
finished: !Ye.finished
|
|
874
874
|
}
|
|
875
875
|
});
|
|
876
876
|
}
|
|
877
|
-
},
|
|
877
|
+
}, Pe), ue = z);
|
|
878
878
|
}
|
|
879
879
|
function xe() {
|
|
880
880
|
const z = $.node;
|
|
@@ -910,9 +910,9 @@ const Ur = new RegExp(`(${xa.join("|")})`, "g"), zr = /<\/?mark>/g, Sa = (_) =>
|
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
function Me(z) {
|
|
913
|
-
var
|
|
913
|
+
var Pe;
|
|
914
914
|
const Ae = $.node;
|
|
915
|
-
z.preventDefault(), !((
|
|
915
|
+
z.preventDefault(), !((Pe = Ae.children) != null && Pe.length) && (dt.pos = null, b("toPrevFocus", Ae, !0), pe());
|
|
916
916
|
}
|
|
917
917
|
function G(z) {
|
|
918
918
|
b("tab", z, $.node);
|
|
@@ -924,16 +924,16 @@ const Ur = new RegExp(`(${xa.join("|")})`, "g"), zr = /<\/?mark>/g, Sa = (_) =>
|
|
|
924
924
|
...Ae,
|
|
925
925
|
collapsed: !1
|
|
926
926
|
});
|
|
927
|
-
const
|
|
927
|
+
const Pe = {
|
|
928
928
|
text: "",
|
|
929
|
-
uuid:
|
|
930
|
-
},
|
|
931
|
-
if (typeof
|
|
932
|
-
const { left: Je, right:
|
|
933
|
-
Ae.text = Je,
|
|
934
|
-
}
|
|
935
|
-
Ae.children ? Ae.children.unshift(
|
|
936
|
-
dt.pos = 0, b("toFocus",
|
|
929
|
+
uuid: zt()
|
|
930
|
+
}, Ye = Ae.text;
|
|
931
|
+
if (typeof Ye == "string") {
|
|
932
|
+
const { left: Je, right: Ve } = ga(Ye, dt.pos - 1);
|
|
933
|
+
Ae.text = Je, Pe.text = Ve;
|
|
934
|
+
}
|
|
935
|
+
Ae.children ? Ae.children.unshift(Pe) : Ae.children = [Pe], q(), Ht(() => {
|
|
936
|
+
dt.pos = 0, b("toFocus", Pe);
|
|
937
937
|
});
|
|
938
938
|
} else
|
|
939
939
|
b("enter", Ae);
|
|
@@ -977,7 +977,7 @@ const Ur = new RegExp(`(${xa.join("|")})`, "g"), zr = /<\/?mark>/g, Sa = (_) =>
|
|
|
977
977
|
})
|
|
978
978
|
}, null, 4)
|
|
979
979
|
], 2),
|
|
980
|
-
|
|
980
|
+
bt(We(Ta), {
|
|
981
981
|
ref_key: "editor",
|
|
982
982
|
ref: ne,
|
|
983
983
|
class: Ot({
|
|
@@ -1094,7 +1094,7 @@ const Zr = {
|
|
|
1094
1094
|
],
|
|
1095
1095
|
setup(_, { expose: X, emit: $ }) {
|
|
1096
1096
|
const b = _, ue = $;
|
|
1097
|
-
X({ appendNode:
|
|
1097
|
+
X({ appendNode: Pe, updateNode: Ye, head: Ae, addFiles: z });
|
|
1098
1098
|
let B = null, ne = null;
|
|
1099
1099
|
function V() {
|
|
1100
1100
|
B && (clearTimeout(B), B = null), ne && (d0.off("dragEnd", ne), ne = null);
|
|
@@ -1102,7 +1102,7 @@ const Zr = {
|
|
|
1102
1102
|
q0(V), Wt(
|
|
1103
1103
|
() => b.nodes,
|
|
1104
1104
|
() => {
|
|
1105
|
-
|
|
1105
|
+
Ve();
|
|
1106
1106
|
},
|
|
1107
1107
|
{ immediate: !0 }
|
|
1108
1108
|
);
|
|
@@ -1114,15 +1114,15 @@ const Zr = {
|
|
|
1114
1114
|
Se.currentTarget.classList.add("dragging"), Se.dataTransfer.setData("dragNode", JSON.stringify(Re));
|
|
1115
1115
|
const Ue = me(Se.target);
|
|
1116
1116
|
Se.dataTransfer.setDragImage(Ue, 0, 0), ne && d0.off("dragEnd", ne), ne = () => {
|
|
1117
|
-
const
|
|
1118
|
-
et(
|
|
1117
|
+
const He = b.nodes.filter((ie) => ie !== Re);
|
|
1118
|
+
et(He);
|
|
1119
1119
|
}, d0.on("dragEnd", ne), dt.dragId = Re.uuid;
|
|
1120
1120
|
}
|
|
1121
1121
|
function be(Se) {
|
|
1122
1122
|
Se.currentTarget.classList.remove("dragging"), document.querySelectorAll(".dragging-image").forEach((Ue) => Ue.remove()), ne && (d0.off("dragEnd", ne), ne = null);
|
|
1123
1123
|
}
|
|
1124
1124
|
function xe(Se, Re) {
|
|
1125
|
-
var
|
|
1125
|
+
var He, ie, T;
|
|
1126
1126
|
Se.stopPropagation();
|
|
1127
1127
|
const Ue = Se.dataTransfer.files;
|
|
1128
1128
|
if (z0(), Ue.length)
|
|
@@ -1139,7 +1139,7 @@ const Zr = {
|
|
|
1139
1139
|
Re.uuid === e.uuid || // 拖拽到自己的子节点
|
|
1140
1140
|
y0(Re, e) || // 拖拽到自己的父节点
|
|
1141
1141
|
y0(e, Re, !1) && r === "center" || // 拖拽到父节点
|
|
1142
|
-
y0(e, Re, !1) && r === "bottom" && ((ie = (
|
|
1142
|
+
y0(e, Re, !1) && r === "bottom" && ((ie = (He = Re.children) == null ? void 0 : He[0]) == null ? void 0 : ie.uuid) === e.uuid
|
|
1143
1143
|
)
|
|
1144
1144
|
return;
|
|
1145
1145
|
let c = [...b.nodes];
|
|
@@ -1170,12 +1170,12 @@ const Zr = {
|
|
|
1170
1170
|
}
|
|
1171
1171
|
function Me(Se, Re) {
|
|
1172
1172
|
Se.preventDefault();
|
|
1173
|
-
const Ue = [...b.nodes],
|
|
1173
|
+
const Ue = [...b.nodes], He = Ue.findIndex((r) => r === Re), ie = v0();
|
|
1174
1174
|
if (Se.shiftKey)
|
|
1175
1175
|
ue("transfer", Re);
|
|
1176
|
-
else if (
|
|
1177
|
-
const r = b.nodes[
|
|
1178
|
-
r.collapsed && (r.collapsed = !1), r.children ? r.children.push(Re) : r.children = [Re], Ue.splice(
|
|
1176
|
+
else if (He > 0) {
|
|
1177
|
+
const r = b.nodes[He - 1];
|
|
1178
|
+
r.collapsed && (r.collapsed = !1), r.children ? r.children.push(Re) : r.children = [Re], Ue.splice(He, 1), et(Ue);
|
|
1179
1179
|
} else
|
|
1180
1180
|
Se.target.focus();
|
|
1181
1181
|
const T = () => {
|
|
@@ -1189,19 +1189,19 @@ const Zr = {
|
|
|
1189
1189
|
if (!b.allowEmpty && b.nodes.length === 1) {
|
|
1190
1190
|
const Ue = {
|
|
1191
1191
|
text: "",
|
|
1192
|
-
uuid:
|
|
1192
|
+
uuid: zt()
|
|
1193
1193
|
};
|
|
1194
1194
|
Re.push(Ue);
|
|
1195
|
-
const
|
|
1195
|
+
const He = () => {
|
|
1196
1196
|
q(Ue);
|
|
1197
1197
|
};
|
|
1198
|
-
dt.isMobile ? setTimeout(
|
|
1198
|
+
dt.isMobile ? setTimeout(He, 100) : setTimeout(He, 200);
|
|
1199
1199
|
}
|
|
1200
1200
|
et(Re);
|
|
1201
1201
|
}
|
|
1202
1202
|
function W(Se, Re) {
|
|
1203
|
-
const Ue = [...b.nodes],
|
|
1204
|
-
Se.children = Se.children.filter((ie) => ie !== Re), Ue.splice(
|
|
1203
|
+
const Ue = [...b.nodes], He = Ue.findIndex((ie) => ie === Se);
|
|
1204
|
+
Se.children = Se.children.filter((ie) => ie !== Re), Ue.splice(He + 1, 0, Re), et(Ue);
|
|
1205
1205
|
}
|
|
1206
1206
|
function ve(Se) {
|
|
1207
1207
|
b.enableDbEnter ? B ? (clearTimeout(B), B = null, ce()) : B = setTimeout(() => {
|
|
@@ -1212,14 +1212,14 @@ const Zr = {
|
|
|
1212
1212
|
ue("dbEnter");
|
|
1213
1213
|
}
|
|
1214
1214
|
function y(Se) {
|
|
1215
|
-
const Re = b.nodes.findIndex((r) => r.uuid === Se.uuid), Ue = [...b.nodes],
|
|
1215
|
+
const Re = b.nodes.findIndex((r) => r.uuid === Se.uuid), Ue = [...b.nodes], He = { text: "", uuid: zt() }, ie = Se.text;
|
|
1216
1216
|
if (typeof ie == "string") {
|
|
1217
1217
|
const { left: r, right: c } = ga(ie, dt.pos - 1);
|
|
1218
|
-
Ue[Re].text = r,
|
|
1218
|
+
Ue[Re].text = r, He.text = c;
|
|
1219
1219
|
}
|
|
1220
|
-
Ue.splice(Re + 1, 0,
|
|
1220
|
+
Ue.splice(Re + 1, 0, He), et(Ue);
|
|
1221
1221
|
const T = () => {
|
|
1222
|
-
const r = $t(
|
|
1222
|
+
const r = $t(He);
|
|
1223
1223
|
r && (dt.pos = 0, r.focus());
|
|
1224
1224
|
}, e = dt.isMobile ? 50 : 0;
|
|
1225
1225
|
setTimeout(T, e);
|
|
@@ -1227,11 +1227,11 @@ const Zr = {
|
|
|
1227
1227
|
function oe(Se, Re = !1) {
|
|
1228
1228
|
var ie;
|
|
1229
1229
|
let Ue = v0();
|
|
1230
|
-
const
|
|
1231
|
-
if (
|
|
1230
|
+
const He = b.nodes.findIndex((T) => T === Se);
|
|
1231
|
+
if (He === 0)
|
|
1232
1232
|
ue("focusPrev", Re);
|
|
1233
1233
|
else {
|
|
1234
|
-
const T = b.nodes[
|
|
1234
|
+
const T = b.nodes[He - 1], e = ((ie = T.children) == null ? void 0 : ie.length) && !T.collapsed, r = () => {
|
|
1235
1235
|
const c = $t(T, e);
|
|
1236
1236
|
if (!c)
|
|
1237
1237
|
return;
|
|
@@ -1247,9 +1247,9 @@ const Zr = {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
function pe(Se, Re = !1, Ue = !1) {
|
|
1249
1249
|
var e;
|
|
1250
|
-
const
|
|
1250
|
+
const He = v0(), ie = b.nodes.findIndex((r) => r === Se), T = (r) => {
|
|
1251
1251
|
const c = $t(r);
|
|
1252
|
-
c && s0(c, Re ? 0 :
|
|
1252
|
+
c && s0(c, Re ? 0 : He);
|
|
1253
1253
|
};
|
|
1254
1254
|
if (Ue && ((e = Se.children) != null && e.length) && !Se.collapsed) {
|
|
1255
1255
|
const r = Se.children[0];
|
|
@@ -1263,11 +1263,11 @@ const Zr = {
|
|
|
1263
1263
|
}
|
|
1264
1264
|
function q(Se, Re = !1) {
|
|
1265
1265
|
let Ue = v0();
|
|
1266
|
-
const
|
|
1266
|
+
const He = () => {
|
|
1267
1267
|
const T = $t(Se);
|
|
1268
1268
|
T && s0(T, Ue, Re);
|
|
1269
1269
|
}, ie = dt.isMobile ? 30 : 0;
|
|
1270
|
-
setTimeout(
|
|
1270
|
+
setTimeout(He, ie);
|
|
1271
1271
|
}
|
|
1272
1272
|
function z(Se, Re, Ue = 0) {
|
|
1273
1273
|
if (Se) {
|
|
@@ -1293,9 +1293,9 @@ const Zr = {
|
|
|
1293
1293
|
}
|
|
1294
1294
|
return Re;
|
|
1295
1295
|
}
|
|
1296
|
-
function
|
|
1297
|
-
const
|
|
1298
|
-
if (!Re && (!
|
|
1296
|
+
function Pe(Se, Re = !1, Ue = b.nodes) {
|
|
1297
|
+
const He = dt.currentId, ie = [...Ue];
|
|
1298
|
+
if (!Re && (!He || !document.getElementById(He))) {
|
|
1299
1299
|
const e = ie[ie.length - 1];
|
|
1300
1300
|
!(e != null && e.type) && !e.text ? ie[ie.length - 1] = {
|
|
1301
1301
|
...e,
|
|
@@ -1303,7 +1303,7 @@ const Zr = {
|
|
|
1303
1303
|
} : ie.push(Se), et(ie);
|
|
1304
1304
|
return;
|
|
1305
1305
|
}
|
|
1306
|
-
const T = ie.findIndex((e) => e.uuid ===
|
|
1306
|
+
const T = ie.findIndex((e) => e.uuid === He);
|
|
1307
1307
|
if (T >= 0) {
|
|
1308
1308
|
const e = ie[T];
|
|
1309
1309
|
!(e != null && e.type) && !e.text ? ie[T] = {
|
|
@@ -1313,24 +1313,24 @@ const Zr = {
|
|
|
1313
1313
|
} else
|
|
1314
1314
|
ie.forEach((e) => {
|
|
1315
1315
|
var r;
|
|
1316
|
-
(r = e.children) != null && r.length && (e.children =
|
|
1316
|
+
(r = e.children) != null && r.length && (e.children = Pe(Se, !0, e.children));
|
|
1317
1317
|
});
|
|
1318
1318
|
return Re || et(ie), ie;
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1321
|
-
const
|
|
1322
|
-
return ie >= 0 ?
|
|
1320
|
+
function Ye(Se, Re = !1, Ue = b.nodes) {
|
|
1321
|
+
const He = [...Ue], ie = He.findIndex((T) => T.uuid === Se.uuid);
|
|
1322
|
+
return ie >= 0 ? He[ie] = Se : He.forEach((T) => {
|
|
1323
1323
|
var e;
|
|
1324
|
-
(e = T.children) != null && e.length && (T.children =
|
|
1325
|
-
}), Re || et(
|
|
1324
|
+
(e = T.children) != null && e.length && (T.children = Ye(Se, !0, T.children));
|
|
1325
|
+
}), Re || et(He), He;
|
|
1326
1326
|
}
|
|
1327
1327
|
function Je(Se) {
|
|
1328
1328
|
return Se;
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function Ve() {
|
|
1331
1331
|
let Se = !1;
|
|
1332
1332
|
b.nodes.forEach((Re) => {
|
|
1333
|
-
if (Re.uuid || (Re.uuid =
|
|
1333
|
+
if (Re.uuid || (Re.uuid = zt(), Se = !0), Xr(Re) && !Re.type) {
|
|
1334
1334
|
const Ue = Kr(Re.text);
|
|
1335
1335
|
Ue && (Re.type = Ue.type, Re.content = Ue.content), Se = !0;
|
|
1336
1336
|
}
|
|
@@ -1350,52 +1350,53 @@ const Zr = {
|
|
|
1350
1350
|
const Ue = Ia("tree-editor");
|
|
1351
1351
|
return _.readOnly ? (tt(), ut("div", Zr, [
|
|
1352
1352
|
Ze("ul", null, [
|
|
1353
|
-
(tt(!0), ut(S0, null, T0(_.nodes, (
|
|
1354
|
-
key:
|
|
1355
|
-
id: `${
|
|
1353
|
+
(tt(!0), ut(S0, null, T0(_.nodes, (He) => (tt(), ut("li", {
|
|
1354
|
+
key: He.uuid,
|
|
1355
|
+
id: `${He.uuid}`,
|
|
1356
1356
|
class: Ot({
|
|
1357
1357
|
"node-li": !0,
|
|
1358
|
-
collapsed:
|
|
1359
|
-
"has-child": !!(
|
|
1358
|
+
collapsed: He.collapsed || !1,
|
|
1359
|
+
"has-child": !!(He.children || []).length
|
|
1360
1360
|
})
|
|
1361
1361
|
}, [
|
|
1362
|
-
|
|
1362
|
+
bt(We(ia), {
|
|
1363
1363
|
readOnly: "",
|
|
1364
1364
|
tags: _.tags,
|
|
1365
|
-
node:
|
|
1365
|
+
node: He,
|
|
1366
1366
|
onChange: ht
|
|
1367
1367
|
}, null, 8, ["tags", "node"]),
|
|
1368
|
-
(
|
|
1368
|
+
(He.children || []).length ? (tt(), Ut(Ue, {
|
|
1369
1369
|
key: 0,
|
|
1370
1370
|
readOnly: "",
|
|
1371
|
-
onChange: (ie) => U(
|
|
1372
|
-
nodes:
|
|
1371
|
+
onChange: (ie) => U(He, ie),
|
|
1372
|
+
nodes: He.children,
|
|
1373
1373
|
sublevel: !0
|
|
1374
1374
|
}, null, 8, ["onChange", "nodes"])) : Tt("", !0)
|
|
1375
1375
|
], 10, Qr))), 128))
|
|
1376
1376
|
])
|
|
1377
1377
|
])) : (tt(), ut("div", Jr, [
|
|
1378
1378
|
Ze("ul", null, [
|
|
1379
|
-
(tt(!0), ut(S0, null, T0(_.nodes, (
|
|
1380
|
-
key:
|
|
1381
|
-
id: `${
|
|
1379
|
+
(tt(!0), ut(S0, null, T0(_.nodes, (He) => (tt(), ut("li", {
|
|
1380
|
+
key: He.uuid,
|
|
1381
|
+
id: `${He.uuid}`,
|
|
1382
1382
|
ref_for: !0,
|
|
1383
1383
|
ref: "elements",
|
|
1384
1384
|
draggable: "true",
|
|
1385
1385
|
class: Ot({
|
|
1386
1386
|
"node-li": !0,
|
|
1387
|
-
collapsed:
|
|
1388
|
-
"has-child": !!(
|
|
1387
|
+
collapsed: He.collapsed || !1,
|
|
1388
|
+
"has-child": !!(He.children || []).length
|
|
1389
1389
|
}),
|
|
1390
|
-
onDragstart: Dt((ie) => J(ie,
|
|
1391
|
-
onDragover: Dt((ie) => We($r)(ie,
|
|
1390
|
+
onDragstart: Dt((ie) => J(ie, He), ["stop"]),
|
|
1391
|
+
onDragover: Dt((ie) => We($r)(ie, He), ["stop", "prevent"]),
|
|
1392
1392
|
onDragend: Dt((ie) => be(ie), ["stop", "prevent"]),
|
|
1393
|
-
onDrop: Dt((ie) => xe(ie,
|
|
1394
|
-
onDragleave: Dt((ie) => We(z0)(ie,
|
|
1395
|
-
onPaste: Dt((ie) => Be(ie,
|
|
1393
|
+
onDrop: Dt((ie) => xe(ie, He), ["stop"]),
|
|
1394
|
+
onDragleave: Dt((ie) => We(z0)(ie, He), ["stop"]),
|
|
1395
|
+
onPaste: Dt((ie) => Be(ie, He), ["stop"])
|
|
1396
1396
|
}, [
|
|
1397
|
-
|
|
1398
|
-
|
|
1397
|
+
(tt(), Ut(We(ia), {
|
|
1398
|
+
key: `${He.uuid}-${He.type || "text"}`,
|
|
1399
|
+
node: He,
|
|
1399
1400
|
tags: _.tags,
|
|
1400
1401
|
onChange: ht,
|
|
1401
1402
|
onToPrevFocus: oe,
|
|
@@ -1404,18 +1405,18 @@ const Zr = {
|
|
|
1404
1405
|
onEnter: ve,
|
|
1405
1406
|
onTab: Me,
|
|
1406
1407
|
onRemove: G
|
|
1407
|
-
}, null, 8, ["node", "tags"]),
|
|
1408
|
-
(
|
|
1408
|
+
}, null, 8, ["node", "tags"])),
|
|
1409
|
+
(He.children || []).length ? (tt(), Ut(Ue, {
|
|
1409
1410
|
key: 0,
|
|
1410
|
-
nodes:
|
|
1411
|
+
nodes: He.children,
|
|
1411
1412
|
tags: _.tags,
|
|
1412
1413
|
enableDbEnter: _.enableDbEnter,
|
|
1413
1414
|
allowEmpty: !0,
|
|
1414
1415
|
sublevel: !0,
|
|
1415
|
-
onChange: (ie) => U(
|
|
1416
|
-
onFocusPrev: (ie) => q(
|
|
1417
|
-
onFocusNext: (ie) => pe(
|
|
1418
|
-
onTransfer: (ie) => W(
|
|
1416
|
+
onChange: (ie) => U(He, ie),
|
|
1417
|
+
onFocusPrev: (ie) => q(He, ie),
|
|
1418
|
+
onFocusNext: (ie) => pe(He, ie),
|
|
1419
|
+
onTransfer: (ie) => W(He, ie),
|
|
1419
1420
|
onFileUpload: Re[0] || (Re[0] = (...ie) => Se.$emit("fileUpload", ...ie)),
|
|
1420
1421
|
onDbEnter: ce
|
|
1421
1422
|
}, null, 8, ["nodes", "tags", "enableDbEnter", "onChange", "onFocusPrev", "onFocusNext", "onTransfer"])) : Tt("", !0)
|
|
@@ -1424,7 +1425,7 @@ const Zr = {
|
|
|
1424
1425
|
]));
|
|
1425
1426
|
};
|
|
1426
1427
|
}
|
|
1427
|
-
}), rn = /* @__PURE__ */ t0(an, [["__scopeId", "data-v-
|
|
1428
|
+
}), rn = /* @__PURE__ */ t0(an, [["__scopeId", "data-v-dc61c4c0"]]), nn = { class: "record-tree-title-bar" }, sn = ["onClick"], on = {
|
|
1428
1429
|
__name: "index",
|
|
1429
1430
|
props: {
|
|
1430
1431
|
readOnly: {
|
|
@@ -1548,22 +1549,22 @@ const Zr = {
|
|
|
1548
1549
|
function oe(q) {
|
|
1549
1550
|
if (q.clipboardData) {
|
|
1550
1551
|
const z = q.clipboardData.items;
|
|
1551
|
-
Array.from(z).some((
|
|
1552
|
+
Array.from(z).some((Pe) => Pe.kind === "file") ? (q.preventDefault(), J.value ? pe(q.clipboardData.files[0]) : ne("file", q.clipboardData.files)) : q.clipboardData.getData("text") && (J.value = !1, setTimeout(() => {
|
|
1552
1553
|
ne("input", q.target.textContent);
|
|
1553
1554
|
}, 0));
|
|
1554
1555
|
}
|
|
1555
1556
|
}
|
|
1556
1557
|
async function pe(q) {
|
|
1557
1558
|
const z = ma(q.type), Ae = URL.createObjectURL(q);
|
|
1558
|
-
let
|
|
1559
|
-
switch ((z.mainType === "image" || z.mainType === "video") && (
|
|
1559
|
+
let Pe = {};
|
|
1560
|
+
switch ((z.mainType === "image" || z.mainType === "video") && (Pe = await _a(q, z.mainType)), z.mainType) {
|
|
1560
1561
|
case "image":
|
|
1561
1562
|
case "audio":
|
|
1562
1563
|
case "video":
|
|
1563
1564
|
W({
|
|
1564
1565
|
type: z.mainType,
|
|
1565
1566
|
content: Ae,
|
|
1566
|
-
size:
|
|
1567
|
+
size: Pe
|
|
1567
1568
|
});
|
|
1568
1569
|
break;
|
|
1569
1570
|
default:
|
|
@@ -1574,18 +1575,18 @@ const Zr = {
|
|
|
1574
1575
|
size: q.size
|
|
1575
1576
|
});
|
|
1576
1577
|
}
|
|
1577
|
-
pa.uploadFile([q], (
|
|
1578
|
+
pa.uploadFile([q], (Ye, Je) => {
|
|
1578
1579
|
if (Je) {
|
|
1579
|
-
const
|
|
1580
|
-
|
|
1580
|
+
const Ve = Je[0];
|
|
1581
|
+
Ve.code === 0 && W({
|
|
1581
1582
|
...be.value,
|
|
1582
|
-
content:
|
|
1583
|
+
content: Ve.data.url
|
|
1583
1584
|
});
|
|
1584
1585
|
}
|
|
1585
1586
|
});
|
|
1586
1587
|
}
|
|
1587
1588
|
return (q, z) => (tt(), ut("div", nn, [
|
|
1588
|
-
_.tags.length ? (tt(),
|
|
1589
|
+
_.tags.length ? (tt(), Ut(We(da), { key: 0 }, ca({
|
|
1589
1590
|
default: M0(() => [
|
|
1590
1591
|
Ze("span", {
|
|
1591
1592
|
class: "record-tree-popper-reference",
|
|
@@ -1612,7 +1613,7 @@ const Zr = {
|
|
|
1612
1613
|
active: _.note.tag_id === Ae.created_at
|
|
1613
1614
|
}]),
|
|
1614
1615
|
key: Ae.created_at,
|
|
1615
|
-
onClick: (
|
|
1616
|
+
onClick: (Pe) => Me(Ae)
|
|
1616
1617
|
}, [
|
|
1617
1618
|
Ze("span", {
|
|
1618
1619
|
class: "record-tree-empty-icon",
|
|
@@ -1628,7 +1629,7 @@ const Zr = {
|
|
|
1628
1629
|
key: "0"
|
|
1629
1630
|
}
|
|
1630
1631
|
]), 1024)) : Tt("", !0),
|
|
1631
|
-
|
|
1632
|
+
bt(We(Ta), {
|
|
1632
1633
|
id: "tree_title",
|
|
1633
1634
|
ref_key: "recordTitle",
|
|
1634
1635
|
ref: ue,
|
|
@@ -1650,7 +1651,7 @@ const Zr = {
|
|
|
1650
1651
|
]));
|
|
1651
1652
|
}
|
|
1652
1653
|
};
|
|
1653
|
-
var
|
|
1654
|
+
var pt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
1654
1655
|
function j0(_) {
|
|
1655
1656
|
return _ && _.__esModule && Object.prototype.hasOwnProperty.call(_, "default") ? _.default : _;
|
|
1656
1657
|
}
|
|
@@ -1689,10 +1690,10 @@ function k0() {
|
|
|
1689
1690
|
return sa || (sa = 1, function(_, X) {
|
|
1690
1691
|
(function($, b) {
|
|
1691
1692
|
_.exports = b();
|
|
1692
|
-
})(
|
|
1693
|
+
})(pt, function() {
|
|
1693
1694
|
var $ = $ || function(b, ue) {
|
|
1694
1695
|
var B;
|
|
1695
|
-
if (typeof window < "u" && window.crypto && (B = window.crypto), typeof self < "u" && self.crypto && (B = self.crypto), typeof globalThis < "u" && globalThis.crypto && (B = globalThis.crypto), !B && typeof window < "u" && window.msCrypto && (B = window.msCrypto), !B && typeof
|
|
1696
|
+
if (typeof window < "u" && window.crypto && (B = window.crypto), typeof self < "u" && self.crypto && (B = self.crypto), typeof globalThis < "u" && globalThis.crypto && (B = globalThis.crypto), !B && typeof window < "u" && window.msCrypto && (B = window.msCrypto), !B && typeof pt < "u" && pt.crypto && (B = pt.crypto), !B && typeof un == "function")
|
|
1696
1697
|
try {
|
|
1697
1698
|
B = fn;
|
|
1698
1699
|
} catch {
|
|
@@ -1850,12 +1851,12 @@ function k0() {
|
|
|
1850
1851
|
var oe = this.words, pe = y.words, q = this.sigBytes, z = y.sigBytes;
|
|
1851
1852
|
if (this.clamp(), q % 4)
|
|
1852
1853
|
for (var Ae = 0; Ae < z; Ae++) {
|
|
1853
|
-
var
|
|
1854
|
-
oe[q + Ae >>> 2] |=
|
|
1854
|
+
var Pe = pe[Ae >>> 2] >>> 24 - Ae % 4 * 8 & 255;
|
|
1855
|
+
oe[q + Ae >>> 2] |= Pe << 24 - (q + Ae) % 4 * 8;
|
|
1855
1856
|
}
|
|
1856
1857
|
else
|
|
1857
|
-
for (var
|
|
1858
|
-
oe[q +
|
|
1858
|
+
for (var Ye = 0; Ye < z; Ye += 4)
|
|
1859
|
+
oe[q + Ye >>> 2] = pe[Ye >>> 2];
|
|
1859
1860
|
return this.sigBytes += z, this;
|
|
1860
1861
|
},
|
|
1861
1862
|
/**
|
|
@@ -2054,15 +2055,15 @@ function k0() {
|
|
|
2054
2055
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
2055
2056
|
*/
|
|
2056
2057
|
_process: function(y) {
|
|
2057
|
-
var oe, pe = this._data, q = pe.words, z = pe.sigBytes, Ae = this.blockSize,
|
|
2058
|
-
y ?
|
|
2059
|
-
var Je =
|
|
2058
|
+
var oe, pe = this._data, q = pe.words, z = pe.sigBytes, Ae = this.blockSize, Pe = Ae * 4, Ye = z / Pe;
|
|
2059
|
+
y ? Ye = b.ceil(Ye) : Ye = b.max((Ye | 0) - this._minBufferSize, 0);
|
|
2060
|
+
var Je = Ye * Ae, Ve = b.min(Je * 4, z);
|
|
2060
2061
|
if (Je) {
|
|
2061
2062
|
for (var U = 0; U < Je; U += Ae)
|
|
2062
2063
|
this._doProcessBlock(q, U);
|
|
2063
|
-
oe = q.splice(0, Je), pe.sigBytes -=
|
|
2064
|
+
oe = q.splice(0, Je), pe.sigBytes -= Ve;
|
|
2064
2065
|
}
|
|
2065
|
-
return new xe.init(oe,
|
|
2066
|
+
return new xe.init(oe, Ve);
|
|
2066
2067
|
},
|
|
2067
2068
|
/**
|
|
2068
2069
|
* Creates a copy of this object.
|
|
@@ -2190,7 +2191,7 @@ function vn() {
|
|
|
2190
2191
|
return oa || (oa = 1, function(_, X) {
|
|
2191
2192
|
(function($, b) {
|
|
2192
2193
|
_.exports = b(k0());
|
|
2193
|
-
})(
|
|
2194
|
+
})(pt, function($) {
|
|
2194
2195
|
return function(b) {
|
|
2195
2196
|
var ue = $, B = ue.lib, ne = B.WordArray, V = B.Hasher, me = ue.algo, J = [], be = [];
|
|
2196
2197
|
(function() {
|
|
@@ -2211,15 +2212,15 @@ function vn() {
|
|
|
2211
2212
|
this._hash = new ne.init(J.slice(0));
|
|
2212
2213
|
},
|
|
2213
2214
|
_doProcessBlock: function(Me, G) {
|
|
2214
|
-
for (var W = this._hash.words, ve = W[0], ce = W[1], y = W[2], oe = W[3], pe = W[4], q = W[5], z = W[6], Ae = W[7],
|
|
2215
|
-
if (
|
|
2216
|
-
xe[
|
|
2215
|
+
for (var W = this._hash.words, ve = W[0], ce = W[1], y = W[2], oe = W[3], pe = W[4], q = W[5], z = W[6], Ae = W[7], Pe = 0; Pe < 64; Pe++) {
|
|
2216
|
+
if (Pe < 16)
|
|
2217
|
+
xe[Pe] = Me[G + Pe] | 0;
|
|
2217
2218
|
else {
|
|
2218
|
-
var
|
|
2219
|
-
xe[
|
|
2219
|
+
var Ye = xe[Pe - 15], Je = (Ye << 25 | Ye >>> 7) ^ (Ye << 14 | Ye >>> 18) ^ Ye >>> 3, Ve = xe[Pe - 2], U = (Ve << 15 | Ve >>> 17) ^ (Ve << 13 | Ve >>> 19) ^ Ve >>> 10;
|
|
2220
|
+
xe[Pe] = Je + xe[Pe - 7] + U + xe[Pe - 16];
|
|
2220
2221
|
}
|
|
2221
|
-
var ht = pe & q ^ ~pe & z, et = ve & ce ^ ve & y ^ ce & y, Se = (ve << 30 | ve >>> 2) ^ (ve << 19 | ve >>> 13) ^ (ve << 10 | ve >>> 22), Re = (pe << 26 | pe >>> 6) ^ (pe << 21 | pe >>> 11) ^ (pe << 7 | pe >>> 25), Ue = Ae + Re + ht + be[
|
|
2222
|
-
Ae = z, z = q, q = pe, pe = oe + Ue | 0, oe = y, y = ce, ce = ve, ve = Ue +
|
|
2222
|
+
var ht = pe & q ^ ~pe & z, et = ve & ce ^ ve & y ^ ce & y, Se = (ve << 30 | ve >>> 2) ^ (ve << 19 | ve >>> 13) ^ (ve << 10 | ve >>> 22), Re = (pe << 26 | pe >>> 6) ^ (pe << 21 | pe >>> 11) ^ (pe << 7 | pe >>> 25), Ue = Ae + Re + ht + be[Pe] + xe[Pe], He = Se + et;
|
|
2223
|
+
Ae = z, z = q, q = pe, pe = oe + Ue | 0, oe = y, y = ce, ce = ve, ve = Ue + He | 0;
|
|
2223
2224
|
}
|
|
2224
2225
|
W[0] = W[0] + ve | 0, W[1] = W[1] + ce | 0, W[2] = W[2] + y | 0, W[3] = W[3] + oe | 0, W[4] = W[4] + pe | 0, W[5] = W[5] + q | 0, W[6] = W[6] + z | 0, W[7] = W[7] + Ae | 0;
|
|
2225
2226
|
},
|
|
@@ -2242,7 +2243,7 @@ function hn() {
|
|
|
2242
2243
|
return la || (la = 1, function(_, X) {
|
|
2243
2244
|
(function($, b) {
|
|
2244
2245
|
_.exports = b(k0());
|
|
2245
|
-
})(
|
|
2246
|
+
})(pt, function($) {
|
|
2246
2247
|
(function() {
|
|
2247
2248
|
var b = $, ue = b.lib, B = ue.Base, ne = b.enc, V = ne.Utf8, me = b.algo;
|
|
2248
2249
|
me.HMAC = B.extend({
|
|
@@ -2318,7 +2319,7 @@ function hn() {
|
|
|
2318
2319
|
(function(_, X) {
|
|
2319
2320
|
(function($, b, ue) {
|
|
2320
2321
|
_.exports = b(k0(), vn(), hn());
|
|
2321
|
-
})(
|
|
2322
|
+
})(pt, function($) {
|
|
2322
2323
|
return $.HmacSHA256;
|
|
2323
2324
|
});
|
|
2324
2325
|
})(Ra);
|
|
@@ -2328,7 +2329,7 @@ var Ca = { exports: {} };
|
|
|
2328
2329
|
(function(_, X) {
|
|
2329
2330
|
(function($, b) {
|
|
2330
2331
|
_.exports = b(k0());
|
|
2331
|
-
})(
|
|
2332
|
+
})(pt, function($) {
|
|
2332
2333
|
return function() {
|
|
2333
2334
|
var b = $, ue = b.lib, B = ue.WordArray, ne = b.enc;
|
|
2334
2335
|
ne.Base64 = {
|
|
@@ -2399,7 +2400,7 @@ var Ca = { exports: {} };
|
|
|
2399
2400
|
})(Ca);
|
|
2400
2401
|
var pn = Ca.exports;
|
|
2401
2402
|
const bn = /* @__PURE__ */ j0(pn);
|
|
2402
|
-
let
|
|
2403
|
+
let Gt, i0 = "", x0 = "", ka = null;
|
|
2403
2404
|
function wn() {
|
|
2404
2405
|
var _ = "wss://iat-api.xfyun.cn/v2/iat", X = "iat-api.xfyun.cn", $ = "4f2bbe08d7ee54da888cfd009514e89f", b = "NTc3MWNlNDNiZWFmMGM2Yzk0ZjRlZjdi", ue = (/* @__PURE__ */ new Date()).toGMTString(), B = "hmac-sha256", ne = "host date request-line", V = `host: ${X}
|
|
2405
2406
|
date: ${ue}
|
|
@@ -2419,11 +2420,11 @@ function yn(_) {
|
|
|
2419
2420
|
b = b + ue[B].cw[0].w;
|
|
2420
2421
|
$.pgs ? ($.pgs === "apd" && (i0 = x0), x0 = i0 + b) : i0 = i0 + b, ka(x0 || i0 || "");
|
|
2421
2422
|
}
|
|
2422
|
-
X.code === 0 && X.data.status === 2 &&
|
|
2423
|
+
X.code === 0 && X.data.status === 2 && Gt.close(), X.code !== 0 && (Gt.close(), console.error(X));
|
|
2423
2424
|
}
|
|
2424
2425
|
function xn(_) {
|
|
2425
2426
|
const X = wn();
|
|
2426
|
-
|
|
2427
|
+
Gt = new WebSocket(X), Gt.onopen = () => {
|
|
2427
2428
|
var $ = {
|
|
2428
2429
|
common: {
|
|
2429
2430
|
app_id: "c54ef25c"
|
|
@@ -2441,15 +2442,15 @@ function xn(_) {
|
|
|
2441
2442
|
encoding: "lame"
|
|
2442
2443
|
}
|
|
2443
2444
|
};
|
|
2444
|
-
|
|
2445
|
-
},
|
|
2445
|
+
Gt.send(JSON.stringify($)), _();
|
|
2446
|
+
}, Gt.onmessage = ($) => {
|
|
2446
2447
|
yn($.data);
|
|
2447
|
-
},
|
|
2448
|
+
}, Gt.onerror = ($) => {
|
|
2448
2449
|
console.error($);
|
|
2449
2450
|
};
|
|
2450
2451
|
}
|
|
2451
2452
|
function Sn(_, X) {
|
|
2452
|
-
|
|
2453
|
+
Gt = null, i0 = "", x0 = "", ka = X, xn(() => {
|
|
2453
2454
|
const $ = new FileReader();
|
|
2454
2455
|
$.readAsArrayBuffer(_), $.onload = (b) => {
|
|
2455
2456
|
const ue = gn(b.target.result);
|
|
@@ -2458,7 +2459,7 @@ function Sn(_, X) {
|
|
|
2458
2459
|
const ne = ue.substring(B, B + 1280);
|
|
2459
2460
|
B += 1280;
|
|
2460
2461
|
const V = B >= ue.length;
|
|
2461
|
-
|
|
2462
|
+
Gt.send(
|
|
2462
2463
|
JSON.stringify({
|
|
2463
2464
|
data: {
|
|
2464
2465
|
status: V ? 2 : 1,
|
|
@@ -2470,7 +2471,7 @@ function Sn(_, X) {
|
|
|
2470
2471
|
);
|
|
2471
2472
|
}
|
|
2472
2473
|
}, $.onerror = () => {
|
|
2473
|
-
|
|
2474
|
+
Gt.close();
|
|
2474
2475
|
};
|
|
2475
2476
|
});
|
|
2476
2477
|
}
|
|
@@ -2501,7 +2502,7 @@ var Aa = { exports: {} };
|
|
|
2501
2502
|
}
|
|
2502
2503
|
return !1;
|
|
2503
2504
|
}, B.BufferSize = 4096, B.Destroy = function() {
|
|
2504
|
-
|
|
2505
|
+
Ye(me + " Destroy"), Ae();
|
|
2505
2506
|
for (var e in W)
|
|
2506
2507
|
W[e]();
|
|
2507
2508
|
};
|
|
@@ -2531,7 +2532,7 @@ var Aa = { exports: {} };
|
|
|
2531
2532
|
try {
|
|
2532
2533
|
c = new r(), B.NewCtxs.push(c);
|
|
2533
2534
|
} catch (v) {
|
|
2534
|
-
|
|
2535
|
+
Ye("GetContext tryNew Error", 1, v);
|
|
2535
2536
|
}
|
|
2536
2537
|
return c;
|
|
2537
2538
|
}, B.CloseNewCtx = function(e) {
|
|
@@ -2542,7 +2543,7 @@ var Aa = { exports: {} };
|
|
|
2542
2543
|
r.splice(v, 1);
|
|
2543
2544
|
break;
|
|
2544
2545
|
}
|
|
2545
|
-
|
|
2546
|
+
Ye(ie("mSxV::剩{1}个GetContext未close", 0, c + "-1=" + r.length), r.length ? 3 : 0);
|
|
2546
2547
|
}
|
|
2547
2548
|
};
|
|
2548
2549
|
var ve = function(e) {
|
|
@@ -2569,7 +2570,7 @@ var Aa = { exports: {} };
|
|
|
2569
2570
|
return;
|
|
2570
2571
|
}
|
|
2571
2572
|
}, we = "ScriptProcessor", Ce = "audioWorklet", Ne = me + " " + Ce, ye = "RecProc", te = "MediaRecorder", Ee = te + ".WebM.PCM", Oe = k.createScriptProcessor || k.createJavaScriptNode, j = ie("ZGlf::。由于{1}内部1秒375次回调,在移动端可能会有性能问题导致回调丢失录音变短,PC端无影响,暂不建议开启{1}。", 0, Ce), fe = function() {
|
|
2572
|
-
s = v.isWorklet = !1, q(v),
|
|
2573
|
+
s = v.isWorklet = !1, q(v), Ye(ie("7TU0::Connect采用老的{1},", 0, we) + He.get(
|
|
2573
2574
|
B[y] ? ie("JwCL::但已设置{1}尝试启用{2}", 2) : ie("VGjB::可设置{1}尝试启用{2}", 2),
|
|
2574
2575
|
[me + "." + y + "=true", Ce]
|
|
2575
2576
|
) + _e + j, 3);
|
|
@@ -2613,7 +2614,7 @@ var Aa = { exports: {} };
|
|
|
2613
2614
|
return s && v._na;
|
|
2614
2615
|
}, p = v._na = function() {
|
|
2615
2616
|
ae !== "" && (clearTimeout(ae), ae = setTimeout(function() {
|
|
2616
|
-
ae = 0, le() && (
|
|
2617
|
+
ae = 0, le() && (Ye(ie("MxX1::{1}未返回任何音频,恢复使用{2}", 0, Ce, we), 3), Oe && fe());
|
|
2617
2618
|
}, 500));
|
|
2618
2619
|
}, N = function() {
|
|
2619
2620
|
if (le()) {
|
|
@@ -2621,8 +2622,8 @@ var Aa = { exports: {} };
|
|
|
2621
2622
|
processorOptions: { bufferSize: c }
|
|
2622
2623
|
});
|
|
2623
2624
|
K(he), he.port.onmessage = function(F) {
|
|
2624
|
-
ae && (clearTimeout(ae), ae = ""), le() ? Ie(F.data.val) : s ||
|
|
2625
|
-
},
|
|
2625
|
+
ae && (clearTimeout(ae), ae = ""), le() ? Ie(F.data.val) : s || Ye(ie("XUap::{1}多余回调", 0, Ce), 3);
|
|
2626
|
+
}, Ye(ie("yOta::Connect采用{1},设置{2}可恢复老式{3}", 0, Ce, me + "." + y + "=false", we) + _e + j, 3);
|
|
2626
2627
|
}
|
|
2627
2628
|
};
|
|
2628
2629
|
k.resume()[De && "finally"](function() {
|
|
@@ -2635,7 +2636,7 @@ var Aa = { exports: {} };
|
|
|
2635
2636
|
k[Ce].addModule(he).then(function(F) {
|
|
2636
2637
|
le() && (k[ye] = 1, N(), ae && p());
|
|
2637
2638
|
})[Me](function(F) {
|
|
2638
|
-
|
|
2639
|
+
Ye(Ce + ".addModule Error", 1, F), le() && fe();
|
|
2639
2640
|
});
|
|
2640
2641
|
}
|
|
2641
2642
|
});
|
|
@@ -2652,7 +2653,7 @@ var Aa = { exports: {} };
|
|
|
2652
2653
|
};
|
|
2653
2654
|
v._ra = function() {
|
|
2654
2655
|
ae !== "" && (clearTimeout(ae), ae = setTimeout(function() {
|
|
2655
|
-
N() && (
|
|
2656
|
+
N() && (Ye(ie("vHnb::{1}未返回任何音频,降级使用{2}", 0, te, Ce), 3), l());
|
|
2656
2657
|
}, 500));
|
|
2657
2658
|
};
|
|
2658
2659
|
var he = Object.assign({ mimeType: le }, B.ConnectWebMOptions), F = v._r = new x(v, he), re = v._rd = { sampleRate: k[xe] };
|
|
@@ -2669,9 +2670,9 @@ var Aa = { exports: {} };
|
|
|
2669
2670
|
}
|
|
2670
2671
|
ae && (clearTimeout(ae), ae = ""), Ie(L);
|
|
2671
2672
|
} else
|
|
2672
|
-
M ||
|
|
2673
|
+
M || Ye(ie("O9P7::{1}多余回调", 0, te), 3);
|
|
2673
2674
|
}, ge.readAsArrayBuffer(D.data);
|
|
2674
|
-
}, F.start(~~(c / 48)),
|
|
2675
|
+
}, F.start(~~(c / 48)), Ye(ie("LMEm::Connect采用{1},设置{2}可恢复使用{3}或老式{4}", 0, Ee, me + "." + ce + "=false", Ce, we));
|
|
2675
2676
|
};
|
|
2676
2677
|
A();
|
|
2677
2678
|
}, pe = function(e) {
|
|
@@ -2683,8 +2684,8 @@ var Aa = { exports: {} };
|
|
|
2683
2684
|
}, Ae = function(e) {
|
|
2684
2685
|
e = e || B;
|
|
2685
2686
|
var r = e == B, c = e.Stream;
|
|
2686
|
-
c && (c._m && (c._m.disconnect(), c._m = null), !c._RC && c._c && B.CloseNewCtx(c._c), c._RC = null, c._c = null, c._d && (
|
|
2687
|
-
},
|
|
2687
|
+
c && (c._m && (c._m.disconnect(), c._m = null), !c._RC && c._c && B.CloseNewCtx(c._c), c._RC = null, c._c = null, c._d && (Pe(c._d.stream), c._d = null), c._p && (c._p.disconnect(), c._p.onaudioprocess = c._p = null), q(c), z(c), r && Pe(c)), e.Stream = 0;
|
|
2688
|
+
}, Pe = B.StopS_ = function(e) {
|
|
2688
2689
|
for (var r = e.getTracks && e.getTracks() || e.audioTracks || [], c = 0; c < r.length; c++) {
|
|
2689
2690
|
var v = r[c];
|
|
2690
2691
|
v.stop && v.stop();
|
|
@@ -2695,7 +2696,7 @@ var Aa = { exports: {} };
|
|
|
2695
2696
|
var K = "SampleData";
|
|
2696
2697
|
v || (v = {});
|
|
2697
2698
|
var M = v.index || 0, s = v.offset || 0, ae = v.filter;
|
|
2698
|
-
if (ae && ae.fn && ae.sr != r && (ae = null,
|
|
2699
|
+
if (ae && ae.fn && ae.sr != r && (ae = null, Ye(ie("d48C::{1}的filter采样率变了,重设滤波", 0, K), 3)), !ae) {
|
|
2699
2700
|
var _e = c > r * 3 / 4 ? 0 : c / 2 * 3 / 4;
|
|
2700
2701
|
ae = { fn: _e ? B.IIRFilter(!0, r, _e) : 0 };
|
|
2701
2702
|
}
|
|
@@ -2705,7 +2706,7 @@ var Aa = { exports: {} };
|
|
|
2705
2706
|
var we = k.frameSize || 1;
|
|
2706
2707
|
k.frameType && (we = k.frameType == "mp3" ? 1152 : 1);
|
|
2707
2708
|
var Ce = e.length;
|
|
2708
|
-
M > Ce + 1 &&
|
|
2709
|
+
M > Ce + 1 && Ye(ie("tlbC::{1}似乎传入了未重置chunk {2}", 0, K, M + ">" + Ce), 3);
|
|
2709
2710
|
for (var Ne = 0, ye = M; ye < Ce; ye++)
|
|
2710
2711
|
Ne += e[ye].length;
|
|
2711
2712
|
Ne = Math.max(0, Ne - Math.floor(s));
|
|
@@ -2765,17 +2766,17 @@ var Aa = { exports: {} };
|
|
|
2765
2766
|
Je ? _e && _e("[IsLoser]" + K[0], K.length > 1 ? K : "") : _e.apply(console, K);
|
|
2766
2767
|
}
|
|
2767
2768
|
};
|
|
2768
|
-
var
|
|
2769
|
+
var Ye = function() {
|
|
2769
2770
|
B.CLog.apply(this, arguments);
|
|
2770
2771
|
}, Je = !0;
|
|
2771
2772
|
try {
|
|
2772
2773
|
Je = !console.log.apply;
|
|
2773
2774
|
} catch {
|
|
2774
2775
|
}
|
|
2775
|
-
var
|
|
2776
|
+
var Ve = 0;
|
|
2776
2777
|
function U(e) {
|
|
2777
2778
|
var r = this;
|
|
2778
|
-
r.id = ++
|
|
2779
|
+
r.id = ++Ve, T();
|
|
2779
2780
|
var c = {
|
|
2780
2781
|
type: "mp3",
|
|
2781
2782
|
onProcess: b
|
|
@@ -2810,7 +2811,7 @@ var Aa = { exports: {} };
|
|
|
2810
2811
|
/*close*/
|
|
2811
2812
|
C: 9
|
|
2812
2813
|
}, B.prototype = U.prototype = {
|
|
2813
|
-
CLog:
|
|
2814
|
+
CLog: Ye,
|
|
2814
2815
|
_streamStore: function() {
|
|
2815
2816
|
return this.set.sourceStream ? this : B;
|
|
2816
2817
|
},
|
|
@@ -2961,7 +2962,7 @@ var Aa = { exports: {} };
|
|
|
2961
2962
|
var A = we - j.t - Ce;
|
|
2962
2963
|
if (A > Ce / 5) {
|
|
2963
2964
|
var x = !v.disableEnvInFix;
|
|
2964
|
-
if (c.CLog("[" + we + "]" +
|
|
2965
|
+
if (c.CLog("[" + we + "]" + He.get(ie(x ? "4Kfd::补偿{1}ms" : "bM5i::未补偿{1}ms", 1), [A]), 3), c.envInFix += A, x) {
|
|
2965
2966
|
var m = new Int16Array(A * K / 1e3);
|
|
2966
2967
|
M += m.length, ae.push(m);
|
|
2967
2968
|
}
|
|
@@ -3138,21 +3139,21 @@ var Aa = { exports: {} };
|
|
|
3138
3139
|
var l = Re(te, Ee), A = Ue(te, Ee);
|
|
3139
3140
|
if (et(l, [181])) {
|
|
3140
3141
|
var Oe = 0, x = new Uint8Array(A.reverse()).buffer;
|
|
3141
|
-
A.length == 4 ? Oe = new Float32Array(x)[0] : A.length == 8 ? Oe = new Float64Array(x)[0] :
|
|
3142
|
+
A.length == 4 ? Oe = new Float32Array(x)[0] : A.length == 8 ? Oe = new Float64Array(x)[0] : Ye("WebM Track !Float", 1, A), Ne[xe] = Math.round(Oe);
|
|
3142
3143
|
} else
|
|
3143
3144
|
et(l, [98, 100]) ? Ne.bitDepth = Se(A) : et(l, [159]) && (Ne.channels = Se(A));
|
|
3144
3145
|
}
|
|
3145
3146
|
}
|
|
3146
3147
|
}
|
|
3147
|
-
r._ht = 1,
|
|
3148
|
+
r._ht = 1, Ye("WebM Tracks", c), k();
|
|
3148
3149
|
break;
|
|
3149
3150
|
}
|
|
3150
3151
|
}
|
|
3151
3152
|
}
|
|
3152
3153
|
var m = r.track0;
|
|
3153
3154
|
if (m) {
|
|
3154
|
-
if (m.bitDepth == 16 && /FLOAT/i.test(m.codec) && (m.bitDepth = 32,
|
|
3155
|
-
return r.bytes = [], r.bad ||
|
|
3155
|
+
if (m.bitDepth == 16 && /FLOAT/i.test(m.codec) && (m.bitDepth = 32, Ye("WebM 16->32 bit", 3)), m[xe] != r[xe] || m.bitDepth != 32 || m.channels < 1 || !/(\b|_)PCM\b/i.test(m.codec))
|
|
3156
|
+
return r.bytes = [], r.bad || Ye("WebM Track Unexpected", 3, r), r.bad = 1, -1;
|
|
3156
3157
|
for (var le = [], p = 0; v[0] < M.length; ) {
|
|
3157
3158
|
var Ie = Re(M, v), we = Ue(M, v);
|
|
3158
3159
|
if (!we)
|
|
@@ -3160,7 +3161,7 @@ var Aa = { exports: {} };
|
|
|
3160
3161
|
if (et(Ie, [163])) {
|
|
3161
3162
|
var N = we[0] & 15, Ne = c[N];
|
|
3162
3163
|
if (!Ne)
|
|
3163
|
-
|
|
3164
|
+
Ye("WebM !Track" + N, 1, c);
|
|
3164
3165
|
else if (Ne.idx === 0) {
|
|
3165
3166
|
for (var he = new Uint8Array(we.length - 4), fe = 4; fe < we.length; fe++)
|
|
3166
3167
|
he[fe - 4] = we[fe];
|
|
@@ -3223,7 +3224,7 @@ var Aa = { exports: {} };
|
|
|
3223
3224
|
}
|
|
3224
3225
|
return r[0] = k, K;
|
|
3225
3226
|
}
|
|
3226
|
-
},
|
|
3227
|
+
}, He = B.i18n = {
|
|
3227
3228
|
lang: "zh-CN",
|
|
3228
3229
|
alias: { "zh-CN": "zh", "en-US": "en" },
|
|
3229
3230
|
locales: {},
|
|
@@ -3232,14 +3233,14 @@ var Aa = { exports: {} };
|
|
|
3232
3233
|
var c = me + ".i18n.put: ", v = e.overwrite;
|
|
3233
3234
|
v = v == null || v;
|
|
3234
3235
|
var k = e.lang;
|
|
3235
|
-
if (k =
|
|
3236
|
+
if (k = He.alias[k] || k, !k)
|
|
3236
3237
|
throw new Error(c + "set.lang?");
|
|
3237
|
-
var K =
|
|
3238
|
-
K || (K = {},
|
|
3238
|
+
var K = He.locales[k];
|
|
3239
|
+
K || (K = {}, He.locales[k] = K);
|
|
3239
3240
|
for (var M = /^([\w\-]+):/, s, ae = 0; ae < r.length; ae++) {
|
|
3240
3241
|
var De = r[ae];
|
|
3241
3242
|
if (s = M.exec(De), !s) {
|
|
3242
|
-
|
|
3243
|
+
Ye(c + "'key:'? " + De, 3, e);
|
|
3243
3244
|
continue;
|
|
3244
3245
|
}
|
|
3245
3246
|
var _e = s[1], De = De.substr(_e.length + 1);
|
|
@@ -3247,17 +3248,17 @@ var Aa = { exports: {} };
|
|
|
3247
3248
|
}
|
|
3248
3249
|
},
|
|
3249
3250
|
get: function() {
|
|
3250
|
-
return
|
|
3251
|
+
return He.v_G.apply(null, arguments);
|
|
3251
3252
|
},
|
|
3252
3253
|
v_G: function(e, r, c) {
|
|
3253
|
-
r = r || [], c = c ||
|
|
3254
|
-
var v =
|
|
3255
|
-
return !k && c != "zh" ? c == "en" ?
|
|
3256
|
-
return M = +M || 0, K = r[M - 1], (M < 1 || M > r.length) && (K = "{?}",
|
|
3254
|
+
r = r || [], c = c || He.lang, c = He.alias[c] || c;
|
|
3255
|
+
var v = He.locales[c], k = v && v[e] || "";
|
|
3256
|
+
return !k && c != "zh" ? c == "en" ? He.v_G(e, r, "zh") : He.v_G(e, r, "en") : (He.lastLang = c, k == "=Empty" ? "" : k.replace(/\{(\d+)(\!?)\}/g, function(K, M, s) {
|
|
3257
|
+
return M = +M || 0, K = r[M - 1], (M < 1 || M > r.length) && (K = "{?}", Ye("i18n[" + e + "] no {" + M + "}: " + k, 3)), s ? "" : K;
|
|
3257
3258
|
}));
|
|
3258
3259
|
},
|
|
3259
3260
|
$T: function() {
|
|
3260
|
-
return
|
|
3261
|
+
return He.v_T.apply(null, arguments);
|
|
3261
3262
|
},
|
|
3262
3263
|
v_T: function() {
|
|
3263
3264
|
for (var e = arguments, r = "", c = [], v = 0, k = me + ".i18n.$T:", K = /^([\w\-]*):/, M, s = 0; s < e.length; s++) {
|
|
@@ -3282,14 +3283,14 @@ var Aa = { exports: {} };
|
|
|
3282
3283
|
var _e = s == 1 ? "en" : s ? "" : "zh";
|
|
3283
3284
|
if (M = K.exec(ae), M && (_e = M[1] || _e, ae = ae.substr(M[1].length + 1)), !M || !_e)
|
|
3284
3285
|
throw new Error(k + s + " 'lang:'?");
|
|
3285
|
-
|
|
3286
|
+
He.put({ lang: _e, overwrite: !1 }, [r + ":" + ae]);
|
|
3286
3287
|
}
|
|
3287
3288
|
}
|
|
3288
3289
|
}
|
|
3289
|
-
return r ? v > 0 ? r :
|
|
3290
|
+
return r ? v > 0 ? r : He.v_G(r, c) : "";
|
|
3290
3291
|
}
|
|
3291
|
-
}, ie =
|
|
3292
|
-
ie.G =
|
|
3292
|
+
}, ie = He.$T;
|
|
3293
|
+
ie.G = He.get, ie("NonBrowser-1::非浏览器环境,不支持{1}", 1), ie("IllegalArgs-1::参数错误:{1}", 1), ie("NeedImport-2::调用{1}需要先导入{2}", 2), ie("NotSupport-1::不支持:{1}", 1), B.TrafficImgUrl = "//ia.51.la/go1?id=20469973&pvFlag=1";
|
|
3293
3294
|
var T = B.Traffic = function(e) {
|
|
3294
3295
|
if ($) {
|
|
3295
3296
|
e = e ? "/" + me + "/Report/" + e : "";
|
|
@@ -3299,12 +3300,12 @@ var Aa = { exports: {} };
|
|
|
3299
3300
|
if (r.indexOf("//") == 0 && (/^https:/i.test(K) ? r = "https:" + r : r = "http:" + r), e && (r = r + "&cu=" + encodeURIComponent(k + e)), !c[K]) {
|
|
3300
3301
|
c[K] = 1;
|
|
3301
3302
|
var M = new Image();
|
|
3302
|
-
M.src = r,
|
|
3303
|
+
M.src = r, Ye("Traffic Analysis Image: " + (e || me + ".TrafficImgUrl=" + B.TrafficImgUrl));
|
|
3303
3304
|
}
|
|
3304
3305
|
}
|
|
3305
3306
|
}
|
|
3306
3307
|
};
|
|
3307
|
-
G && (
|
|
3308
|
+
G && (Ye(ie("8HO5::覆盖导入{1}", 0, me), 1), G.Destroy()), X[me] = B;
|
|
3308
3309
|
});
|
|
3309
3310
|
})(Aa);
|
|
3310
3311
|
var Tn = Aa.exports;
|
|
@@ -3350,28 +3351,28 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
3350
3351
|
}
|
|
3351
3352
|
}
|
|
3352
3353
|
ne(y);
|
|
3353
|
-
var q = new _.lamejs.Mp3Encoder(1, y.sampleRate, y.bitRate), z = 57600, Ae = new Int8Array(5e5),
|
|
3354
|
+
var q = new _.lamejs.Mp3Encoder(1, y.sampleRate, y.bitRate), z = 57600, Ae = new Int8Array(5e5), Pe = 0, Ye = 0, Je = function() {
|
|
3354
3355
|
try {
|
|
3355
|
-
if (
|
|
3356
|
-
var
|
|
3356
|
+
if (Ye < oe)
|
|
3357
|
+
var Ve = q.encodeBuffer(G.subarray(Ye, Ye + z));
|
|
3357
3358
|
else
|
|
3358
|
-
var
|
|
3359
|
+
var Ve = q.flush();
|
|
3359
3360
|
} catch (Re) {
|
|
3360
3361
|
console.error(Re), ve("MP3 Encoder: " + Re.message);
|
|
3361
3362
|
return;
|
|
3362
3363
|
}
|
|
3363
|
-
var U =
|
|
3364
|
+
var U = Ve.length;
|
|
3364
3365
|
if (U > 0) {
|
|
3365
|
-
if (
|
|
3366
|
+
if (Pe + U > Ae.length) {
|
|
3366
3367
|
var ht = new Int8Array(Ae.length + Math.max(5e5, U));
|
|
3367
|
-
ht.set(Ae.subarray(0,
|
|
3368
|
+
ht.set(Ae.subarray(0, Pe)), Ae = ht;
|
|
3368
3369
|
}
|
|
3369
|
-
Ae.set(
|
|
3370
|
+
Ae.set(Ve, Pe), Pe += U;
|
|
3370
3371
|
}
|
|
3371
|
-
if (
|
|
3372
|
-
|
|
3372
|
+
if (Ye < oe)
|
|
3373
|
+
Ye += z, setTimeout(Je);
|
|
3373
3374
|
else {
|
|
3374
|
-
var et = [Ae.buffer.slice(0,
|
|
3375
|
+
var et = [Ae.buffer.slice(0, Pe)], Se = Be.fn(et, Pe, oe, y.sampleRate);
|
|
3375
3376
|
Me(Se, y), W(et[0] || new ArrayBuffer(0), "audio/mp3");
|
|
3376
3377
|
}
|
|
3377
3378
|
};
|
|
@@ -3388,16 +3389,16 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
3388
3389
|
};
|
|
3389
3390
|
var be = { id: 0 }, xe = function(G, W) {
|
|
3390
3391
|
var ve = function(Je) {
|
|
3391
|
-
var
|
|
3392
|
-
if (
|
|
3393
|
-
U[
|
|
3394
|
-
sampleRate:
|
|
3395
|
-
bitRate:
|
|
3396
|
-
takeoff:
|
|
3392
|
+
var Ve = Je.data, U = oe.wkScope.wk_ctxs, ht = oe.wkScope.wk_lame, et = oe.wkScope.wk_mp3TrimFix, Se = U[Ve.id];
|
|
3393
|
+
if (Ve.action == "init")
|
|
3394
|
+
U[Ve.id] = {
|
|
3395
|
+
sampleRate: Ve.sampleRate,
|
|
3396
|
+
bitRate: Ve.bitRate,
|
|
3397
|
+
takeoff: Ve.takeoff,
|
|
3397
3398
|
pcmSize: 0,
|
|
3398
3399
|
memory: new Int8Array(5e5),
|
|
3399
3400
|
mOffset: 0,
|
|
3400
|
-
encObj: new ht.Mp3Encoder(1,
|
|
3401
|
+
encObj: new ht.Mp3Encoder(1, Ve.sampleRate, Ve.bitRate)
|
|
3401
3402
|
};
|
|
3402
3403
|
else if (!Se)
|
|
3403
3404
|
return;
|
|
@@ -3409,18 +3410,18 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
3409
3410
|
}
|
|
3410
3411
|
Se.memory.set(T, Se.mOffset), Se.mOffset += e;
|
|
3411
3412
|
};
|
|
3412
|
-
switch (
|
|
3413
|
+
switch (Ve.action) {
|
|
3413
3414
|
case "stop":
|
|
3414
|
-
Se.encObj = null, delete U[
|
|
3415
|
+
Se.encObj = null, delete U[Ve.id];
|
|
3415
3416
|
break;
|
|
3416
3417
|
case "encode":
|
|
3417
|
-
Se.pcmSize +=
|
|
3418
|
+
Se.pcmSize += Ve.pcm.length;
|
|
3418
3419
|
try {
|
|
3419
|
-
var Ue = Se.encObj.encodeBuffer(
|
|
3420
|
+
var Ue = Se.encObj.encodeBuffer(Ve.pcm);
|
|
3420
3421
|
} catch (T) {
|
|
3421
3422
|
Se.err = T, console.error(T);
|
|
3422
3423
|
}
|
|
3423
|
-
Ue && Ue.length > 0 && (Se.takeoff ? pe.onmessage({ action: "takeoff", id:
|
|
3424
|
+
Ue && Ue.length > 0 && (Se.takeoff ? pe.onmessage({ action: "takeoff", id: Ve.id, chunk: Ue }) : Re(Ue));
|
|
3424
3425
|
break;
|
|
3425
3426
|
case "complete":
|
|
3426
3427
|
try {
|
|
@@ -3428,27 +3429,27 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
3428
3429
|
} catch (T) {
|
|
3429
3430
|
Se.err = T, console.error(T);
|
|
3430
3431
|
}
|
|
3431
|
-
if (Ue && Ue.length > 0 && (Se.takeoff ? pe.onmessage({ action: "takeoff", id:
|
|
3432
|
+
if (Ue && Ue.length > 0 && (Se.takeoff ? pe.onmessage({ action: "takeoff", id: Ve.id, chunk: Ue }) : Re(Ue)), Se.err) {
|
|
3432
3433
|
pe.onmessage({
|
|
3433
|
-
action:
|
|
3434
|
-
id:
|
|
3434
|
+
action: Ve.action,
|
|
3435
|
+
id: Ve.id,
|
|
3435
3436
|
err: "MP3 Encoder: " + Se.err.message
|
|
3436
3437
|
});
|
|
3437
3438
|
break;
|
|
3438
3439
|
}
|
|
3439
|
-
var
|
|
3440
|
+
var He = [Se.memory.buffer.slice(0, Se.mOffset)], ie = et.fn(He, Se.mOffset, Se.pcmSize, Se.sampleRate);
|
|
3440
3441
|
pe.onmessage({
|
|
3441
|
-
action:
|
|
3442
|
-
id:
|
|
3443
|
-
blob:
|
|
3442
|
+
action: Ve.action,
|
|
3443
|
+
id: Ve.id,
|
|
3444
|
+
blob: He[0] || new ArrayBuffer(0),
|
|
3444
3445
|
meta: ie
|
|
3445
3446
|
});
|
|
3446
3447
|
break;
|
|
3447
3448
|
}
|
|
3448
3449
|
}, ce = function(Je) {
|
|
3449
|
-
pe.onmessage = function(
|
|
3450
|
-
var U =
|
|
3451
|
-
Je && (U =
|
|
3450
|
+
pe.onmessage = function(Ve) {
|
|
3451
|
+
var U = Ve;
|
|
3452
|
+
Je && (U = Ve.data);
|
|
3452
3453
|
var ht = be[U.id];
|
|
3453
3454
|
ht && (U.action == "takeoff" ? ht.set.takeoffEncodeChunk(new Uint8Array(U.chunk.buffer)) : (ht.call && ht.call(U), ht.call = null));
|
|
3454
3455
|
};
|
|
@@ -3481,13 +3482,13 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
3481
3482
|
q = q.replace(/[\w\$]+\.wkScope/g, "wkScope");
|
|
3482
3483
|
var z = ");wk_lame();self.onmessage=" + q;
|
|
3483
3484
|
z += ";var wkScope={ wk_ctxs:{},wk_lame:wk_lame", z += ",wk_mp3TrimFix:{rm:" + Be.rm + ",fn:" + Be.fn + "} }";
|
|
3484
|
-
var Ae = _.lamejs.toString(),
|
|
3485
|
-
pe = new Worker(
|
|
3486
|
-
(window.URL || webkitURL).revokeObjectURL(
|
|
3485
|
+
var Ae = _.lamejs.toString(), Pe = (window.URL || webkitURL).createObjectURL(new Blob(["var wk_lame=(", Ae, z], { type: "text/javascript" }));
|
|
3486
|
+
pe = new Worker(Pe), setTimeout(function() {
|
|
3487
|
+
(window.URL || webkitURL).revokeObjectURL(Pe);
|
|
3487
3488
|
}, 1e4), ce(1);
|
|
3488
3489
|
}
|
|
3489
|
-
var
|
|
3490
|
-
return
|
|
3490
|
+
var Ye = y();
|
|
3491
|
+
return Ye.isW = 1, J = pe, Ye;
|
|
3491
3492
|
} catch (Je) {
|
|
3492
3493
|
return pe && pe.terminate(), console.error(Je), xe(G, 1);
|
|
3493
3494
|
}
|
|
@@ -3533,18 +3534,18 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
3533
3534
|
"2.5": [11025, 12e3, 8e3]
|
|
3534
3535
|
}[q];
|
|
3535
3536
|
Ae && (Ae = Ae[ve(pe.substr(4, 2), 2)]);
|
|
3536
|
-
var
|
|
3537
|
+
var Pe = [
|
|
3537
3538
|
//lamejs -> Tables.bitrate_table
|
|
3538
3539
|
[0, 8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160],
|
|
3539
3540
|
[0, 32, 40, 48, 56, 64, 80, 96, 112, 128, 160, 192, 224, 256, 320]
|
|
3540
3541
|
//MPEG 1
|
|
3541
3542
|
][q == 1 ? 1 : 0][ve(pe.substr(0, 4), 2)];
|
|
3542
|
-
if (!q || !z || !
|
|
3543
|
+
if (!q || !z || !Pe || !Ae)
|
|
3543
3544
|
return null;
|
|
3544
|
-
for (var
|
|
3545
|
+
for (var Ye = Math.round(W * 8 / Pe), Je = z == 1 ? 384 : z == 2 || q == 1 ? 1152 : 576, Ve = Je / Ae * 1e3, U = Math.floor(Je * Pe / 8 / Ae * 1e3), ht = 0, et = 0, Se = 0; Se < G.length; Se++) {
|
|
3545
3546
|
var Re = G[Se];
|
|
3546
3547
|
if (et += Re.byteLength, et >= U + 3) {
|
|
3547
|
-
var Ue = new Uint8Array(Re),
|
|
3548
|
+
var Ue = new Uint8Array(Re), He = Re.byteLength - (et - (U + 3) + 1), ie = y(He, Ue);
|
|
3548
3549
|
ht = ie.charAt(6) == "1";
|
|
3549
3550
|
break;
|
|
3550
3551
|
}
|
|
@@ -3553,12 +3554,12 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
3553
3554
|
version: q,
|
|
3554
3555
|
layer: z,
|
|
3555
3556
|
sampleRate: Ae,
|
|
3556
|
-
bitRate:
|
|
3557
|
-
duration:
|
|
3557
|
+
bitRate: Pe,
|
|
3558
|
+
duration: Ye,
|
|
3558
3559
|
size: W,
|
|
3559
3560
|
hasPadding: ht,
|
|
3560
3561
|
frameSize: U,
|
|
3561
|
-
frameDurationFloat:
|
|
3562
|
+
frameDurationFloat: Ve
|
|
3562
3563
|
//每帧时长,含小数 ms
|
|
3563
3564
|
};
|
|
3564
3565
|
};
|
|
@@ -3573,21 +3574,21 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
3573
3574
|
if (pe > 0) {
|
|
3574
3575
|
var q = pe * y.frameSize - (y.hasPadding ? 1 : 0);
|
|
3575
3576
|
W -= q;
|
|
3576
|
-
for (var z = 0, Ae = [],
|
|
3577
|
-
var
|
|
3577
|
+
for (var z = 0, Ae = [], Pe = 0; Pe < G.length; Pe++) {
|
|
3578
|
+
var Ye = G[Pe];
|
|
3578
3579
|
if (q <= 0)
|
|
3579
3580
|
break;
|
|
3580
|
-
q >=
|
|
3581
|
+
q >= Ye.byteLength ? (q -= Ye.byteLength, Ae.push(Ye), G.splice(Pe, 1), Pe--) : (G[Pe] = Ye.slice(q), z = Ye, q = 0);
|
|
3581
3582
|
}
|
|
3582
3583
|
var Je = this.rm(G, W);
|
|
3583
3584
|
if (!Je) {
|
|
3584
3585
|
z && (G[0] = z);
|
|
3585
|
-
for (var
|
|
3586
|
-
G.splice(
|
|
3586
|
+
for (var Pe = 0; Pe < Ae.length; Pe++)
|
|
3587
|
+
G.splice(Pe, 0, Ae[Pe]);
|
|
3587
3588
|
y.err = "mp3 fix error: 已还原,错误原因不明";
|
|
3588
3589
|
}
|
|
3589
|
-
var
|
|
3590
|
-
|
|
3590
|
+
var Ve = y.trimFix = {};
|
|
3591
|
+
Ve.remove = pe, Ve.removeDuration = Math.round(pe * y.frameDurationFloat), Ve.duration = Math.round(W * 8 / y.bitRate);
|
|
3591
3592
|
}
|
|
3592
3593
|
return y;
|
|
3593
3594
|
}
|
|
@@ -4369,7 +4370,7 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
4369
4370
|
return 8 <= N && N <= 320 ? le(p, N, he) : (p.preset = 0, N);
|
|
4370
4371
|
};
|
|
4371
4372
|
}
|
|
4372
|
-
function
|
|
4373
|
+
function Pe() {
|
|
4373
4374
|
var l;
|
|
4374
4375
|
this.setModules = function(A) {
|
|
4375
4376
|
l = A;
|
|
@@ -4399,8 +4400,8 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
4399
4400
|
le.resvDrain_post += p, A.ResvSize -= p;
|
|
4400
4401
|
};
|
|
4401
4402
|
}
|
|
4402
|
-
|
|
4403
|
-
function
|
|
4403
|
+
Ye.NUMTOCENTRIES = 100, Ye.MAXFRAMESIZE = 2880;
|
|
4404
|
+
function Ye() {
|
|
4404
4405
|
this.setModules = function(x, m, le) {
|
|
4405
4406
|
};
|
|
4406
4407
|
var l = [
|
|
@@ -4881,7 +4882,7 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
4881
4882
|
m = ue(ye.LAME_MAXMP3BUFFER), f.h_ptr = f.w_ptr = 0, f.header[f.h_ptr].write_timing = 0, p = -1, N = 0, le = 0;
|
|
4882
4883
|
};
|
|
4883
4884
|
}
|
|
4884
|
-
function
|
|
4885
|
+
function Ve(l, A, x, m) {
|
|
4885
4886
|
this.xlen = l, this.linmax = A, this.table = x, this.hlen = m;
|
|
4886
4887
|
}
|
|
4887
4888
|
var U = {};
|
|
@@ -7998,42 +7999,42 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
7998
7999
|
8
|
|
7999
8000
|
], U.ht = [
|
|
8000
8001
|
/* xlen, linmax, table, hlen */
|
|
8001
|
-
new
|
|
8002
|
-
new
|
|
8003
|
-
new
|
|
8004
|
-
new
|
|
8005
|
-
new
|
|
8002
|
+
new Ve(0, 0, null, null),
|
|
8003
|
+
new Ve(2, 0, U.t1HB, U.t1l),
|
|
8004
|
+
new Ve(3, 0, U.t2HB, U.t2l),
|
|
8005
|
+
new Ve(3, 0, U.t3HB, U.t3l),
|
|
8006
|
+
new Ve(0, 0, null, null),
|
|
8006
8007
|
/* Apparently not used */
|
|
8007
|
-
new
|
|
8008
|
-
new
|
|
8009
|
-
new
|
|
8010
|
-
new
|
|
8011
|
-
new
|
|
8012
|
-
new
|
|
8013
|
-
new
|
|
8014
|
-
new
|
|
8015
|
-
new
|
|
8016
|
-
new
|
|
8008
|
+
new Ve(4, 0, U.t5HB, U.t5l),
|
|
8009
|
+
new Ve(4, 0, U.t6HB, U.t6l),
|
|
8010
|
+
new Ve(6, 0, U.t7HB, U.t7l),
|
|
8011
|
+
new Ve(6, 0, U.t8HB, U.t8l),
|
|
8012
|
+
new Ve(6, 0, U.t9HB, U.t9l),
|
|
8013
|
+
new Ve(8, 0, U.t10HB, U.t10l),
|
|
8014
|
+
new Ve(8, 0, U.t11HB, U.t11l),
|
|
8015
|
+
new Ve(8, 0, U.t12HB, U.t12l),
|
|
8016
|
+
new Ve(16, 0, U.t13HB, U.t13l),
|
|
8017
|
+
new Ve(0, 0, null, U.t16_5l),
|
|
8017
8018
|
/* Apparently not used */
|
|
8018
|
-
new
|
|
8019
|
-
new
|
|
8020
|
-
new
|
|
8021
|
-
new
|
|
8022
|
-
new
|
|
8023
|
-
new
|
|
8024
|
-
new
|
|
8025
|
-
new
|
|
8026
|
-
new
|
|
8027
|
-
new
|
|
8028
|
-
new
|
|
8029
|
-
new
|
|
8030
|
-
new
|
|
8031
|
-
new
|
|
8032
|
-
new
|
|
8033
|
-
new
|
|
8034
|
-
new
|
|
8035
|
-
new
|
|
8036
|
-
new
|
|
8019
|
+
new Ve(16, 0, U.t15HB, U.t15l),
|
|
8020
|
+
new Ve(1, 1, U.t16HB, U.t16l),
|
|
8021
|
+
new Ve(2, 3, U.t16HB, U.t16l),
|
|
8022
|
+
new Ve(3, 7, U.t16HB, U.t16l),
|
|
8023
|
+
new Ve(4, 15, U.t16HB, U.t16l),
|
|
8024
|
+
new Ve(6, 63, U.t16HB, U.t16l),
|
|
8025
|
+
new Ve(8, 255, U.t16HB, U.t16l),
|
|
8026
|
+
new Ve(10, 1023, U.t16HB, U.t16l),
|
|
8027
|
+
new Ve(13, 8191, U.t16HB, U.t16l),
|
|
8028
|
+
new Ve(4, 15, U.t24HB, U.t24l),
|
|
8029
|
+
new Ve(5, 31, U.t24HB, U.t24l),
|
|
8030
|
+
new Ve(6, 63, U.t24HB, U.t24l),
|
|
8031
|
+
new Ve(7, 127, U.t24HB, U.t24l),
|
|
8032
|
+
new Ve(8, 255, U.t24HB, U.t24l),
|
|
8033
|
+
new Ve(9, 511, U.t24HB, U.t24l),
|
|
8034
|
+
new Ve(11, 2047, U.t24HB, U.t24l),
|
|
8035
|
+
new Ve(13, 8191, U.t24HB, U.t24l),
|
|
8036
|
+
new Ve(0, 0, U.t32HB, U.t32l),
|
|
8037
|
+
new Ve(0, 0, U.t33HB, U.t33l)
|
|
8037
8038
|
], U.largetbl = [
|
|
8038
8039
|
65540,
|
|
8039
8040
|
327685,
|
|
@@ -8346,7 +8347,7 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
8346
8347
|
function Ue() {
|
|
8347
8348
|
this.class_id = 0, this.num_samples = 0, this.num_channels = 0, this.in_samplerate = 0, this.out_samplerate = 0, this.scale = 0, this.scale_left = 0, this.scale_right = 0, this.analysis = !1, this.bWriteVbrTag = !1, this.decode_only = !1, this.quality = 0, this.mode = oe.STEREO, this.force_ms = !1, this.free_format = !1, this.findReplayGain = !1, this.decode_on_the_fly = !1, this.write_id3tag_automatic = !1, this.brate = 0, this.compression_ratio = 0, this.copyright = 0, this.original = 0, this.extension = 0, this.emphasis = 0, this.error_protection = 0, this.strict_ISO = !1, this.disable_reservoir = !1, this.quant_comp = 0, this.quant_comp_short = 0, this.experimentalY = !1, this.experimentalZ = 0, this.exp_nspsytune = 0, this.preset = 0, this.VBR = null, this.VBR_q_frac = 0, this.VBR_q = 0, this.VBR_mean_bitrate_kbps = 0, this.VBR_min_bitrate_kbps = 0, this.VBR_max_bitrate_kbps = 0, this.VBR_hard_min = 0, this.lowpassfreq = 0, this.highpassfreq = 0, this.lowpasswidth = 0, this.highpasswidth = 0, this.maskingadjust = 0, this.maskingadjust_short = 0, this.ATHonly = !1, this.ATHshort = !1, this.noATH = !1, this.ATHtype = 0, this.ATHcurve = 0, this.ATHlower = 0, this.athaa_type = 0, this.athaa_loudapprox = 0, this.athaa_sensitivity = 0, this.short_blocks = null, this.useTemporal = !1, this.interChRatio = 0, this.msfix = 0, this.tune = !1, this.tune_value_a = 0, this.version = 0, this.encoder_delay = 0, this.encoder_padding = 0, this.framesize = 0, this.frameNum = 0, this.lame_allocated_gfp = 0, this.internal_flags = null;
|
|
8348
8349
|
}
|
|
8349
|
-
function
|
|
8350
|
+
function He(l) {
|
|
8350
8351
|
var A = l;
|
|
8351
8352
|
this.quantize = A, this.iteration_loop = function(x, m, le, p) {
|
|
8352
8353
|
var N = x.internal_flags, he = V(v.SFBMAX), F = V(576), re = ne(2), D = 0, ge = N.l3_side, L = new ht(D);
|
|
@@ -10462,7 +10463,7 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
10462
10463
|
-0.313819 * 2
|
|
10463
10464
|
];
|
|
10464
10465
|
this.L3psycho_anal_ns = function(de, P, se, je, qe, ke, ze, Ge, Xe, st) {
|
|
10465
|
-
var $e = de.internal_flags, yt = J([2, s.BLKSIZE]), ft = J([2, 3, s.BLKSIZE_s]), wt = V(s.CBANDS + 1), Rt = V(s.CBANDS + 1), vt = V(s.CBANDS + 2), it = ne(2),
|
|
10466
|
+
var $e = de.internal_flags, yt = J([2, s.BLKSIZE]), ft = J([2, 3, s.BLKSIZE_s]), wt = V(s.CBANDS + 1), Rt = V(s.CBANDS + 1), vt = V(s.CBANDS + 2), it = ne(2), _t = ne(2), Lt, Ke, lt, rt, St, jt, Ft, mt, p0 = J([2, 576]), Yt, Kt = ne(s.CBANDS + 2), a0 = ne(s.CBANDS + 2);
|
|
10466
10467
|
for (Me.fill(a0, 0), Lt = $e.channels_out, de.mode == oe.JOINT_STEREO && (Lt = 4), de.VBR == y.vbr_off ? Yt = $e.ResvMax == 0 ? 0 : $e.ResvSize / $e.ResvMax * 0.5 : de.VBR == y.vbr_rh || de.VBR == y.vbr_mtrh || de.VBR == y.vbr_mt ? Yt = 0.6 : Yt = 1, Ke = 0; Ke < $e.channels_out; Ke++) {
|
|
10467
10468
|
var o0 = P[Ke], l0 = se + 576 - 350 - H + 192;
|
|
10468
10469
|
for (rt = 0; rt < 576; rt++) {
|
|
@@ -10492,7 +10493,7 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
10492
10493
|
var D0;
|
|
10493
10494
|
Xt[rt - 1] > Xt[rt] ? D0 = Xt[rt - 1] / Xt[rt] : D0 = Xt[rt] / Xt[rt - 1], D0 < 1.7 && (Bt[rt] = 0, rt == 1 && (Bt[0] = 0));
|
|
10494
10495
|
}
|
|
10495
|
-
for (Bt[0] != 0 && $e.nsPsy.lastAttacks[Ke] != 0 && (Bt[0] = 0), ($e.nsPsy.lastAttacks[Ke] == 3 || Bt[0] + Bt[1] + Bt[2] + Bt[3] != 0) && (K0 = 0, Bt[1] != 0 && Bt[0] != 0 && (Bt[1] = 0), Bt[2] != 0 && Bt[1] != 0 && (Bt[2] = 0), Bt[3] != 0 && Bt[2] != 0 && (Bt[3] = 0)), Ke < 2 ?
|
|
10496
|
+
for (Bt[0] != 0 && $e.nsPsy.lastAttacks[Ke] != 0 && (Bt[0] = 0), ($e.nsPsy.lastAttacks[Ke] == 3 || Bt[0] + Bt[1] + Bt[2] + Bt[3] != 0) && (K0 = 0, Bt[1] != 0 && Bt[0] != 0 && (Bt[1] = 0), Bt[2] != 0 && Bt[1] != 0 && (Bt[2] = 0), Bt[3] != 0 && Bt[2] != 0 && (Bt[3] = 0)), Ke < 2 ? _t[Ke] = K0 : b(), Xe[Ke] = $e.tot_ener[Ke], $0 = ft, X0 = yt, C(
|
|
10496
10497
|
de,
|
|
10497
10498
|
ea,
|
|
10498
10499
|
ta,
|
|
@@ -10552,7 +10553,7 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
10552
10553
|
wt[lt] = 0, vt[lt] = 0;
|
|
10553
10554
|
a($e, wt, vt, Ke);
|
|
10554
10555
|
}
|
|
10555
|
-
for ((de.mode == oe.STEREO || de.mode == oe.JOINT_STEREO) && b(), de.mode == oe.JOINT_STEREO && b(), ee(de,
|
|
10556
|
+
for ((de.mode == oe.STEREO || de.mode == oe.JOINT_STEREO) && b(), de.mode == oe.JOINT_STEREO && b(), ee(de, _t, st, it), Ke = 0; Ke < Lt; Ke++) {
|
|
10556
10557
|
var b0, w0 = 0, ra, O0;
|
|
10557
10558
|
Ke > 1 ? b() : (b0 = ze, w0 = 0, ra = st[Ke], O0 = qe[je][Ke]), ra == s.SHORT_TYPE ? b0[w0 + Ke] = Te(O0, $e.masking_lower) : b0[w0 + Ke] = Fe(O0, $e.masking_lower), de.analysis && ($e.pinfo.pe[je][Ke] = b0[w0 + Ke]);
|
|
10558
10559
|
}
|
|
@@ -10568,12 +10569,12 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
10568
10569
|
function gt(de, P, se, je, qe, ke, ze, Ge, Xe, st, $e, yt) {
|
|
10569
10570
|
var ft = V(s.CBANDS + 1), wt = Ge / (yt > 15 ? 2 * 576 : 2 * 192), Rt = ne(s.HBLKSIZE), vt;
|
|
10570
10571
|
Ge /= Xe;
|
|
10571
|
-
var it = 0,
|
|
10572
|
+
var it = 0, _t = 0;
|
|
10572
10573
|
for (vt = 0; vt < s.CBANDS; vt++) {
|
|
10573
10574
|
var Lt, Ke;
|
|
10574
10575
|
for (Lt = kt(Ge * it), ft[vt] = Ge * it, Ke = it; kt(Ge * Ke) - Lt < N && Ke <= Xe / 2; Ke++)
|
|
10575
10576
|
;
|
|
10576
|
-
for (de[vt] = Ke - it,
|
|
10577
|
+
for (de[vt] = Ke - it, _t = vt + 1; it < Ke; )
|
|
10577
10578
|
Rt[it++] = vt;
|
|
10578
10579
|
if (it > Xe / 2) {
|
|
10579
10580
|
it = Xe / 2, ++vt;
|
|
@@ -10591,11 +10592,11 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
10591
10592
|
);
|
|
10592
10593
|
}
|
|
10593
10594
|
it = 0;
|
|
10594
|
-
for (var Yt = 0; Yt <
|
|
10595
|
+
for (var Yt = 0; Yt < _t; Yt++) {
|
|
10595
10596
|
var Kt = de[Yt], Lt, a0;
|
|
10596
10597
|
Lt = kt(Ge * it), a0 = kt(Ge * (it + Kt - 1)), je[Yt] = 0.5 * (Lt + a0), Lt = kt(Ge * (it - 0.5)), a0 = kt(Ge * (it + Kt - 0.5)), qe[Yt] = a0 - Lt, it += Kt;
|
|
10597
10598
|
}
|
|
10598
|
-
return
|
|
10599
|
+
return _t;
|
|
10599
10600
|
}
|
|
10600
10601
|
function Mt(de, P, se, je, qe, ke) {
|
|
10601
10602
|
var ze = J([s.CBANDS, s.CBANDS]), Ge, Xe = 0;
|
|
@@ -10683,13 +10684,13 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
10683
10684
|
);
|
|
10684
10685
|
var it = 0;
|
|
10685
10686
|
for (se = 0; se < P.npart_l; se++) {
|
|
10686
|
-
var
|
|
10687
|
-
|
|
10687
|
+
var _t;
|
|
10688
|
+
_t = ce.MAX_VALUE;
|
|
10688
10689
|
for (var Lt = 0; Lt < P.numlines_l[se]; Lt++, it++) {
|
|
10689
10690
|
var Ke = wt * it / (1e3 * s.BLKSIZE), lt;
|
|
10690
|
-
lt = this.ATHformula(Ke * 1e3, de) - 20, lt = Math.pow(10, 0.1 * lt), lt *= P.numlines_l[se],
|
|
10691
|
+
lt = this.ATHformula(Ke * 1e3, de) - 20, lt = Math.pow(10, 0.1 * lt), lt *= P.numlines_l[se], _t > lt && (_t = lt);
|
|
10691
10692
|
}
|
|
10692
|
-
P.ATH.cb_l[se] =
|
|
10693
|
+
P.ATH.cb_l[se] = _t, _t = -20 + $e[se] * 20 / 10, _t > 6 && (_t = 100), _t < -15 && (_t = -15), _t -= 8, P.minval_l[se] = Math.pow(10, _t / 10) * P.numlines_l[se];
|
|
10693
10694
|
}
|
|
10694
10695
|
for (P.npart_s = gt(
|
|
10695
10696
|
P.numlines_s,
|
|
@@ -10705,13 +10706,13 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
10705
10706
|
s.BLKSIZE_s / (2 * 192),
|
|
10706
10707
|
s.SBMAX_s
|
|
10707
10708
|
), it = 0, se = 0; se < P.npart_s; se++) {
|
|
10708
|
-
var
|
|
10709
|
-
$e[se] >= qe && (vt = st * ($e[se] - qe) / (ke - qe) + Xe * (ke - $e[se]) / (ke - qe)), ft[se] = Math.pow(10, vt / 10),
|
|
10709
|
+
var _t, vt = Xe;
|
|
10710
|
+
$e[se] >= qe && (vt = st * ($e[se] - qe) / (ke - qe) + Xe * (ke - $e[se]) / (ke - qe)), ft[se] = Math.pow(10, vt / 10), _t = ce.MAX_VALUE;
|
|
10710
10711
|
for (var Lt = 0; Lt < P.numlines_s[se]; Lt++, it++) {
|
|
10711
10712
|
var Ke = wt * it / (1e3 * s.BLKSIZE_s), lt;
|
|
10712
|
-
lt = this.ATHformula(Ke * 1e3, de) - 20, lt = Math.pow(10, 0.1 * lt), lt *= P.numlines_s[se],
|
|
10713
|
+
lt = this.ATHformula(Ke * 1e3, de) - 20, lt = Math.pow(10, 0.1 * lt), lt *= P.numlines_s[se], _t > lt && (_t = lt);
|
|
10713
10714
|
}
|
|
10714
|
-
P.ATH.cb_s[se] =
|
|
10715
|
+
P.ATH.cb_s[se] = _t, _t = -7 + $e[se] * 7 / 12, $e[se] > 12 && (_t *= 1 + Math.log(1 + _t) * 3.1), $e[se] < 12 && (_t *= 1 + Math.log(1 - _t) * 2.3), _t < -15 && (_t = -15), _t -= 8, P.minval_s[se] = Math.pow(10, _t / 10) * P.numlines_s[se];
|
|
10715
10716
|
}
|
|
10716
10717
|
P.s3_ss = Mt(
|
|
10717
10718
|
P.s3ind_s,
|
|
@@ -11067,7 +11068,7 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
11067
11068
|
}
|
|
11068
11069
|
default: {
|
|
11069
11070
|
var at;
|
|
11070
|
-
n.sfb21_extra = !1, a.quality < 0 && (a.quality = LAME_DEFAULT_QUALITY), at = a.VBR, at == y.vbr_off && (a.VBR_mean_bitrate_kbps = a.brate), p.apply_preset(a, a.VBR_mean_bitrate_kbps, 0), a.VBR = at, n.PSY.mask_adjust = a.maskingadjust, n.PSY.mask_adjust_short = a.maskingadjust_short, at == y.vbr_off ? n.iteration_loop = new
|
|
11071
|
+
n.sfb21_extra = !1, a.quality < 0 && (a.quality = LAME_DEFAULT_QUALITY), at = a.VBR, at == y.vbr_off && (a.VBR_mean_bitrate_kbps = a.brate), p.apply_preset(a, a.VBR_mean_bitrate_kbps, 0), a.VBR = at, n.PSY.mask_adjust = a.maskingadjust, n.PSY.mask_adjust_short = a.maskingadjust_short, at == y.vbr_off ? n.iteration_loop = new He(he) : b();
|
|
11071
11072
|
break;
|
|
11072
11073
|
}
|
|
11073
11074
|
}
|
|
@@ -11220,7 +11221,7 @@ const P0 = /* @__PURE__ */ j0(Tn);
|
|
|
11220
11221
|
}
|
|
11221
11222
|
function fe(l, A, x) {
|
|
11222
11223
|
l != 1 && b("fix cc: only supports mono");
|
|
11223
|
-
var m = new ye(), le = new te(), p = new z(), N = new Je(), he = new Ae(), F = new e(), re = new k(), D = new
|
|
11224
|
+
var m = new ye(), le = new te(), p = new z(), N = new Je(), he = new Ae(), F = new e(), re = new k(), D = new Ye(), ge = new pe(), L = new j(), H = new Pe(), t = new q(), o = new Ee(), C = new Oe();
|
|
11224
11225
|
m.setModules(p, N, he, F, re, D, ge, L, C), N.setModules(p, C, ge, D), L.setModules(N, ge), he.setModules(m), re.setModules(N, H, F, t), F.setModules(t, H, m.enc.psy), H.setModules(N), t.setModules(F), D.setModules(m, N, ge), le.setModules(o, C), o.setModules(ge, L, he);
|
|
11225
11226
|
var Y = m.lame_init();
|
|
11226
11227
|
Y.num_channels = l, Y.in_samplerate = A, Y.out_samplerate = A, Y.brate = x, Y.mode = oe.STEREO, Y.quality = 3, Y.bWriteVbrTag = !1, Y.disable_reservoir = !0, Y.write_id3tag_automatic = !1, m.lame_init_params(Y);
|
|
@@ -11372,11 +11373,11 @@ const Ba = (_) => (Oa("data-v-e59bd63b"), _ = _(), Fa(), _), Mn = {
|
|
|
11372
11373
|
sampleRate: 16e3,
|
|
11373
11374
|
bitRate: 16,
|
|
11374
11375
|
//mp3格式,指定采样率hz、比特率kbps,其他参数使用默认配置;注意:是数字的参数必须提供数字,不要用字符串;需要使用的type类型,需提前把格式支持文件加载进来,比如使用wav格式需要提前加载wav.js编码引擎
|
|
11375
|
-
onProcess: (q, z, Ae,
|
|
11376
|
+
onProcess: (q, z, Ae, Pe) => {
|
|
11376
11377
|
be.value = G(Ae), B.value && B.value.input(
|
|
11377
11378
|
q[q.length - 1],
|
|
11378
11379
|
z,
|
|
11379
|
-
|
|
11380
|
+
Pe
|
|
11380
11381
|
);
|
|
11381
11382
|
}
|
|
11382
11383
|
}), ue.value.open(
|
|
@@ -11394,8 +11395,8 @@ const Ba = (_) => (Oa("data-v-e59bd63b"), _ = _(), Fa(), _), Mn = {
|
|
|
11394
11395
|
ue.value.close(), ue.value = null, Be.value = "";
|
|
11395
11396
|
}), Me();
|
|
11396
11397
|
function G(q) {
|
|
11397
|
-
const z = Math.floor(q / 1e3), Ae = Math.floor(z / 60),
|
|
11398
|
-
return `${
|
|
11398
|
+
const z = Math.floor(q / 1e3), Ae = Math.floor(z / 60), Pe = z % 60, Ye = Ae.toString().padStart(2, "0"), Je = Pe.toString().padStart(2, "0");
|
|
11399
|
+
return `${Ye}:${Je}`;
|
|
11399
11400
|
}
|
|
11400
11401
|
function W() {
|
|
11401
11402
|
ne.value && (V.value = !0, ue.value.start());
|
|
@@ -11411,11 +11412,11 @@ const Ba = (_) => (Oa("data-v-e59bd63b"), _ = _(), Fa(), _), Mn = {
|
|
|
11411
11412
|
);
|
|
11412
11413
|
}
|
|
11413
11414
|
function ce() {
|
|
11414
|
-
const [, q] = J.value.type.split("/"), z = (/* @__PURE__ */ new Date()).getTime(), Ae = `${z}.${q}`,
|
|
11415
|
+
const [, q] = J.value.type.split("/"), z = (/* @__PURE__ */ new Date()).getTime(), Ae = `${z}.${q}`, Pe = new File([J.value], Ae, {
|
|
11415
11416
|
type: J.value.type,
|
|
11416
11417
|
lastModified: z
|
|
11417
11418
|
});
|
|
11418
|
-
b("finish", [
|
|
11419
|
+
b("finish", [Pe]), b("cancel");
|
|
11419
11420
|
}
|
|
11420
11421
|
function y() {
|
|
11421
11422
|
b("finish", Be.value), b("cancel");
|
|
@@ -11424,12 +11425,12 @@ const Ba = (_) => (Oa("data-v-e59bd63b"), _ = _(), Fa(), _), Mn = {
|
|
|
11424
11425
|
b("cancel");
|
|
11425
11426
|
}
|
|
11426
11427
|
function pe() {
|
|
11427
|
-
const [, q] = J.value.type.split("/"), z = (/* @__PURE__ */ new Date()).getTime(), Ae = `${z}.${q}`,
|
|
11428
|
+
const [, q] = J.value.type.split("/"), z = (/* @__PURE__ */ new Date()).getTime(), Ae = `${z}.${q}`, Pe = new File([J.value], Ae, {
|
|
11428
11429
|
type: J.value.type,
|
|
11429
11430
|
lastModified: z
|
|
11430
11431
|
});
|
|
11431
|
-
Sn(
|
|
11432
|
-
Be.value =
|
|
11432
|
+
Sn(Pe, (Ye) => {
|
|
11433
|
+
Be.value = Ye;
|
|
11433
11434
|
});
|
|
11434
11435
|
}
|
|
11435
11436
|
return (q, z) => (tt(), ut("div", {
|
|
@@ -11445,7 +11446,7 @@ const Ba = (_) => (Oa("data-v-e59bd63b"), _ = _(), Fa(), _), Mn = {
|
|
|
11445
11446
|
title: "停止录制",
|
|
11446
11447
|
class: "oper"
|
|
11447
11448
|
}, [
|
|
11448
|
-
|
|
11449
|
+
bt(We(At), {
|
|
11449
11450
|
src: We(xt).stop,
|
|
11450
11451
|
width: 24,
|
|
11451
11452
|
height: 24
|
|
@@ -11456,7 +11457,7 @@ const Ba = (_) => (Oa("data-v-e59bd63b"), _ = _(), Fa(), _), Mn = {
|
|
|
11456
11457
|
title: "开始录制",
|
|
11457
11458
|
class: "oper"
|
|
11458
11459
|
}, [
|
|
11459
|
-
|
|
11460
|
+
bt(We(At), {
|
|
11460
11461
|
src: We(xt).record,
|
|
11461
11462
|
width: 24,
|
|
11462
11463
|
height: 24
|
|
@@ -11484,7 +11485,7 @@ const Ba = (_) => (Oa("data-v-e59bd63b"), _ = _(), Fa(), _), Mn = {
|
|
|
11484
11485
|
title: "停止录制",
|
|
11485
11486
|
class: "oper"
|
|
11486
11487
|
}, [
|
|
11487
|
-
|
|
11488
|
+
bt(We(At), {
|
|
11488
11489
|
src: We(xt).stop,
|
|
11489
11490
|
width: 24,
|
|
11490
11491
|
height: 24
|
|
@@ -11495,7 +11496,7 @@ const Ba = (_) => (Oa("data-v-e59bd63b"), _ = _(), Fa(), _), Mn = {
|
|
|
11495
11496
|
title: "开始录制",
|
|
11496
11497
|
class: "oper"
|
|
11497
11498
|
}, [
|
|
11498
|
-
|
|
11499
|
+
bt(We(At), {
|
|
11499
11500
|
src: We(xt).record,
|
|
11500
11501
|
width: 24,
|
|
11501
11502
|
height: 24
|
|
@@ -12135,7 +12136,7 @@ var Ea = { exports: {} };
|
|
|
12135
12136
|
* @param {object} config - {type:"video", disableLogs: true, numberOfAudioChannels: 1, bufferSize: 0, sampleRate: 0, video: HTMLVideoElement, getNativeBlob:true, etc.}
|
|
12136
12137
|
*/
|
|
12137
12138
|
function $(T, e) {
|
|
12138
|
-
return !e.recorderType && !e.type && (e.audio && e.video ? e.type = "video" : e.audio && !e.video && (e.type = "audio")), e.recorderType && !e.type && (e.recorderType === U || e.recorderType ===
|
|
12139
|
+
return !e.recorderType && !e.type && (e.audio && e.video ? e.type = "video" : e.audio && !e.video && (e.type = "audio")), e.recorderType && !e.type && (e.recorderType === U || e.recorderType === Ve || typeof ie < "u" && e.recorderType === ie ? e.type = "video" : e.recorderType === Se ? e.type = "gif" : e.recorderType === Je ? e.type = "audio" : e.recorderType === Ye && (pe(T, "audio").length && pe(T, "video").length || !pe(T, "audio").length && pe(T, "video").length ? e.type = "video" : pe(T, "audio").length && !pe(T, "video").length && (e.type = "audio"))), typeof Ye < "u" && typeof MediaRecorder < "u" && "requestData" in MediaRecorder.prototype && (e.mimeType || (e.mimeType = "video/webm"), e.type || (e.type = e.mimeType.split("/")[0]), e.bitsPerSecond), e.type || (e.mimeType && (e.type = e.mimeType.split("/")[0]), e.type || (e.type = "audio")), e;
|
|
12139
12140
|
}
|
|
12140
12141
|
/**
|
|
12141
12142
|
* {@link GetRecorderType} is an inner/private helper for {@link RecordRTC}.
|
|
@@ -12153,7 +12154,7 @@ var Ea = { exports: {} };
|
|
|
12153
12154
|
*/
|
|
12154
12155
|
function b(T, e) {
|
|
12155
12156
|
var r;
|
|
12156
|
-
return (G || xe || Be) && (r = Je), typeof MediaRecorder < "u" && "requestData" in MediaRecorder.prototype && !G && (r =
|
|
12157
|
+
return (G || xe || Be) && (r = Je), typeof MediaRecorder < "u" && "requestData" in MediaRecorder.prototype && !G && (r = Ye), e.type === "video" && (G || Be) && (r = U, typeof ie < "u" && typeof ReadableStream < "u" && (r = ie)), e.type === "gif" && (r = Se), e.type === "canvas" && (r = Ve), Pe() && r !== Ve && r !== Se && typeof MediaRecorder < "u" && "requestData" in MediaRecorder.prototype && (pe(T, "video").length || pe(T, "audio").length) && (e.type === "audio" ? typeof MediaRecorder.isTypeSupported == "function" && MediaRecorder.isTypeSupported("audio/webm") && (r = Ye) : typeof MediaRecorder.isTypeSupported == "function" && MediaRecorder.isTypeSupported("video/webm") && (r = Ye)), T instanceof Array && T.length && (r = Ue), e.recorderType && (r = e.recorderType), !e.disableLogs && r && r.name && console.log("Using recorderType:", r.name || r.constructor.name), !r && W && (r = Ye), r;
|
|
12157
12158
|
}
|
|
12158
12159
|
/**
|
|
12159
12160
|
* MRecordRTC runs on top of {@link RecordRTC} to bring multiple recordings in a single place, by providing simple API.
|
|
@@ -12194,7 +12195,7 @@ var Ea = { exports: {} };
|
|
|
12194
12195
|
video: null,
|
|
12195
12196
|
gif: null
|
|
12196
12197
|
};
|
|
12197
|
-
if (typeof e.audio != "function" &&
|
|
12198
|
+
if (typeof e.audio != "function" && Pe() && !pe(T, "audio").length && (e.audio = !1), typeof e.video != "function" && Pe() && !pe(T, "video").length && (e.video = !1), typeof e.gif != "function" && Pe() && !pe(T, "video").length && (e.gif = !1), !e.audio && !e.video && !e.gif)
|
|
12198
12199
|
throw "MediaStream must have either audio or video tracks.";
|
|
12199
12200
|
if (e.audio && (r = null, typeof e.audio == "function" && (r = e.audio), this.audioRecorder = new X(T, {
|
|
12200
12201
|
type: "audio",
|
|
@@ -12209,9 +12210,9 @@ var Ea = { exports: {} };
|
|
|
12209
12210
|
}), e.video || this.audioRecorder.startRecording()), e.video) {
|
|
12210
12211
|
r = null, typeof e.video == "function" && (r = e.video);
|
|
12211
12212
|
var v = T;
|
|
12212
|
-
if (
|
|
12213
|
+
if (Pe() && e.audio && typeof e.audio == "function") {
|
|
12213
12214
|
var k = pe(T, "video")[0];
|
|
12214
|
-
Me ? (v = new ve(), v.addTrack(k), r && r === U && (r =
|
|
12215
|
+
Me ? (v = new ve(), v.addTrack(k), r && r === U && (r = Ye)) : (v = new ve(), v.addTrack(k));
|
|
12215
12216
|
}
|
|
12216
12217
|
this.videoRecorder = new X(v, {
|
|
12217
12218
|
type: "video",
|
|
@@ -12232,7 +12233,7 @@ var Ea = { exports: {} };
|
|
|
12232
12233
|
}), e.audio || this.videoRecorder.startRecording();
|
|
12233
12234
|
}
|
|
12234
12235
|
if (e.audio && e.video) {
|
|
12235
|
-
var K = this, M =
|
|
12236
|
+
var K = this, M = Pe() === !0;
|
|
12236
12237
|
(e.audio instanceof Je && e.video || e.audio !== !0 && e.video !== !0 && e.audio !== e.video) && (M = !1), M === !0 ? (K.audioRecorder = null, K.videoRecorder.startRecording()) : K.videoRecorder.initRecorder(function() {
|
|
12237
12238
|
K.audioRecorder.initRecorder(function() {
|
|
12238
12239
|
K.videoRecorder.startRecording(), K.audioRecorder.startRecording();
|
|
@@ -12331,11 +12332,11 @@ var Ea = { exports: {} };
|
|
|
12331
12332
|
ue.getFromDisk = X.getFromDisk, ue.writeToDisk = X.writeToDisk, typeof X < "u" && (X.MRecordRTC = ue);
|
|
12332
12333
|
var B = "Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";
|
|
12333
12334
|
(function(T) {
|
|
12334
|
-
T && (typeof window < "u" || typeof
|
|
12335
|
+
T && (typeof window < "u" || typeof pt > "u" || (pt.navigator = {
|
|
12335
12336
|
userAgent: B,
|
|
12336
12337
|
getUserMedia: function() {
|
|
12337
12338
|
}
|
|
12338
|
-
},
|
|
12339
|
+
}, pt.console || (pt.console = {}), (typeof pt.console.log > "u" || typeof pt.console.error > "u") && (pt.console.error = pt.console.log = pt.console.log || function() {
|
|
12339
12340
|
console.log(arguments);
|
|
12340
12341
|
}), typeof document > "u" && (T.document = {
|
|
12341
12342
|
documentElement: {
|
|
@@ -12375,8 +12376,8 @@ var Ea = { exports: {} };
|
|
|
12375
12376
|
revokeObjectURL: function() {
|
|
12376
12377
|
return "";
|
|
12377
12378
|
}
|
|
12378
|
-
}), T.window =
|
|
12379
|
-
})(typeof
|
|
12379
|
+
}), T.window = pt));
|
|
12380
|
+
})(typeof pt < "u" ? pt : null);
|
|
12380
12381
|
var ne = window.requestAnimationFrame;
|
|
12381
12382
|
if (typeof ne > "u") {
|
|
12382
12383
|
if (typeof webkitRequestAnimationFrame < "u")
|
|
@@ -12481,7 +12482,7 @@ var Ea = { exports: {} };
|
|
|
12481
12482
|
*/
|
|
12482
12483
|
var Ae = {};
|
|
12483
12484
|
typeof J < "u" ? Ae.AudioContext = J : typeof webkitAudioContext < "u" && (Ae.AudioContext = webkitAudioContext), typeof X < "u" && (X.Storage = Ae);
|
|
12484
|
-
function
|
|
12485
|
+
function Pe() {
|
|
12485
12486
|
if (Me || W || xe)
|
|
12486
12487
|
return !0;
|
|
12487
12488
|
var T = navigator.userAgent, e = "" + parseFloat(navigator.appVersion), r = parseInt(navigator.appVersion, 10), c, v;
|
|
@@ -12517,7 +12518,7 @@ var Ea = { exports: {} };
|
|
|
12517
12518
|
* @param {object} config - {disableLogs:true, initCallback: function, mimeType: "video/webm", timeSlice: 1000}
|
|
12518
12519
|
* @throws Will throw an error if first argument "MediaStream" is missing. Also throws error if "MediaRecorder API" are not supported by the browser.
|
|
12519
12520
|
*/
|
|
12520
|
-
function
|
|
12521
|
+
function Ye(T, e) {
|
|
12521
12522
|
var _e = this;
|
|
12522
12523
|
if (typeof T > "u")
|
|
12523
12524
|
throw 'First argument "MediaStream" is required.';
|
|
@@ -12539,7 +12540,7 @@ var Ea = { exports: {} };
|
|
|
12539
12540
|
}, this.record = function() {
|
|
12540
12541
|
_e.blob = null, _e.clearRecordedData(), _e.timestamps = [], ae = [], c = [];
|
|
12541
12542
|
var De = e;
|
|
12542
|
-
e.disableLogs || console.log("Passing following config over MediaRecorder API.", De), M && (M = null), G && !
|
|
12543
|
+
e.disableLogs || console.log("Passing following config over MediaRecorder API.", De), M && (M = null), G && !Pe() && (De = "video/vp8"), typeof MediaRecorder.isTypeSupported == "function" && De.mimeType && (MediaRecorder.isTypeSupported(De.mimeType) || (e.disableLogs || console.warn("MediaRecorder API seems unable to record mimeType:", De.mimeType), De.mimeType = e.type === "audio" ? "audio/webm" : "video/webm"));
|
|
12543
12544
|
try {
|
|
12544
12545
|
M = new MediaRecorder(T, De), e.mimeType = De.mimeType;
|
|
12545
12546
|
} catch {
|
|
@@ -12637,7 +12638,7 @@ var Ea = { exports: {} };
|
|
|
12637
12638
|
return this.name;
|
|
12638
12639
|
};
|
|
12639
12640
|
}
|
|
12640
|
-
typeof X < "u" && (X.MediaStreamRecorder =
|
|
12641
|
+
typeof X < "u" && (X.MediaStreamRecorder = Ye);
|
|
12641
12642
|
/**
|
|
12642
12643
|
* StereoAudioRecorder is a standalone class used by {@link RecordRTC} to bring "stereo" audio-recording in chrome.
|
|
12643
12644
|
* @summary JavaScript standalone object for stereo audio recording.
|
|
@@ -12863,7 +12864,7 @@ var Ea = { exports: {} };
|
|
|
12863
12864
|
* @param {HTMLElement} htmlElement - querySelector/getElementById/getElementsByTagName[0]/etc.
|
|
12864
12865
|
* @param {object} config - {disableLogs:true, initCallback: function}
|
|
12865
12866
|
*/
|
|
12866
|
-
function
|
|
12867
|
+
function Ve(T, e) {
|
|
12867
12868
|
if (typeof html2canvas > "u")
|
|
12868
12869
|
throw "Please link: https://www.webrtc-experiment.com/screenshot.js";
|
|
12869
12870
|
e = e || {}, e.frameInterval || (e.frameInterval = 10);
|
|
@@ -12895,7 +12896,7 @@ var Ea = { exports: {} };
|
|
|
12895
12896
|
}
|
|
12896
12897
|
if (!Ne)
|
|
12897
12898
|
throw "captureStream API are NOT available.";
|
|
12898
|
-
M = new
|
|
12899
|
+
M = new Ye(Ne, {
|
|
12899
12900
|
mimeType: e.mimeType || "video/webm"
|
|
12900
12901
|
}), M.record();
|
|
12901
12902
|
} else
|
|
@@ -12930,12 +12931,12 @@ var Ea = { exports: {} };
|
|
|
12930
12931
|
};
|
|
12931
12932
|
var ae = !1;
|
|
12932
12933
|
this.pause = function() {
|
|
12933
|
-
if (ae = !0, M instanceof
|
|
12934
|
+
if (ae = !0, M instanceof Ye) {
|
|
12934
12935
|
M.pause();
|
|
12935
12936
|
return;
|
|
12936
12937
|
}
|
|
12937
12938
|
}, this.resume = function() {
|
|
12938
|
-
if (ae = !1, M instanceof
|
|
12939
|
+
if (ae = !1, M instanceof Ye) {
|
|
12939
12940
|
M.resume();
|
|
12940
12941
|
return;
|
|
12941
12942
|
}
|
|
@@ -12979,7 +12980,7 @@ var Ea = { exports: {} };
|
|
|
12979
12980
|
}
|
|
12980
12981
|
var we = (/* @__PURE__ */ new Date()).getTime(), Ce = new ht.Video(100);
|
|
12981
12982
|
}
|
|
12982
|
-
typeof X < "u" && (X.CanvasRecorder =
|
|
12983
|
+
typeof X < "u" && (X.CanvasRecorder = Ve);
|
|
12983
12984
|
/**
|
|
12984
12985
|
* WhammyRecorder is a standalone class used by {@link RecordRTC} to bring video recording in Chrome. It runs top over {@link Whammy}.
|
|
12985
12986
|
* @summary Video recording feature in Chrome.
|
|
@@ -13607,11 +13608,11 @@ var Ea = { exports: {} };
|
|
|
13607
13608
|
function Re(T, e) {
|
|
13608
13609
|
var r = "Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";
|
|
13609
13610
|
(function(j) {
|
|
13610
|
-
typeof X < "u" || j && (typeof window < "u" || typeof
|
|
13611
|
+
typeof X < "u" || j && (typeof window < "u" || typeof pt > "u" || (pt.navigator = {
|
|
13611
13612
|
userAgent: r,
|
|
13612
13613
|
getUserMedia: function() {
|
|
13613
13614
|
}
|
|
13614
|
-
},
|
|
13615
|
+
}, pt.console || (pt.console = {}), (typeof pt.console.log > "u" || typeof pt.console.error > "u") && (pt.console.error = pt.console.log = pt.console.log || function() {
|
|
13615
13616
|
console.log(arguments);
|
|
13616
13617
|
}), typeof document > "u" && (j.document = {
|
|
13617
13618
|
documentElement: {
|
|
@@ -13651,8 +13652,8 @@ var Ea = { exports: {} };
|
|
|
13651
13652
|
revokeObjectURL: function() {
|
|
13652
13653
|
return "";
|
|
13653
13654
|
}
|
|
13654
|
-
}), j.window =
|
|
13655
|
-
})(typeof
|
|
13655
|
+
}), j.window = pt));
|
|
13656
|
+
})(typeof pt < "u" ? pt : null), e = e || "multi-streams-mixer";
|
|
13656
13657
|
var c = [], v = !1, k = document.createElement("canvas"), K = k.getContext("2d");
|
|
13657
13658
|
k.style.opacity = 0, k.style.position = "absolute", k.style.zIndex = -1, k.style.top = "-1000em", k.style.left = "-1000em", k.className = e, (document.body || document.documentElement).appendChild(k), this.disableLogs = !1, this.frameInterval = 10, this.width = 360, this.height = 240, this.useGainNode = !0;
|
|
13658
13659
|
var M = this, s = window.AudioContext;
|
|
@@ -13818,7 +13819,7 @@ var Ea = { exports: {} };
|
|
|
13818
13819
|
height: 240
|
|
13819
13820
|
}
|
|
13820
13821
|
}, e.frameInterval || (e.frameInterval = 10), e.video || (e.video = {}), e.video.width || (e.video.width = 360), e.video.height || (e.video.height = 240), this.record = function() {
|
|
13821
|
-
c = new Re(T, e.elementClass || "multi-streams-mixer"), k().length && (c.frameInterval = e.frameInterval || 10, c.width = e.video.width || 360, c.height = e.video.height || 240, c.startDrawingFrames()), e.previewStream && typeof e.previewStream == "function" && e.previewStream(c.getMixedStream()), v = new
|
|
13822
|
+
c = new Re(T, e.elementClass || "multi-streams-mixer"), k().length && (c.frameInterval = e.frameInterval || 10, c.width = e.video.width || 360, c.height = e.video.height || 240, c.startDrawingFrames()), e.previewStream && typeof e.previewStream == "function" && e.previewStream(c.getMixedStream()), v = new Ye(c.getMixedStream(), e), v.record();
|
|
13822
13823
|
};
|
|
13823
13824
|
function k() {
|
|
13824
13825
|
var K = [];
|
|
@@ -13872,7 +13873,7 @@ var Ea = { exports: {} };
|
|
|
13872
13873
|
* @throws Will throw an error if "new" keyword is not used to initiate "RecordRTCPromisesHandler". Also throws error if first argument "MediaStream" is missing.
|
|
13873
13874
|
* @requires {@link RecordRTC}
|
|
13874
13875
|
*/
|
|
13875
|
-
function
|
|
13876
|
+
function He(T, e) {
|
|
13876
13877
|
if (!this)
|
|
13877
13878
|
throw 'Use "new RecordRTCPromisesHandler()"';
|
|
13878
13879
|
if (typeof T > "u")
|
|
@@ -13968,7 +13969,7 @@ var Ea = { exports: {} };
|
|
|
13968
13969
|
});
|
|
13969
13970
|
}, this.blob = null, this.version = "5.6.2";
|
|
13970
13971
|
}
|
|
13971
|
-
typeof X < "u" && (X.RecordRTCPromisesHandler =
|
|
13972
|
+
typeof X < "u" && (X.RecordRTCPromisesHandler = He);
|
|
13972
13973
|
/**
|
|
13973
13974
|
* WebAssemblyRecorder lets you create webm videos in JavaScript via WebAssembly. The library consumes raw RGBA32 buffers (4 bytes per pixel) and turns them into a webm video with the given framerate and quality. This makes it compatible out-of-the-box with ImageData from a CANVAS. With realtime mode you can also use webm-wasm for streaming webm videos.
|
|
13974
13975
|
* @summary Video recording feature in Chrome, Firefox and maybe Edge.
|
|
@@ -14154,7 +14155,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14154
14155
|
title: "停止录制",
|
|
14155
14156
|
class: "oper"
|
|
14156
14157
|
}, [
|
|
14157
|
-
|
|
14158
|
+
bt(We(At), {
|
|
14158
14159
|
src: We(xt).stop,
|
|
14159
14160
|
width: 24,
|
|
14160
14161
|
height: 24
|
|
@@ -14165,7 +14166,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14165
14166
|
title: "开始录制",
|
|
14166
14167
|
class: "oper"
|
|
14167
14168
|
}, [
|
|
14168
|
-
|
|
14169
|
+
bt(We(At), {
|
|
14169
14170
|
src: We(xt).record,
|
|
14170
14171
|
width: 24,
|
|
14171
14172
|
height: 24
|
|
@@ -14265,7 +14266,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14265
14266
|
title: "拍照",
|
|
14266
14267
|
class: "oper"
|
|
14267
14268
|
}, [
|
|
14268
|
-
|
|
14269
|
+
bt(We(At), {
|
|
14269
14270
|
src: We(xt).photo,
|
|
14270
14271
|
width: 24,
|
|
14271
14272
|
height: 24
|
|
@@ -14376,7 +14377,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14376
14377
|
setup(_, { expose: X, emit: $ }) {
|
|
14377
14378
|
const b = _, ue = $;
|
|
14378
14379
|
X({ focusTitle: ht, focusContent: U });
|
|
14379
|
-
const B = ot([{ text: "", uuid:
|
|
14380
|
+
const B = ot([{ text: "", uuid: zt() }]), ne = ot(null), V = ot(!1), me = ot(!1), J = ot(!1), be = ot(!1), xe = ot(!1), Be = ot(b.initialLock), Me = ot(!1), G = ot({}), W = ot(null), ve = ot(null), ce = ot(null), y = ot(null), oe = ot(null);
|
|
14380
14381
|
let pe = null, q = null;
|
|
14381
14382
|
const z = e0(() => !!R0(b.note).rel), Ae = e0(() => xe.value ? !0 : be.value || b.note.created_at);
|
|
14382
14383
|
Wt(
|
|
@@ -14401,9 +14402,9 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14401
14402
|
}
|
|
14402
14403
|
if (!ne.value || ne.value !== x.created_at || x.content !== (m == null ? void 0 : m.content)) {
|
|
14403
14404
|
try {
|
|
14404
|
-
if (ne.value = x.created_at, B.value =
|
|
14405
|
+
if (ne.value = x.created_at, B.value = Ye(x.content), q = x.content, B.value.filter((N) => !N.pending).length || B.value.push({
|
|
14405
14406
|
text: "",
|
|
14406
|
-
uuid:
|
|
14407
|
+
uuid: zt()
|
|
14407
14408
|
}), b.readOnly)
|
|
14408
14409
|
for (; B.value[B.value.length - 1] && h0(B.value[B.value.length - 1].text); )
|
|
14409
14410
|
B.value.pop();
|
|
@@ -14415,20 +14416,20 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14415
14416
|
}, 300);
|
|
14416
14417
|
},
|
|
14417
14418
|
{ immediate: !0 }
|
|
14418
|
-
),
|
|
14419
|
+
), Pe(), q0(() => {
|
|
14419
14420
|
pe && (clearTimeout(pe), pe = null), ae();
|
|
14420
14421
|
});
|
|
14421
|
-
function
|
|
14422
|
+
function Pe() {
|
|
14422
14423
|
typeof b.mobile == "boolean" && (dt.isMobile = b.mobile);
|
|
14423
14424
|
}
|
|
14424
|
-
function
|
|
14425
|
+
function Ye(x) {
|
|
14425
14426
|
if (!x)
|
|
14426
14427
|
return [];
|
|
14427
14428
|
if (x.startsWith("<ul")) {
|
|
14428
14429
|
let N = function(he) {
|
|
14429
14430
|
return Array.from(he.children).map((F) => {
|
|
14430
14431
|
const re = {
|
|
14431
|
-
uuid:
|
|
14432
|
+
uuid: zt()
|
|
14432
14433
|
}, D = document.createElement("div");
|
|
14433
14434
|
Array.from(F.childNodes).forEach((L) => {
|
|
14434
14435
|
L.nodeName !== "UL" && D.appendChild(L.cloneNode(!0));
|
|
@@ -14455,7 +14456,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14455
14456
|
}
|
|
14456
14457
|
}));
|
|
14457
14458
|
}
|
|
14458
|
-
function
|
|
14459
|
+
function Ve() {
|
|
14459
14460
|
ue("hideHoverNote");
|
|
14460
14461
|
}
|
|
14461
14462
|
function U() {
|
|
@@ -14499,7 +14500,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14499
14500
|
function Ue(x) {
|
|
14500
14501
|
U(), W.value.addFiles(x, B.value[0], -1);
|
|
14501
14502
|
}
|
|
14502
|
-
function
|
|
14503
|
+
function He() {
|
|
14503
14504
|
ue("dbEnter");
|
|
14504
14505
|
}
|
|
14505
14506
|
function ie(x) {
|
|
@@ -14599,7 +14600,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14599
14600
|
}
|
|
14600
14601
|
function Ee(x) {
|
|
14601
14602
|
typeof x == "string" ? dt.currentId === "" ? et(x) : W.value.appendNode({
|
|
14602
|
-
uuid:
|
|
14603
|
+
uuid: zt(),
|
|
14603
14604
|
text: x
|
|
14604
14605
|
}) : Oe(x);
|
|
14605
14606
|
}
|
|
@@ -14614,7 +14615,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14614
14615
|
case "audio":
|
|
14615
14616
|
case "video":
|
|
14616
14617
|
return {
|
|
14617
|
-
uuid:
|
|
14618
|
+
uuid: zt(),
|
|
14618
14619
|
type: D.mainType,
|
|
14619
14620
|
content: ge,
|
|
14620
14621
|
pending: !0,
|
|
@@ -14622,7 +14623,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14622
14623
|
};
|
|
14623
14624
|
default:
|
|
14624
14625
|
return {
|
|
14625
|
-
uuid:
|
|
14626
|
+
uuid: zt(),
|
|
14626
14627
|
type: "file",
|
|
14627
14628
|
name: re.name,
|
|
14628
14629
|
content: ge,
|
|
@@ -14692,14 +14693,14 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14692
14693
|
Ze("div", null, Jt(b.clipboard), 1)
|
|
14693
14694
|
]),
|
|
14694
14695
|
Ze("div", Qn, [
|
|
14695
|
-
|
|
14696
|
+
bt(We(At), {
|
|
14696
14697
|
src: We(xt).close,
|
|
14697
14698
|
width: 20,
|
|
14698
14699
|
height: 20,
|
|
14699
14700
|
style: { "margin-right": "20px" },
|
|
14700
14701
|
onClick: A
|
|
14701
14702
|
}, null, 8, ["src"]),
|
|
14702
|
-
|
|
14703
|
+
bt(We(At), {
|
|
14703
14704
|
src: We(xt).confirm,
|
|
14704
14705
|
width: 26,
|
|
14705
14706
|
height: 26,
|
|
@@ -14717,7 +14718,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14717
14718
|
height: _.height
|
|
14718
14719
|
} : ""
|
|
14719
14720
|
),
|
|
14720
|
-
onMouseenter:
|
|
14721
|
+
onMouseenter: Ve
|
|
14721
14722
|
}, [
|
|
14722
14723
|
_.showTitle ? (tt(), ut("div", {
|
|
14723
14724
|
key: 0,
|
|
@@ -14725,7 +14726,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14725
14726
|
onContextmenu: De
|
|
14726
14727
|
}, [
|
|
14727
14728
|
Ze("div", Jn, [
|
|
14728
|
-
|
|
14729
|
+
bt(We(on), {
|
|
14729
14730
|
ref_key: "titleEditor",
|
|
14730
14731
|
ref: ve,
|
|
14731
14732
|
tags: _.tags,
|
|
@@ -14735,11 +14736,11 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14735
14736
|
onFocusContent: U,
|
|
14736
14737
|
onChange: et,
|
|
14737
14738
|
onFile: Ue,
|
|
14738
|
-
onDbEnter:
|
|
14739
|
+
onDbEnter: He
|
|
14739
14740
|
}, null, 8, ["tags", "readOnly", "enableDbEnter", "note"])
|
|
14740
14741
|
]),
|
|
14741
14742
|
z.value ? (tt(), ut("div", ei, [
|
|
14742
|
-
|
|
14743
|
+
bt(We(At), {
|
|
14743
14744
|
src: We(xt).relate,
|
|
14744
14745
|
width: 20,
|
|
14745
14746
|
height: 20
|
|
@@ -14749,7 +14750,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14749
14750
|
class: "top-bar-right",
|
|
14750
14751
|
onClick: s
|
|
14751
14752
|
}, [
|
|
14752
|
-
|
|
14753
|
+
bt(We(At), {
|
|
14753
14754
|
src: Be.value ? We(xt).lock : We(xt).unlock,
|
|
14754
14755
|
width: 20,
|
|
14755
14756
|
height: 20,
|
|
@@ -14762,7 +14763,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14762
14763
|
onContextmenu: De
|
|
14763
14764
|
}, [
|
|
14764
14765
|
Ze("div", ti, [
|
|
14765
|
-
|
|
14766
|
+
bt(rn, {
|
|
14766
14767
|
ref_key: "tree",
|
|
14767
14768
|
ref: W,
|
|
14768
14769
|
nodes: B.value,
|
|
@@ -14785,7 +14786,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14785
14786
|
onClick: e,
|
|
14786
14787
|
title: "左缩进"
|
|
14787
14788
|
}, [
|
|
14788
|
-
|
|
14789
|
+
bt(We(At), {
|
|
14789
14790
|
src: We(xt).left,
|
|
14790
14791
|
width: 20,
|
|
14791
14792
|
height: 20
|
|
@@ -14796,7 +14797,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14796
14797
|
onClick: r,
|
|
14797
14798
|
title: "右缩进"
|
|
14798
14799
|
}, [
|
|
14799
|
-
|
|
14800
|
+
bt(We(At), {
|
|
14800
14801
|
src: We(xt).right,
|
|
14801
14802
|
width: 20,
|
|
14802
14803
|
height: 20
|
|
@@ -14807,7 +14808,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14807
14808
|
onClick: c,
|
|
14808
14809
|
title: "上移"
|
|
14809
14810
|
}, [
|
|
14810
|
-
|
|
14811
|
+
bt(We(At), {
|
|
14811
14812
|
src: We(xt).up,
|
|
14812
14813
|
width: 20,
|
|
14813
14814
|
height: 20
|
|
@@ -14818,7 +14819,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14818
14819
|
onClick: v,
|
|
14819
14820
|
title: "移动"
|
|
14820
14821
|
}, [
|
|
14821
|
-
|
|
14822
|
+
bt(We(At), {
|
|
14822
14823
|
src: We(xt).down,
|
|
14823
14824
|
width: 20,
|
|
14824
14825
|
height: 20
|
|
@@ -14836,20 +14837,20 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14836
14837
|
onClick: K,
|
|
14837
14838
|
title: "加粗"
|
|
14838
14839
|
}, [
|
|
14839
|
-
|
|
14840
|
+
bt(We(At), {
|
|
14840
14841
|
src: We(xt).bold,
|
|
14841
14842
|
width: 20,
|
|
14842
14843
|
height: 20
|
|
14843
14844
|
}, null, 8, ["src"])
|
|
14844
14845
|
]),
|
|
14845
14846
|
We(dt).isMobile ? Tt("", !0) : (tt(), ut("div", ii, [
|
|
14846
|
-
|
|
14847
|
+
bt(We(da), {
|
|
14847
14848
|
placement: "top",
|
|
14848
14849
|
hover: !0,
|
|
14849
14850
|
arrow: !0
|
|
14850
14851
|
}, ca({
|
|
14851
14852
|
default: M0(() => [
|
|
14852
|
-
|
|
14853
|
+
bt(We(At), {
|
|
14853
14854
|
src: We(xt).color,
|
|
14854
14855
|
width: 20,
|
|
14855
14856
|
height: 20
|
|
@@ -14860,7 +14861,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14860
14861
|
Be.value ? void 0 : {
|
|
14861
14862
|
name: "content",
|
|
14862
14863
|
fn: M0(() => [
|
|
14863
|
-
|
|
14864
|
+
bt(We(Sr), { onChange: M })
|
|
14864
14865
|
]),
|
|
14865
14866
|
key: "0"
|
|
14866
14867
|
}
|
|
@@ -14871,7 +14872,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14871
14872
|
onClick: Ce,
|
|
14872
14873
|
title: "添加附件"
|
|
14873
14874
|
}, [
|
|
14874
|
-
|
|
14875
|
+
bt(We(At), {
|
|
14875
14876
|
src: We(xt).attach,
|
|
14876
14877
|
width: 20,
|
|
14877
14878
|
height: 20
|
|
@@ -14882,7 +14883,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14882
14883
|
onClick: ye,
|
|
14883
14884
|
title: "录制音频"
|
|
14884
14885
|
}, [
|
|
14885
|
-
|
|
14886
|
+
bt(We(At), {
|
|
14886
14887
|
src: We(xt).audio,
|
|
14887
14888
|
width: 20,
|
|
14888
14889
|
height: 20
|
|
@@ -14893,7 +14894,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14893
14894
|
onClick: Ne,
|
|
14894
14895
|
title: "录制视频"
|
|
14895
14896
|
}, [
|
|
14896
|
-
|
|
14897
|
+
bt(We(At), {
|
|
14897
14898
|
src: We(xt).video,
|
|
14898
14899
|
width: 20,
|
|
14899
14900
|
height: 20
|
|
@@ -14904,7 +14905,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14904
14905
|
onClick: te,
|
|
14905
14906
|
title: "拍照"
|
|
14906
14907
|
}, [
|
|
14907
|
-
|
|
14908
|
+
bt(We(At), {
|
|
14908
14909
|
src: We(xt).photo,
|
|
14909
14910
|
width: 20,
|
|
14910
14911
|
height: 20
|
|
@@ -14943,27 +14944,27 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14943
14944
|
}, null, 544)
|
|
14944
14945
|
])
|
|
14945
14946
|
])) : Tt("", !0),
|
|
14946
|
-
V.value ? (tt(),
|
|
14947
|
+
V.value ? (tt(), Ut(We(Fn), {
|
|
14947
14948
|
key: 2,
|
|
14948
14949
|
isMobile: We(dt).isMobile,
|
|
14949
14950
|
responsive: _.responsive,
|
|
14950
14951
|
onFinish: Ee,
|
|
14951
14952
|
onCancel: m[4] || (m[4] = (le) => V.value = !1)
|
|
14952
14953
|
}, null, 8, ["isMobile", "responsive"])) : Tt("", !0),
|
|
14953
|
-
me.value ? (tt(),
|
|
14954
|
+
me.value ? (tt(), Ut(We(Pn), {
|
|
14954
14955
|
key: 3,
|
|
14955
14956
|
responsive: _.responsive,
|
|
14956
14957
|
onFinish: Oe,
|
|
14957
14958
|
onCancel: m[5] || (m[5] = (le) => me.value = !1)
|
|
14958
14959
|
}, null, 8, ["responsive"])) : Tt("", !0),
|
|
14959
|
-
J.value ? (tt(),
|
|
14960
|
+
J.value ? (tt(), Ut(We(Xn), {
|
|
14960
14961
|
key: 4,
|
|
14961
14962
|
responsive: _.responsive,
|
|
14962
14963
|
onFinish: Oe,
|
|
14963
14964
|
onCancel: m[6] || (m[6] = (le) => J.value = !1)
|
|
14964
14965
|
}, null, 8, ["responsive"])) : Tt("", !0),
|
|
14965
14966
|
Be.value && !z.value ? (tt(), ut("div", li)) : Tt("", !0),
|
|
14966
|
-
(tt(),
|
|
14967
|
+
(tt(), Ut(Na, { to: "body" }, [
|
|
14967
14968
|
Me.value && !_.readOnly && !z.value && !We(dt).isMobile ? (tt(), ut("div", {
|
|
14968
14969
|
key: 0,
|
|
14969
14970
|
class: "record-tree-context-menu",
|
|
@@ -14977,7 +14978,7 @@ const Hn = { class: "record-video" }, Yn = { class: "buttons" }, Vn = {
|
|
|
14977
14978
|
class: "context-menu-item",
|
|
14978
14979
|
onClick: Ie
|
|
14979
14980
|
}, [
|
|
14980
|
-
|
|
14981
|
+
bt(We(At), {
|
|
14981
14982
|
src: Be.value ? We(xt).unlock : We(xt).lock,
|
|
14982
14983
|
width: 16,
|
|
14983
14984
|
height: 16,
|