@codernote/record-tree 2.5.4 → 2.5.5
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 +577 -573
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-d8fa8371]{display:flex;flex-direction:row;align-self:center;justify-self:center;outline:none}.holder[data-v-d8fa8371]{width:0px;overflow:hidden;border-width:1px;border-style:solid;border-color:transparent;outline:none}.node-element[data-v-d8fa8371]{display:inline-block;position:relative;margin:5px 1px}.node-element:hover .node-del[data-v-d8fa8371]{display:block}.node-image img[data-v-d8fa8371]{outline:none}.node-audio[data-v-d8fa8371]{width:300px}.node-audio audio[data-v-d8fa8371]{width:300px;outline:none}.node-video video[data-v-d8fa8371]{outline:none;-o-object-fit:cover;object-fit:cover;background-color:#000}.node-del[data-v-d8fa8371]{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-d8fa8371]:before,.node-del[data-v-d8fa8371]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:10px;background-color:#595959}.node-del[data-v-d8fa8371]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-d8fa8371]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-file-wrap[data-v-d8fa8371]{width:260px;padding:10px 16px;display:flex;background:#f2f2f2;border-radius:5px;justify-content:center;align-items:center}.node-file-left[data-v-d8fa8371]{flex:1}.node-file-left h6[data-v-d8fa8371]{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;white-space:nowrap}.node-file-left p[data-v-d8fa8371]{margin:0;padding:0;font-size:12px;color:#999}.node-file-right a[data-v-d8fa8371]{color:#52a770;font-size:14px}@keyframes blinkBorder-d8fa8371{0%,to{border-color:transparent}50%{border-color:#333}}.node-complex .holder[data-v-d8fa8371]:focus{animation:blinkBorder-d8fa8371 1s infinite}.fullscreen-handle[data-v-d8fa8371]{width:15px;height:15px;position:absolute;bottom:0;right:16px;cursor:pointer;background:#fff9}.resize-handle[data-v-d8fa8371]{width:15px;height:15px;position:absolute;bottom:0;right:0;cursor:se-resize;transform:rotate(90deg);background:#fff9}.resize-handle svg[data-v-d8fa8371]{cursor:se-resize}.ProseMirror{outline:none}.node-div[data-v-c2e5c561]{display:flex;align-items:center;position:relative;padding-bottom:8px}.node-div>div[data-v-c2e5c561]{flex:1}.node-icon[data-v-c2e5c561]{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-c2e5c561]:before{content:"";position:absolute;top:-20px;right:-30px;bottom:-10px;left:-20px;z-index:5}.node-icon-todo[data-v-c2e5c561]{border-radius:0}.node-icon .node-circle[data-v-c2e5c561]{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-c2e5c561]{text-decoration:line-through;color:#999}.node-ul[data-v-598a57e3]{display:grid;grid-template-rows:1fr;transition:.25s grid-template-rows ease}.node-ul ul[data-v-598a57e3]{background-color:#fff;margin:0;padding:0;list-style:none;overflow:hidden}.node-li[data-v-598a57e3]{padding:0;list-style:none;margin:0;line-height:1.5;position:relative;overflow:hidden}[data-v-598a57e3] .sublevel .node-li{margin-left:15px}[data-v-598a57e3] .drag-over-top:before{content:"";width:100%;height:1px;top:0;background-color:#eee;position:absolute}[data-v-598a57e3] .drag-over-center{background-color:#eee}[data-v-598a57e3] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#eee;position:absolute;bottom:0}.collapsed>.node-ul[data-v-598a57e3]{grid-template-rows:0fr}[data-v-598a57e3] .collapsed .node-icon .node-line{display:none}[data-v-598a57e3] .collapsed.has-child>.node-div>.node-icon{background-color:#ddd}.tree-title[data-v-598a57e3]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-598a57e3] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}[data-v-598a57e3] .node-li.dragging .node-icon .node-line{display:none}[data-v-598a57e3] .has-child>.node-div>.node-icon .node-line{content:"";position:absolute;top:20px;left:50%;height:9999px;width:1px;background-color:#f2f2f2}[data-v-598a57e3] .has-child>.node-div>.node-icon:hover .node-line{background-color:var(--line-color)}.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;margin-bottom:10px}.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;overflow:hidden}.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;overflow-x:scroll;align-items:center}.record-tree-option-left-scroll::-webkit-scrollbar{display:none}.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:-webkit-full-screen{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain}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}.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}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { openBlock as st, createElementBlock as ft, createElementVNode as tt, createVNode as xt, unref as $e, Fragment as p0, renderList as b0, normalizeStyle as Gt, reactive as Ma, ref as ct, withModifiers as It, normalizeClass as Ot, createCommentVNode as kt, toDisplayString 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-d8fa8371]{display:flex;flex-direction:row;align-self:center;justify-self:center;outline:none}.holder[data-v-d8fa8371]{width:0px;overflow:hidden;border-width:1px;border-style:solid;border-color:transparent;outline:none}.node-element[data-v-d8fa8371]{display:inline-block;position:relative;margin:5px 1px}.node-element:hover .node-del[data-v-d8fa8371]{display:block}.node-image img[data-v-d8fa8371]{outline:none}.node-audio[data-v-d8fa8371]{width:300px}.node-audio audio[data-v-d8fa8371]{width:300px;outline:none}.node-video video[data-v-d8fa8371]{outline:none;-o-object-fit:cover;object-fit:cover;background-color:#000}.node-del[data-v-d8fa8371]{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-d8fa8371]:before,.node-del[data-v-d8fa8371]:after{content:"";position:absolute;top:50%;left:50%;width:2px;height:10px;background-color:#595959}.node-del[data-v-d8fa8371]:before{transform:translate(-50%,-50%) rotate(45deg)}.node-del[data-v-d8fa8371]:after{transform:translate(-50%,-50%) rotate(-45deg)}.node-file-wrap[data-v-d8fa8371]{width:260px;padding:10px 16px;display:flex;background:#f2f2f2;border-radius:5px;justify-content:center;align-items:center}.node-file-left[data-v-d8fa8371]{flex:1}.node-file-left h6[data-v-d8fa8371]{font-size:14px;font-weight:700;margin:0 0 5px;padding:0;white-space:nowrap}.node-file-left p[data-v-d8fa8371]{margin:0;padding:0;font-size:12px;color:#999}.node-file-right a[data-v-d8fa8371]{color:#52a770;font-size:14px}@keyframes blinkBorder-d8fa8371{0%,to{border-color:transparent}50%{border-color:#333}}.node-complex .holder[data-v-d8fa8371]:focus{animation:blinkBorder-d8fa8371 1s infinite}.fullscreen-handle[data-v-d8fa8371]{width:15px;height:15px;position:absolute;bottom:0;right:16px;cursor:pointer;background:#fff9}.resize-handle[data-v-d8fa8371]{width:15px;height:15px;position:absolute;bottom:0;right:0;cursor:se-resize;transform:rotate(90deg);background:#fff9}.resize-handle svg[data-v-d8fa8371]{cursor:se-resize}.ProseMirror{outline:none}.node-div[data-v-c2e5c561]{display:flex;align-items:center;position:relative;padding-bottom:8px}.node-div>div[data-v-c2e5c561]{flex:1}.node-icon[data-v-c2e5c561]{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-c2e5c561]:before{content:"";position:absolute;top:-20px;right:-30px;bottom:-10px;left:-20px;z-index:5}.node-icon-todo[data-v-c2e5c561]{border-radius:0}.node-icon .node-circle[data-v-c2e5c561]{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-c2e5c561]{text-decoration:line-through;color:#999}.node-ul[data-v-598a57e3]{display:grid;grid-template-rows:1fr;transition:.25s grid-template-rows ease}.node-ul ul[data-v-598a57e3]{background-color:#fff;margin:0;padding:0;list-style:none;overflow:hidden}.node-li[data-v-598a57e3]{padding:0;list-style:none;margin:0;line-height:1.5;position:relative;overflow:hidden}[data-v-598a57e3] .sublevel .node-li{margin-left:15px}[data-v-598a57e3] .drag-over-top:before{content:"";width:100%;height:1px;top:0;background-color:#eee;position:absolute}[data-v-598a57e3] .drag-over-center{background-color:#eee}[data-v-598a57e3] .drag-over-bottom:after{content:"";width:100%;height:1px;background-color:#eee;position:absolute;bottom:0}.collapsed>.node-ul[data-v-598a57e3]{grid-template-rows:0fr}[data-v-598a57e3] .collapsed .node-icon .node-line{display:none}[data-v-598a57e3] .collapsed.has-child>.node-div>.node-icon{background-color:#ddd}.tree-title[data-v-598a57e3]{padding-left:25px;font-weight:700;outline:none;font-size:1.125rem;line-height:1.5;width:100%}[data-v-598a57e3] .node-li.has-child.collapsed .node-icon:after{background-color:#aaa}[data-v-598a57e3] .node-li.dragging .node-icon .node-line{display:none}[data-v-598a57e3] .has-child>.node-div>.node-icon .node-line{content:"";position:absolute;top:20px;left:50%;height:9999px;width:1px;background-color:#f2f2f2}[data-v-598a57e3] .has-child>.node-div>.node-icon:hover .node-line{background-color:var(--line-color)}.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;margin-bottom:10px}.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;overflow:hidden}.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;overflow-x:scroll;align-items:center}.record-tree-option-left-scroll::-webkit-scrollbar{display:none}.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:-webkit-full-screen{width:auto!important;height:auto!important;max-width:100%!important;max-height:100%!important;object-fit:contain}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}.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:50px;display:flex;justify-content:center}')),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
+
import { openBlock as st, createElementBlock as ft, createElementVNode as tt, createVNode as xt, unref as $e, Fragment as p0, renderList as b0, normalizeStyle as Gt, reactive as Ma, ref as ct, withModifiers as It, normalizeClass as Ot, createCommentVNode as kt, toDisplayString as u0, nextTick as Vt, watch as a0, onMounted as F0, onBeforeUnmount as Ta, createBlock as qt, onUnmounted as f0, computed as l0, resolveComponent as Ra, createSlots as Ca, withCtx as w0, pushScopeId as ka, popScopeId as Aa } from "vue";
|
|
3
3
|
import na from "vue3-popper";
|
|
4
4
|
import Bt from "vue-inline-svg";
|
|
5
5
|
import { detectDeviceType as N0, truncateString as Ba, formatBytes as Ea, getTag as ia, isTodoTag as sa, getExt as D0, getTagStyle as oa, uuid as Ut, getTagStyleById as Da, parseMimeType as la, getSize as ua, oss as ca } from "@codernote/utils";
|
|
@@ -89,7 +89,7 @@ const qa = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!
|
|
|
89
89
|
])
|
|
90
90
|
]));
|
|
91
91
|
}
|
|
92
|
-
}, cr = /* @__PURE__ */ Jt(ur, [["__scopeId", "data-v-d2cde42f"]]),
|
|
92
|
+
}, cr = /* @__PURE__ */ Jt(ur, [["__scopeId", "data-v-d2cde42f"]]), _t = Ma({
|
|
93
93
|
currentId: null,
|
|
94
94
|
dragId: null,
|
|
95
95
|
pos: null,
|
|
@@ -108,7 +108,7 @@ function Pt(w, Z = !1) {
|
|
|
108
108
|
}
|
|
109
109
|
return re.classList.contains(b.substring(1)) ? re : re == null ? void 0 : re.querySelector(b);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function o0() {
|
|
112
112
|
if (document.activeElement && document.activeElement.classList.contains("holder-right"))
|
|
113
113
|
return 1 / 0;
|
|
114
114
|
let w = window.getSelection();
|
|
@@ -152,7 +152,7 @@ function fa(w = !0) {
|
|
|
152
152
|
const re = window.visualViewport.height, b = () => {
|
|
153
153
|
window.visualViewport.height < re && (Z.style.display = "none", setTimeout(() => {
|
|
154
154
|
if (Z.style.display = "", w) {
|
|
155
|
-
const F =
|
|
155
|
+
const F = _t.currentId, _e = Pt({ uuid: F });
|
|
156
156
|
dr(_e) || _e.scrollIntoView({
|
|
157
157
|
behavior: "smooth",
|
|
158
158
|
block: "center"
|
|
@@ -194,7 +194,7 @@ const vr = ["contenteditable"], hr = {
|
|
|
194
194
|
},
|
|
195
195
|
emits: ["remove", "change", "keydown", "focus"],
|
|
196
196
|
setup(w, { expose: Z, emit: re }) {
|
|
197
|
-
const b =
|
|
197
|
+
const b = _t.isMobile, le = re, F = w, _e = ct(), N = ct(), we = ct(), he = ct(), be = ct();
|
|
198
198
|
Z({
|
|
199
199
|
focus: () => {
|
|
200
200
|
_e.value.focus();
|
|
@@ -204,7 +204,7 @@ const vr = ["contenteditable"], hr = {
|
|
|
204
204
|
be.value && be.value.focus();
|
|
205
205
|
}
|
|
206
206
|
function xe(Q) {
|
|
207
|
-
const ve =
|
|
207
|
+
const ve = o0();
|
|
208
208
|
if (Q.key === "ArrowLeft" && ve > 0) {
|
|
209
209
|
Vt(() => {
|
|
210
210
|
Qt(Q.currentTarget, 0);
|
|
@@ -299,8 +299,8 @@ const vr = ["contenteditable"], hr = {
|
|
|
299
299
|
}, null, 8, br)) : kt("", !0),
|
|
300
300
|
w.data.type === "file" ? (st(), ft("div", wr, [
|
|
301
301
|
tt("div", yr, [
|
|
302
|
-
tt("h6", null,
|
|
303
|
-
tt("p", null,
|
|
302
|
+
tt("h6", null, u0($e(Ba)(w.data.name, 20)), 1),
|
|
303
|
+
tt("p", null, u0($e(Ea)(w.data.size)), 1)
|
|
304
304
|
]),
|
|
305
305
|
tt("div", gr, [
|
|
306
306
|
tt("a", {
|
|
@@ -546,7 +546,7 @@ const ha = (w) => w.tagName.toLowerCase() === "mark", Y0 = () => {
|
|
|
546
546
|
},
|
|
547
547
|
handleKeyDown(I, ee) {
|
|
548
548
|
const { selection: Ae, doc: R } = I.state, { from: Q, to: ve } = Ae, ae = R.content.size - 1, te = Q === 1 && ve === 1, Ce = Q === ae && ve === ae;
|
|
549
|
-
return
|
|
549
|
+
return _t.pos = Q, // 回车,缩进,光标上下移动
|
|
550
550
|
["Enter", "Tab", "ArrowUp", "ArrowDown"].includes(ee.key) || // 行首生效: 删除,和光标左移到上一行仅在
|
|
551
551
|
["Backspace", "ArrowLeft"].includes(ee.key) && te || // 行尾生效:光标右移到下一行
|
|
552
552
|
["ArrowRight"].includes(ee.key) && Ce ? (F("keydown", ee), !0) : !1;
|
|
@@ -556,7 +556,7 @@ const ha = (w) => w.tagName.toLowerCase() === "mark", Y0 = () => {
|
|
|
556
556
|
we();
|
|
557
557
|
},
|
|
558
558
|
onFocus({ editor: I }) {
|
|
559
|
-
const ee =
|
|
559
|
+
const ee = _t.pos;
|
|
560
560
|
typeof ee == "number" && I.commands.setTextSelection(ee || 0), F("focus"), _0.clear();
|
|
561
561
|
},
|
|
562
562
|
onBlur({ editor: I }) {
|
|
@@ -578,12 +578,12 @@ const ha = (w) => w.tagName.toLowerCase() === "mark", Y0 = () => {
|
|
|
578
578
|
const { state: I } = N.value, { from: ee, to: Ae } = I.selection;
|
|
579
579
|
return ee === Ae ? ee : { from: ee, to: Ae };
|
|
580
580
|
};
|
|
581
|
-
|
|
581
|
+
a0(
|
|
582
582
|
() => le.content,
|
|
583
583
|
() => {
|
|
584
584
|
N != null && N.value && (N.value.getHTML() === le.content || N.value.commands.setContent(le.content, !1));
|
|
585
585
|
}
|
|
586
|
-
),
|
|
586
|
+
), a0(
|
|
587
587
|
() => le.readOnly,
|
|
588
588
|
() => {
|
|
589
589
|
N != null && N.value && N.value.setEditable(!le.readOnly);
|
|
@@ -748,10 +748,10 @@ const ha = (w) => w.tagName.toLowerCase() === "mark", Y0 = () => {
|
|
|
748
748
|
}), f0(() => {
|
|
749
749
|
delete c0[re.node.uuid];
|
|
750
750
|
});
|
|
751
|
-
const N =
|
|
751
|
+
const N = l0(() => {
|
|
752
752
|
const te = ia(re.node.tag_id, re.tags);
|
|
753
753
|
return te.created_at ? te : null;
|
|
754
|
-
}), we =
|
|
754
|
+
}), we = l0(() => sa(N.value)), he = l0(() => {
|
|
755
755
|
const te = D0(re.node);
|
|
756
756
|
return we.value && te.finished;
|
|
757
757
|
});
|
|
@@ -777,7 +777,7 @@ const ha = (w) => w.tagName.toLowerCase() === "mark", Y0 = () => {
|
|
|
777
777
|
}
|
|
778
778
|
function Ee() {
|
|
779
779
|
const te = re.node;
|
|
780
|
-
|
|
780
|
+
_t.currentId = te.uuid, _t.isMobile && fa();
|
|
781
781
|
}
|
|
782
782
|
function Ye(te, ...Ce) {
|
|
783
783
|
switch (te.key) {
|
|
@@ -835,11 +835,11 @@ const ha = (w) => w.tagName.toLowerCase() === "mark", Y0 = () => {
|
|
|
835
835
|
}
|
|
836
836
|
function ee(te) {
|
|
837
837
|
const Ce = re.node;
|
|
838
|
-
te.currentTarget && (
|
|
838
|
+
te.currentTarget && (_t.pos = null, b("toPrevFocus", Ce, !0));
|
|
839
839
|
}
|
|
840
840
|
function Ae(te) {
|
|
841
841
|
const Ce = re.node;
|
|
842
|
-
te.currentTarget && (
|
|
842
|
+
te.currentTarget && (_t.pos = 0, b("toNextFocus", Ce, !0, !0));
|
|
843
843
|
}
|
|
844
844
|
function R() {
|
|
845
845
|
b("toNextFocus", re.node, !1, !0);
|
|
@@ -904,8 +904,8 @@ function I0() {
|
|
|
904
904
|
}
|
|
905
905
|
function Er(w, Z) {
|
|
906
906
|
var _e;
|
|
907
|
-
const re = w.currentTarget, b =
|
|
908
|
-
if (!re ||
|
|
907
|
+
const re = w.currentTarget, b = _t.dragId ? document.getElementById(_t.dragId) : null;
|
|
908
|
+
if (!re || _t.dragId === Z.uuid || b != null && b.querySelector(`[id="${Z.uuid}"]`)) {
|
|
909
909
|
w.dataTransfer.dropEffect = "none";
|
|
910
910
|
return;
|
|
911
911
|
}
|
|
@@ -995,7 +995,7 @@ const Lr = {
|
|
|
995
995
|
const b = w, le = re;
|
|
996
996
|
Z({ appendNode: ae, updateNode: te, head: ve, addFiles: Q });
|
|
997
997
|
let F = null;
|
|
998
|
-
|
|
998
|
+
a0(
|
|
999
999
|
() => b.nodes,
|
|
1000
1000
|
() => {
|
|
1001
1001
|
Pe();
|
|
@@ -1006,7 +1006,7 @@ const Lr = {
|
|
|
1006
1006
|
M.currentTarget.classList.add("dragging"), M.dataTransfer.setData("dragNode", JSON.stringify(Ie)), K0.on("dragEnd", () => {
|
|
1007
1007
|
const He = b.nodes.filter((Me) => Me !== Ie);
|
|
1008
1008
|
Le(He);
|
|
1009
|
-
}),
|
|
1009
|
+
}), _t.dragId = Ie.uuid;
|
|
1010
1010
|
}
|
|
1011
1011
|
function N(M) {
|
|
1012
1012
|
M.currentTarget.classList.remove("dragging");
|
|
@@ -1031,7 +1031,7 @@ const Lr = {
|
|
|
1031
1031
|
)
|
|
1032
1032
|
return;
|
|
1033
1033
|
let Qe = [...b.nodes];
|
|
1034
|
-
if (Qe.find((Ke) => Ke.uuid === Me.uuid) ? Qe = Qe.filter((Ke) => Ke.uuid !== Me.uuid) : K0.emit("dragEnd"),
|
|
1034
|
+
if (Qe.find((Ke) => Ke.uuid === Me.uuid) ? Qe = Qe.filter((Ke) => Ke.uuid !== Me.uuid) : K0.emit("dragEnd"), _t.dragId = null, Ve === "center" && (Ie.collapsed = !1, Ie.children ? Ie.children.push(Me) : Ie.children = [Me], Vt(() => {
|
|
1035
1035
|
Le(Qe);
|
|
1036
1036
|
})), Ve === "top") {
|
|
1037
1037
|
const Ke = Qe.findIndex((Fe) => Fe === Ie);
|
|
@@ -1049,7 +1049,7 @@ const Lr = {
|
|
|
1049
1049
|
}
|
|
1050
1050
|
function be(M, Ie) {
|
|
1051
1051
|
M.preventDefault();
|
|
1052
|
-
const He = [...b.nodes], Me = He.findIndex((Qe) => Qe === Ie), Ve =
|
|
1052
|
+
const He = [...b.nodes], Me = He.findIndex((Qe) => Qe === Ie), Ve = o0();
|
|
1053
1053
|
if (M.shiftKey)
|
|
1054
1054
|
le("transfer", Ie);
|
|
1055
1055
|
else if (Me > 0) {
|
|
@@ -1095,7 +1095,7 @@ const Lr = {
|
|
|
1095
1095
|
}
|
|
1096
1096
|
function ee(M, Ie = !1) {
|
|
1097
1097
|
var Ve;
|
|
1098
|
-
let He =
|
|
1098
|
+
let He = o0();
|
|
1099
1099
|
const Me = b.nodes.findIndex((Qe) => Qe === M);
|
|
1100
1100
|
if (Me === 0)
|
|
1101
1101
|
le("focusPrev", Ie);
|
|
@@ -1110,7 +1110,7 @@ const Lr = {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
function Ae(M, Ie = !1, He = !1) {
|
|
1112
1112
|
var Qe;
|
|
1113
|
-
const Me =
|
|
1113
|
+
const Me = o0(), Ve = b.nodes.findIndex((Ke) => Ke === M);
|
|
1114
1114
|
if (He && ((Qe = M.children) != null && Qe.length) && !M.collapsed) {
|
|
1115
1115
|
const Ke = Pt(M.children[0]);
|
|
1116
1116
|
Qt(Ke, Ie ? 0 : Me);
|
|
@@ -1122,7 +1122,7 @@ const Lr = {
|
|
|
1122
1122
|
}
|
|
1123
1123
|
}
|
|
1124
1124
|
function R(M, Ie = !1) {
|
|
1125
|
-
let He =
|
|
1125
|
+
let He = o0();
|
|
1126
1126
|
const Me = Pt(M);
|
|
1127
1127
|
Qt(Me, He, Ie);
|
|
1128
1128
|
}
|
|
@@ -1151,7 +1151,7 @@ const Lr = {
|
|
|
1151
1151
|
return Ie;
|
|
1152
1152
|
}
|
|
1153
1153
|
function ae(M, Ie = !1, He = b.nodes) {
|
|
1154
|
-
const Me =
|
|
1154
|
+
const Me = _t.currentId, Ve = [...He];
|
|
1155
1155
|
if (!Ie && (!Me || !document.getElementById(Me))) {
|
|
1156
1156
|
const Ke = Ve[Ve.length - 1];
|
|
1157
1157
|
!(Ke != null && Ke.type) && !Ke.text ? Ve[Ve.length - 1] = {
|
|
@@ -1330,7 +1330,7 @@ const Lr = {
|
|
|
1330
1330
|
// 图标定位top值
|
|
1331
1331
|
}, le = ct(null), F = w, _e = re;
|
|
1332
1332
|
Z({ focus: Ye });
|
|
1333
|
-
const N = ct(null), we = N0() === "mobile", he = ct(!1), be =
|
|
1333
|
+
const N = ct(null), we = N0() === "mobile", he = ct(!1), be = l0(() => {
|
|
1334
1334
|
try {
|
|
1335
1335
|
const ae = JSON.parse(F.note.title);
|
|
1336
1336
|
if (typeof ae != "object")
|
|
@@ -1341,11 +1341,11 @@ const Lr = {
|
|
|
1341
1341
|
text: F.note.title
|
|
1342
1342
|
};
|
|
1343
1343
|
}
|
|
1344
|
-
}), Ee =
|
|
1344
|
+
}), Ee = l0(() => {
|
|
1345
1345
|
const ae = ia(F.note.tag_id, F.tags), te = D0(F.note);
|
|
1346
1346
|
return sa(ae) && te.finished;
|
|
1347
1347
|
});
|
|
1348
|
-
|
|
1348
|
+
a0(
|
|
1349
1349
|
() => {
|
|
1350
1350
|
var ae;
|
|
1351
1351
|
return (ae = F.note) == null ? void 0 : ae.title;
|
|
@@ -1368,7 +1368,7 @@ const Lr = {
|
|
|
1368
1368
|
te.tag_id === Ce ? delete te.tag_id : te.tag_id = Ce, _e("change", te.title, te);
|
|
1369
1369
|
}
|
|
1370
1370
|
function q() {
|
|
1371
|
-
|
|
1371
|
+
_t.currentId = "tree_title", we && fa(!1);
|
|
1372
1372
|
}
|
|
1373
1373
|
function I(ae) {
|
|
1374
1374
|
if (ae.type)
|
|
@@ -2415,17 +2415,17 @@ var ya = { exports: {} };
|
|
|
2415
2415
|
var j = function(G) {
|
|
2416
2416
|
var g = h._m = C.createMediaStreamSource(h), pe = C.destination, m = "createMediaStreamDestination";
|
|
2417
2417
|
C[m] && (pe = h._d = C[m]()), g.connect(G), G.connect(pe);
|
|
2418
|
-
}, x, i, se, de = "",
|
|
2419
|
-
for (var g in
|
|
2418
|
+
}, x, i, se, de = "", W = h._call, oe = function(G) {
|
|
2419
|
+
for (var g in W) {
|
|
2420
2420
|
for (var pe = G.length, m = new Int16Array(pe), P = 0, me = 0; me < pe; me++) {
|
|
2421
2421
|
var Y = Math.max(-1, Math.min(1, G[me]));
|
|
2422
2422
|
Y = Y < 0 ? Y * 32768 : Y * 32767, m[me] = Y, P += Math.abs(Y);
|
|
2423
2423
|
}
|
|
2424
|
-
for (var ue in
|
|
2425
|
-
|
|
2424
|
+
for (var ue in W)
|
|
2425
|
+
W[ue](m, P);
|
|
2426
2426
|
return;
|
|
2427
2427
|
}
|
|
2428
|
-
}, ne = "ScriptProcessor", ye = "audioWorklet", Be = we + " " + ye, ge = "RecProc",
|
|
2428
|
+
}, ne = "ScriptProcessor", ye = "audioWorklet", Be = we + " " + ye, ge = "RecProc", X = "MediaRecorder", Te = X + ".WebM.PCM", Oe = C.createScriptProcessor || C.createJavaScriptNode, z = Fe("ZGlf::。由于{1}内部1秒375次回调,在移动端可能会有性能问题导致回调丢失录音变短,PC端无影响,暂不建议开启{1}。", 0, ye), fe = function() {
|
|
2429
2429
|
i = h.isWorklet = !1, ae(h), Ue(Fe("7TU0::Connect采用老的{1},", 0, ne) + Ke.get(
|
|
2430
2430
|
F[R] ? Fe("JwCL::但已设置{1}尝试启用{2}", 2) : Fe("VGjB::可设置{1}尝试启用{2}", 2),
|
|
2431
2431
|
[we + "." + R + "=true", ye]
|
|
@@ -2482,7 +2482,7 @@ var ya = { exports: {} };
|
|
|
2482
2482
|
}, Ue(Fe("yOta::Connect采用{1},设置{2}可恢复老式{3}", 0, ye, we + "." + R + "=false", ne) + de + z, 3);
|
|
2483
2483
|
}
|
|
2484
2484
|
};
|
|
2485
|
-
C.resume()[
|
|
2485
|
+
C.resume()[W && "finally"](function() {
|
|
2486
2486
|
if (pe()) {
|
|
2487
2487
|
if (C[ge]) {
|
|
2488
2488
|
P();
|
|
@@ -2497,7 +2497,7 @@ var ya = { exports: {} };
|
|
|
2497
2497
|
}
|
|
2498
2498
|
});
|
|
2499
2499
|
}, k = function() {
|
|
2500
|
-
var G = window[
|
|
2500
|
+
var G = window[X], g = "ondataavailable", pe = "audio/webm; codecs=pcm";
|
|
2501
2501
|
x = h.isWebM = F[Ae];
|
|
2502
2502
|
var m = G && g in G.prototype && G.isTypeSupported(pe);
|
|
2503
2503
|
if (de = m ? "" : Fe("VwPd::(此浏览器不支持{1})", 0, Te), !s || !x || !m) {
|
|
@@ -2509,7 +2509,7 @@ var ya = { exports: {} };
|
|
|
2509
2509
|
};
|
|
2510
2510
|
h._ra = function() {
|
|
2511
2511
|
se !== "" && (clearTimeout(se), se = setTimeout(function() {
|
|
2512
|
-
P() && (Ue(Fe("vHnb::{1}未返回任何音频,降级使用{2}", 0,
|
|
2512
|
+
P() && (Ue(Fe("vHnb::{1}未返回任何音频,降级使用{2}", 0, X, ye), 3), l());
|
|
2513
2513
|
}, 500));
|
|
2514
2514
|
};
|
|
2515
2515
|
var me = Object.assign({ mimeType: pe }, F.ConnectWebMOptions), Y = h._r = new G(h, me), ue = h._rd = { sampleRate: C[Ee] };
|
|
@@ -2526,7 +2526,7 @@ var ya = { exports: {} };
|
|
|
2526
2526
|
}
|
|
2527
2527
|
se && (clearTimeout(se), se = ""), oe(L);
|
|
2528
2528
|
} else
|
|
2529
|
-
x || Ue(Fe("O9P7::{1}多余回调", 0,
|
|
2529
|
+
x || Ue(Fe("O9P7::{1}多余回调", 0, X), 3);
|
|
2530
2530
|
}, Re.readAsArrayBuffer(O.data);
|
|
2531
2531
|
}, Y.start(~~(d / 48)), Ue(Fe("LMEm::Connect采用{1},设置{2}可恢复使用{3}或老式{4}", 0, Te, we + "." + Ae + "=false", ye, ne));
|
|
2532
2532
|
};
|
|
@@ -2557,7 +2557,7 @@ var ya = { exports: {} };
|
|
|
2557
2557
|
se = { fn: de ? F.IIRFilter(!0, s, de) : 0 };
|
|
2558
2558
|
}
|
|
2559
2559
|
se.sr = s;
|
|
2560
|
-
var
|
|
2560
|
+
var W = se.fn, oe = h.frameNext || [];
|
|
2561
2561
|
C || (C = {});
|
|
2562
2562
|
var ne = C.frameSize || 1;
|
|
2563
2563
|
C.frameType && (ne = C.frameType == "mp3" ? 1152 : 1);
|
|
@@ -2566,20 +2566,20 @@ var ya = { exports: {} };
|
|
|
2566
2566
|
for (var Be = 0, ge = x; ge < ye; ge++)
|
|
2567
2567
|
Be += e[ge].length;
|
|
2568
2568
|
Be = Math.max(0, Be - Math.floor(i));
|
|
2569
|
-
var
|
|
2570
|
-
|
|
2569
|
+
var X = s / d;
|
|
2570
|
+
X > 1 ? Be = Math.floor(Be / X) : (X = 1, d = s), Be += oe.length;
|
|
2571
2571
|
for (var Te = new Int16Array(Be), Oe = 0, ge = 0; ge < oe.length; ge++)
|
|
2572
2572
|
Te[Oe] = oe[ge], Oe++;
|
|
2573
2573
|
for (; x < ye; x++) {
|
|
2574
|
-
for (var z = e[x], ge = i, fe = z.length, l =
|
|
2575
|
-
if (P < fe && (l ? (g = z[P], pe = l.b0 * g + l.b1 * l.x1 + l.b0 * l.x2 - l.a1 * l.y1 - l.a2 * l.y2, l.x2 = l.x1, l.x1 = g, l.y2 = l.y1, l.y1 = pe) : pe =
|
|
2574
|
+
for (var z = e[x], ge = i, fe = z.length, l = W && W.Embed, k = 0, G = 0, g = 0, pe = 0, m = 0, P = 0; m < fe; m++, P++) {
|
|
2575
|
+
if (P < fe && (l ? (g = z[P], pe = l.b0 * g + l.b1 * l.x1 + l.b0 * l.x2 - l.a1 * l.y1 - l.a2 * l.y2, l.x2 = l.x1, l.x1 = g, l.y2 = l.y1, l.y1 = pe) : pe = W ? W(z[P]) : z[P]), k = G, G = pe, P == 0) {
|
|
2576
2576
|
m--;
|
|
2577
2577
|
continue;
|
|
2578
2578
|
}
|
|
2579
2579
|
var me = Math.floor(ge);
|
|
2580
2580
|
if (m == me) {
|
|
2581
2581
|
var Y = Math.ceil(ge), ue = ge - me, O = k, Re = Y < fe ? G : O, L = O + (Re - O) * ue;
|
|
2582
|
-
L > 32767 ? L = 32767 : L < -32768 && (L = -32768), Te[Oe] = L, Oe++, ge +=
|
|
2582
|
+
L > 32767 ? L = 32767 : L < -32768 && (L = -32768), Te[Oe] = L, Oe++, ge += X;
|
|
2583
2583
|
}
|
|
2584
2584
|
}
|
|
2585
2585
|
i = Math.max(0, ge - fe);
|
|
@@ -2601,13 +2601,13 @@ var ya = { exports: {} };
|
|
|
2601
2601
|
}, F.IIRFilter = function(e, s, d) {
|
|
2602
2602
|
var h = 2 * Math.PI * d / s, C = Math.sin(h), j = Math.cos(h), x = C / 2, i = 1 + x, se = -2 * j / i, de = (1 - x) / i;
|
|
2603
2603
|
if (e)
|
|
2604
|
-
var
|
|
2604
|
+
var W = (1 - j) / 2 / i, oe = (1 - j) / i;
|
|
2605
2605
|
else
|
|
2606
|
-
var
|
|
2607
|
-
var ne = 0, ye = 0, Be = 0, ge = 0,
|
|
2608
|
-
return Be =
|
|
2606
|
+
var W = (1 + j) / 2 / i, oe = -(1 + j) / i;
|
|
2607
|
+
var ne = 0, ye = 0, Be = 0, ge = 0, X = 0, Te = function(Oe) {
|
|
2608
|
+
return Be = W * Oe + oe * ne + W * ye - se * ge - de * X, ye = ne, ne = Oe, X = ge, ge = Be, Be;
|
|
2609
2609
|
};
|
|
2610
|
-
return Te.Embed = { x1: 0, x2: 0, y1: 0, y2: 0, b0:
|
|
2610
|
+
return Te.Embed = { x1: 0, x2: 0, y1: 0, y2: 0, b0: W, b1: oe, a1: se, a2: de }, Te;
|
|
2611
2611
|
}, F.PowerLevel = function(e, s) {
|
|
2612
2612
|
var d = e / s || 0, h;
|
|
2613
2613
|
return d < 1251 ? h = Math.round(d / 1250 * 10) : h = Math.round(Math.min(100, Math.max(0, (1 + Math.log(d / 1e4) / Math.log(10)) * 100))), h;
|
|
@@ -2684,10 +2684,10 @@ var ya = { exports: {} };
|
|
|
2684
2684
|
d._streamTag = he;
|
|
2685
2685
|
var i = function() {
|
|
2686
2686
|
d.CLog("open ok, id:" + d.id + " stream:" + d._streamTag), e(), d._SO = 0;
|
|
2687
|
-
}, se = C.Sync, de = ++se.O,
|
|
2687
|
+
}, se = C.Sync, de = ++se.O, W = se.C;
|
|
2688
2688
|
d._O = d._O_ = de, d._SO = d._S;
|
|
2689
2689
|
var oe = function() {
|
|
2690
|
-
if (
|
|
2690
|
+
if (W != se.C || !d._O) {
|
|
2691
2691
|
var l = Fe("dFm8::open被取消");
|
|
2692
2692
|
return de == se.O ? d.close() : l = Fe("VtJO::open被中断"), x(l), !0;
|
|
2693
2693
|
}
|
|
@@ -2737,7 +2737,7 @@ var ya = { exports: {} };
|
|
|
2737
2737
|
}
|
|
2738
2738
|
var ge = h.runningContext;
|
|
2739
2739
|
ge || (ge = j = F.GetContext(!0));
|
|
2740
|
-
var
|
|
2740
|
+
var X = function(l) {
|
|
2741
2741
|
setTimeout(function() {
|
|
2742
2742
|
l._call = {};
|
|
2743
2743
|
var k = F.Stream;
|
|
@@ -2750,11 +2750,11 @@ var ya = { exports: {} };
|
|
|
2750
2750
|
Oe[Ee] = ge[Ee];
|
|
2751
2751
|
var z = { audio: Oe };
|
|
2752
2752
|
try {
|
|
2753
|
-
var fe = F.Scope[he](z,
|
|
2753
|
+
var fe = F.Scope[he](z, X, Te);
|
|
2754
2754
|
} catch (l) {
|
|
2755
|
-
d.CLog(he, 3, l), z = { audio: !0 }, fe = F.Scope[he](z,
|
|
2755
|
+
d.CLog(he, 3, l), z = { audio: !0 }, fe = F.Scope[he](z, X, Te);
|
|
2756
2756
|
}
|
|
2757
|
-
d.CLog(he + "(" + JSON.stringify(z) + ") " + ee(ge) + Fe("RiWe::,未配置noiseSuppression和echoCancellation时浏览器可能会自动打开降噪和回声消除,移动端可能会降低系统播放音量(关闭录音后可恢复),请参阅文档中audioTrackSet配置") + "(" + N + ") LM:" + _e + " UA:" + navigator.userAgent), fe && fe.then && fe.then(
|
|
2757
|
+
d.CLog(he + "(" + JSON.stringify(z) + ") " + ee(ge) + Fe("RiWe::,未配置noiseSuppression和echoCancellation时浏览器可能会自动打开降噪和回声消除,移动端可能会降低系统播放音量(关闭录音后可恢复),请参阅文档中audioTrackSet配置") + "(" + N + ") LM:" + _e + " UA:" + navigator.userAgent), fe && fe.then && fe.then(X)[xe](Te);
|
|
2758
2758
|
},
|
|
2759
2759
|
close: function(e) {
|
|
2760
2760
|
e = e || b;
|
|
@@ -2801,19 +2801,19 @@ var ya = { exports: {} };
|
|
|
2801
2801
|
}
|
|
2802
2802
|
var j = d[be], x = e.length, i = F.PowerLevel(s, x), se = d.buffers, de = se.length;
|
|
2803
2803
|
se.push(e);
|
|
2804
|
-
var
|
|
2804
|
+
var W = se, oe = de, ne = Date.now(), ye = Math.round(x / j * 1e3);
|
|
2805
2805
|
d.envInLast = ne, d.buffers.length == 1 && (d.envInFirst = ne - ye);
|
|
2806
2806
|
var Be = d.envInFixTs;
|
|
2807
2807
|
Be.splice(0, 0, { t: ne, d: ye });
|
|
2808
|
-
for (var ge = ne,
|
|
2808
|
+
for (var ge = ne, X = 0, Te = 0; Te < Be.length; Te++) {
|
|
2809
2809
|
var Oe = Be[Te];
|
|
2810
2810
|
if (ne - Oe.t > 3e3) {
|
|
2811
2811
|
Be.length = Te;
|
|
2812
2812
|
break;
|
|
2813
2813
|
}
|
|
2814
|
-
ge = Oe.t,
|
|
2814
|
+
ge = Oe.t, X += Oe.d;
|
|
2815
2815
|
}
|
|
2816
|
-
var z = Be[1], fe = ne - ge, l = fe -
|
|
2816
|
+
var z = Be[1], fe = ne - ge, l = fe - X;
|
|
2817
2817
|
if (l > fe / 3 && (z && fe > 1e3 || Be.length >= 6)) {
|
|
2818
2818
|
var k = ne - z.t - ye;
|
|
2819
2819
|
if (k > ye / 5) {
|
|
@@ -2829,15 +2829,15 @@ var ya = { exports: {} };
|
|
|
2829
2829
|
var me = F.SampleData(se, j, h[Ee], C.chunkInfo);
|
|
2830
2830
|
C.chunkInfo = me, pe = C.pcmSize, m = me.data.length, P = pe + m, C.pcmSize = P, se = C.pcmDatas, de = se.length, se.push(me.data), j = me[Ee];
|
|
2831
2831
|
}
|
|
2832
|
-
var Y = Math.round(P / j * 1e3), ue = se.length, O =
|
|
2832
|
+
var Y = Math.round(P / j * 1e3), ue = se.length, O = W.length, Re = function() {
|
|
2833
2833
|
for (var T = L ? 0 : -m, U = se[0] == null, y = de; y < ue; y++) {
|
|
2834
2834
|
var f = se[y];
|
|
2835
2835
|
f == null ? U = 1 : (T += f.length, C && f.length && d[h.type + "_encode"](C, f));
|
|
2836
2836
|
}
|
|
2837
2837
|
if (U && C) {
|
|
2838
2838
|
var y = oe;
|
|
2839
|
-
for (
|
|
2840
|
-
|
|
2839
|
+
for (W[0] && (y = 0); y < O; y++)
|
|
2840
|
+
W[y] = null;
|
|
2841
2841
|
}
|
|
2842
2842
|
U && (T = L ? m : 0, se[0] = null), C ? C.pcmSize += T : d.recSize += T;
|
|
2843
2843
|
}, L = 0, H = "rec.set.onProcess";
|
|
@@ -2900,7 +2900,7 @@ var ya = { exports: {} };
|
|
|
2900
2900
|
h._stop(), d && h.close();
|
|
2901
2901
|
}, de = function(Oe) {
|
|
2902
2902
|
h.CLog(Fe("u8JG::结束录音失败:") + Oe, 1), s && s(Oe), se();
|
|
2903
|
-
},
|
|
2903
|
+
}, W = function(Oe, z, fe) {
|
|
2904
2904
|
var l = "blob", k = "arraybuffer", G = "dataType", g = "DefaultDataType", pe = h[G] || F[g] || l, m = G + "=" + pe, P = Oe instanceof ArrayBuffer, me = 0, Y = P ? Oe.byteLength : Oe.size;
|
|
2905
2905
|
if (pe == k ? P || (me = 1) : pe == l ? typeof Blob != "function" ? me = Fe.G("NonBrowser-1", [m]) + Fe("1skY::,请设置{1}", 0, we + "." + g + '="' + k + '"') : (P && (Oe = new Blob([Oe], { type: z })), Oe instanceof Blob || (me = 1), z = Oe.type || z) : me = Fe.G("NotSupport-1", [m]), h.CLog(Fe("Wv7l::结束录音 编码花{1}ms 音频时长{2}ms 文件大小{3}b", 0, Date.now() - j, fe, Y) + " " + m + "," + z), me) {
|
|
2906
2906
|
de(me != 1 ? me : Fe("Vkbd::{1}编码器返回的不是{2}", 0, C.type, pe) + ", " + m);
|
|
@@ -2942,7 +2942,7 @@ var ya = { exports: {} };
|
|
|
2942
2942
|
if (h[C.type + "_complete"] && Be) {
|
|
2943
2943
|
var Te = Math.round(Be.pcmSize / C[Ee] * 1e3);
|
|
2944
2944
|
j = Date.now(), h[C.type + "_complete"](Be, function(z, fe) {
|
|
2945
|
-
|
|
2945
|
+
W(z, fe, Te);
|
|
2946
2946
|
}, de);
|
|
2947
2947
|
return;
|
|
2948
2948
|
}
|
|
@@ -2952,10 +2952,10 @@ var ya = { exports: {} };
|
|
|
2952
2952
|
}
|
|
2953
2953
|
var ge = F.SampleData(h.buffers, h[be], C[Ee]);
|
|
2954
2954
|
C[Ee] = ge[Ee];
|
|
2955
|
-
var
|
|
2956
|
-
h.CLog(Fe("CxeT::采样:{1} 花:{2}ms", 0, ne + "->" +
|
|
2957
|
-
j = Date.now(), h[C.type](
|
|
2958
|
-
|
|
2955
|
+
var X = ge.data, Te = Math.round(X.length / C[Ee] * 1e3);
|
|
2956
|
+
h.CLog(Fe("CxeT::采样:{1} 花:{2}ms", 0, ne + "->" + X.length, Date.now() - j)), setTimeout(function() {
|
|
2957
|
+
j = Date.now(), h[C.type](X, function(Oe, z) {
|
|
2958
|
+
W(Oe, z, Te);
|
|
2959
2959
|
}, function(Oe) {
|
|
2960
2960
|
de(Oe);
|
|
2961
2961
|
});
|
|
@@ -2971,7 +2971,7 @@ var ya = { exports: {} };
|
|
|
2971
2971
|
if (Ve(x, h), Qe(x, h), !He(Ve(x, h), [24, 83, 128, 103]))
|
|
2972
2972
|
return;
|
|
2973
2973
|
for (Ve(x, h); h[0] < x.length; ) {
|
|
2974
|
-
var i = Ve(x, h), se = Qe(x, h), de = [0],
|
|
2974
|
+
var i = Ve(x, h), se = Qe(x, h), de = [0], W = 0;
|
|
2975
2975
|
if (!se)
|
|
2976
2976
|
return;
|
|
2977
2977
|
if (He(i, [22, 84, 174, 107])) {
|
|
@@ -2979,20 +2979,20 @@ var ya = { exports: {} };
|
|
|
2979
2979
|
var oe = Ve(se, de), ne = Qe(se, de), ye = [0], Be = { channels: 0, sampleRate: 0 };
|
|
2980
2980
|
if (He(oe, [174]))
|
|
2981
2981
|
for (; ye[0] < ne.length; ) {
|
|
2982
|
-
var ge = Ve(ne, ye),
|
|
2982
|
+
var ge = Ve(ne, ye), X = Qe(ne, ye), Te = [0];
|
|
2983
2983
|
if (He(ge, [215])) {
|
|
2984
|
-
var Oe = Me(
|
|
2984
|
+
var Oe = Me(X);
|
|
2985
2985
|
Be.number = Oe, d[Oe] = Be;
|
|
2986
2986
|
} else if (He(ge, [131])) {
|
|
2987
|
-
var Oe = Me(
|
|
2988
|
-
Oe == 1 ? Be.type = "video" : Oe == 2 ? (Be.type = "audio",
|
|
2987
|
+
var Oe = Me(X);
|
|
2988
|
+
Oe == 1 ? Be.type = "video" : Oe == 2 ? (Be.type = "audio", W || (s.track0 = Be), Be.idx = W++) : Be.type = "Type-" + Oe;
|
|
2989
2989
|
} else if (He(ge, [134])) {
|
|
2990
|
-
for (var z = "", fe = 0; fe <
|
|
2991
|
-
z += String.fromCharCode(
|
|
2990
|
+
for (var z = "", fe = 0; fe < X.length; fe++)
|
|
2991
|
+
z += String.fromCharCode(X[fe]);
|
|
2992
2992
|
Be.codec = z;
|
|
2993
2993
|
} else if (He(ge, [225]))
|
|
2994
|
-
for (; Te[0] <
|
|
2995
|
-
var l = Ve(
|
|
2994
|
+
for (; Te[0] < X.length; ) {
|
|
2995
|
+
var l = Ve(X, Te), k = Qe(X, Te);
|
|
2996
2996
|
if (He(l, [181])) {
|
|
2997
2997
|
var Oe = 0, G = new Uint8Array(k.reverse()).buffer;
|
|
2998
2998
|
k.length == 4 ? Oe = new Float32Array(G)[0] : k.length == 8 ? Oe = new Float64Array(G)[0] : Ue("WebM Track !Float", 1, k), Be[Ee] = Math.round(Oe);
|
|
@@ -3094,13 +3094,13 @@ var ya = { exports: {} };
|
|
|
3094
3094
|
var j = Ke.locales[C];
|
|
3095
3095
|
j || (j = {}, Ke.locales[C] = j);
|
|
3096
3096
|
for (var x = /^([\w\-]+):/, i, se = 0; se < s.length; se++) {
|
|
3097
|
-
var
|
|
3098
|
-
if (i = x.exec(
|
|
3099
|
-
Ue(d + "'key:'? " +
|
|
3097
|
+
var W = s[se];
|
|
3098
|
+
if (i = x.exec(W), !i) {
|
|
3099
|
+
Ue(d + "'key:'? " + W, 3, e);
|
|
3100
3100
|
continue;
|
|
3101
3101
|
}
|
|
3102
|
-
var de = i[1],
|
|
3103
|
-
!h && j[de] || (j[de] =
|
|
3102
|
+
var de = i[1], W = W.substr(de.length + 1);
|
|
3103
|
+
!h && j[de] || (j[de] = W);
|
|
3104
3104
|
}
|
|
3105
3105
|
},
|
|
3106
3106
|
get: function() {
|
|
@@ -3624,8 +3624,8 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3624
3624
|
c = c >> 1;
|
|
3625
3625
|
var r = c % 2;
|
|
3626
3626
|
for (c = c >> 1; c-- != 0; ) {
|
|
3627
|
-
var J, D,
|
|
3628
|
-
J = _[S++] * v, D = _[S++] * v, De = 0 | J,
|
|
3627
|
+
var J, D, K, Se, De, Ne, Je, nt;
|
|
3628
|
+
J = _[S++] * v, D = _[S++] * v, De = 0 | J, K = _[S++] * v, Ne = 0 | D, Se = _[S++] * v, Je = 0 | K, J += l.adj43[De], nt = 0 | Se, D += l.adj43[Ne], E[a++] = 0 | J, K += l.adj43[Je], E[a++] = 0 | D, Se += l.adj43[nt], E[a++] = 0 | K, E[a++] = 0 | Se;
|
|
3629
3629
|
}
|
|
3630
3630
|
if (r != 0) {
|
|
3631
3631
|
var J, D, De, Ne;
|
|
@@ -3633,53 +3633,53 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3633
3633
|
}
|
|
3634
3634
|
}
|
|
3635
3635
|
function m(c, v, _, S, E) {
|
|
3636
|
-
var a, r, J = 0, D,
|
|
3636
|
+
var a, r, J = 0, D, K = 0, Se = 0, De = 0, Ne = v, Je = 0, nt = Ne, at = 0, Tt = c, Rt = 0;
|
|
3637
3637
|
for (D = E != null && S.global_gain == E.global_gain, S.block_type == i.SHORT_TYPE ? r = 38 : r = 21, a = 0; a <= r; a++) {
|
|
3638
3638
|
var wt = -1;
|
|
3639
3639
|
if ((D || S.block_type == i.NORM_TYPE) && (wt = S.global_gain - (S.scalefac[a] + (S.preflag != 0 ? l.pretab[a] : 0) << S.scalefac_scale + 1) - S.subblock_gain[S.window[a]] * 8), D && E.step[a] == wt)
|
|
3640
|
-
|
|
3641
|
-
|
|
3640
|
+
K != 0 && (pe(
|
|
3641
|
+
K,
|
|
3642
3642
|
_,
|
|
3643
3643
|
Tt,
|
|
3644
3644
|
Rt,
|
|
3645
3645
|
nt,
|
|
3646
3646
|
at
|
|
3647
|
-
),
|
|
3647
|
+
), K = 0), Se != 0 && b();
|
|
3648
3648
|
else {
|
|
3649
3649
|
var St = S.width[a];
|
|
3650
3650
|
if (J + S.width[a] > S.max_nonzero_coeff) {
|
|
3651
3651
|
var Et;
|
|
3652
3652
|
Et = S.max_nonzero_coeff - J + 1, xe.fill(v, S.max_nonzero_coeff, 576, 0), St = Et, St < 0 && (St = 0), a = r + 1;
|
|
3653
3653
|
}
|
|
3654
|
-
if (
|
|
3655
|
-
|
|
3654
|
+
if (K == 0 && Se == 0 && (nt = Ne, at = Je, Tt = c, Rt = De), E != null && E.sfb_count1 > 0 && a >= E.sfb_count1 && E.step[a] > 0 && wt >= E.step[a] ? (K != 0 && (pe(
|
|
3655
|
+
K,
|
|
3656
3656
|
_,
|
|
3657
3657
|
Tt,
|
|
3658
3658
|
Rt,
|
|
3659
3659
|
nt,
|
|
3660
3660
|
at
|
|
3661
|
-
),
|
|
3661
|
+
), K = 0, nt = Ne, at = Je, Tt = c, Rt = De), Se += St) : (Se != 0 && (g(
|
|
3662
3662
|
Se,
|
|
3663
3663
|
_,
|
|
3664
3664
|
Tt,
|
|
3665
3665
|
Rt,
|
|
3666
3666
|
nt,
|
|
3667
3667
|
at
|
|
3668
|
-
), Se = 0, nt = Ne, at = Je, Tt = c, Rt = De),
|
|
3669
|
-
Se != 0 && b(),
|
|
3668
|
+
), Se = 0, nt = Ne, at = Je, Tt = c, Rt = De), K += St), St <= 0) {
|
|
3669
|
+
Se != 0 && b(), K != 0 && b();
|
|
3670
3670
|
break;
|
|
3671
3671
|
}
|
|
3672
3672
|
}
|
|
3673
3673
|
a <= r && (Je += S.width[a], De += S.width[a], J += S.width[a]);
|
|
3674
3674
|
}
|
|
3675
|
-
|
|
3676
|
-
|
|
3675
|
+
K != 0 && (pe(
|
|
3676
|
+
K,
|
|
3677
3677
|
_,
|
|
3678
3678
|
Tt,
|
|
3679
3679
|
Rt,
|
|
3680
3680
|
nt,
|
|
3681
3681
|
at
|
|
3682
|
-
),
|
|
3682
|
+
), K = 0), Se != 0 && b();
|
|
3683
3683
|
}
|
|
3684
3684
|
function P(c, v, _) {
|
|
3685
3685
|
var S = 0, E = 0;
|
|
@@ -3692,8 +3692,8 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3692
3692
|
function me(c, v, _, S, E, a) {
|
|
3693
3693
|
var r = M.ht[S].xlen * 65536 + M.ht[E].xlen, J = 0, D;
|
|
3694
3694
|
do {
|
|
3695
|
-
var
|
|
3696
|
-
|
|
3695
|
+
var K = c[v++], Se = c[v++];
|
|
3696
|
+
K != 0 && (K > 14 && (K = 15, J += r), K *= 16), Se != 0 && (Se > 14 && (Se = 15, J += r), K += Se), J += M.largetbl[K];
|
|
3697
3697
|
} while (v < _);
|
|
3698
3698
|
return D = J & 65535, J >>= 16, J > D && (J = D, S = E), a.bits += J, S;
|
|
3699
3699
|
}
|
|
@@ -3709,16 +3709,16 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3709
3709
|
var a = 0, r, J = M.ht[S].xlen, D;
|
|
3710
3710
|
S == 2 ? D = M.table23 : D = M.table56;
|
|
3711
3711
|
do {
|
|
3712
|
-
var
|
|
3713
|
-
v += 2, a += D[
|
|
3712
|
+
var K = c[v + 0] * J + c[v + 1];
|
|
3713
|
+
v += 2, a += D[K];
|
|
3714
3714
|
} while (v < _);
|
|
3715
3715
|
return r = a & 65535, a >>= 16, a > r && (a = r, S++), E.bits += a, S;
|
|
3716
3716
|
}
|
|
3717
3717
|
function O(c, v, _, S, E) {
|
|
3718
|
-
var a = 0, r = 0, J = 0, D = M.ht[S].xlen,
|
|
3718
|
+
var a = 0, r = 0, J = 0, D = M.ht[S].xlen, K = M.ht[S].hlen, Se = M.ht[S + 1].hlen, De = M.ht[S + 2].hlen;
|
|
3719
3719
|
do {
|
|
3720
3720
|
var Ne = c[v + 0] * D + c[v + 1];
|
|
3721
|
-
v += 2, a +=
|
|
3721
|
+
v += 2, a += K[Ne], r += Se[Ne], J += De[Ne];
|
|
3722
3722
|
} while (v < _);
|
|
3723
3723
|
var Je = S;
|
|
3724
3724
|
return a > r && (a = r, Je++), a > J && (a = J, Je = S + 2), E.bits += a, Je;
|
|
@@ -3804,18 +3804,18 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3804
3804
|
a = 3 * c.scalefac_band.s[3], a > v.big_values && (a = v.big_values), r = v.big_values;
|
|
3805
3805
|
else if (v.block_type == i.NORM_TYPE) {
|
|
3806
3806
|
if (a = v.region0_count = c.bv_scf[E - 2], r = v.region1_count = c.bv_scf[E - 1], r = c.scalefac_band.l[a + r + 2], a = c.scalefac_band.l[a + 1], r < E) {
|
|
3807
|
-
var
|
|
3808
|
-
v.table_select[2] = L(S, r, E,
|
|
3807
|
+
var K = new k(D);
|
|
3808
|
+
v.table_select[2] = L(S, r, E, K), D = K.bits;
|
|
3809
3809
|
}
|
|
3810
3810
|
} else
|
|
3811
3811
|
v.region0_count = 7, v.region1_count = i.SBMAX_l - 1 - 7 - 1, a = c.scalefac_band.l[8], r = E, a > r && (a = r);
|
|
3812
3812
|
if (a = Math.min(a, E), r = Math.min(r, E), 0 < a) {
|
|
3813
|
-
var
|
|
3814
|
-
v.table_select[0] = L(S, 0, a,
|
|
3813
|
+
var K = new k(D);
|
|
3814
|
+
v.table_select[0] = L(S, 0, a, K), D = K.bits;
|
|
3815
3815
|
}
|
|
3816
3816
|
if (a < r) {
|
|
3817
|
-
var
|
|
3818
|
-
v.table_select[1] = L(S, a, r,
|
|
3817
|
+
var K = new k(D);
|
|
3818
|
+
v.table_select[1] = L(S, a, r, K), D = K.bits;
|
|
3819
3819
|
}
|
|
3820
3820
|
if (c.use_best_huffman == 2 && b(), _ != null && v.block_type == i.NORM_TYPE) {
|
|
3821
3821
|
for (var Se = 0; c.scalefac_band.l[Se] < v.big_values; )
|
|
@@ -3831,10 +3831,10 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3831
3831
|
for (var J = v.big_values, D = 0; D <= 22; D++)
|
|
3832
3832
|
S[D] = e.LARGE_BITS;
|
|
3833
3833
|
for (var D = 0; D < 16; D++) {
|
|
3834
|
-
var
|
|
3835
|
-
if (
|
|
3834
|
+
var K = c.scalefac_band.l[D + 1];
|
|
3835
|
+
if (K >= J)
|
|
3836
3836
|
break;
|
|
3837
|
-
var Se = 0, De = new k(Se), Ne = L(_, 0,
|
|
3837
|
+
var Se = 0, De = new k(Se), Ne = L(_, 0, K, De);
|
|
3838
3838
|
Se = De.bits;
|
|
3839
3839
|
for (var Je = 0; Je < 8; Je++) {
|
|
3840
3840
|
var nt = c.scalefac_band.l[D + Je + 2];
|
|
@@ -3842,21 +3842,21 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3842
3842
|
break;
|
|
3843
3843
|
var at = Se;
|
|
3844
3844
|
De = new k(at);
|
|
3845
|
-
var Tt = L(_,
|
|
3845
|
+
var Tt = L(_, K, nt, De);
|
|
3846
3846
|
at = De.bits, S[D + Je] > at && (S[D + Je] = at, E[D + Je] = D, a[D + Je] = Ne, r[D + Je] = Tt);
|
|
3847
3847
|
}
|
|
3848
3848
|
}
|
|
3849
3849
|
}
|
|
3850
3850
|
function t(c, v, _, S, E, a, r, J) {
|
|
3851
|
-
for (var D = v.big_values,
|
|
3852
|
-
var Se = c.scalefac_band.l[
|
|
3851
|
+
for (var D = v.big_values, K = 2; K < i.SBMAX_l + 1; K++) {
|
|
3852
|
+
var Se = c.scalefac_band.l[K];
|
|
3853
3853
|
if (Se >= D)
|
|
3854
3854
|
break;
|
|
3855
|
-
var De = E[
|
|
3855
|
+
var De = E[K - 2] + v.count1bits;
|
|
3856
3856
|
if (_.part2_3_length <= De)
|
|
3857
3857
|
break;
|
|
3858
3858
|
var Ne = new k(De), Je = L(S, Se, D, Ne);
|
|
3859
|
-
De = Ne.bits, !(_.part2_3_length <= De) && (_.assign(v), _.part2_3_length = De, _.region0_count = a[
|
|
3859
|
+
De = Ne.bits, !(_.part2_3_length <= De) && (_.assign(v), _.part2_3_length = De, _.region0_count = a[K - 2], _.region1_count = K - 2 - a[K - 2], _.table_select[0] = r[K - 2], _.table_select[1] = J[K - 2], _.table_select[2] = Je);
|
|
3860
3860
|
}
|
|
3861
3861
|
}
|
|
3862
3862
|
this.best_huffman_divide = function(c, v) {
|
|
@@ -3875,11 +3875,11 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3875
3875
|
var D = _.big_values;
|
|
3876
3876
|
if (!(D == 0 || (S[D - 2] | S[D - 1]) > 1) && (D = v.count1 + 2, !(D > 576))) {
|
|
3877
3877
|
_.assign(v), _.count1 = D;
|
|
3878
|
-
for (var
|
|
3878
|
+
for (var K = 0, Se = 0; D > _.big_values; D -= 4) {
|
|
3879
3879
|
var De = ((S[D - 4] * 2 + S[D - 3]) * 2 + S[D - 2]) * 2 + S[D - 1];
|
|
3880
|
-
|
|
3880
|
+
K += M.t32l[De], Se += M.t33l[De];
|
|
3881
3881
|
}
|
|
3882
|
-
if (_.big_values = D, _.count1table_select = 0,
|
|
3882
|
+
if (_.big_values = D, _.count1table_select = 0, K > Se && (K = Se, _.count1table_select = 1), _.count1bits = K, _.block_type == i.NORM_TYPE)
|
|
3883
3883
|
t(
|
|
3884
3884
|
c,
|
|
3885
3885
|
_,
|
|
@@ -3891,13 +3891,13 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3891
3891
|
J
|
|
3892
3892
|
);
|
|
3893
3893
|
else {
|
|
3894
|
-
if (_.part2_3_length =
|
|
3894
|
+
if (_.part2_3_length = K, K = c.scalefac_band.l[8], K > D && (K = D), K > 0) {
|
|
3895
3895
|
var Ne = new k(_.part2_3_length);
|
|
3896
|
-
_.table_select[0] = L(S, 0,
|
|
3896
|
+
_.table_select[0] = L(S, 0, K, Ne), _.part2_3_length = Ne.bits;
|
|
3897
3897
|
}
|
|
3898
|
-
if (D >
|
|
3898
|
+
if (D > K) {
|
|
3899
3899
|
var Ne = new k(_.part2_3_length);
|
|
3900
|
-
_.table_select[1] = L(S,
|
|
3900
|
+
_.table_select[1] = L(S, K, D, Ne), _.part2_3_length = Ne.bits;
|
|
3901
3901
|
}
|
|
3902
3902
|
v.part2_3_length > _.part2_3_length && v.assign(_);
|
|
3903
3903
|
}
|
|
@@ -3919,21 +3919,21 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3919
3919
|
var r = 0, J = 0;
|
|
3920
3920
|
for (_ = 0; _ < 11; _++)
|
|
3921
3921
|
S.scalefac[_] != -1 && (J++, r < S.scalefac[_] && (r = S.scalefac[_]));
|
|
3922
|
-
for (var D = 0,
|
|
3923
|
-
S.scalefac[_] != -1 && (
|
|
3922
|
+
for (var D = 0, K = 0; _ < i.SBPSY_l; _++)
|
|
3923
|
+
S.scalefac[_] != -1 && (K++, D < S.scalefac[_] && (D = S.scalefac[_]));
|
|
3924
3924
|
for (var a = 0; a < 16; a++)
|
|
3925
3925
|
if (r < o[a] && D < T[a]) {
|
|
3926
|
-
var Se = U[a] * J + y[a] *
|
|
3926
|
+
var Se = U[a] * J + y[a] * K;
|
|
3927
3927
|
S.part2_length > Se && (S.part2_length = Se, S.scalefac_compress = a);
|
|
3928
3928
|
}
|
|
3929
3929
|
}
|
|
3930
3930
|
this.best_scalefac_store = function(c, v, _, S) {
|
|
3931
|
-
var E = S.tt[v][_], a, r, J, D,
|
|
3931
|
+
var E = S.tt[v][_], a, r, J, D, K = 0;
|
|
3932
3932
|
for (J = 0, a = 0; a < E.sfbmax; a++) {
|
|
3933
3933
|
var Se = E.width[a];
|
|
3934
3934
|
for (J += Se, D = -Se; D < 0 && E.l3_enc[D + J] == 0; D++)
|
|
3935
3935
|
;
|
|
3936
|
-
D == 0 && (E.scalefac[a] =
|
|
3936
|
+
D == 0 && (E.scalefac[a] = K = -2);
|
|
3937
3937
|
}
|
|
3938
3938
|
if (E.scalefac_scale == 0 && E.preflag == 0) {
|
|
3939
3939
|
var De = 0;
|
|
@@ -3942,7 +3942,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3942
3942
|
if (!(De & 1) && De != 0) {
|
|
3943
3943
|
for (a = 0; a < E.sfbmax; a++)
|
|
3944
3944
|
E.scalefac[a] > 0 && (E.scalefac[a] >>= 1);
|
|
3945
|
-
E.scalefac_scale =
|
|
3945
|
+
E.scalefac_scale = K = 1;
|
|
3946
3946
|
}
|
|
3947
3947
|
}
|
|
3948
3948
|
if (E.preflag == 0 && E.block_type != i.SHORT_TYPE && c.mode_gr == 2) {
|
|
@@ -3951,14 +3951,14 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
3951
3951
|
if (a == i.SBPSY_l) {
|
|
3952
3952
|
for (a = 11; a < i.SBPSY_l; a++)
|
|
3953
3953
|
E.scalefac[a] > 0 && (E.scalefac[a] -= l.pretab[a]);
|
|
3954
|
-
E.preflag =
|
|
3954
|
+
E.preflag = K = 1;
|
|
3955
3955
|
}
|
|
3956
3956
|
}
|
|
3957
3957
|
for (r = 0; r < 4; r++)
|
|
3958
3958
|
S.scfsi[_][r] = 0;
|
|
3959
|
-
for (c.mode_gr == 2 && v == 1 && S.tt[0][_].block_type != i.SHORT_TYPE && S.tt[1][_].block_type != i.SHORT_TYPE && (f(_, S),
|
|
3959
|
+
for (c.mode_gr == 2 && v == 1 && S.tt[0][_].block_type != i.SHORT_TYPE && S.tt[1][_].block_type != i.SHORT_TYPE && (f(_, S), K = 0), a = 0; a < E.sfbmax; a++)
|
|
3960
3960
|
E.scalefac[a] == -2 && (E.scalefac[a] = 0);
|
|
3961
|
-
|
|
3961
|
+
K != 0 && (c.mode_gr == 2 ? this.scale_bitcount(E) : this.scale_bitcount_lsf(c, E));
|
|
3962
3962
|
};
|
|
3963
3963
|
var p = [
|
|
3964
3964
|
0,
|
|
@@ -4040,29 +4040,29 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
4040
4040
|
[3, 3, 0, 0]
|
|
4041
4041
|
];
|
|
4042
4042
|
this.scale_bitcount_lsf = function(c, v) {
|
|
4043
|
-
var _, S, E, a, r, J, D,
|
|
4043
|
+
var _, S, E, a, r, J, D, K, Se = _e(4), De = v.scalefac;
|
|
4044
4044
|
for (v.preflag != 0 ? _ = 2 : _ = 0, D = 0; D < 4; D++)
|
|
4045
4045
|
Se[D] = 0;
|
|
4046
4046
|
if (v.block_type == i.SHORT_TYPE) {
|
|
4047
4047
|
S = 1;
|
|
4048
4048
|
var Ne = l.nr_of_sfb_block[_][S];
|
|
4049
|
-
for (
|
|
4050
|
-
for (a = Ne[E] / 3, D = 0; D < a; D++,
|
|
4049
|
+
for (K = 0, E = 0; E < 4; E++)
|
|
4050
|
+
for (a = Ne[E] / 3, D = 0; D < a; D++, K++)
|
|
4051
4051
|
for (r = 0; r < 3; r++)
|
|
4052
|
-
De[
|
|
4052
|
+
De[K * 3 + r] > Se[E] && (Se[E] = De[K * 3 + r]);
|
|
4053
4053
|
} else {
|
|
4054
4054
|
S = 0;
|
|
4055
4055
|
var Ne = l.nr_of_sfb_block[_][S];
|
|
4056
|
-
for (
|
|
4057
|
-
for (a = Ne[E], D = 0; D < a; D++,
|
|
4058
|
-
De[
|
|
4056
|
+
for (K = 0, E = 0; E < 4; E++)
|
|
4057
|
+
for (a = Ne[E], D = 0; D < a; D++, K++)
|
|
4058
|
+
De[K] > Se[E] && (Se[E] = De[K]);
|
|
4059
4059
|
}
|
|
4060
4060
|
for (J = !1, E = 0; E < 4; E++)
|
|
4061
4061
|
Se[E] > n[_][E] && (J = !0);
|
|
4062
4062
|
if (!J) {
|
|
4063
4063
|
var Je, nt, at, Tt;
|
|
4064
4064
|
for (v.sfb_partition_table = l.nr_of_sfb_block[_][S], E = 0; E < 4; E++)
|
|
4065
|
-
v.slen[E] =
|
|
4065
|
+
v.slen[E] = $[Se[E]];
|
|
4066
4066
|
switch (Je = v.slen[0], nt = v.slen[1], at = v.slen[2], Tt = v.slen[3], _) {
|
|
4067
4067
|
case 0:
|
|
4068
4068
|
v.scalefac_compress = (Je * 5 + nt << 4) + (at << 2) + Tt;
|
|
@@ -4080,7 +4080,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
4080
4080
|
v.part2_length += v.slen[E] * v.sfb_partition_table[E];
|
|
4081
4081
|
return J;
|
|
4082
4082
|
};
|
|
4083
|
-
var
|
|
4083
|
+
var $ = [
|
|
4084
4084
|
0,
|
|
4085
4085
|
1,
|
|
4086
4086
|
2,
|
|
@@ -4572,21 +4572,21 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
4572
4572
|
f.header[f.h_ptr].ptr = B;
|
|
4573
4573
|
}
|
|
4574
4574
|
function Re(f, p) {
|
|
4575
|
-
var u = f.internal_flags, B, n,
|
|
4575
|
+
var u = f.internal_flags, B, n, $;
|
|
4576
4576
|
if (B = u.l3_side, u.header[u.h_ptr].ptr = 0, xe.fill(u.header[u.h_ptr].buf, 0, u.sideinfo_len, 0), f.out_samplerate < 16e3 ? O(u, 4094, 12) : O(u, 4095, 12), O(u, f.version, 1), O(u, 1, 2), O(u, f.error_protection ? 0 : 1, 1), O(u, u.bitrate_index, 4), O(u, u.samplerate_index, 2), O(u, u.padding, 1), O(u, f.extension, 1), O(u, f.mode.ordinal(), 2), O(u, u.mode_ext, 2), O(u, f.copyright, 1), O(u, f.original, 1), O(u, f.emphasis, 2), f.error_protection && O(u, 0, 16), f.version == 1) {
|
|
4577
|
-
for (O(u, B.main_data_begin, 9), u.channels_out == 2 ? O(u, B.private_bits, 3) : O(u, B.private_bits, 5),
|
|
4577
|
+
for (O(u, B.main_data_begin, 9), u.channels_out == 2 ? O(u, B.private_bits, 3) : O(u, B.private_bits, 5), $ = 0; $ < u.channels_out; $++) {
|
|
4578
4578
|
var c;
|
|
4579
4579
|
for (c = 0; c < 4; c++)
|
|
4580
|
-
O(u, B.scfsi[
|
|
4580
|
+
O(u, B.scfsi[$][c], 1);
|
|
4581
4581
|
}
|
|
4582
4582
|
for (n = 0; n < 2; n++)
|
|
4583
|
-
for (
|
|
4584
|
-
var v = B.tt[n][
|
|
4583
|
+
for ($ = 0; $ < u.channels_out; $++) {
|
|
4584
|
+
var v = B.tt[n][$];
|
|
4585
4585
|
O(u, v.part2_3_length + v.part2_length, 12), O(u, v.big_values / 2, 9), O(u, v.global_gain, 8), O(u, v.scalefac_compress, 4), v.block_type != i.NORM_TYPE ? (O(u, 1, 1), O(u, v.block_type, 2), O(u, v.mixed_block_flag, 1), v.table_select[0] == 14 && (v.table_select[0] = 16), O(u, v.table_select[0], 5), v.table_select[1] == 14 && (v.table_select[1] = 16), O(u, v.table_select[1], 5), O(u, v.subblock_gain[0], 3), O(u, v.subblock_gain[1], 3), O(u, v.subblock_gain[2], 3)) : (O(u, 0, 1), v.table_select[0] == 14 && (v.table_select[0] = 16), O(u, v.table_select[0], 5), v.table_select[1] == 14 && (v.table_select[1] = 16), O(u, v.table_select[1], 5), v.table_select[2] == 14 && (v.table_select[2] = 16), O(u, v.table_select[2], 5), O(u, v.region0_count, 4), O(u, v.region1_count, 3)), O(u, v.preflag, 1), O(u, v.scalefac_scale, 1), O(u, v.count1table_select, 1);
|
|
4586
4586
|
}
|
|
4587
4587
|
} else
|
|
4588
|
-
for (O(u, B.main_data_begin, 8), O(u, B.private_bits, u.channels_out), n = 0,
|
|
4589
|
-
var v = B.tt[n][
|
|
4588
|
+
for (O(u, B.main_data_begin, 8), O(u, B.private_bits, u.channels_out), n = 0, $ = 0; $ < u.channels_out; $++) {
|
|
4589
|
+
var v = B.tt[n][$];
|
|
4590
4590
|
O(u, v.part2_3_length + v.part2_length, 12), O(u, v.big_values / 2, 9), O(u, v.global_gain, 8), O(u, v.scalefac_compress, 9), v.block_type != i.NORM_TYPE ? (O(u, 1, 1), O(u, v.block_type, 2), O(u, v.mixed_block_flag, 1), v.table_select[0] == 14 && (v.table_select[0] = 16), O(u, v.table_select[0], 5), v.table_select[1] == 14 && (v.table_select[1] = 16), O(u, v.table_select[1], 5), O(u, v.subblock_gain[0], 3), O(u, v.subblock_gain[1], 3), O(u, v.subblock_gain[2], 3)) : (O(u, 0, 1), v.table_select[0] == 14 && (v.table_select[0] = 16), O(u, v.table_select[0], 5), v.table_select[1] == 14 && (v.table_select[1] = 16), O(u, v.table_select[1], 5), v.table_select[2] == 14 && (v.table_select[2] = 16), O(u, v.table_select[2], 5), O(u, v.region0_count, 4), O(u, v.region1_count, 3)), O(u, v.scalefac_scale, 1), O(u, v.count1table_select, 1);
|
|
4591
4591
|
}
|
|
4592
4592
|
f.error_protection && b();
|
|
@@ -4596,23 +4596,23 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
4596
4596
|
}
|
|
4597
4597
|
}
|
|
4598
4598
|
function L(f, p) {
|
|
4599
|
-
var u = M.ht[p.count1table_select + 32], B, n = 0,
|
|
4599
|
+
var u = M.ht[p.count1table_select + 32], B, n = 0, $ = p.big_values, c = p.big_values;
|
|
4600
4600
|
for (B = (p.count1 - p.big_values) / 4; B > 0; --B) {
|
|
4601
4601
|
var v = 0, _ = 0, S;
|
|
4602
|
-
S = p.l3_enc[
|
|
4602
|
+
S = p.l3_enc[$ + 0], S != 0 && (_ += 8, p.xr[c + 0] < 0 && v++), S = p.l3_enc[$ + 1], S != 0 && (_ += 4, v *= 2, p.xr[c + 1] < 0 && v++), S = p.l3_enc[$ + 2], S != 0 && (_ += 2, v *= 2, p.xr[c + 2] < 0 && v++), S = p.l3_enc[$ + 3], S != 0 && (_++, v *= 2, p.xr[c + 3] < 0 && v++), $ += 4, c += 4, Y(f, v + u.table[_], u.hlen[_]), n += u.hlen[_];
|
|
4603
4603
|
}
|
|
4604
4604
|
return n;
|
|
4605
4605
|
}
|
|
4606
4606
|
function H(f, p, u, B, n) {
|
|
4607
|
-
var
|
|
4607
|
+
var $ = M.ht[p], c = 0;
|
|
4608
4608
|
if (p == 0)
|
|
4609
4609
|
return c;
|
|
4610
4610
|
for (var v = u; v < B; v += 2) {
|
|
4611
|
-
var _ = 0, S = 0, E =
|
|
4611
|
+
var _ = 0, S = 0, E = $.xlen, a = $.xlen, r = 0, J = n.l3_enc[v], D = n.l3_enc[v + 1];
|
|
4612
4612
|
if (J != 0 && (n.xr[v] < 0 && r++, _--), p > 15) {
|
|
4613
4613
|
if (J > 14) {
|
|
4614
|
-
var
|
|
4615
|
-
r |=
|
|
4614
|
+
var K = J - 15;
|
|
4615
|
+
r |= K << 1, S = E, J = 15;
|
|
4616
4616
|
}
|
|
4617
4617
|
if (D > 14) {
|
|
4618
4618
|
var Se = D - 15;
|
|
@@ -4620,7 +4620,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
4620
4620
|
}
|
|
4621
4621
|
a = 16;
|
|
4622
4622
|
}
|
|
4623
|
-
D != 0 && (r <<= 1, n.xr[v + 1] < 0 && r++, _--), J = J * a + D, S -= _, _ +=
|
|
4623
|
+
D != 0 && (r <<= 1, n.xr[v + 1] < 0 && r++, _--), J = J * a + D, S -= _, _ += $.hlen[J], Y(f, $.table[J], _), Y(f, r, S), c += _ + S;
|
|
4624
4624
|
}
|
|
4625
4625
|
return c;
|
|
4626
4626
|
}
|
|
@@ -4637,25 +4637,25 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
4637
4637
|
), B;
|
|
4638
4638
|
}
|
|
4639
4639
|
function o(f, p) {
|
|
4640
|
-
var u, B, n,
|
|
4640
|
+
var u, B, n, $;
|
|
4641
4641
|
u = p.big_values;
|
|
4642
4642
|
var c = p.region0_count + 1;
|
|
4643
|
-
return n = f.scalefac_band.l[c], c += p.region1_count + 1,
|
|
4643
|
+
return n = f.scalefac_band.l[c], c += p.region1_count + 1, $ = f.scalefac_band.l[c], n > u && (n = u), $ > u && ($ = u), B = H(f, p.table_select[0], 0, n, p), B += H(
|
|
4644
4644
|
f,
|
|
4645
4645
|
p.table_select[1],
|
|
4646
4646
|
n,
|
|
4647
|
-
|
|
4647
|
+
$,
|
|
4648
4648
|
p
|
|
4649
4649
|
), B += H(
|
|
4650
4650
|
f,
|
|
4651
4651
|
p.table_select[2],
|
|
4652
|
-
|
|
4652
|
+
$,
|
|
4653
4653
|
u,
|
|
4654
4654
|
p
|
|
4655
4655
|
), B;
|
|
4656
4656
|
}
|
|
4657
4657
|
function T(f) {
|
|
4658
|
-
var p, u, B, n,
|
|
4658
|
+
var p, u, B, n, $ = 0, c = f.internal_flags, v = c.l3_side;
|
|
4659
4659
|
if (f.version == 1)
|
|
4660
4660
|
for (p = 0; p < 2; p++)
|
|
4661
4661
|
for (u = 0; u < c.channels_out; u++) {
|
|
@@ -4664,48 +4664,48 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
4664
4664
|
_.scalefac[B] != -1 && (Y(c, _.scalefac[B], S), n += S);
|
|
4665
4665
|
for (; B < _.sfbmax; B++)
|
|
4666
4666
|
_.scalefac[B] != -1 && (Y(c, _.scalefac[B], E), n += E);
|
|
4667
|
-
_.block_type == i.SHORT_TYPE ? n += t(c, _) : n += o(c, _), n += L(c, _),
|
|
4667
|
+
_.block_type == i.SHORT_TYPE ? n += t(c, _) : n += o(c, _), n += L(c, _), $ += n;
|
|
4668
4668
|
}
|
|
4669
4669
|
else
|
|
4670
4670
|
for (p = 0, u = 0; u < c.channels_out; u++) {
|
|
4671
4671
|
var _ = v.tt[p][u], a, r, J = 0;
|
|
4672
4672
|
if (n = 0, B = 0, r = 0, _.block_type == i.SHORT_TYPE) {
|
|
4673
4673
|
for (; r < 4; r++) {
|
|
4674
|
-
var D = _.sfb_partition_table[r] / 3,
|
|
4674
|
+
var D = _.sfb_partition_table[r] / 3, K = _.slen[r];
|
|
4675
4675
|
for (a = 0; a < D; a++, B++)
|
|
4676
4676
|
Y(
|
|
4677
4677
|
c,
|
|
4678
4678
|
Math.max(_.scalefac[B * 3 + 0], 0),
|
|
4679
|
-
|
|
4679
|
+
K
|
|
4680
4680
|
), Y(
|
|
4681
4681
|
c,
|
|
4682
4682
|
Math.max(_.scalefac[B * 3 + 1], 0),
|
|
4683
|
-
|
|
4683
|
+
K
|
|
4684
4684
|
), Y(
|
|
4685
4685
|
c,
|
|
4686
4686
|
Math.max(_.scalefac[B * 3 + 2], 0),
|
|
4687
|
-
|
|
4688
|
-
), J += 3 *
|
|
4687
|
+
K
|
|
4688
|
+
), J += 3 * K;
|
|
4689
4689
|
}
|
|
4690
4690
|
n += t(c, _);
|
|
4691
4691
|
} else {
|
|
4692
4692
|
for (; r < 4; r++) {
|
|
4693
|
-
var D = _.sfb_partition_table[r],
|
|
4693
|
+
var D = _.sfb_partition_table[r], K = _.slen[r];
|
|
4694
4694
|
for (a = 0; a < D; a++, B++)
|
|
4695
|
-
Y(c, Math.max(_.scalefac[B], 0),
|
|
4695
|
+
Y(c, Math.max(_.scalefac[B], 0), K), J += K;
|
|
4696
4696
|
}
|
|
4697
4697
|
n += o(c, _);
|
|
4698
4698
|
}
|
|
4699
|
-
n += L(c, _),
|
|
4699
|
+
n += L(c, _), $ += J + n;
|
|
4700
4700
|
}
|
|
4701
|
-
return
|
|
4701
|
+
return $;
|
|
4702
4702
|
}
|
|
4703
4703
|
function U() {
|
|
4704
4704
|
this.total = 0;
|
|
4705
4705
|
}
|
|
4706
4706
|
function y(f, p) {
|
|
4707
|
-
var u = f.internal_flags, B, n,
|
|
4708
|
-
return u.w_ptr,
|
|
4707
|
+
var u = f.internal_flags, B, n, $;
|
|
4708
|
+
return u.w_ptr, $ = u.h_ptr - 1, $ == -1 && ($ = ne.MAX_HEADER_BUF - 1), B = u.header[$].write_timing - pe, p.total = B, B >= 0 && b(), n = l.getframebits(f), B += n, p.total += n, p.total % 8 != 0 ? p.total = 1 + p.total / 8 : p.total = p.total / 8, p.total += m + 1, B;
|
|
4709
4709
|
}
|
|
4710
4710
|
this.flush_bitstream = function(f) {
|
|
4711
4711
|
var p = f.internal_flags, u, B;
|
|
@@ -4717,23 +4717,23 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
4717
4717
|
ue(f, u.resvDrain_pre), Re(f, B);
|
|
4718
4718
|
var n = 8 * p.sideinfo_len;
|
|
4719
4719
|
if (n += T(f), ue(f, u.resvDrain_post), n += u.resvDrain_post, u.main_data_begin += (B - n) / 8, y(f, new U()) != p.ResvSize, u.main_data_begin * 8 != p.ResvSize && (p.ResvSize = u.main_data_begin * 8), pe > 1e9) {
|
|
4720
|
-
var
|
|
4721
|
-
for (
|
|
4722
|
-
p.header[
|
|
4720
|
+
var $;
|
|
4721
|
+
for ($ = 0; $ < ne.MAX_HEADER_BUF; ++$)
|
|
4722
|
+
p.header[$].write_timing -= pe;
|
|
4723
4723
|
pe = 0;
|
|
4724
4724
|
}
|
|
4725
4725
|
return 0;
|
|
4726
4726
|
}, this.copy_buffer = function(f, p, u, B, n) {
|
|
4727
|
-
var
|
|
4728
|
-
if (
|
|
4727
|
+
var $ = m + 1;
|
|
4728
|
+
if ($ <= 0)
|
|
4729
4729
|
return 0;
|
|
4730
|
-
if (B != 0 &&
|
|
4730
|
+
if (B != 0 && $ > B)
|
|
4731
4731
|
return -1;
|
|
4732
|
-
if (q.arraycopy(g, 0, p, u,
|
|
4732
|
+
if (q.arraycopy(g, 0, p, u, $), m = -1, P = 0, n != 0) {
|
|
4733
4733
|
var c = _e(1);
|
|
4734
|
-
c[0] = f.nMusicCRC, G.updateMusicCRC(c, p, u,
|
|
4734
|
+
c[0] = f.nMusicCRC, G.updateMusicCRC(c, p, u, $), f.nMusicCRC = c[0], $ > 0 && (f.VBR_seek_table.nBytesWritten += $), f.decode_on_the_fly && b();
|
|
4735
4735
|
}
|
|
4736
|
-
return
|
|
4736
|
+
return $;
|
|
4737
4737
|
}, this.init_bit_stream_w = function(f) {
|
|
4738
4738
|
g = le(ge.LAME_MAXMP3BUFFER), f.h_ptr = f.w_ptr = 0, f.header[f.h_ptr].write_timing = 0, m = -1, P = 0, pe = 0;
|
|
4739
4739
|
};
|
|
@@ -8635,11 +8635,11 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
8635
8635
|
return p -= ue, p = Math.pow(10, p / 10 + y.ATHlower), p;
|
|
8636
8636
|
}
|
|
8637
8637
|
function T(y) {
|
|
8638
|
-
for (var f = y.internal_flags.ATH.l, p = y.internal_flags.ATH.psfb21, u = y.internal_flags.ATH.s, B = y.internal_flags.ATH.psfb12, n = y.internal_flags,
|
|
8638
|
+
for (var f = y.internal_flags.ATH.l, p = y.internal_flags.ATH.psfb21, u = y.internal_flags.ATH.s, B = y.internal_flags.ATH.psfb12, n = y.internal_flags, $ = y.out_samplerate, c = 0; c < i.SBMAX_l; c++) {
|
|
8639
8639
|
var v = n.scalefac_band.l[c], _ = n.scalefac_band.l[c + 1];
|
|
8640
8640
|
f[c] = Ae.MAX_VALUE;
|
|
8641
8641
|
for (var S = v; S < _; S++) {
|
|
8642
|
-
var E = S *
|
|
8642
|
+
var E = S * $ / 1152, a = o(y, E);
|
|
8643
8643
|
f[c] = Math.min(f[c], a);
|
|
8644
8644
|
}
|
|
8645
8645
|
}
|
|
@@ -8647,7 +8647,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
8647
8647
|
var v = n.scalefac_band.psfb21[c], _ = n.scalefac_band.psfb21[c + 1];
|
|
8648
8648
|
p[c] = Ae.MAX_VALUE;
|
|
8649
8649
|
for (var S = v; S < _; S++) {
|
|
8650
|
-
var E = S *
|
|
8650
|
+
var E = S * $ / 1152, a = o(y, E);
|
|
8651
8651
|
p[c] = Math.min(p[c], a);
|
|
8652
8652
|
}
|
|
8653
8653
|
}
|
|
@@ -8655,7 +8655,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
8655
8655
|
var v = n.scalefac_band.s[c], _ = n.scalefac_band.s[c + 1];
|
|
8656
8656
|
u[c] = Ae.MAX_VALUE;
|
|
8657
8657
|
for (var S = v; S < _; S++) {
|
|
8658
|
-
var E = S *
|
|
8658
|
+
var E = S * $ / 384, a = o(y, E);
|
|
8659
8659
|
u[c] = Math.min(u[c], a);
|
|
8660
8660
|
}
|
|
8661
8661
|
u[c] *= n.scalefac_band.s[c + 1] - n.scalefac_band.s[c];
|
|
@@ -8664,7 +8664,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
8664
8664
|
var v = n.scalefac_band.psfb12[c], _ = n.scalefac_band.psfb12[c + 1];
|
|
8665
8665
|
B[c] = Ae.MAX_VALUE;
|
|
8666
8666
|
for (var S = v; S < _; S++) {
|
|
8667
|
-
var E = S *
|
|
8667
|
+
var E = S * $ / 384, a = o(y, E);
|
|
8668
8668
|
B[c] = Math.min(B[c], a);
|
|
8669
8669
|
}
|
|
8670
8670
|
B[c] *= n.scalefac_band.s[13] - n.scalefac_band.s[12];
|
|
@@ -8687,73 +8687,73 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
8687
8687
|
Re[u] = Math.pow(2, (u - 210 - Y) * 0.25);
|
|
8688
8688
|
l.huffman_init(f);
|
|
8689
8689
|
{
|
|
8690
|
-
var B, n,
|
|
8691
|
-
for (u = y.exp_nspsytune >> 2 & 63, u >= 32 && (u -= 64), B = Math.pow(10, u / 4 / 10), u = y.exp_nspsytune >> 8 & 63, u >= 32 && (u -= 64), n = Math.pow(10, u / 4 / 10), u = y.exp_nspsytune >> 14 & 63, u >= 32 && (u -= 64),
|
|
8690
|
+
var B, n, $, c;
|
|
8691
|
+
for (u = y.exp_nspsytune >> 2 & 63, u >= 32 && (u -= 64), B = Math.pow(10, u / 4 / 10), u = y.exp_nspsytune >> 8 & 63, u >= 32 && (u -= 64), n = Math.pow(10, u / 4 / 10), u = y.exp_nspsytune >> 14 & 63, u >= 32 && (u -= 64), $ = Math.pow(10, u / 4 / 10), u = y.exp_nspsytune >> 20 & 63, u >= 32 && (u -= 64), c = $ * Math.pow(10, u / 4 / 10), u = 0; u < i.SBMAX_l; u++) {
|
|
8692
8692
|
var v;
|
|
8693
|
-
u <= 6 ? v = B : u <= 13 ? v = n : u <= 20 ? v =
|
|
8693
|
+
u <= 6 ? v = B : u <= 13 ? v = n : u <= 20 ? v = $ : v = c, f.nsPsy.longfact[u] = v;
|
|
8694
8694
|
}
|
|
8695
8695
|
for (u = 0; u < i.SBMAX_s; u++) {
|
|
8696
8696
|
var v;
|
|
8697
|
-
u <= 5 ? v = B : u <= 10 ? v = n : u <= 11 ? v =
|
|
8697
|
+
u <= 5 ? v = B : u <= 10 ? v = n : u <= 11 ? v = $ : v = c, f.nsPsy.shortfact[u] = v;
|
|
8698
8698
|
}
|
|
8699
8699
|
}
|
|
8700
8700
|
}
|
|
8701
8701
|
}, this.on_pe = function(y, f, p, u, B, n) {
|
|
8702
|
-
var
|
|
8702
|
+
var $ = y.internal_flags, c = 0, v, _ = _e(2), S, E = new Ie(c), a = k.ResvMaxBits(y, u, E, n);
|
|
8703
8703
|
c = E.bits;
|
|
8704
8704
|
var r = c + a;
|
|
8705
|
-
for (r > ne.MAX_BITS_PER_GRANULE && (r = ne.MAX_BITS_PER_GRANULE), v = 0, S = 0; S <
|
|
8705
|
+
for (r > ne.MAX_BITS_PER_GRANULE && (r = ne.MAX_BITS_PER_GRANULE), v = 0, S = 0; S < $.channels_out; ++S)
|
|
8706
8706
|
p[S] = Math.min(
|
|
8707
8707
|
ne.MAX_BITS_PER_CHANNEL,
|
|
8708
|
-
c /
|
|
8708
|
+
c / $.channels_out
|
|
8709
8709
|
), _[S] = 0 | p[S] * f[B][S] / 700 - p[S], _[S] > u * 3 / 4 && (_[S] = u * 3 / 4), _[S] < 0 && (_[S] = 0), _[S] + p[S] > ne.MAX_BITS_PER_CHANNEL && (_[S] = Math.max(
|
|
8710
8710
|
0,
|
|
8711
8711
|
ne.MAX_BITS_PER_CHANNEL - p[S]
|
|
8712
8712
|
)), v += _[S];
|
|
8713
8713
|
if (v > a)
|
|
8714
|
-
for (S = 0; S <
|
|
8714
|
+
for (S = 0; S < $.channels_out; ++S)
|
|
8715
8715
|
_[S] = a * _[S] / v;
|
|
8716
|
-
for (S = 0; S <
|
|
8716
|
+
for (S = 0; S < $.channels_out; ++S)
|
|
8717
8717
|
p[S] += _[S], a -= _[S];
|
|
8718
|
-
for (v = 0, S = 0; S <
|
|
8718
|
+
for (v = 0, S = 0; S < $.channels_out; ++S)
|
|
8719
8719
|
v += p[S];
|
|
8720
8720
|
return v > ne.MAX_BITS_PER_GRANULE && b(), r;
|
|
8721
8721
|
}, this.athAdjust = function(y, f, p) {
|
|
8722
|
-
var u = 90.30873362, B = 94.82444863, n = I.FAST_LOG10_X(f, 10),
|
|
8723
|
-
return n -= p,
|
|
8722
|
+
var u = 90.30873362, B = 94.82444863, n = I.FAST_LOG10_X(f, 10), $ = y * y, c = 0;
|
|
8723
|
+
return n -= p, $ > 1e-20 && (c = 1 + I.FAST_LOG10_X($, 10 / u)), c < 0 && (c = 0), n *= c, n += p + u - B, Math.pow(10, 0.1 * n);
|
|
8724
8724
|
}, this.calc_xmin = function(y, f, p, u) {
|
|
8725
|
-
var B = 0, n = y.internal_flags,
|
|
8726
|
-
for ((y.VBR == R.vbr_mtrh || y.VBR == R.vbr_mt) && (a = 1),
|
|
8727
|
-
var r, J, D,
|
|
8728
|
-
y.VBR == R.vbr_rh || y.VBR == R.vbr_mtrh ? J = athAdjust(_.adjust, _.l[
|
|
8725
|
+
var B = 0, n = y.internal_flags, $, c = 0, v = 0, _ = n.ATH, S = p.xr, E = y.VBR == R.vbr_mtrh ? 1 : 0, a = n.masking_lower;
|
|
8726
|
+
for ((y.VBR == R.vbr_mtrh || y.VBR == R.vbr_mt) && (a = 1), $ = 0; $ < p.psy_lmax; $++) {
|
|
8727
|
+
var r, J, D, K, Se, De;
|
|
8728
|
+
y.VBR == R.vbr_rh || y.VBR == R.vbr_mtrh ? J = athAdjust(_.adjust, _.l[$], _.floor) : J = _.adjust * _.l[$], Se = p.width[$], D = J / Se, K = pe, De = Se >> 1, r = 0;
|
|
8729
8729
|
do {
|
|
8730
8730
|
var Ne, Je;
|
|
8731
|
-
Ne = S[c] * S[c], r += Ne,
|
|
8731
|
+
Ne = S[c] * S[c], r += Ne, K += Ne < D ? Ne : D, c++, Je = S[c] * S[c], r += Je, K += Je < D ? Je : D, c++;
|
|
8732
8732
|
} while (--De > 0);
|
|
8733
|
-
if (r > J && v++,
|
|
8734
|
-
var nt = f.en.l[
|
|
8733
|
+
if (r > J && v++, $ == i.SBPSY_l && b(), E != 0 && (J = K), !y.ATHonly) {
|
|
8734
|
+
var nt = f.en.l[$];
|
|
8735
8735
|
if (nt > 0) {
|
|
8736
8736
|
var at;
|
|
8737
|
-
at = r * f.thm.l[
|
|
8737
|
+
at = r * f.thm.l[$] * a / nt, E != 0 && (at *= n.nsPsy.longfact[$]), J < at && (J = at);
|
|
8738
8738
|
}
|
|
8739
8739
|
}
|
|
8740
|
-
E != 0 ? u[B++] = J : u[B++] = J * n.nsPsy.longfact[
|
|
8740
|
+
E != 0 ? u[B++] = J : u[B++] = J * n.nsPsy.longfact[$];
|
|
8741
8741
|
}
|
|
8742
8742
|
var Tt = 575;
|
|
8743
8743
|
if (p.block_type != i.SHORT_TYPE)
|
|
8744
8744
|
for (var Rt = 576; Rt-- != 0 && et.EQ(S[Rt], 0); )
|
|
8745
8745
|
Tt = Rt;
|
|
8746
8746
|
p.max_nonzero_coeff = Tt;
|
|
8747
|
-
for (var wt = p.sfb_smin;
|
|
8747
|
+
for (var wt = p.sfb_smin; $ < p.psymax; wt++, $ += 3) {
|
|
8748
8748
|
var Se, St, Et;
|
|
8749
|
-
for (y.VBR == R.vbr_rh || y.VBR == R.vbr_mtrh ? Et = athAdjust(_.adjust, _.s[wt], _.floor) : Et = _.adjust * _.s[wt], Se = p.width[
|
|
8750
|
-
var r = 0, J, D,
|
|
8751
|
-
D = Et / Se,
|
|
8749
|
+
for (y.VBR == R.vbr_rh || y.VBR == R.vbr_mtrh ? Et = athAdjust(_.adjust, _.s[wt], _.floor) : Et = _.adjust * _.s[wt], Se = p.width[$], St = 0; St < 3; St++) {
|
|
8750
|
+
var r = 0, J, D, K, De = Se >> 1;
|
|
8751
|
+
D = Et / Se, K = pe;
|
|
8752
8752
|
do {
|
|
8753
8753
|
var Ne, Je;
|
|
8754
|
-
Ne = S[c] * S[c], r += Ne,
|
|
8754
|
+
Ne = S[c] * S[c], r += Ne, K += Ne < D ? Ne : D, c++, Je = S[c] * S[c], r += Je, K += Je < D ? Je : D, c++;
|
|
8755
8755
|
} while (--De > 0);
|
|
8756
|
-
if (r > Et && v++, wt == i.SBPSY_s && b(), E != 0 ? J =
|
|
8756
|
+
if (r > Et && v++, wt == i.SBPSY_s && b(), E != 0 ? J = K : J = Et, !y.ATHonly && !y.ATHshort) {
|
|
8757
8757
|
var nt = f.en.s[wt][St];
|
|
8758
8758
|
if (nt > 0) {
|
|
8759
8759
|
var at;
|
|
@@ -8770,7 +8770,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
8770
8770
|
this.s = y;
|
|
8771
8771
|
}
|
|
8772
8772
|
this.calc_noise_core = function(y, f, p, u) {
|
|
8773
|
-
var B = 0, n = f.s,
|
|
8773
|
+
var B = 0, n = f.s, $ = y.l3_enc;
|
|
8774
8774
|
if (n > y.count1)
|
|
8775
8775
|
for (; p-- != 0; ) {
|
|
8776
8776
|
var c;
|
|
@@ -8780,28 +8780,28 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
8780
8780
|
var v = N(2);
|
|
8781
8781
|
for (v[0] = 0, v[1] = u; p-- != 0; ) {
|
|
8782
8782
|
var c;
|
|
8783
|
-
c = Math.abs(y.xr[n]) - v[
|
|
8783
|
+
c = Math.abs(y.xr[n]) - v[$[n]], n++, B += c * c, c = Math.abs(y.xr[n]) - v[$[n]], n++, B += c * c;
|
|
8784
8784
|
}
|
|
8785
8785
|
} else
|
|
8786
8786
|
for (; p-- != 0; ) {
|
|
8787
8787
|
var c;
|
|
8788
|
-
c = Math.abs(y.xr[n]) - H[
|
|
8788
|
+
c = Math.abs(y.xr[n]) - H[$[n]] * u, n++, B += c * c, c = Math.abs(y.xr[n]) - H[$[n]] * u, n++, B += c * c;
|
|
8789
8789
|
}
|
|
8790
8790
|
return f.s = n, B;
|
|
8791
8791
|
}, this.calc_noise = function(y, f, p, u, B) {
|
|
8792
|
-
var n = 0,
|
|
8792
|
+
var n = 0, $ = 0, c, v, _ = 0, S = 0, E = 0, a = -20, r = 0, J = y.scalefac, D = 0;
|
|
8793
8793
|
for (u.over_SSD = 0, c = 0; c < y.psymax; c++) {
|
|
8794
|
-
var
|
|
8795
|
-
if (B != null && B.step[c] ==
|
|
8796
|
-
Se = B.noise[c], r += y.width[c], p[n++] = Se / f[
|
|
8794
|
+
var K = y.global_gain - (J[D++] + (y.preflag != 0 ? O[c] : 0) << y.scalefac_scale + 1) - y.subblock_gain[y.window[c]] * 8, Se = 0;
|
|
8795
|
+
if (B != null && B.step[c] == K)
|
|
8796
|
+
Se = B.noise[c], r += y.width[c], p[n++] = Se / f[$++], Se = B.noise_log[c];
|
|
8797
8797
|
else {
|
|
8798
|
-
var De = g(
|
|
8798
|
+
var De = g(K);
|
|
8799
8799
|
if (v = y.width[c] >> 1, r + y.width[c] > y.max_nonzero_coeff) {
|
|
8800
8800
|
var Ne;
|
|
8801
8801
|
Ne = y.max_nonzero_coeff - r + 1, Ne > 0 ? v = Ne >> 1 : v = 0;
|
|
8802
8802
|
}
|
|
8803
8803
|
var Je = new U(r);
|
|
8804
|
-
Se = this.calc_noise_core(y, Je, v, De), r = Je.s, B != null && (B.step[c] =
|
|
8804
|
+
Se = this.calc_noise_core(y, Je, v, De), r = Je.s, B != null && (B.step[c] = K, B.noise[c] = Se), Se = p[n++] = Se / f[$++], Se = I.FAST_LOG10(Math.max(Se, 1e-20)), B != null && (B.noise_log[c] = Se);
|
|
8805
8805
|
}
|
|
8806
8806
|
if (B != null && (B.global_gain = y.global_gain), E += Se, Se > 0) {
|
|
8807
8807
|
var nt;
|
|
@@ -8876,9 +8876,9 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
8876
8876
|
}
|
|
8877
8877
|
}
|
|
8878
8878
|
else
|
|
8879
|
-
for (var
|
|
8879
|
+
for (var $ = 0; $ < 3; $++)
|
|
8880
8880
|
for (var y = !1, f = i.PSFB12 - 1; f >= 0 && !y; f--) {
|
|
8881
|
-
var p = t.scalefac_band.s[12] * 3 + (t.scalefac_band.s[13] - t.scalefac_band.s[12]) *
|
|
8881
|
+
var p = t.scalefac_band.s[12] * 3 + (t.scalefac_band.s[13] - t.scalefac_band.s[12]) * $ + (t.scalefac_band.psfb12[f] - t.scalefac_band.psfb12[0]), u = p + (t.scalefac_band.psfb12[f + 1] - t.scalefac_band.psfb12[f]), c = k.athAdjust(
|
|
8882
8882
|
T.adjust,
|
|
8883
8883
|
T.psfb12[f],
|
|
8884
8884
|
T.floor
|
|
@@ -8918,10 +8918,10 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
8918
8918
|
function me(t, o, T, U, y) {
|
|
8919
8919
|
var f, p = t.CurrentStep[U], u = !1, B = t.OldValue[U], n = P.BINSEARCH_NONE;
|
|
8920
8920
|
for (o.global_gain = B, T -= o.part2_length; ; ) {
|
|
8921
|
-
var
|
|
8921
|
+
var $;
|
|
8922
8922
|
if (f = g.count_bits(t, y, o, null), p == 1 || f == T)
|
|
8923
8923
|
break;
|
|
8924
|
-
f > T ? (n == P.BINSEARCH_DOWN && (u = !0), u && (p /= 2), n = P.BINSEARCH_UP,
|
|
8924
|
+
f > T ? (n == P.BINSEARCH_DOWN && (u = !0), u && (p /= 2), n = P.BINSEARCH_UP, $ = p) : (n == P.BINSEARCH_UP && (u = !0), u && (p /= 2), n = P.BINSEARCH_DOWN, $ = -p), o.global_gain += $, o.global_gain < 0 && b(), o.global_gain > 255 && b();
|
|
8925
8925
|
}
|
|
8926
8926
|
for (; f > T && o.global_gain < 255; )
|
|
8927
8927
|
o.global_gain++, f = g.count_bits(t, y, o, null);
|
|
@@ -8987,11 +8987,11 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
8987
8987
|
u > 1 ? u = 1 : u *= 0.95;
|
|
8988
8988
|
break;
|
|
8989
8989
|
}
|
|
8990
|
-
for (var
|
|
8990
|
+
for (var $ = 0, B = 0; B < o.sfbmax; B++) {
|
|
8991
8991
|
var c = o.width[B], v;
|
|
8992
|
-
if (
|
|
8992
|
+
if ($ += c, !(T[B] < u)) {
|
|
8993
8993
|
for (f.substep_shaping & 2 && b(), o.scalefac[B]++, v = -c; v < 0; v++)
|
|
8994
|
-
U[
|
|
8994
|
+
U[$ + v] *= p, U[$ + v] > o.xrpow_max && (o.xrpow_max = U[$ + v]);
|
|
8995
8995
|
if (f.noise_shaping_amp == 2)
|
|
8996
8996
|
return;
|
|
8997
8997
|
}
|
|
@@ -9026,9 +9026,9 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9026
9026
|
o.subblock_gain[f]++;
|
|
9027
9027
|
var B = t.scalefac_band.l[o.sfb_lmax];
|
|
9028
9028
|
for (U = o.sfb_lmax + f; U < o.sfbmax; U += 3) {
|
|
9029
|
-
var n,
|
|
9029
|
+
var n, $ = o.width[U], c = y[U];
|
|
9030
9030
|
if (c = c - (4 >> o.scalefac_scale), c >= 0) {
|
|
9031
|
-
y[U] = c, B +=
|
|
9031
|
+
y[U] = c, B += $ * 3;
|
|
9032
9032
|
continue;
|
|
9033
9033
|
}
|
|
9034
9034
|
y[U] = 0;
|
|
@@ -9036,10 +9036,10 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9036
9036
|
var v = 210 + (c << o.scalefac_scale + 1);
|
|
9037
9037
|
n = k.IPOW20(v);
|
|
9038
9038
|
}
|
|
9039
|
-
B +=
|
|
9040
|
-
for (var _ =
|
|
9039
|
+
B += $ * (f + 1);
|
|
9040
|
+
for (var _ = -$; _ < 0; _++)
|
|
9041
9041
|
T[B + _] *= n, T[B + _] > o.xrpow_max && (o.xrpow_max = T[B + _]);
|
|
9042
|
-
B +=
|
|
9042
|
+
B += $ * (3 - f - 1);
|
|
9043
9043
|
}
|
|
9044
9044
|
{
|
|
9045
9045
|
var n = k.IPOW20(202);
|
|
@@ -9058,23 +9058,23 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9058
9058
|
return p ? !1 : (f.mode_gr == 2 ? p = g.scale_bitcount(o) : p = g.scale_bitcount_lsf(f, o), p ? (f.noise_shaping > 1 && (xe.fill(f.pseudohalf, 0), o.scalefac_scale == 0 ? (Re(o, U), p = !1) : o.block_type == i.SHORT_TYPE && f.subblock_gain > 0 && (p = L(f, o, U) || Y(o))), p || (f.mode_gr == 2 ? p = g.scale_bitcount(o) : p = g.scale_bitcount_lsf(f, o)), !p) : !0);
|
|
9059
9059
|
}
|
|
9060
9060
|
this.outer_loop = function(t, o, T, U, y, f) {
|
|
9061
|
-
var p = t.internal_flags, u = new d(), B = N(576), n = N(h.SFBMAX),
|
|
9061
|
+
var p = t.internal_flags, u = new d(), B = N(576), n = N(h.SFBMAX), $ = new He(), c, v = new s(), _ = 9999999, S = !1, E = !1, a = 0;
|
|
9062
9062
|
if (me(p, o, f, y, U), p.noise_shaping == 0)
|
|
9063
9063
|
return 100;
|
|
9064
9064
|
k.calc_noise(
|
|
9065
9065
|
o,
|
|
9066
9066
|
T,
|
|
9067
9067
|
n,
|
|
9068
|
-
|
|
9068
|
+
$,
|
|
9069
9069
|
v
|
|
9070
|
-
),
|
|
9070
|
+
), $.bits = o.part2_3_length, u.assign(o);
|
|
9071
9071
|
var r = 0;
|
|
9072
9072
|
for (q.arraycopy(U, 0, B, 0, 576); !S; ) {
|
|
9073
9073
|
do {
|
|
9074
|
-
var J = new He(), D,
|
|
9074
|
+
var J = new He(), D, K = 255;
|
|
9075
9075
|
if (p.substep_shaping & 2 ? D = 20 : D = 3, p.sfb21_extra && b(), !H(t, u, n, U))
|
|
9076
9076
|
break;
|
|
9077
|
-
u.scalefac_scale != 0 && (
|
|
9077
|
+
u.scalefac_scale != 0 && (K = 254);
|
|
9078
9078
|
var Se = f - u.part2_length;
|
|
9079
9079
|
if (Se <= 0)
|
|
9080
9080
|
break;
|
|
@@ -9083,19 +9083,19 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9083
9083
|
U,
|
|
9084
9084
|
u,
|
|
9085
9085
|
v
|
|
9086
|
-
)) > Se && u.global_gain <=
|
|
9086
|
+
)) > Se && u.global_gain <= K; )
|
|
9087
9087
|
u.global_gain++;
|
|
9088
|
-
if (u.global_gain >
|
|
9088
|
+
if (u.global_gain > K)
|
|
9089
9089
|
break;
|
|
9090
|
-
if (
|
|
9090
|
+
if ($.over_count == 0) {
|
|
9091
9091
|
for (; (u.part2_3_length = g.count_bits(
|
|
9092
9092
|
p,
|
|
9093
9093
|
U,
|
|
9094
9094
|
u,
|
|
9095
9095
|
v
|
|
9096
|
-
)) > _ && u.global_gain <=
|
|
9096
|
+
)) > _ && u.global_gain <= K; )
|
|
9097
9097
|
u.global_gain++;
|
|
9098
|
-
if (u.global_gain >
|
|
9098
|
+
if (u.global_gain > K)
|
|
9099
9099
|
break;
|
|
9100
9100
|
}
|
|
9101
9101
|
if (k.calc_noise(
|
|
@@ -9104,14 +9104,14 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9104
9104
|
n,
|
|
9105
9105
|
J,
|
|
9106
9106
|
v
|
|
9107
|
-
), J.bits = u.part2_3_length, o.block_type != i.SHORT_TYPE ? c = t.quant_comp : c = t.quant_comp_short, c = ue(c,
|
|
9108
|
-
_ = o.part2_3_length,
|
|
9109
|
-
else if (p.full_outer_loop == 0 && (++r > D &&
|
|
9107
|
+
), J.bits = u.part2_3_length, o.block_type != i.SHORT_TYPE ? c = t.quant_comp : c = t.quant_comp_short, c = ue(c, $, J) ? 1 : 0, c != 0)
|
|
9108
|
+
_ = o.part2_3_length, $ = J, o.assign(u), r = 0, q.arraycopy(U, 0, B, 0, 576);
|
|
9109
|
+
else if (p.full_outer_loop == 0 && (++r > D && $.over_count == 0 || p.noise_shaping_amp == 3 && E && r > 30 || p.noise_shaping_amp == 3 && E && u.global_gain - a > 15))
|
|
9110
9110
|
break;
|
|
9111
9111
|
} while (u.global_gain + u.scalefac_scale < 255);
|
|
9112
9112
|
p.noise_shaping_amp == 3 ? b() : S = !0;
|
|
9113
9113
|
}
|
|
9114
|
-
return t.VBR == R.vbr_rh || t.VBR == R.vbr_mtrh ? q.arraycopy(B, 0, U, 0, 576) : p.substep_shaping & 1 && b(),
|
|
9114
|
+
return t.VBR == R.vbr_rh || t.VBR == R.vbr_mtrh ? q.arraycopy(B, 0, U, 0, 576) : p.substep_shaping & 1 && b(), $.over_count;
|
|
9115
9115
|
}, this.iteration_finish_one = function(t, o, T) {
|
|
9116
9116
|
var U = t.l3_side, y = U.tt[o][T];
|
|
9117
9117
|
g.best_scalefac_store(t, o, T, U), t.use_best_huffman == 1 && g.best_huffman_divide(t, y), l.ResvAdjust(t, y);
|
|
@@ -9633,8 +9633,8 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9633
9633
|
function Re(L, H, t) {
|
|
9634
9634
|
var o, T;
|
|
9635
9635
|
{
|
|
9636
|
-
var U, y, f, p, u, B, n,
|
|
9637
|
-
U = t[17] - t[9], f = t[15] - t[11], p = t[14] - t[12], u = t[0] + t[8], B = t[1] + t[7], n = t[2] + t[6],
|
|
9636
|
+
var U, y, f, p, u, B, n, $;
|
|
9637
|
+
U = t[17] - t[9], f = t[15] - t[11], p = t[14] - t[12], u = t[0] + t[8], B = t[1] + t[7], n = t[2] + t[6], $ = t[3] + t[5], L[H + 17] = u + n - $ - (B - t[4]), T = (u + n - $) * m[19] + (B - t[4]), o = (U - f - p) * m[18], L[H + 5] = o + T, L[H + 6] = o - T, y = (t[16] - t[10]) * m[18], B = B * m[19] + t[4], o = U * m[12] + y + f * m[13] + p * m[14], T = -u * m[16] + B - n * m[17] + $ * m[15], L[H + 1] = o + T, L[H + 2] = o - T, o = U * m[13] - y - f * m[14] + p * m[12], T = -u * m[17] + B - n * m[15] + $ * m[16], L[H + 9] = o + T, L[H + 10] = o - T, o = U * m[14] - y + f * m[12] - p * m[13], T = u * m[15] - B + n * m[16] - $ * m[17], L[H + 13] = o + T, L[H + 14] = o - T;
|
|
9638
9638
|
}
|
|
9639
9639
|
{
|
|
9640
9640
|
var c, v, _, S, E, a, r, J;
|
|
@@ -9644,9 +9644,9 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9644
9644
|
this.mdct_sub48 = function(L, H, t) {
|
|
9645
9645
|
for (var o = H, T = 286, U = 0; U < L.channels_out; U++) {
|
|
9646
9646
|
for (var y = 0; y < L.mode_gr; y++) {
|
|
9647
|
-
for (var f, p = L.l3_side.tt[y][U], u = p.xr, B = 0, n = L.sb_sample[U][1 - y],
|
|
9648
|
-
for (ue(o, T, n[
|
|
9649
|
-
n[
|
|
9647
|
+
for (var f, p = L.l3_side.tt[y][U], u = p.xr, B = 0, n = L.sb_sample[U][1 - y], $ = 0, c = 0; c < 18 / 2; c++)
|
|
9648
|
+
for (ue(o, T, n[$]), ue(o, T + 32, n[$ + 1]), $ += 2, T += 64, f = 1; f < 32; f += 2)
|
|
9649
|
+
n[$ - 1][f] *= -1;
|
|
9650
9650
|
for (f = 0; f < 32; f++, B += 18) {
|
|
9651
9651
|
var v = p.block_type, _ = L.sb_sample[U][y], S = L.sb_sample[U][1 - y];
|
|
9652
9652
|
if (p.mixed_block_flag != 0 && f < 2 && (v = 0), L.amp_filter[f] < 1e-12)
|
|
@@ -9671,8 +9671,8 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9671
9671
|
}
|
|
9672
9672
|
if (v != i.SHORT_TYPE && f != 0)
|
|
9673
9673
|
for (var c = 7; c >= 0; --c) {
|
|
9674
|
-
var D,
|
|
9675
|
-
D = u[B + c] * P[20 + c] + u[B + -1 - c] * me[28 + c],
|
|
9674
|
+
var D, K;
|
|
9675
|
+
D = u[B + c] * P[20 + c] + u[B + -1 - c] * me[28 + c], K = u[B + c] * me[28 + c] - u[B + -1 - c] * P[20 + c], u[B + -1 - c] = D, u[B + c] = K;
|
|
9676
9676
|
}
|
|
9677
9677
|
}
|
|
9678
9678
|
}
|
|
@@ -9689,7 +9689,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9689
9689
|
};
|
|
9690
9690
|
}
|
|
9691
9691
|
function x() {
|
|
9692
|
-
this.thm = new
|
|
9692
|
+
this.thm = new W(), this.en = new W();
|
|
9693
9693
|
}
|
|
9694
9694
|
i.ENCDELAY = 576, i.POSTDELAY = 1152, i.MDCTDELAY = 48, i.FFTOFFSET = 224 + i.MDCTDELAY, i.DECDELAY = 528, i.SBLIMIT = 32, i.CBANDS = 64, i.SBPSY_l = 21, i.SBPSY_s = 12, i.SBMAX_l = 22, i.SBMAX_s = 13, i.PSFB21 = 6, i.PSFB12 = 6, i.BLKSIZE = 1024, i.HBLKSIZE = i.BLKSIZE / 2 + 1, i.BLKSIZE_s = 256, i.HBLKSIZE_s = i.BLKSIZE_s / 2 + 1, i.NORM_TYPE = 0, i.START_TYPE = 1, i.SHORT_TYPE = 2, i.STOP_TYPE = 3, i.MPG_MD_LR_LR = 0, i.MPG_MD_LR_I = 1, i.MPG_MD_MS_LR = 2, i.MPG_MD_MS_I = 3, i.fircoef = [
|
|
9695
9695
|
-0.0207887 * 5,
|
|
@@ -9748,7 +9748,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9748
9748
|
o[0][0] = new x(), o[0][1] = new x(), o[1][0] = new x(), o[1][1] = new x();
|
|
9749
9749
|
var T = Ye([2, 2]);
|
|
9750
9750
|
T[0][0] = new x(), T[0][1] = new x(), T[1][0] = new x(), T[1][1] = new x();
|
|
9751
|
-
var U, y = [null, null], f = Y.internal_flags, p = he([2, 4]), u = [0.5, 0.5], B = [[0, 0], [0, 0]], n = [[0, 0], [0, 0]],
|
|
9751
|
+
var U, y = [null, null], f = Y.internal_flags, p = he([2, 4]), u = [0.5, 0.5], B = [[0, 0], [0, 0]], n = [[0, 0], [0, 0]], $, c, v;
|
|
9752
9752
|
if (y[0] = ue, y[1] = O, f.lame_encode_frame_init == 0 && me(Y, y), f.padding = 0, (f.slot_lag -= f.frac_SpF) < 0 && (f.slot_lag += Y.out_samplerate, f.padding = 1), f.psymodel != 0) {
|
|
9753
9753
|
var _, S = [null, null], E = 0, a = _e(2);
|
|
9754
9754
|
for (v = 0; v < f.mode_gr; v++) {
|
|
@@ -9774,20 +9774,20 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9774
9774
|
}
|
|
9775
9775
|
} else
|
|
9776
9776
|
b();
|
|
9777
|
-
if (m(f), pe.mdct_sub48(f, y[0], y[1]), f.mode_ext = i.MPG_MD_LR_LR, Y.force_ms ? f.mode_ext = i.MPG_MD_MS_LR : Y.mode == Q.JOINT_STEREO && b(), f.mode_ext == l ? (U = T,
|
|
9777
|
+
if (m(f), pe.mdct_sub48(f, y[0], y[1]), f.mode_ext = i.MPG_MD_LR_LR, Y.force_ms ? f.mode_ext = i.MPG_MD_MS_LR : Y.mode == Q.JOINT_STEREO && b(), f.mode_ext == l ? (U = T, $ = n) : (U = o, $ = B), Y.analysis && f.pinfo != null && b(), Y.VBR == R.vbr_off || Y.VBR == R.vbr_abr) {
|
|
9778
9778
|
var J, D;
|
|
9779
9779
|
for (J = 0; J < 18; J++)
|
|
9780
9780
|
f.nsPsy.pefirbuf[J] = f.nsPsy.pefirbuf[J + 1];
|
|
9781
9781
|
for (D = 0, v = 0; v < f.mode_gr; v++)
|
|
9782
9782
|
for (c = 0; c < f.channels_out; c++)
|
|
9783
|
-
D +=
|
|
9783
|
+
D += $[v][c];
|
|
9784
9784
|
for (f.nsPsy.pefirbuf[18] = D, D = f.nsPsy.pefirbuf[9], J = 0; J < 9; J++)
|
|
9785
9785
|
D += (f.nsPsy.pefirbuf[J] + f.nsPsy.pefirbuf[18 - J]) * i.fircoef[J];
|
|
9786
9786
|
for (D = 670 * 5 * f.mode_gr * f.channels_out / D, v = 0; v < f.mode_gr; v++)
|
|
9787
9787
|
for (c = 0; c < f.channels_out; c++)
|
|
9788
|
-
|
|
9788
|
+
$[v][c] *= D;
|
|
9789
9789
|
}
|
|
9790
|
-
return f.iteration_loop.iteration_loop(Y,
|
|
9790
|
+
return f.iteration_loop.iteration_loop(Y, $, u, U), k.format_bitstream(Y), t = k.copy_buffer(f, Re, L, H, 1), Y.bWriteVbrTag && g.addVbrFrame(Y), Y.analysis && f.pinfo != null && b(), P(f), t;
|
|
9791
9791
|
};
|
|
9792
9792
|
}
|
|
9793
9793
|
function se() {
|
|
@@ -9799,7 +9799,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9799
9799
|
for (var k = 0; k < 2; k++)
|
|
9800
9800
|
this.tt[l][k] = new d();
|
|
9801
9801
|
}
|
|
9802
|
-
function
|
|
9802
|
+
function W() {
|
|
9803
9803
|
this.l = N(i.SBMAX_l), this.s = he([i.SBMAX_s, 3]);
|
|
9804
9804
|
var l = this;
|
|
9805
9805
|
this.assign = function(k) {
|
|
@@ -9821,9 +9821,9 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9821
9821
|
}
|
|
9822
9822
|
this.header = new Array(ne.MAX_HEADER_BUF), this.h_ptr = 0, this.w_ptr = 0, this.ancillary_flag = 0, this.ResvSize = 0, this.ResvMax = 0, this.scalefac_band = new A(), this.minval_l = N(i.CBANDS), this.minval_s = N(i.CBANDS), this.nb_1 = he([4, i.CBANDS]), this.nb_2 = he([4, i.CBANDS]), this.nb_s1 = he([4, i.CBANDS]), this.nb_s2 = he([4, i.CBANDS]), this.s3_ss = null, this.s3_ll = null, this.decay = 0, this.thm = new Array(4), this.en = new Array(4), this.tot_ener = N(4), this.loudness_sq = he([2, 2]), this.loudness_sq_save = N(2), this.mld_l = N(i.SBMAX_l), this.mld_s = N(i.SBMAX_s), this.bm_l = _e(i.SBMAX_l), this.bo_l = _e(i.SBMAX_l), this.bm_s = _e(i.SBMAX_s), this.bo_s = _e(i.SBMAX_s), this.npart_l = 0, this.npart_s = 0, this.s3ind = be([i.CBANDS, 2]), this.s3ind_s = be([i.CBANDS, 2]), this.numlines_s = _e(i.CBANDS), this.numlines_l = _e(i.CBANDS), this.rnumlines_l = N(i.CBANDS), this.mld_cb_l = N(i.CBANDS), this.mld_cb_s = N(i.CBANDS), this.numlines_s_num1 = 0, this.numlines_l_num1 = 0, this.pe = N(4), this.ms_ratio_s_old = 0, this.ms_ratio_l_old = 0, this.ms_ener_ratio_old = 0, this.blocktype_old = _e(2), this.nsPsy = new oe(), this.VBR_seek_table = new se(), this.ATH = null, this.PSY = null, this.nogap_total = 0, this.nogap_current = 0, this.decode_on_the_fly = !0, this.findReplayGain = !0, this.findPeakSample = !0, this.PeakSample = 0, this.RadioGain = 0, this.AudiophileGain = 0, this.rgdata = null, this.noclipGainChange = 0, this.noclipScale = 0, this.bitrate_stereoMode_Hist = be([16, 5]), this.bitrate_blockType_Hist = be([16, 6]), this.pinfo = null, this.hip = null, this.in_buffer_nsamples = 0, this.in_buffer_0 = null, this.in_buffer_1 = null, this.iteration_loop = null;
|
|
9823
9823
|
for (var G = 0; G < this.en.length; G++)
|
|
9824
|
-
this.en[G] = new
|
|
9824
|
+
this.en[G] = new W();
|
|
9825
9825
|
for (var G = 0; G < this.thm.length; G++)
|
|
9826
|
-
this.thm[G] = new
|
|
9826
|
+
this.thm[G] = new W();
|
|
9827
9827
|
for (var G = 0; G < this.header.length; G++)
|
|
9828
9828
|
this.header[G] = new k();
|
|
9829
9829
|
}
|
|
@@ -9851,13 +9851,13 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
9851
9851
|
u = m[O + 0] - m[O + T], p = m[O + 0] + m[O + T], n = m[O + U] - m[O + y], B = m[O + U] + m[O + y], m[O + U] = p - B, m[O + 0] = p + B, m[O + y] = u - n, m[O + T] = u + n, u = m[Re + 0] - m[Re + T], p = m[Re + 0] + m[Re + T], n = I.SQRT2 * m[Re + y], B = I.SQRT2 * m[Re + U], m[Re + U] = p - B, m[Re + 0] = p + B, m[Re + y] = u - n, m[Re + T] = u + n, Re += ue, O += ue;
|
|
9852
9852
|
} while (O < L);
|
|
9853
9853
|
for (t = G[Y + 0], H = G[Y + 1], o = 1; o < f; o++) {
|
|
9854
|
-
var
|
|
9855
|
-
|
|
9854
|
+
var $, c;
|
|
9855
|
+
$ = 1 - 2 * H * H, c = 2 * H * t, O = P + o, Re = P + T - o;
|
|
9856
9856
|
do {
|
|
9857
9857
|
var v, _, S, p, u, E, B, a, n, r;
|
|
9858
|
-
_ = c * m[O + T] -
|
|
9858
|
+
_ = c * m[O + T] - $ * m[Re + T], v = $ * m[O + T] + c * m[Re + T], u = m[O + 0] - v, p = m[O + 0] + v, E = m[Re + 0] - _, S = m[Re + 0] + _, _ = c * m[O + y] - $ * m[Re + y], v = $ * m[O + y] + c * m[Re + y], n = m[O + U] - v, B = m[O + U] + v, r = m[Re + U] - _, a = m[Re + U] + _, _ = H * B - t * r, v = t * B + H * r, m[O + U] = p - v, m[O + 0] = p + v, m[Re + y] = E - _, m[Re + T] = E + _, _ = t * a - H * n, v = H * a + t * n, m[Re + U] = S - v, m[Re + 0] = S + v, m[O + y] = u - _, m[O + T] = u + _, Re += ue, O += ue;
|
|
9859
9859
|
} while (O < L);
|
|
9860
|
-
|
|
9860
|
+
$ = t, t = $ * G[Y + 0] - H * G[Y + 1], H = $ * G[Y + 1] + H * G[Y + 0];
|
|
9861
9861
|
}
|
|
9862
9862
|
Y += 2;
|
|
9863
9863
|
} while (ue < me);
|
|
@@ -10057,7 +10057,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10057
10057
|
0.25119,
|
|
10058
10058
|
0.11749
|
|
10059
10059
|
];
|
|
10060
|
-
function
|
|
10060
|
+
function $() {
|
|
10061
10061
|
p = Math.pow(10, (U + 1) / 16), u = Math.pow(10, (y + 1) / 16), B = Math.pow(10, f / 10);
|
|
10062
10062
|
}
|
|
10063
10063
|
var c = [
|
|
@@ -10210,7 +10210,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10210
10210
|
function D(ce, V, ie) {
|
|
10211
10211
|
return ie >= 1 ? ce : ie <= 0 ? V : V > 0 ? Math.pow(ce / V, ie) * V : 0;
|
|
10212
10212
|
}
|
|
10213
|
-
var
|
|
10213
|
+
var K = [
|
|
10214
10214
|
11.8,
|
|
10215
10215
|
13.6,
|
|
10216
10216
|
17.2,
|
|
@@ -10231,7 +10231,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10231
10231
|
var ke = ce.thm.s[je][Ge];
|
|
10232
10232
|
if (ke > 0) {
|
|
10233
10233
|
var ze = ke * V, qe = ce.en.s[je][Ge];
|
|
10234
|
-
qe > ze && (qe > ze * 1e10 ? ie +=
|
|
10234
|
+
qe > ze && (qe > ze * 1e10 ? ie += K[je] * (10 * k) : ie += K[je] * I.FAST_LOG10(qe / ze));
|
|
10235
10235
|
}
|
|
10236
10236
|
}
|
|
10237
10237
|
return ie;
|
|
@@ -10319,13 +10319,13 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10319
10319
|
-0.313819 * 2
|
|
10320
10320
|
];
|
|
10321
10321
|
this.L3psycho_anal_ns = function(ce, V, ie, je, Ge, ke, ze, qe, We, ot) {
|
|
10322
|
-
var Xe = ce.internal_flags, yt = he([2, i.BLKSIZE]), dt = he([2, 3, i.BLKSIZE_s]), bt = N(i.CBANDS + 1), Mt = N(i.CBANDS + 1), vt = N(i.CBANDS + 2), it = _e(2), mt = _e(2), Dt, Ze, lt, rt, gt, Wt, Ft,
|
|
10322
|
+
var Xe = ce.internal_flags, yt = he([2, i.BLKSIZE]), dt = he([2, 3, i.BLKSIZE_s]), bt = N(i.CBANDS + 1), Mt = N(i.CBANDS + 1), vt = N(i.CBANDS + 2), it = _e(2), mt = _e(2), Dt, Ze, lt, rt, gt, Wt, Ft, ht, d0 = he([2, 576]), Yt, $t = _e(i.CBANDS + 2), e0 = _e(i.CBANDS + 2);
|
|
10323
10323
|
for (xe.fill(e0, 0), Dt = Xe.channels_out, ce.mode == Q.JOINT_STEREO && (Dt = 4), ce.VBR == R.vbr_off ? Yt = Xe.ResvMax == 0 ? 0 : Xe.ResvSize / Xe.ResvMax * 0.5 : ce.VBR == R.vbr_rh || ce.VBR == R.vbr_mtrh || ce.VBR == R.vbr_mt ? Yt = 0.6 : Yt = 1, Ze = 0; Ze < Xe.channels_out; Ze++) {
|
|
10324
|
-
var
|
|
10324
|
+
var r0 = V[Ze], n0 = ie + 576 - 350 - H + 192;
|
|
10325
10325
|
for (rt = 0; rt < 576; rt++) {
|
|
10326
10326
|
var g0, x0;
|
|
10327
|
-
for (g0 =
|
|
10328
|
-
g0 += at[gt] * (
|
|
10327
|
+
for (g0 = r0[n0 + rt + 10], x0 = 0, gt = 0; gt < (H - 1) / 2 - 1; gt += 2)
|
|
10328
|
+
g0 += at[gt] * (r0[n0 + rt + gt] + r0[n0 + rt + H - gt]), x0 += at[gt + 1] * (r0[n0 + rt + gt + 1] + r0[n0 + rt + H - gt - 1]);
|
|
10329
10329
|
d0[Ze][rt] = g0 + x0;
|
|
10330
10330
|
}
|
|
10331
10331
|
Ge[je][Ze].en.assign(Xe.en[Ze]), Ge[je][Ze].thm.assign(Xe.thm[Ze]), Dt > 2 && b();
|
|
@@ -10336,10 +10336,10 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10336
10336
|
Ht[rt] = Xe.nsPsy.last_en_subshort[Ze][rt + 6], S0[rt] = Ht[rt] / Xe.nsPsy.last_en_subshort[Ze][rt + 4], Xt[0] += Ht[rt];
|
|
10337
10337
|
Ze == 2 && b();
|
|
10338
10338
|
{
|
|
10339
|
-
var X0 = d0[Ze & 1],
|
|
10339
|
+
var X0 = d0[Ze & 1], i0 = 0;
|
|
10340
10340
|
for (rt = 0; rt < 9; rt++) {
|
|
10341
|
-
for (var Sa =
|
|
10342
|
-
Lt < Math.abs(X0[
|
|
10341
|
+
for (var Sa = i0 + 64, Lt = 1; i0 < Sa; i0++)
|
|
10342
|
+
Lt < Math.abs(X0[i0]) && (Lt = Math.abs(X0[i0]));
|
|
10343
10343
|
Xe.nsPsy.last_en_subshort[Ze][rt] = Ht[rt + 3] = Lt, Xt[1 + rt / 3] += Lt, Lt > Ht[rt + 3 - 2] ? Lt = Lt / Ht[rt + 3 - 2] : Ht[rt + 3 - 2] > Lt * 10 ? Lt = Ht[rt + 3 - 2] / (Lt * 10) : Lt = 0, S0[rt + 3] = Lt;
|
|
10344
10344
|
}
|
|
10345
10345
|
}
|
|
@@ -10361,33 +10361,33 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10361
10361
|
Ze,
|
|
10362
10362
|
V,
|
|
10363
10363
|
ie
|
|
10364
|
-
), Je(Xe, j0, bt, q0, G0), nt(Xe, q0, G0, $t),
|
|
10364
|
+
), Je(Xe, j0, bt, q0, G0), nt(Xe, q0, G0, $t), ht = 0; ht < 3; ht++) {
|
|
10365
10365
|
var T0, Nt;
|
|
10366
|
-
for (r(ce, W0, Mt, vt, Ze,
|
|
10367
|
-
if (Nt = Xe.thm[Ze].s[Ft][
|
|
10368
|
-
var
|
|
10369
|
-
Xe.thm[Ze].s[Ft][
|
|
10366
|
+
for (r(ce, W0, Mt, vt, Ze, ht), E(Xe, Mt, vt, Ze, ht), Ft = 0; Ft < i.SBMAX_s; Ft++) {
|
|
10367
|
+
if (Nt = Xe.thm[Ze].s[Ft][ht], Nt *= ue, Ct[ht] >= 2 || Ct[ht + 1] == 1) {
|
|
10368
|
+
var s0 = ht != 0 ? ht - 1 : 2, Lt = D(
|
|
10369
|
+
Xe.thm[Ze].s[Ft][s0],
|
|
10370
10370
|
Nt,
|
|
10371
10371
|
O * Yt
|
|
10372
10372
|
);
|
|
10373
10373
|
Nt = Math.min(Nt, Lt);
|
|
10374
10374
|
}
|
|
10375
|
-
if (Ct[
|
|
10376
|
-
var
|
|
10377
|
-
Xe.thm[Ze].s[Ft][
|
|
10375
|
+
if (Ct[ht] == 1) {
|
|
10376
|
+
var s0 = ht != 0 ? ht - 1 : 2, Lt = D(
|
|
10377
|
+
Xe.thm[Ze].s[Ft][s0],
|
|
10378
10378
|
Nt,
|
|
10379
10379
|
Re * Yt
|
|
10380
10380
|
);
|
|
10381
10381
|
Nt = Math.min(Nt, Lt);
|
|
10382
|
-
} else if (
|
|
10383
|
-
var
|
|
10384
|
-
Xe.thm[Ze].s[Ft][
|
|
10382
|
+
} else if (ht != 0 && Ct[ht - 1] == 3 || ht == 0 && Xe.nsPsy.lastAttacks[Ze] == 3) {
|
|
10383
|
+
var s0 = ht != 2 ? ht + 1 : 0, Lt = D(
|
|
10384
|
+
Xe.thm[Ze].s[Ft][s0],
|
|
10385
10385
|
Nt,
|
|
10386
10386
|
Re * Yt
|
|
10387
10387
|
);
|
|
10388
10388
|
Nt = Math.min(Nt, Lt);
|
|
10389
10389
|
}
|
|
10390
|
-
T0 = Ht[
|
|
10390
|
+
T0 = Ht[ht * 3 + 3] + Ht[ht * 3 + 4] + Ht[ht * 3 + 5], Ht[ht * 3 + 5] * 6 < T0 && (Nt *= 0.5, Ht[ht * 3 + 4] * 6 < T0 && (Nt *= 0.5)), Xe.thm[Ze].s[Ft][ht] = Nt;
|
|
10391
10391
|
}
|
|
10392
10392
|
}
|
|
10393
10393
|
for (Xe.nsPsy.lastAttacks[Ze] = Ct[2], Wt = 0, lt = 0; lt < Xe.npart_l; lt++) {
|
|
@@ -10439,12 +10439,12 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10439
10439
|
}
|
|
10440
10440
|
dt[vt] = qe * it;
|
|
10441
10441
|
for (var lt = 0; lt < yt; lt++) {
|
|
10442
|
-
var rt, gt, Wt, Ft,
|
|
10442
|
+
var rt, gt, Wt, Ft, ht;
|
|
10443
10443
|
Wt = ot[lt], Ft = ot[lt + 1], rt = 0 | Math.floor(0.5 + Xe * (Wt - 0.5)), rt < 0 && (rt = 0), gt = 0 | Math.floor(0.5 + Xe * (Ft - 0.5)), gt > We / 2 && (gt = We / 2), ie[lt] = (Mt[rt] + Mt[gt]) / 2, V[lt] = Mt[gt];
|
|
10444
10444
|
var d0 = bt * Ft;
|
|
10445
|
-
ze[lt] = (d0 - dt[V[lt]]) / (dt[V[lt] + 1] - dt[V[lt]]), ze[lt] < 0 ? ze[lt] = 0 : ze[lt] > 1 && (ze[lt] = 1),
|
|
10445
|
+
ze[lt] = (d0 - dt[V[lt]]) / (dt[V[lt] + 1] - dt[V[lt]]), ze[lt] < 0 ? ze[lt] = 0 : ze[lt] > 1 && (ze[lt] = 1), ht = Rt(qe * ot[lt] * Xe), ht = Math.min(ht, 15.5) / 15.5, ke[lt] = Math.pow(
|
|
10446
10446
|
10,
|
|
10447
|
-
1.25 * (1 - Math.cos(Math.PI *
|
|
10447
|
+
1.25 * (1 - Math.cos(Math.PI * ht)) - 2.5
|
|
10448
10448
|
);
|
|
10449
10449
|
}
|
|
10450
10450
|
it = 0;
|
|
@@ -10577,7 +10577,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10577
10577
|
yt,
|
|
10578
10578
|
dt,
|
|
10579
10579
|
je
|
|
10580
|
-
),
|
|
10580
|
+
), $(), l.init_fft(V), V.decay = Math.exp(-1 * k / (Y * bt / 192));
|
|
10581
10581
|
{
|
|
10582
10582
|
var rt;
|
|
10583
10583
|
rt = L, ce.exp_nspsytune & 2 && (rt = 1), Math.abs(ce.msfix) > 0 && (rt = ce.msfix), ce.msfix = rt;
|
|
@@ -10586,11 +10586,11 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10586
10586
|
}
|
|
10587
10587
|
var Wt = 576 * V.mode_gr / bt;
|
|
10588
10588
|
if (V.ATH.decay = Math.pow(10, -12 / 10 * Wt), V.ATH.adjust = 0.01, V.ATH.adjustLimit = 1, ce.ATHtype != -1) {
|
|
10589
|
-
var Ze, Ft = ce.out_samplerate / i.BLKSIZE,
|
|
10589
|
+
var Ze, Ft = ce.out_samplerate / i.BLKSIZE, ht = 0;
|
|
10590
10590
|
for (Ze = 0, ie = 0; ie < i.BLKSIZE / 2; ++ie)
|
|
10591
|
-
Ze += Ft, V.ATH.eql_w[ie] = 1 / Math.pow(10, this.ATHformula(Ze, ce) / 10),
|
|
10592
|
-
for (
|
|
10593
|
-
V.ATH.eql_w[ie] *=
|
|
10591
|
+
Ze += Ft, V.ATH.eql_w[ie] = 1 / Math.pow(10, this.ATHformula(Ze, ce) / 10), ht += V.ATH.eql_w[ie];
|
|
10592
|
+
for (ht = 1 / ht, ie = i.BLKSIZE / 2; --ie >= 0; )
|
|
10593
|
+
V.ATH.eql_w[ie] *= ht;
|
|
10594
10594
|
}
|
|
10595
10595
|
{
|
|
10596
10596
|
for (var gt = it = 0; gt < V.npart_s; ++gt)
|
|
@@ -10650,8 +10650,8 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10650
10650
|
var G = 16384 + k;
|
|
10651
10651
|
ge.LAME_MAXMP3BUFFER = G;
|
|
10652
10652
|
var g, pe, m, P, me, Y = new Be(), ue, O;
|
|
10653
|
-
this.enc = new i(), this.setModules = function(a, r, J, D,
|
|
10654
|
-
g = a, pe = r, m = J, P = D, me =
|
|
10653
|
+
this.enc = new i(), this.setModules = function(a, r, J, D, K, Se, De, Ne, Je) {
|
|
10654
|
+
g = a, pe = r, m = J, P = D, me = K, ue = Se, O = Ne, this.enc.setModules(pe, Y, P, ue);
|
|
10655
10655
|
};
|
|
10656
10656
|
function Re() {
|
|
10657
10657
|
this.mask_adjust = 0, this.mask_adjust_short = 0, this.bo_l_weight = N(i.SBMAX_l), this.bo_s_weight = N(i.SBMAX_s);
|
|
@@ -10693,14 +10693,14 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10693
10693
|
224,
|
|
10694
10694
|
256,
|
|
10695
10695
|
320
|
|
10696
|
-
], J = 0, D = 0,
|
|
10697
|
-
Se = r[16],
|
|
10696
|
+
], J = 0, D = 0, K = 0, Se = 0;
|
|
10697
|
+
Se = r[16], K = 16, D = r[16], J = 16;
|
|
10698
10698
|
for (var De = 0; De < 16; De++)
|
|
10699
10699
|
if (Math.max(a, r[De + 1]) != a) {
|
|
10700
|
-
Se = r[De + 1],
|
|
10700
|
+
Se = r[De + 1], K = De + 1, D = r[De], J = De;
|
|
10701
10701
|
break;
|
|
10702
10702
|
}
|
|
10703
|
-
return Se - a > a - D ? J :
|
|
10703
|
+
return Se - a > a - D ? J : K;
|
|
10704
10704
|
};
|
|
10705
10705
|
function U(a, r) {
|
|
10706
10706
|
switch (a) {
|
|
@@ -10728,8 +10728,8 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10728
10728
|
}
|
|
10729
10729
|
function y(a, r, J) {
|
|
10730
10730
|
J < 16e3 && (r = 2);
|
|
10731
|
-
for (var D = M.bitrate_table[r][1],
|
|
10732
|
-
M.bitrate_table[r][
|
|
10731
|
+
for (var D = M.bitrate_table[r][1], K = 2; K <= 14; K++)
|
|
10732
|
+
M.bitrate_table[r][K] > 0 && Math.abs(M.bitrate_table[r][K] - a) < Math.abs(D - a) && (D = M.bitrate_table[r][K]);
|
|
10733
10733
|
return D;
|
|
10734
10734
|
}
|
|
10735
10735
|
function f(a, r, J) {
|
|
@@ -10764,16 +10764,16 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10764
10764
|
function u(a) {
|
|
10765
10765
|
var r = a.internal_flags, J = 32;
|
|
10766
10766
|
if (r.lowpass1 > 0) {
|
|
10767
|
-
for (var D = 999,
|
|
10768
|
-
var Se =
|
|
10769
|
-
Se >= r.lowpass2 && (J = Math.min(J,
|
|
10767
|
+
for (var D = 999, K = 0; K <= 31; K++) {
|
|
10768
|
+
var Se = K / 31;
|
|
10769
|
+
Se >= r.lowpass2 && (J = Math.min(J, K)), r.lowpass1 < Se && Se < r.lowpass2 && (D = Math.min(D, K));
|
|
10770
10770
|
}
|
|
10771
10771
|
D == 999 ? r.lowpass1 = (J - 0.75) / 31 : r.lowpass1 = (D - 0.75) / 31, r.lowpass2 = J / 31;
|
|
10772
10772
|
}
|
|
10773
10773
|
r.highpass2 > 0 && b(), r.highpass2 > 0 && b();
|
|
10774
|
-
for (var
|
|
10775
|
-
var De, Ne, Se =
|
|
10776
|
-
r.highpass2 > r.highpass1 ? b() : De = 1, r.lowpass2 > r.lowpass1 ? Ne = T((Se - r.lowpass1) / (r.lowpass2 - r.lowpass1 + 1e-20)) : Ne = 1, r.amp_filter[
|
|
10774
|
+
for (var K = 0; K < 32; K++) {
|
|
10775
|
+
var De, Ne, Se = K / 31;
|
|
10776
|
+
r.highpass2 > r.highpass1 ? b() : De = 1, r.lowpass2 > r.lowpass1 ? Ne = T((Se - r.lowpass1) / (r.lowpass2 - r.lowpass1 + 1e-20)) : Ne = 1, r.amp_filter[K] = De * Ne;
|
|
10777
10777
|
}
|
|
10778
10778
|
}
|
|
10779
10779
|
function B(a) {
|
|
@@ -10860,7 +10860,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10860
10860
|
case R.vbr_rh:
|
|
10861
10861
|
case R.vbr_mtrh:
|
|
10862
10862
|
{
|
|
10863
|
-
var
|
|
10863
|
+
var K = [
|
|
10864
10864
|
5.7,
|
|
10865
10865
|
6.5,
|
|
10866
10866
|
7.3,
|
|
@@ -10872,7 +10872,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10872
10872
|
15,
|
|
10873
10873
|
16.5
|
|
10874
10874
|
];
|
|
10875
|
-
a.compression_ratio =
|
|
10875
|
+
a.compression_ratio = K[a.VBR_q];
|
|
10876
10876
|
}
|
|
10877
10877
|
break;
|
|
10878
10878
|
case R.vbr_abr:
|
|
@@ -10930,15 +10930,15 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10930
10930
|
}
|
|
10931
10931
|
return a.VBR != R.vbr_off && b(), a.tune && b(), B(a), a.athaa_type < 0 ? r.ATH.useAdjust = 3 : r.ATH.useAdjust = a.athaa_type, r.ATH.aaSensitivityP = Math.pow(10, a.athaa_sensitivity / -10), a.short_blocks == null && (a.short_blocks = ee.short_block_allowed), a.short_blocks == ee.short_block_allowed && (a.mode == Q.JOINT_STEREO || a.mode == Q.STEREO) && (a.short_blocks = ee.short_block_coupled), a.quant_comp < 0 && (a.quant_comp = 1), a.quant_comp_short < 0 && (a.quant_comp_short = 0), a.msfix < 0 && (a.msfix = 0), a.exp_nspsytune = a.exp_nspsytune | 1, a.internal_flags.nsPsy.attackthre < 0 && (a.internal_flags.nsPsy.attackthre = Be.NSATTACKTHRE), a.internal_flags.nsPsy.attackthre_s < 0 && (a.internal_flags.nsPsy.attackthre_s = Be.NSATTACKTHRE_S), a.scale < 0 && (a.scale = 1), a.ATHtype < 0 && (a.ATHtype = 4), a.ATHcurve < 0 && (a.ATHcurve = 4), a.athaa_loudapprox < 0 && (a.athaa_loudapprox = 2), a.interChRatio < 0 && (a.interChRatio = 0), a.useTemporal == null && (a.useTemporal = !0), r.slot_lag = r.frac_SpF = 0, a.VBR == R.vbr_off && (r.slot_lag = r.frac_SpF = (a.version + 1) * 72e3 * a.brate % a.out_samplerate | 0), P.iteration_init(a), Y.psymodel_init(a), 0;
|
|
10932
10932
|
};
|
|
10933
|
-
function
|
|
10933
|
+
function $(a, r) {
|
|
10934
10934
|
(a.in_buffer_0 == null || a.in_buffer_nsamples < r) && (a.in_buffer_0 = N(r), a.in_buffer_1 = N(r), a.in_buffer_nsamples = r);
|
|
10935
10935
|
}
|
|
10936
10936
|
this.lame_encode_flush = function(a, r, J, D) {
|
|
10937
|
-
var
|
|
10938
|
-
if (
|
|
10937
|
+
var K = a.internal_flags, Se = Ee([2, 1152]), De = 0, Ne, Je, nt, at, Tt = K.mf_samples_to_encode - i.POSTDELAY, Rt = c(a);
|
|
10938
|
+
if (K.mf_samples_to_encode < 1)
|
|
10939
10939
|
return 0;
|
|
10940
10940
|
for (Ne = 0, a.in_samplerate != a.out_samplerate && b(), nt = a.framesize - Tt % a.framesize, nt < 576 && (nt += a.framesize), a.encoder_padding = nt, at = (Tt + nt) / a.framesize; at > 0 && De >= 0; ) {
|
|
10941
|
-
var wt = Rt -
|
|
10941
|
+
var wt = Rt - K.mf_size, St = a.frameNum;
|
|
10942
10942
|
wt *= a.in_samplerate, wt /= a.out_samplerate, wt > 1152 && (wt = 1152), wt < 1 && (wt = 1), Je = D - Ne, D == 0 && (Je = 0), De = this.lame_encode_buffer(
|
|
10943
10943
|
a,
|
|
10944
10944
|
Se[0],
|
|
@@ -10949,20 +10949,20 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10949
10949
|
Je
|
|
10950
10950
|
), J += De, Ne += De, at -= St != a.frameNum ? 1 : 0;
|
|
10951
10951
|
}
|
|
10952
|
-
return
|
|
10953
|
-
|
|
10952
|
+
return K.mf_samples_to_encode = 0, De < 0 || (Je = D - Ne, D == 0 && (Je = 0), pe.flush_bitstream(a), De = pe.copy_buffer(
|
|
10953
|
+
K,
|
|
10954
10954
|
r,
|
|
10955
10955
|
J,
|
|
10956
10956
|
Je,
|
|
10957
10957
|
1
|
|
10958
10958
|
), De < 0) ? De : (J += De, Ne += De, Je = D - Ne, D == 0 && (Je = 0), a.write_id3tag_automatic && b(), Ne);
|
|
10959
|
-
}, this.lame_encode_buffer = function(a, r, J, D,
|
|
10959
|
+
}, this.lame_encode_buffer = function(a, r, J, D, K, Se, De) {
|
|
10960
10960
|
var Ne = a.internal_flags, Je = [null, null];
|
|
10961
10961
|
if (Ne.Class_ID != t)
|
|
10962
10962
|
return -3;
|
|
10963
10963
|
if (D == 0)
|
|
10964
10964
|
return 0;
|
|
10965
|
-
|
|
10965
|
+
$(Ne, D), Je[0] = Ne.in_buffer_0, Je[1] = Ne.in_buffer_1;
|
|
10966
10966
|
for (var nt = 0; nt < D; nt++)
|
|
10967
10967
|
Je[0][nt] = r[nt], Ne.channels_in > 1 && (Je[1][nt] = J[nt]);
|
|
10968
10968
|
return v(
|
|
@@ -10970,7 +10970,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10970
10970
|
Je[0],
|
|
10971
10971
|
Je[1],
|
|
10972
10972
|
D,
|
|
10973
|
-
|
|
10973
|
+
K,
|
|
10974
10974
|
Se,
|
|
10975
10975
|
De
|
|
10976
10976
|
);
|
|
@@ -10979,13 +10979,13 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
10979
10979
|
var r = i.BLKSIZE + a.framesize - i.FFTOFFSET;
|
|
10980
10980
|
return r = Math.max(r, 512 + a.framesize - 32), r;
|
|
10981
10981
|
}
|
|
10982
|
-
function v(a, r, J, D,
|
|
10982
|
+
function v(a, r, J, D, K, Se, De) {
|
|
10983
10983
|
var Ne = a.internal_flags, Je = 0, nt, at, Tt, Rt, wt, St = [null, null], Et = [null, null];
|
|
10984
10984
|
if (Ne.Class_ID != t)
|
|
10985
10985
|
return -3;
|
|
10986
10986
|
if (D == 0)
|
|
10987
10987
|
return 0;
|
|
10988
|
-
if (wt = pe.copy_buffer(Ne,
|
|
10988
|
+
if (wt = pe.copy_buffer(Ne, K, Se, De, 0), wt < 0)
|
|
10989
10989
|
return wt;
|
|
10990
10990
|
if (Se += wt, Je += wt, Et[0] = r, Et[1] = J, et.NEQ(a.scale, 0) && et.NEQ(a.scale, 1))
|
|
10991
10991
|
for (at = 0; at < D; ++at)
|
|
@@ -11024,7 +11024,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
11024
11024
|
a,
|
|
11025
11025
|
St[0],
|
|
11026
11026
|
St[1],
|
|
11027
|
-
|
|
11027
|
+
K,
|
|
11028
11028
|
Se,
|
|
11029
11029
|
Ge
|
|
11030
11030
|
), nt < 0)
|
|
@@ -11036,13 +11036,13 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
11036
11036
|
}
|
|
11037
11037
|
return Je;
|
|
11038
11038
|
}
|
|
11039
|
-
function _(a, r, J, D,
|
|
11039
|
+
function _(a, r, J, D, K, Se) {
|
|
11040
11040
|
var De = l.enc.lame_encode_mp3_frame(
|
|
11041
11041
|
a,
|
|
11042
11042
|
r,
|
|
11043
11043
|
J,
|
|
11044
11044
|
D,
|
|
11045
|
-
|
|
11045
|
+
K,
|
|
11046
11046
|
Se
|
|
11047
11047
|
);
|
|
11048
11048
|
return a.frameNum++, De;
|
|
@@ -11050,18 +11050,18 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
11050
11050
|
function S() {
|
|
11051
11051
|
this.n_in = 0, this.n_out = 0;
|
|
11052
11052
|
}
|
|
11053
|
-
function E(a, r, J, D,
|
|
11053
|
+
function E(a, r, J, D, K, Se) {
|
|
11054
11054
|
var De = a.internal_flags;
|
|
11055
11055
|
if (De.resample_ratio < 0.9999 || De.resample_ratio > 1.0001)
|
|
11056
11056
|
b();
|
|
11057
11057
|
else {
|
|
11058
|
-
Se.n_out = Math.min(a.framesize,
|
|
11058
|
+
Se.n_out = Math.min(a.framesize, K), Se.n_in = Se.n_out;
|
|
11059
11059
|
for (var Ne = 0; Ne < Se.n_out; ++Ne)
|
|
11060
11060
|
r[0][De.mf_size + Ne] = J[0][D + Ne], De.channels_out == 2 && (r[1][De.mf_size + Ne] = J[1][D + Ne]);
|
|
11061
11061
|
}
|
|
11062
11062
|
}
|
|
11063
11063
|
}
|
|
11064
|
-
function
|
|
11064
|
+
function X() {
|
|
11065
11065
|
this.setModules = function(l, k) {
|
|
11066
11066
|
};
|
|
11067
11067
|
}
|
|
@@ -11077,7 +11077,7 @@ const E0 = /* @__PURE__ */ H0(sn);
|
|
|
11077
11077
|
}
|
|
11078
11078
|
function fe(l, k, G) {
|
|
11079
11079
|
l != 1 && b("fix cc: only supports mono");
|
|
11080
|
-
var g = new ge(), pe = new
|
|
11080
|
+
var g = new ge(), pe = new X(), m = new te(), P = new et(), me = new Ce(), Y = new e(), ue = new C(), O = new Ue(), Re = new ve(), L = new z(), H = new Pe(), t = new ae(), o = new Te(), T = new Oe();
|
|
11081
11081
|
g.setModules(m, P, me, Y, ue, O, Re, L, T), P.setModules(m, T, Re, O), L.setModules(P, Re), me.setModules(g), ue.setModules(P, H, Y, t), Y.setModules(t, H, g.enc.psy), H.setModules(P), t.setModules(Y), O.setModules(g, P, Re), pe.setModules(o, T), o.setModules(Re, L, me);
|
|
11082
11082
|
var U = g.lame_init();
|
|
11083
11083
|
U.num_channels = l, U.in_samplerate = k, U.out_samplerate = k, U.brate = G, U.mode = Q.STEREO, U.quality = 3, U.bWriteVbrTag = !1, U.disable_reservoir = !0, U.write_id3tag_automatic = !1, g.lame_init_params(U);
|
|
@@ -11223,7 +11223,7 @@ const ga = (w) => (ka("data-v-e59bd63b"), w = w(), Aa(), w), on = {
|
|
|
11223
11223
|
setup(w, { emit: Z }) {
|
|
11224
11224
|
const re = w, b = Z, le = ct(null), F = ct(null), _e = ct(!1), N = ct(!1), we = ct(null), he = ct(null), be = ct("00:00"), Ee = ct("100vw"), Ye = ct("");
|
|
11225
11225
|
function xe() {
|
|
11226
|
-
Ee.value =
|
|
11226
|
+
Ee.value = _t.isMobile || re.responsive ? "100vw" : `${document.querySelector(".record-tree").clientWidth}px`, le.value = E0({
|
|
11227
11227
|
//本配置参数请参考下面的文档,有详细介绍
|
|
11228
11228
|
type: "mp3",
|
|
11229
11229
|
sampleRate: 16e3,
|
|
@@ -11260,7 +11260,7 @@ const ga = (w) => (ka("data-v-e59bd63b"), w = w(), Aa(), w), on = {
|
|
|
11260
11260
|
function ee() {
|
|
11261
11261
|
le.value.stop(
|
|
11262
11262
|
(ae, te) => {
|
|
11263
|
-
N.value = !1, we.value = window.URL.createObjectURL(ae), be.value = q(te), he.value = ae,
|
|
11263
|
+
N.value = !1, we.value = window.URL.createObjectURL(ae), be.value = q(te), he.value = ae, _t.isMobile && Ae();
|
|
11264
11264
|
},
|
|
11265
11265
|
(ae) => {
|
|
11266
11266
|
console.log("录音失败:" + ae), N.value = !1, we.value = null, he.value = null, be.value = "00:00";
|
|
@@ -11295,7 +11295,7 @@ const ga = (w) => (ka("data-v-e59bd63b"), w = w(), Aa(), w), on = {
|
|
|
11295
11295
|
width: Ee.value
|
|
11296
11296
|
})
|
|
11297
11297
|
}, [
|
|
11298
|
-
$e(
|
|
11298
|
+
$e(_t).isMobile ? (st(), ft("div", on, [
|
|
11299
11299
|
N.value ? (st(), ft("a", {
|
|
11300
11300
|
key: 1,
|
|
11301
11301
|
onClick: ee,
|
|
@@ -11323,9 +11323,9 @@ const ga = (w) => (ka("data-v-e59bd63b"), w = w(), Aa(), w), on = {
|
|
|
11323
11323
|
])) : (st(), ft("div", un, [
|
|
11324
11324
|
tt("div", cn, [
|
|
11325
11325
|
fn,
|
|
11326
|
-
tt("div", dn,
|
|
11326
|
+
tt("div", dn, u0(be.value), 1)
|
|
11327
11327
|
]),
|
|
11328
|
-
we.value && !$e(
|
|
11328
|
+
we.value && !$e(_t).isMobile ? (st(), ft("div", vn, [
|
|
11329
11329
|
tt("audio", {
|
|
11330
11330
|
src: we.value,
|
|
11331
11331
|
controls: "",
|
|
@@ -11333,7 +11333,7 @@ const ga = (w) => (ka("data-v-e59bd63b"), w = w(), Aa(), w), on = {
|
|
|
11333
11333
|
}, null, 8, hn),
|
|
11334
11334
|
tt("a", { onClick: ve }, "转文本")
|
|
11335
11335
|
])) : kt("", !0),
|
|
11336
|
-
Ye.value ? (st(), ft("div", _n,
|
|
11336
|
+
Ye.value ? (st(), ft("div", _n, u0(Ye.value), 1)) : kt("", !0),
|
|
11337
11337
|
tt("div", mn, [
|
|
11338
11338
|
N.value ? (st(), ft("a", {
|
|
11339
11339
|
key: 1,
|
|
@@ -11414,34 +11414,34 @@ var xa = { exports: {} };
|
|
|
11414
11414
|
type: "video"
|
|
11415
11415
|
}, e = new re(A, e);
|
|
11416
11416
|
var s = this;
|
|
11417
|
-
function d(
|
|
11418
|
-
return e.disableLogs || console.log("RecordRTC version: ", s.version),
|
|
11417
|
+
function d(X) {
|
|
11418
|
+
return e.disableLogs || console.log("RecordRTC version: ", s.version), X && (e = new re(A, X)), e.disableLogs || console.log("started recording " + e.type + " stream."), ye ? (ye.clearRecordedData(), ye.record(), W("recording"), s.recordingDuration && de(), s) : (h(function() {
|
|
11419
11419
|
s.recordingDuration && de();
|
|
11420
11420
|
}), s);
|
|
11421
11421
|
}
|
|
11422
|
-
function h(
|
|
11423
|
-
|
|
11424
|
-
|
|
11422
|
+
function h(X) {
|
|
11423
|
+
X && (e.initCallback = function() {
|
|
11424
|
+
X(), X = e.initCallback = null;
|
|
11425
11425
|
});
|
|
11426
11426
|
var Te = new b(A, e);
|
|
11427
|
-
ye = new Te(A, e), ye.record(),
|
|
11427
|
+
ye = new Te(A, e), ye.record(), W("recording"), e.disableLogs || console.log("Initialized recorderType:", ye.constructor.name, "for output-type:", e.type);
|
|
11428
11428
|
}
|
|
11429
|
-
function C(
|
|
11430
|
-
if (
|
|
11429
|
+
function C(X) {
|
|
11430
|
+
if (X = X || function() {
|
|
11431
11431
|
}, !ye) {
|
|
11432
11432
|
ne();
|
|
11433
11433
|
return;
|
|
11434
11434
|
}
|
|
11435
11435
|
if (s.state === "paused") {
|
|
11436
11436
|
s.resumeRecording(), setTimeout(function() {
|
|
11437
|
-
C(
|
|
11437
|
+
C(X);
|
|
11438
11438
|
}, 1);
|
|
11439
11439
|
return;
|
|
11440
11440
|
}
|
|
11441
|
-
s.state !== "recording" && !e.disableLogs && console.warn('Recording state should be: "recording", however current state is: ', s.state), e.disableLogs || console.log("Stopped recording " + e.type + " stream."), e.type !== "gif" ? ye.stop(Te) : (ye.stop(), Te()),
|
|
11441
|
+
s.state !== "recording" && !e.disableLogs && console.warn('Recording state should be: "recording", however current state is: ', s.state), e.disableLogs || console.log("Stopped recording " + e.type + " stream."), e.type !== "gif" ? ye.stop(Te) : (ye.stop(), Te()), W("stopped");
|
|
11442
11442
|
function Te(Oe) {
|
|
11443
11443
|
if (!ye) {
|
|
11444
|
-
typeof
|
|
11444
|
+
typeof X.call == "function" ? X.call(s, "") : X("");
|
|
11445
11445
|
return;
|
|
11446
11446
|
}
|
|
11447
11447
|
Object.keys(ye).forEach(function(l) {
|
|
@@ -11453,13 +11453,13 @@ var xa = { exports: {} };
|
|
|
11453
11453
|
ye.blob = z = Oe;
|
|
11454
11454
|
else
|
|
11455
11455
|
throw "Recording failed.";
|
|
11456
|
-
if (z && !e.disableLogs && console.log(z.type, "->", Ae(z.size)),
|
|
11456
|
+
if (z && !e.disableLogs && console.log(z.type, "->", Ae(z.size)), X) {
|
|
11457
11457
|
var fe;
|
|
11458
11458
|
try {
|
|
11459
11459
|
fe = be.createObjectURL(z);
|
|
11460
11460
|
} catch {
|
|
11461
11461
|
}
|
|
11462
|
-
typeof
|
|
11462
|
+
typeof X.call == "function" ? X.call(s, fe) : X(fe);
|
|
11463
11463
|
}
|
|
11464
11464
|
e.autoWriteToDisk && se(function(l) {
|
|
11465
11465
|
var k = {};
|
|
@@ -11476,7 +11476,7 @@ var xa = { exports: {} };
|
|
|
11476
11476
|
e.disableLogs || console.warn("Unable to pause the recording. Recording state: ", s.state);
|
|
11477
11477
|
return;
|
|
11478
11478
|
}
|
|
11479
|
-
|
|
11479
|
+
W("paused"), ye.pause(), e.disableLogs || console.log("Paused recording.");
|
|
11480
11480
|
}
|
|
11481
11481
|
function x() {
|
|
11482
11482
|
if (!ye) {
|
|
@@ -11487,30 +11487,30 @@ var xa = { exports: {} };
|
|
|
11487
11487
|
e.disableLogs || console.warn("Unable to resume the recording. Recording state: ", s.state);
|
|
11488
11488
|
return;
|
|
11489
11489
|
}
|
|
11490
|
-
|
|
11490
|
+
W("recording"), ye.resume(), e.disableLogs || console.log("Resumed recording.");
|
|
11491
11491
|
}
|
|
11492
|
-
function i(
|
|
11493
|
-
postMessage(new FileReaderSync().readAsDataURL(
|
|
11492
|
+
function i(X) {
|
|
11493
|
+
postMessage(new FileReaderSync().readAsDataURL(X));
|
|
11494
11494
|
}
|
|
11495
|
-
function se(
|
|
11496
|
-
if (!
|
|
11495
|
+
function se(X, Te) {
|
|
11496
|
+
if (!X)
|
|
11497
11497
|
throw "Pass a callback function over getDataURL.";
|
|
11498
11498
|
var Oe = Te ? Te.blob : (ye || {}).blob;
|
|
11499
11499
|
if (!Oe) {
|
|
11500
11500
|
e.disableLogs || console.warn("Blob encoder did not finish its job yet."), setTimeout(function() {
|
|
11501
|
-
se(
|
|
11501
|
+
se(X, Te);
|
|
11502
11502
|
}, 1e3);
|
|
11503
11503
|
return;
|
|
11504
11504
|
}
|
|
11505
11505
|
if (typeof Worker < "u" && !navigator.mozGetUserMedia) {
|
|
11506
11506
|
var z = l(i);
|
|
11507
11507
|
z.onmessage = function(k) {
|
|
11508
|
-
|
|
11508
|
+
X(k.data);
|
|
11509
11509
|
}, z.postMessage(Oe);
|
|
11510
11510
|
} else {
|
|
11511
11511
|
var fe = new FileReader();
|
|
11512
11512
|
fe.readAsDataURL(Oe), fe.onload = function(k) {
|
|
11513
|
-
|
|
11513
|
+
X(k.target.result);
|
|
11514
11514
|
};
|
|
11515
11515
|
}
|
|
11516
11516
|
function l(k) {
|
|
@@ -11526,25 +11526,25 @@ var xa = { exports: {} };
|
|
|
11526
11526
|
}
|
|
11527
11527
|
}
|
|
11528
11528
|
}
|
|
11529
|
-
function de(
|
|
11530
|
-
if (
|
|
11529
|
+
function de(X) {
|
|
11530
|
+
if (X = X || 0, s.state === "paused") {
|
|
11531
11531
|
setTimeout(function() {
|
|
11532
|
-
de(
|
|
11532
|
+
de(X);
|
|
11533
11533
|
}, 1e3);
|
|
11534
11534
|
return;
|
|
11535
11535
|
}
|
|
11536
11536
|
if (s.state !== "stopped") {
|
|
11537
|
-
if (
|
|
11537
|
+
if (X >= s.recordingDuration) {
|
|
11538
11538
|
C(s.onRecordingStopped);
|
|
11539
11539
|
return;
|
|
11540
11540
|
}
|
|
11541
|
-
|
|
11542
|
-
de(
|
|
11541
|
+
X += 1e3, setTimeout(function() {
|
|
11542
|
+
de(X);
|
|
11543
11543
|
}, 1e3);
|
|
11544
11544
|
}
|
|
11545
11545
|
}
|
|
11546
|
-
function
|
|
11547
|
-
s && (s.state =
|
|
11546
|
+
function W(X) {
|
|
11547
|
+
s && (s.state = X, typeof s.onStateChanged.call == "function" ? s.onStateChanged.call(s, X) : s.onStateChanged(X));
|
|
11548
11548
|
}
|
|
11549
11549
|
var oe = 'It seems that recorder is destroyed or "startRecording" is not invoked for ' + e.type + " recorder.";
|
|
11550
11550
|
function ne() {
|
|
@@ -11626,12 +11626,12 @@ var xa = { exports: {} };
|
|
|
11626
11626
|
* video.src = this.toURL();
|
|
11627
11627
|
* });
|
|
11628
11628
|
*/
|
|
11629
|
-
setRecordingDuration: function(
|
|
11630
|
-
if (typeof
|
|
11629
|
+
setRecordingDuration: function(X, Te) {
|
|
11630
|
+
if (typeof X > "u")
|
|
11631
11631
|
throw "recordingDuration is required.";
|
|
11632
|
-
if (typeof
|
|
11632
|
+
if (typeof X != "number")
|
|
11633
11633
|
throw "recordingDuration must be a number.";
|
|
11634
|
-
return s.recordingDuration =
|
|
11634
|
+
return s.recordingDuration = X, s.onRecordingStopped = Te || function() {
|
|
11635
11635
|
}, {
|
|
11636
11636
|
onRecordingStopped: function(Oe) {
|
|
11637
11637
|
s.onRecordingStopped = Oe;
|
|
@@ -11742,12 +11742,12 @@ var xa = { exports: {} };
|
|
|
11742
11742
|
* invokeSaveAsDialog(this.getBlob(), 'filename.webm');
|
|
11743
11743
|
* });
|
|
11744
11744
|
*/
|
|
11745
|
-
save: function(
|
|
11745
|
+
save: function(X) {
|
|
11746
11746
|
if (!ye) {
|
|
11747
11747
|
ne();
|
|
11748
11748
|
return;
|
|
11749
11749
|
}
|
|
11750
|
-
R(ye.blob,
|
|
11750
|
+
R(ye.blob, X);
|
|
11751
11751
|
},
|
|
11752
11752
|
/**
|
|
11753
11753
|
* This method gets a blob from indexed-DB storage.
|
|
@@ -11760,12 +11760,12 @@ var xa = { exports: {} };
|
|
|
11760
11760
|
* video.src = dataURL;
|
|
11761
11761
|
* });
|
|
11762
11762
|
*/
|
|
11763
|
-
getFromDisk: function(
|
|
11763
|
+
getFromDisk: function(X) {
|
|
11764
11764
|
if (!ye) {
|
|
11765
11765
|
ne();
|
|
11766
11766
|
return;
|
|
11767
11767
|
}
|
|
11768
|
-
Z.getFromDisk(e.type,
|
|
11768
|
+
Z.getFromDisk(e.type, X);
|
|
11769
11769
|
},
|
|
11770
11770
|
/**
|
|
11771
11771
|
* This method appends an array of webp images to the recorded video-blob. It takes an "array" object.
|
|
@@ -11783,12 +11783,12 @@ var xa = { exports: {} };
|
|
|
11783
11783
|
* });
|
|
11784
11784
|
* recorder.setAdvertisementArray(arrayOfWebPImages);
|
|
11785
11785
|
*/
|
|
11786
|
-
setAdvertisementArray: function(
|
|
11786
|
+
setAdvertisementArray: function(X) {
|
|
11787
11787
|
e.advertisement = [];
|
|
11788
|
-
for (var Te =
|
|
11788
|
+
for (var Te = X.length, Oe = 0; Oe < Te; Oe++)
|
|
11789
11789
|
e.advertisement.push({
|
|
11790
11790
|
duration: Oe,
|
|
11791
|
-
image:
|
|
11791
|
+
image: X[Oe]
|
|
11792
11792
|
});
|
|
11793
11793
|
},
|
|
11794
11794
|
/**
|
|
@@ -11853,7 +11853,7 @@ var xa = { exports: {} };
|
|
|
11853
11853
|
* recorder.startRecording();
|
|
11854
11854
|
*/
|
|
11855
11855
|
reset: function() {
|
|
11856
|
-
s.state === "recording" && !e.disableLogs && console.warn("Stop an active recorder."), ye && typeof ye.clearRecordedData == "function" && ye.clearRecordedData(), ye = null,
|
|
11856
|
+
s.state === "recording" && !e.disableLogs && console.warn("Stop an active recorder."), ye && typeof ye.clearRecordedData == "function" && ye.clearRecordedData(), ye = null, W("inactive"), s.blob = null;
|
|
11857
11857
|
},
|
|
11858
11858
|
/**
|
|
11859
11859
|
* This method is called whenever recorder's state changes. Use this as an "event".
|
|
@@ -11866,8 +11866,8 @@ var xa = { exports: {} };
|
|
|
11866
11866
|
* console.log('Recorder state: ', state);
|
|
11867
11867
|
* };
|
|
11868
11868
|
*/
|
|
11869
|
-
onStateChanged: function(
|
|
11870
|
-
e.disableLogs || console.log("Recorder state changed:",
|
|
11869
|
+
onStateChanged: function(X) {
|
|
11870
|
+
e.disableLogs || console.log("Recorder state changed:", X);
|
|
11871
11871
|
},
|
|
11872
11872
|
/**
|
|
11873
11873
|
* A recorder can have inactive, recording, paused or stopped states.
|
|
@@ -11904,10 +11904,10 @@ var xa = { exports: {} };
|
|
|
11904
11904
|
* recorder.destroy();
|
|
11905
11905
|
*/
|
|
11906
11906
|
destroy: function() {
|
|
11907
|
-
var
|
|
11907
|
+
var X = e.disableLogs;
|
|
11908
11908
|
e = {
|
|
11909
11909
|
disableLogs: !0
|
|
11910
|
-
}, s.reset(),
|
|
11910
|
+
}, s.reset(), W("destroyed"), Be = s = null, Ce.AudioContextConstructor && (Ce.AudioContextConstructor.close(), Ce.AudioContextConstructor = null), e.disableLogs = X, e.disableLogs || console.log("RecordRTC is destroyed.");
|
|
11911
11911
|
},
|
|
11912
11912
|
/**
|
|
11913
11913
|
* RecordRTC version number
|
|
@@ -12317,8 +12317,8 @@ var xa = { exports: {} };
|
|
|
12317
12317
|
var s = new EBML.Reader(), d = new EBML.Decoder(), h = EBML.tools, C = new FileReader();
|
|
12318
12318
|
C.onload = function(j) {
|
|
12319
12319
|
var x = d.decode(this.result);
|
|
12320
|
-
x.forEach(function(
|
|
12321
|
-
s.read(
|
|
12320
|
+
x.forEach(function(W) {
|
|
12321
|
+
s.read(W);
|
|
12322
12322
|
}), s.stop();
|
|
12323
12323
|
var i = h.makeMetadataSeekable(s.metadatas, s.duration, s.cues), se = this.result.slice(s.metadataSize), de = new Blob([i, se], {
|
|
12324
12324
|
type: "video/webm"
|
|
@@ -12395,18 +12395,18 @@ var xa = { exports: {} };
|
|
|
12395
12395
|
return d;
|
|
12396
12396
|
}, this.record = function() {
|
|
12397
12397
|
de.blob = null, de.clearRecordedData(), de.timestamps = [], se = [], d = [];
|
|
12398
|
-
var
|
|
12399
|
-
e.disableLogs || console.log("Passing following config over MediaRecorder API.",
|
|
12398
|
+
var W = e;
|
|
12399
|
+
e.disableLogs || console.log("Passing following config over MediaRecorder API.", W), x && (x = null), q && !Pe() && (W = "video/vp8"), typeof MediaRecorder.isTypeSupported == "function" && W.mimeType && (MediaRecorder.isTypeSupported(W.mimeType) || (e.disableLogs || console.warn("MediaRecorder API seems unable to record mimeType:", W.mimeType), W.mimeType = e.type === "audio" ? "audio/webm" : "video/webm"));
|
|
12400
12400
|
try {
|
|
12401
|
-
x = new MediaRecorder(A,
|
|
12401
|
+
x = new MediaRecorder(A, W), e.mimeType = W.mimeType;
|
|
12402
12402
|
} catch {
|
|
12403
12403
|
x = new MediaRecorder(A);
|
|
12404
12404
|
}
|
|
12405
|
-
|
|
12405
|
+
W.mimeType && !MediaRecorder.isTypeSupported && "canRecordMimeType" in x && x.canRecordMimeType(W.mimeType) === !1 && (e.disableLogs || console.warn("MediaRecorder API seems unable to record mimeType:", W.mimeType)), x.ondataavailable = function(oe) {
|
|
12406
12406
|
if (oe.data && se.push("ondataavailable: " + Ae(oe.data.size)), typeof e.timeSlice == "number") {
|
|
12407
12407
|
if (oe.data && oe.data.size && (d.push(oe.data), h(), typeof e.ondataavailable == "function")) {
|
|
12408
12408
|
var ne = e.getNativeBlob ? oe.data : new Blob([oe.data], {
|
|
12409
|
-
type: C(
|
|
12409
|
+
type: C(W)
|
|
12410
12410
|
});
|
|
12411
12411
|
e.ondataavailable(ne);
|
|
12412
12412
|
}
|
|
@@ -12414,12 +12414,12 @@ var xa = { exports: {} };
|
|
|
12414
12414
|
}
|
|
12415
12415
|
if (!oe.data || !oe.data.size || oe.data.size < 100 || de.blob) {
|
|
12416
12416
|
de.recordingCallback && (de.recordingCallback(new Blob([], {
|
|
12417
|
-
type: C(
|
|
12417
|
+
type: C(W)
|
|
12418
12418
|
})), de.recordingCallback = null);
|
|
12419
12419
|
return;
|
|
12420
12420
|
}
|
|
12421
12421
|
de.blob = e.getNativeBlob ? oe.data : new Blob([oe.data], {
|
|
12422
|
-
type: C(
|
|
12422
|
+
type: C(W)
|
|
12423
12423
|
}), de.recordingCallback && (de.recordingCallback(de.blob), de.recordingCallback = null);
|
|
12424
12424
|
}, x.onstart = function() {
|
|
12425
12425
|
se.push("started");
|
|
@@ -12430,7 +12430,7 @@ var xa = { exports: {} };
|
|
|
12430
12430
|
}, x.onstop = function() {
|
|
12431
12431
|
se.push("stopped");
|
|
12432
12432
|
}, x.onerror = function(oe) {
|
|
12433
|
-
oe && (oe.name || (oe.name = "UnknownError"), se.push("error: " + oe), e.disableLogs || (oe.name.toString().toLowerCase().indexOf("invalidstate") !== -1 ? console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.", oe) : oe.name.toString().toLowerCase().indexOf("notsupported") !== -1 ? console.error("MIME type (",
|
|
12433
|
+
oe && (oe.name || (oe.name = "UnknownError"), se.push("error: " + oe), e.disableLogs || (oe.name.toString().toLowerCase().indexOf("invalidstate") !== -1 ? console.error("The MediaRecorder is not in a state in which the proposed operation is allowed to be executed.", oe) : oe.name.toString().toLowerCase().indexOf("notsupported") !== -1 ? console.error("MIME type (", W.mimeType, ") is not supported.", oe) : oe.name.toString().toLowerCase().indexOf("security") !== -1 ? console.error("MediaRecorder security error", oe) : oe.name === "OutOfMemory" ? console.error("The UA has exhaused the available memory. User agents SHOULD provide as much additional information as possible in the message attribute.", oe) : oe.name === "IllegalStreamModification" ? console.error("A modification to the stream has occurred that makes it impossible to continue recording. An example would be the addition of a Track while recording is occurring. User agents SHOULD provide as much additional information as possible in the message attribute.", oe) : oe.name === "OtherRecordingError" ? console.error("Used for an fatal error other than those listed above. User agents SHOULD provide as much additional information as possible in the message attribute.", oe) : oe.name === "GenericError" ? console.error("The UA cannot provide the codec or recording option that has been requested.", oe) : console.error("MediaRecorder Error", oe)), function(ne) {
|
|
12434
12434
|
if (!de.manuallyStopped && x && x.state === "inactive") {
|
|
12435
12435
|
delete e.timeslice, x.start(10 * 60 * 1e3);
|
|
12436
12436
|
return;
|
|
@@ -12442,12 +12442,12 @@ var xa = { exports: {} };
|
|
|
12442
12442
|
function h() {
|
|
12443
12443
|
de.timestamps.push((/* @__PURE__ */ new Date()).getTime()), typeof e.onTimeStamp == "function" && e.onTimeStamp(de.timestamps[de.timestamps.length - 1], de.timestamps);
|
|
12444
12444
|
}
|
|
12445
|
-
function C(
|
|
12446
|
-
return x && x.mimeType ? x.mimeType :
|
|
12445
|
+
function C(W) {
|
|
12446
|
+
return x && x.mimeType ? x.mimeType : W.mimeType || "video/webm";
|
|
12447
12447
|
}
|
|
12448
|
-
this.stop = function(
|
|
12449
|
-
|
|
12450
|
-
}, de.manuallyStopped = !0, x && (this.recordingCallback =
|
|
12448
|
+
this.stop = function(W) {
|
|
12449
|
+
W = W || function() {
|
|
12450
|
+
}, de.manuallyStopped = !0, x && (this.recordingCallback = W, x.state === "recording" && x.stop(), typeof e.timeSlice == "number" && setTimeout(function() {
|
|
12451
12451
|
de.blob = new Blob(d, {
|
|
12452
12452
|
type: C(e)
|
|
12453
12453
|
}), de.recordingCallback(de.blob);
|
|
@@ -12482,13 +12482,13 @@ var xa = { exports: {} };
|
|
|
12482
12482
|
return se;
|
|
12483
12483
|
}, typeof e.checkForInactiveTracks > "u" && (e.checkForInactiveTracks = !1);
|
|
12484
12484
|
var de = this;
|
|
12485
|
-
(function
|
|
12485
|
+
(function W() {
|
|
12486
12486
|
if (!(!x || e.checkForInactiveTracks === !1)) {
|
|
12487
12487
|
if (i() === !1) {
|
|
12488
12488
|
e.disableLogs || console.log("MediaStream seems stopped."), de.stop();
|
|
12489
12489
|
return;
|
|
12490
12490
|
}
|
|
12491
|
-
setTimeout(
|
|
12491
|
+
setTimeout(W, 1e3);
|
|
12492
12492
|
}
|
|
12493
12493
|
})(), this.name = "MediaStreamRecorder", this.toString = function() {
|
|
12494
12494
|
return this.name;
|
|
@@ -12536,15 +12536,15 @@ var xa = { exports: {} };
|
|
|
12536
12536
|
throw "Please make sure MediaStream is active.";
|
|
12537
12537
|
Oe(), fe = Te = !1, C = !0, typeof e.timeSlice < "u" && G();
|
|
12538
12538
|
};
|
|
12539
|
-
function
|
|
12539
|
+
function W(g, pe) {
|
|
12540
12540
|
function m(me, Y) {
|
|
12541
12541
|
var ue = me.numberOfAudioChannels, O = me.leftBuffers.slice(0), Re = me.rightBuffers.slice(0), L = me.sampleRate, H = me.internalInterleavedLength, t = me.desiredSampRate;
|
|
12542
12542
|
ue === 2 && (O = U(O, H), Re = U(Re, H), t && (O = o(O, t, L), Re = o(Re, t, L))), ue === 1 && (O = U(O, H), t && (O = o(O, t, L))), t && (L = t);
|
|
12543
12543
|
function o(E, a, r) {
|
|
12544
|
-
var J = Math.round(E.length * (a / r)), D = [],
|
|
12544
|
+
var J = Math.round(E.length * (a / r)), D = [], K = Number((E.length - 1) / (J - 1));
|
|
12545
12545
|
D[0] = E[0];
|
|
12546
12546
|
for (var Se = 1; Se < J - 1; Se++) {
|
|
12547
|
-
var De = Se *
|
|
12547
|
+
var De = Se * K, Ne = Number(Math.floor(De)).toFixed(), Je = Number(Math.ceil(De)).toFixed(), nt = De - Ne;
|
|
12548
12548
|
D[Se] = T(E[Ne], E[Je], nt);
|
|
12549
12549
|
}
|
|
12550
12550
|
return D[J - 1] = E[E.length - 1], D;
|
|
@@ -12553,15 +12553,15 @@ var xa = { exports: {} };
|
|
|
12553
12553
|
return E + (a - E) * r;
|
|
12554
12554
|
}
|
|
12555
12555
|
function U(E, a) {
|
|
12556
|
-
for (var r = new Float64Array(a), J = 0, D = E.length,
|
|
12557
|
-
var Se = E[
|
|
12556
|
+
for (var r = new Float64Array(a), J = 0, D = E.length, K = 0; K < D; K++) {
|
|
12557
|
+
var Se = E[K];
|
|
12558
12558
|
r.set(Se, J), J += Se.length;
|
|
12559
12559
|
}
|
|
12560
12560
|
return r;
|
|
12561
12561
|
}
|
|
12562
12562
|
function y(E, a) {
|
|
12563
|
-
for (var r = E.length + a.length, J = new Float64Array(r), D = 0,
|
|
12564
|
-
J[
|
|
12563
|
+
for (var r = E.length + a.length, J = new Float64Array(r), D = 0, K = 0; K < r; )
|
|
12564
|
+
J[K++] = E[D], J[K++] = a[D], D++;
|
|
12565
12565
|
return J;
|
|
12566
12566
|
}
|
|
12567
12567
|
function f(E, a, r) {
|
|
@@ -12570,18 +12570,18 @@ var xa = { exports: {} };
|
|
|
12570
12570
|
}
|
|
12571
12571
|
var p;
|
|
12572
12572
|
ue === 2 && (p = y(O, Re)), ue === 1 && (p = O);
|
|
12573
|
-
var u = p.length, B = 44 + u * 2, n = new ArrayBuffer(B),
|
|
12574
|
-
f(
|
|
12573
|
+
var u = p.length, B = 44 + u * 2, n = new ArrayBuffer(B), $ = new DataView(n);
|
|
12574
|
+
f($, 0, "RIFF"), $.setUint32(4, 36 + u * 2, !0), f($, 8, "WAVE"), f($, 12, "fmt "), $.setUint32(16, 16, !0), $.setUint16(20, 1, !0), $.setUint16(22, ue, !0), $.setUint32(24, L, !0), $.setUint32(28, L * ue * 2, !0), $.setUint16(32, ue * 2, !0), $.setUint16(34, 16, !0), f($, 36, "data"), $.setUint32(40, u * 2, !0);
|
|
12575
12575
|
for (var c = u, v = 44, _ = 1, S = 0; S < c; S++)
|
|
12576
|
-
|
|
12576
|
+
$.setInt16(v, p[S] * (32767 * _), !0), v += 2;
|
|
12577
12577
|
if (Y)
|
|
12578
12578
|
return Y({
|
|
12579
12579
|
buffer: n,
|
|
12580
|
-
view:
|
|
12580
|
+
view: $
|
|
12581
12581
|
});
|
|
12582
12582
|
postMessage({
|
|
12583
12583
|
buffer: n,
|
|
12584
|
-
view:
|
|
12584
|
+
view: $
|
|
12585
12585
|
});
|
|
12586
12586
|
}
|
|
12587
12587
|
if (g.noWorker) {
|
|
@@ -12606,9 +12606,9 @@ var xa = { exports: {} };
|
|
|
12606
12606
|
}
|
|
12607
12607
|
this.stop = function(g) {
|
|
12608
12608
|
g = g || function() {
|
|
12609
|
-
}, C = !1,
|
|
12609
|
+
}, C = !1, W({
|
|
12610
12610
|
desiredSampRate: se,
|
|
12611
|
-
sampleRate:
|
|
12611
|
+
sampleRate: X,
|
|
12612
12612
|
numberOfAudioChannels: i,
|
|
12613
12613
|
internalInterleavedLength: j,
|
|
12614
12614
|
leftBuffers: d,
|
|
@@ -12617,7 +12617,7 @@ var xa = { exports: {} };
|
|
|
12617
12617
|
}, function(pe, m) {
|
|
12618
12618
|
s.blob = new Blob([m], {
|
|
12619
12619
|
type: "audio/wav"
|
|
12620
|
-
}), s.buffer = new ArrayBuffer(m.buffer.byteLength), s.view = m, s.sampleRate = se ||
|
|
12620
|
+
}), s.buffer = new ArrayBuffer(m.buffer.byteLength), s.view = m, s.sampleRate = se || X, s.bufferSize = ge, s.length = j, fe = !1, g && g(s.blob);
|
|
12621
12621
|
});
|
|
12622
12622
|
}, typeof Z.Storage > "u" && (Z.Storage = {
|
|
12623
12623
|
AudioContextConstructor: null,
|
|
@@ -12631,8 +12631,8 @@ var xa = { exports: {} };
|
|
|
12631
12631
|
else
|
|
12632
12632
|
throw "WebAudio API has no support on this browser.";
|
|
12633
12633
|
ye.connect(x), e.bufferSize || (ge = x.bufferSize);
|
|
12634
|
-
var
|
|
12635
|
-
(
|
|
12634
|
+
var X = typeof e.sampleRate < "u" ? e.sampleRate : ne.sampleRate || 44100;
|
|
12635
|
+
(X < 22050 || X > 96e3) && (e.disableLogs || console.log("sample-rate must be under range 22050 and 96000.")), e.disableLogs || e.desiredSampRate && console.log("Desired sample-rate: " + e.desiredSampRate);
|
|
12636
12636
|
var Te = !1;
|
|
12637
12637
|
this.pause = function() {
|
|
12638
12638
|
Te = !0;
|
|
@@ -12648,7 +12648,7 @@ var xa = { exports: {} };
|
|
|
12648
12648
|
e.checkForInactiveTracks = !1, C && this.stop(z), z();
|
|
12649
12649
|
};
|
|
12650
12650
|
function Oe() {
|
|
12651
|
-
d = [], h = [], j = 0, fe = !1, C = !1, Te = !1, ne = null, s.leftchannel = d, s.rightchannel = h, s.numberOfAudioChannels = i, s.desiredSampRate = se, s.sampleRate =
|
|
12651
|
+
d = [], h = [], j = 0, fe = !1, C = !1, Te = !1, ne = null, s.leftchannel = d, s.rightchannel = h, s.numberOfAudioChannels = i, s.desiredSampRate = se, s.sampleRate = X, s.recordingLength = j, k = {
|
|
12652
12652
|
left: [],
|
|
12653
12653
|
right: [],
|
|
12654
12654
|
recordingLength: 0
|
|
@@ -12676,16 +12676,16 @@ var xa = { exports: {} };
|
|
|
12676
12676
|
j += ge, s.recordingLength = j, typeof e.timeSlice < "u" && (k.recordingLength += ge, k.left.push(m), i === 2 && k.right.push(me));
|
|
12677
12677
|
}
|
|
12678
12678
|
}
|
|
12679
|
-
x.onaudioprocess = l, ne.createMediaStreamDestination ? x.connect(ne.createMediaStreamDestination()) : x.connect(ne.destination), this.leftchannel = d, this.rightchannel = h, this.numberOfAudioChannels = i, this.desiredSampRate = se, this.sampleRate =
|
|
12679
|
+
x.onaudioprocess = l, ne.createMediaStreamDestination ? x.connect(ne.createMediaStreamDestination()) : x.connect(ne.destination), this.leftchannel = d, this.rightchannel = h, this.numberOfAudioChannels = i, this.desiredSampRate = se, this.sampleRate = X, s.recordingLength = j;
|
|
12680
12680
|
var k = {
|
|
12681
12681
|
left: [],
|
|
12682
12682
|
right: [],
|
|
12683
12683
|
recordingLength: 0
|
|
12684
12684
|
};
|
|
12685
12685
|
function G() {
|
|
12686
|
-
!C || typeof e.ondataavailable != "function" || typeof e.timeSlice > "u" || (k.left.length ? (
|
|
12686
|
+
!C || typeof e.ondataavailable != "function" || typeof e.timeSlice > "u" || (k.left.length ? (W({
|
|
12687
12687
|
desiredSampRate: se,
|
|
12688
|
-
sampleRate:
|
|
12688
|
+
sampleRate: X,
|
|
12689
12689
|
numberOfAudioChannels: i,
|
|
12690
12690
|
internalInterleavedLength: k.recordingLength,
|
|
12691
12691
|
leftBuffers: k.left,
|
|
@@ -12764,10 +12764,10 @@ var xa = { exports: {} };
|
|
|
12764
12764
|
return;
|
|
12765
12765
|
}
|
|
12766
12766
|
var ge = ye.frames.length;
|
|
12767
|
-
ye.frames.forEach(function(
|
|
12767
|
+
ye.frames.forEach(function(X, Te) {
|
|
12768
12768
|
var Oe = ge - Te;
|
|
12769
12769
|
e.disableLogs || console.log(Oe + "/" + ge + " frames remaining"), e.onEncodingCallback && e.onEncodingCallback(Oe, ge);
|
|
12770
|
-
var z =
|
|
12770
|
+
var z = X.image.toDataURL("image/webp", 1);
|
|
12771
12771
|
ye.frames[Te].image = z;
|
|
12772
12772
|
}), e.disableLogs || console.log("Generating WebM"), Be();
|
|
12773
12773
|
}, this.stop = function(Be) {
|
|
@@ -12778,8 +12778,8 @@ var xa = { exports: {} };
|
|
|
12778
12778
|
return;
|
|
12779
12779
|
}
|
|
12780
12780
|
this.getWebPImages(function() {
|
|
12781
|
-
ye.compile(function(
|
|
12782
|
-
e.disableLogs || console.log("Recording finished!"), ge.blob =
|
|
12781
|
+
ye.compile(function(X) {
|
|
12782
|
+
e.disableLogs || console.log("Recording finished!"), ge.blob = X, ge.blob.forEach && (ge.blob = new Blob([], {
|
|
12783
12783
|
type: "video/webm"
|
|
12784
12784
|
})), Be && Be(ge.blob), ye.frames = [];
|
|
12785
12785
|
});
|
|
@@ -12806,7 +12806,7 @@ var xa = { exports: {} };
|
|
|
12806
12806
|
this.name = "CanvasRecorder", this.toString = function() {
|
|
12807
12807
|
return this.name;
|
|
12808
12808
|
};
|
|
12809
|
-
function
|
|
12809
|
+
function W() {
|
|
12810
12810
|
var Be = document.createElement("canvas"), ge = Be.getContext("2d");
|
|
12811
12811
|
return Be.width = A.width, Be.height = A.height, ge.drawImage(A, 0, 0), Be;
|
|
12812
12812
|
}
|
|
@@ -12816,7 +12816,7 @@ var xa = { exports: {} };
|
|
|
12816
12816
|
if (A.nodeName.toLowerCase() === "canvas") {
|
|
12817
12817
|
var Be = (/* @__PURE__ */ new Date()).getTime() - ne;
|
|
12818
12818
|
ne = (/* @__PURE__ */ new Date()).getTime(), ye.frames.push({
|
|
12819
|
-
image:
|
|
12819
|
+
image: W(),
|
|
12820
12820
|
duration: Be
|
|
12821
12821
|
}), i && setTimeout(oe, e.frameInterval);
|
|
12822
12822
|
return;
|
|
@@ -12824,12 +12824,12 @@ var xa = { exports: {} };
|
|
|
12824
12824
|
html2canvas(A, {
|
|
12825
12825
|
grabMouse: typeof e.showMousePointer > "u" || e.showMousePointer,
|
|
12826
12826
|
onrendered: function(ge) {
|
|
12827
|
-
var
|
|
12828
|
-
if (!
|
|
12827
|
+
var X = (/* @__PURE__ */ new Date()).getTime() - ne;
|
|
12828
|
+
if (!X)
|
|
12829
12829
|
return setTimeout(oe, e.frameInterval);
|
|
12830
12830
|
ne = (/* @__PURE__ */ new Date()).getTime(), ye.frames.push({
|
|
12831
12831
|
image: ge.toDataURL("image/webp", 1),
|
|
12832
|
-
duration:
|
|
12832
|
+
duration: X
|
|
12833
12833
|
}), i && setTimeout(oe, e.frameInterval);
|
|
12834
12834
|
}
|
|
12835
12835
|
});
|
|
@@ -12864,16 +12864,16 @@ var xa = { exports: {} };
|
|
|
12864
12864
|
height: e.height
|
|
12865
12865
|
}), i.width = e.canvas.width || 320, i.height = e.canvas.height || 240, se = i.getContext("2d"), e.video && e.video instanceof HTMLVideoElement ? (de = e.video.cloneNode(), e.initCallback && e.initCallback()) : (de = document.createElement("video"), ae(A, de), de.onloadedmetadata = function() {
|
|
12866
12866
|
e.initCallback && e.initCallback();
|
|
12867
|
-
}, de.width = e.video.width, de.height = e.video.height), de.muted = !0, de.play(),
|
|
12867
|
+
}, de.width = e.video.width, de.height = e.video.height), de.muted = !0, de.play(), W = (/* @__PURE__ */ new Date()).getTime(), oe = new Ie.Video(), e.disableLogs || (console.log("canvas resolutions", i.width, "*", i.height), console.log("video width/height", de.width || i.width, "*", de.height || i.height)), s(e.frameInterval);
|
|
12868
12868
|
};
|
|
12869
12869
|
function s(ne) {
|
|
12870
12870
|
ne = typeof ne < "u" ? ne : 10;
|
|
12871
|
-
var ye = (/* @__PURE__ */ new Date()).getTime() -
|
|
12871
|
+
var ye = (/* @__PURE__ */ new Date()).getTime() - W;
|
|
12872
12872
|
if (!ye)
|
|
12873
12873
|
return setTimeout(s, ne, ne);
|
|
12874
12874
|
if (j)
|
|
12875
|
-
return
|
|
12876
|
-
|
|
12875
|
+
return W = (/* @__PURE__ */ new Date()).getTime(), setTimeout(s, 100);
|
|
12876
|
+
W = (/* @__PURE__ */ new Date()).getTime(), de.paused && de.play(), se.drawImage(de, 0, 0, i.width, i.height), oe.frames.push({
|
|
12877
12877
|
duration: ye,
|
|
12878
12878
|
image: i.toDataURL("image/webp")
|
|
12879
12879
|
}), C || setTimeout(s, ne, ne);
|
|
@@ -12890,7 +12890,7 @@ var xa = { exports: {} };
|
|
|
12890
12890
|
}, 1);
|
|
12891
12891
|
})();
|
|
12892
12892
|
}
|
|
12893
|
-
function h(ne, ye, Be, ge,
|
|
12893
|
+
function h(ne, ye, Be, ge, X) {
|
|
12894
12894
|
var Te = document.createElement("canvas");
|
|
12895
12895
|
Te.width = i.width, Te.height = i.height;
|
|
12896
12896
|
var Oe = Te.getContext("2d"), z = [], fe = ne.length, l = {
|
|
@@ -12929,7 +12929,7 @@ var xa = { exports: {} };
|
|
|
12929
12929
|
}
|
|
12930
12930
|
},
|
|
12931
12931
|
callback: function() {
|
|
12932
|
-
z = z.concat(ne.slice(fe)), z.length <= 0 && z.push(ne[ne.length - 1]),
|
|
12932
|
+
z = z.concat(ne.slice(fe)), z.length <= 0 && z.push(ne[ne.length - 1]), X(z);
|
|
12933
12933
|
}
|
|
12934
12934
|
});
|
|
12935
12935
|
}
|
|
@@ -12962,7 +12962,7 @@ var xa = { exports: {} };
|
|
|
12962
12962
|
this.name = "WhammyRecorder", this.toString = function() {
|
|
12963
12963
|
return this.name;
|
|
12964
12964
|
};
|
|
12965
|
-
var i = document.createElement("canvas"), se = i.getContext("2d"), de,
|
|
12965
|
+
var i = document.createElement("canvas"), se = i.getContext("2d"), de, W, oe;
|
|
12966
12966
|
}
|
|
12967
12967
|
typeof Z < "u" && (Z.WhammyRecorder = M);
|
|
12968
12968
|
/**
|
|
@@ -13000,8 +13000,8 @@ var xa = { exports: {} };
|
|
|
13000
13000
|
return be.revokeObjectURL(h), C;
|
|
13001
13001
|
}
|
|
13002
13002
|
function s(d) {
|
|
13003
|
-
function h(
|
|
13004
|
-
var Te = j(
|
|
13003
|
+
function h(X) {
|
|
13004
|
+
var Te = j(X);
|
|
13005
13005
|
if (!Te)
|
|
13006
13006
|
return [];
|
|
13007
13007
|
for (var Oe = 3e4, z = [{
|
|
@@ -13109,11 +13109,11 @@ var xa = { exports: {} };
|
|
|
13109
13109
|
}]
|
|
13110
13110
|
}]
|
|
13111
13111
|
}]
|
|
13112
|
-
}], fe = 0, l = 0; fe <
|
|
13112
|
+
}], fe = 0, l = 0; fe < X.length; ) {
|
|
13113
13113
|
var k = [], G = 0;
|
|
13114
13114
|
do
|
|
13115
|
-
k.push(
|
|
13116
|
-
while (fe <
|
|
13115
|
+
k.push(X[fe]), G += X[fe].duration, fe++;
|
|
13116
|
+
while (fe < X.length && G < Oe);
|
|
13117
13117
|
var g = 0, pe = {
|
|
13118
13118
|
id: 524531317,
|
|
13119
13119
|
// Cluster
|
|
@@ -13123,13 +13123,13 @@ var xa = { exports: {} };
|
|
|
13123
13123
|
}
|
|
13124
13124
|
return de(z);
|
|
13125
13125
|
}
|
|
13126
|
-
function C(
|
|
13126
|
+
function C(X, Te, Oe) {
|
|
13127
13127
|
return [{
|
|
13128
|
-
data:
|
|
13128
|
+
data: X,
|
|
13129
13129
|
id: 231
|
|
13130
13130
|
// Timecode
|
|
13131
13131
|
}].concat(Oe.map(function(z) {
|
|
13132
|
-
var fe =
|
|
13132
|
+
var fe = W({
|
|
13133
13133
|
discardable: 0,
|
|
13134
13134
|
frame: z.data.slice(4),
|
|
13135
13135
|
invisible: 0,
|
|
@@ -13144,93 +13144,93 @@ var xa = { exports: {} };
|
|
|
13144
13144
|
};
|
|
13145
13145
|
}));
|
|
13146
13146
|
}
|
|
13147
|
-
function j(
|
|
13148
|
-
if (!
|
|
13147
|
+
function j(X) {
|
|
13148
|
+
if (!X[0]) {
|
|
13149
13149
|
postMessage({
|
|
13150
13150
|
error: "Something went wrong. Maybe WebP format is not supported in the current browser."
|
|
13151
13151
|
});
|
|
13152
13152
|
return;
|
|
13153
13153
|
}
|
|
13154
|
-
for (var Te =
|
|
13155
|
-
z +=
|
|
13154
|
+
for (var Te = X[0].width, Oe = X[0].height, z = X[0].duration, fe = 1; fe < X.length; fe++)
|
|
13155
|
+
z += X[fe].duration;
|
|
13156
13156
|
return {
|
|
13157
13157
|
duration: z,
|
|
13158
13158
|
width: Te,
|
|
13159
13159
|
height: Oe
|
|
13160
13160
|
};
|
|
13161
13161
|
}
|
|
13162
|
-
function x(
|
|
13163
|
-
for (var Te = [];
|
|
13164
|
-
Te.push(
|
|
13162
|
+
function x(X) {
|
|
13163
|
+
for (var Te = []; X > 0; )
|
|
13164
|
+
Te.push(X & 255), X = X >> 8;
|
|
13165
13165
|
return new Uint8Array(Te.reverse());
|
|
13166
13166
|
}
|
|
13167
|
-
function i(
|
|
13168
|
-
return new Uint8Array(
|
|
13167
|
+
function i(X) {
|
|
13168
|
+
return new Uint8Array(X.split("").map(function(Te) {
|
|
13169
13169
|
return Te.charCodeAt(0);
|
|
13170
13170
|
}));
|
|
13171
13171
|
}
|
|
13172
|
-
function se(
|
|
13173
|
-
var Te = [], Oe =
|
|
13174
|
-
|
|
13175
|
-
for (var z = 0; z <
|
|
13176
|
-
Te.push(parseInt(
|
|
13172
|
+
function se(X) {
|
|
13173
|
+
var Te = [], Oe = X.length % 8 ? new Array(9 - X.length % 8).join("0") : "";
|
|
13174
|
+
X = Oe + X;
|
|
13175
|
+
for (var z = 0; z < X.length; z += 8)
|
|
13176
|
+
Te.push(parseInt(X.substr(z, 8), 2));
|
|
13177
13177
|
return new Uint8Array(Te);
|
|
13178
13178
|
}
|
|
13179
|
-
function de(
|
|
13180
|
-
for (var Te = [], Oe = 0; Oe <
|
|
13181
|
-
var z =
|
|
13179
|
+
function de(X) {
|
|
13180
|
+
for (var Te = [], Oe = 0; Oe < X.length; Oe++) {
|
|
13181
|
+
var z = X[Oe].data;
|
|
13182
13182
|
typeof z == "object" && (z = de(z)), typeof z == "number" && (z = se(z.toString(2))), typeof z == "string" && (z = i(z));
|
|
13183
13183
|
var fe = z.size || z.byteLength || z.length, l = Math.ceil(Math.ceil(Math.log(fe) / Math.log(2)) / 8), k = fe.toString(2), G = new Array(l * 7 + 7 + 1 - k.length).join("0") + k, g = new Array(l).join("0") + "1" + G;
|
|
13184
|
-
Te.push(x(
|
|
13184
|
+
Te.push(x(X[Oe].id)), Te.push(se(g)), Te.push(z);
|
|
13185
13185
|
}
|
|
13186
13186
|
return new Blob(Te, {
|
|
13187
13187
|
type: "video/webm"
|
|
13188
13188
|
});
|
|
13189
13189
|
}
|
|
13190
|
-
function
|
|
13190
|
+
function W(X) {
|
|
13191
13191
|
var Te = 0;
|
|
13192
|
-
if (Te |= 128,
|
|
13192
|
+
if (Te |= 128, X.trackNum > 127)
|
|
13193
13193
|
throw "TrackNumber > 127 not supported";
|
|
13194
|
-
var Oe = [
|
|
13194
|
+
var Oe = [X.trackNum | 128, X.timecode >> 8, X.timecode & 255, Te].map(function(z) {
|
|
13195
13195
|
return String.fromCharCode(z);
|
|
13196
|
-
}).join("") +
|
|
13196
|
+
}).join("") + X.frame;
|
|
13197
13197
|
return Oe;
|
|
13198
13198
|
}
|
|
13199
|
-
function oe(
|
|
13200
|
-
for (var Te =
|
|
13199
|
+
function oe(X) {
|
|
13200
|
+
for (var Te = X.RIFF[0].WEBP[0], Oe = Te.indexOf("*"), z = 0, fe = []; z < 4; z++)
|
|
13201
13201
|
fe[z] = Te.charCodeAt(Oe + 3 + z);
|
|
13202
13202
|
var l, k, G;
|
|
13203
13203
|
return G = fe[1] << 8 | fe[0], l = G & 16383, G = fe[3] << 8 | fe[2], k = G & 16383, {
|
|
13204
13204
|
width: l,
|
|
13205
13205
|
height: k,
|
|
13206
13206
|
data: Te,
|
|
13207
|
-
riff:
|
|
13207
|
+
riff: X
|
|
13208
13208
|
};
|
|
13209
13209
|
}
|
|
13210
|
-
function ne(
|
|
13211
|
-
return parseInt(
|
|
13210
|
+
function ne(X, Te) {
|
|
13211
|
+
return parseInt(X.substr(Te + 4, 4).split("").map(function(Oe) {
|
|
13212
13212
|
var z = Oe.charCodeAt(0).toString(2);
|
|
13213
13213
|
return new Array(8 - z.length + 1).join("0") + z;
|
|
13214
13214
|
}).join(""), 2);
|
|
13215
13215
|
}
|
|
13216
|
-
function ye(
|
|
13217
|
-
for (var Te = 0, Oe = {}; Te <
|
|
13218
|
-
var z =
|
|
13216
|
+
function ye(X) {
|
|
13217
|
+
for (var Te = 0, Oe = {}; Te < X.length; ) {
|
|
13218
|
+
var z = X.substr(Te, 4), fe = ne(X, Te), l = X.substr(Te + 4 + 4, fe);
|
|
13219
13219
|
Te += 8 + fe, Oe[z] = Oe[z] || [], z === "RIFF" || z === "LIST" ? Oe[z].push(ye(l)) : Oe[z].push(l);
|
|
13220
13220
|
}
|
|
13221
13221
|
return Oe;
|
|
13222
13222
|
}
|
|
13223
|
-
function Be(
|
|
13223
|
+
function Be(X) {
|
|
13224
13224
|
return [].slice.call(
|
|
13225
|
-
new Uint8Array(new Float64Array([
|
|
13225
|
+
new Uint8Array(new Float64Array([X]).buffer),
|
|
13226
13226
|
0
|
|
13227
13227
|
).map(function(Te) {
|
|
13228
13228
|
return String.fromCharCode(Te);
|
|
13229
13229
|
}).reverse().join("");
|
|
13230
13230
|
}
|
|
13231
|
-
var ge = new h(d.map(function(
|
|
13232
|
-
var Te = oe(ye(atob(
|
|
13233
|
-
return Te.duration =
|
|
13231
|
+
var ge = new h(d.map(function(X) {
|
|
13232
|
+
var Te = oe(ye(atob(X.image.slice(23))));
|
|
13233
|
+
return Te.duration = X.duration, Te;
|
|
13234
13234
|
}));
|
|
13235
13235
|
postMessage(ge);
|
|
13236
13236
|
}
|
|
@@ -13425,7 +13425,7 @@ var xa = { exports: {} };
|
|
|
13425
13425
|
return setTimeout(function() {
|
|
13426
13426
|
ye(Be);
|
|
13427
13427
|
}, 100);
|
|
13428
|
-
de = _e(ye), typeof
|
|
13428
|
+
de = _e(ye), typeof W === void 0 && (W = Be), !(Be - W < 90) && (!d && se.paused && se.play(), d || x.drawImage(se, 0, 0, j.width, j.height), e.onGifPreview && e.onGifPreview(j.toDataURL("image/png")), oe.addFrame(x), W = Be);
|
|
13429
13429
|
}
|
|
13430
13430
|
}
|
|
13431
13431
|
de = _e(ye), e.initCallback && e.initCallback();
|
|
@@ -13458,7 +13458,7 @@ var xa = { exports: {} };
|
|
|
13458
13458
|
i = !0;
|
|
13459
13459
|
}, ae(A, se), se.play();
|
|
13460
13460
|
}
|
|
13461
|
-
var de = null,
|
|
13461
|
+
var de = null, W, oe, ne = this;
|
|
13462
13462
|
}
|
|
13463
13463
|
typeof Z < "u" && (Z.GifRecorder = Me);
|
|
13464
13464
|
function Ve(A, e) {
|
|
@@ -13522,8 +13522,8 @@ var xa = { exports: {} };
|
|
|
13522
13522
|
z.stop();
|
|
13523
13523
|
});
|
|
13524
13524
|
});
|
|
13525
|
-
var
|
|
13526
|
-
typeof i < "u" ?
|
|
13525
|
+
var W = {};
|
|
13526
|
+
typeof i < "u" ? W.AudioContext = i : typeof webkitAudioContext < "u" && (W.AudioContext = webkitAudioContext);
|
|
13527
13527
|
function oe(z, fe) {
|
|
13528
13528
|
"srcObject" in fe ? fe.srcObject = z : "mozSrcObject" in fe ? fe.mozSrcObject = z : fe.srcObject = z;
|
|
13529
13529
|
}
|
|
@@ -13556,7 +13556,7 @@ var xa = { exports: {} };
|
|
|
13556
13556
|
}
|
|
13557
13557
|
function Be() {
|
|
13558
13558
|
h = !1;
|
|
13559
|
-
var z = ge(), fe =
|
|
13559
|
+
var z = ge(), fe = X();
|
|
13560
13560
|
return fe && fe.getTracks().filter(function(l) {
|
|
13561
13561
|
return l.kind === "audio";
|
|
13562
13562
|
}).forEach(function(l) {
|
|
@@ -13576,8 +13576,8 @@ var xa = { exports: {} };
|
|
|
13576
13576
|
fe.addTrack(l);
|
|
13577
13577
|
}), C.stream = fe, fe;
|
|
13578
13578
|
}
|
|
13579
|
-
function
|
|
13580
|
-
|
|
13579
|
+
function X() {
|
|
13580
|
+
W.AudioContextConstructor || (W.AudioContextConstructor = new W.AudioContext()), x.audioContext = W.AudioContextConstructor, x.audioSources = [], x.useGainNode === !0 && (x.gainNode = x.audioContext.createGain(), x.gainNode.connect(x.audioContext.destination), x.gainNode.gain.value = 0);
|
|
13581
13581
|
var z = 0;
|
|
13582
13582
|
if (A.forEach(function(fe) {
|
|
13583
13583
|
if (fe.getTracks().filter(function(k) {
|
|
@@ -13849,11 +13849,11 @@ var xa = { exports: {} };
|
|
|
13849
13849
|
function d() {
|
|
13850
13850
|
return new ReadableStream({
|
|
13851
13851
|
start: function(se) {
|
|
13852
|
-
var de = document.createElement("canvas"),
|
|
13853
|
-
|
|
13852
|
+
var de = document.createElement("canvas"), W = document.createElement("video"), oe = !0;
|
|
13853
|
+
W.srcObject = A, W.muted = !0, W.height = e.height, W.width = e.width, W.volume = 0, W.onplaying = function() {
|
|
13854
13854
|
de.width = e.width, de.height = e.height;
|
|
13855
13855
|
var ne = de.getContext("2d"), ye = 1e3 / e.frameRate, Be = setInterval(function() {
|
|
13856
|
-
if (s && (clearInterval(Be), se.close()), oe && (oe = !1, e.onVideoProcessStarted && e.onVideoProcessStarted()), ne.drawImage(
|
|
13856
|
+
if (s && (clearInterval(Be), se.close()), oe && (oe = !1, e.onVideoProcessStarted && e.onVideoProcessStarted()), ne.drawImage(W, 0, 0), se._controlledReadableStream.state !== "closed")
|
|
13857
13857
|
try {
|
|
13858
13858
|
se.enqueue(
|
|
13859
13859
|
ne.getImageData(0, 0, e.width, e.height)
|
|
@@ -13861,7 +13861,7 @@ var xa = { exports: {} };
|
|
|
13861
13861
|
} catch {
|
|
13862
13862
|
}
|
|
13863
13863
|
}, ye);
|
|
13864
|
-
},
|
|
13864
|
+
}, W.play();
|
|
13865
13865
|
}
|
|
13866
13866
|
});
|
|
13867
13867
|
}
|
|
@@ -13878,10 +13878,10 @@ var xa = { exports: {} };
|
|
|
13878
13878
|
return;
|
|
13879
13879
|
}
|
|
13880
13880
|
if (!e.workerPath && de instanceof ArrayBuffer) {
|
|
13881
|
-
var
|
|
13881
|
+
var W = new Blob([de], {
|
|
13882
13882
|
type: "text/javascript"
|
|
13883
13883
|
});
|
|
13884
|
-
e.workerPath = be.createObjectURL(
|
|
13884
|
+
e.workerPath = be.createObjectURL(W);
|
|
13885
13885
|
}
|
|
13886
13886
|
e.workerPath || console.error("workerPath parameter is missing."), h = new Worker(e.workerPath), h.postMessage(e.webAssemblyPath || "https://unpkg.com/webm-wasm@latest/dist/webm-wasm.wasm"), h.addEventListener("message", function(oe) {
|
|
13887
13887
|
oe.data === "READY" ? (h.postMessage({
|
|
@@ -14217,12 +14217,17 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14217
14217
|
const b = w, le = re;
|
|
14218
14218
|
Z({ focusTitle: te, focusContent: ae });
|
|
14219
14219
|
const F = ct([{ text: "", uuid: Ut() }]), _e = ct(null), N = ct(!1), we = ct(!1), he = ct(!1), be = ct(Ut()), Ee = ct(!1), Ye = ct(b.initialLock), xe = ct(null), q = ct(null), I = ct(null), ee = ct(null), Ae = ct(null);
|
|
14220
|
-
|
|
14220
|
+
a0(
|
|
14221
|
+
() => b.note.created_at,
|
|
14222
|
+
(W, oe) => {
|
|
14223
|
+
W !== oe && (Ye.value = b.initialLock);
|
|
14224
|
+
}
|
|
14225
|
+
), a0(
|
|
14221
14226
|
() => b.note,
|
|
14222
|
-
(
|
|
14223
|
-
if (
|
|
14227
|
+
(W, oe) => {
|
|
14228
|
+
if (W.content && (!_e.value || _e.value !== W.id || W.content !== (oe == null ? void 0 : oe.content)))
|
|
14224
14229
|
try {
|
|
14225
|
-
_e.value =
|
|
14230
|
+
_e.value = W.id, F.value = JSON.parse(W.content), F.value.filter((Be) => !Be.pending).length || F.value.push({
|
|
14226
14231
|
text: "",
|
|
14227
14232
|
uuid: Ut()
|
|
14228
14233
|
});
|
|
@@ -14230,20 +14235,20 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14230
14235
|
if (b.readOnly)
|
|
14231
14236
|
for (; F.value[F.value.length - 1] && ye(F.value[F.value.length - 1]); )
|
|
14232
14237
|
F.value.pop();
|
|
14233
|
-
de(
|
|
14238
|
+
de(W.id), Pe();
|
|
14234
14239
|
} catch {
|
|
14235
14240
|
}
|
|
14236
14241
|
},
|
|
14237
14242
|
{ immediate: !0 }
|
|
14238
14243
|
), R();
|
|
14239
14244
|
function R() {
|
|
14240
|
-
typeof b.mobile == "boolean" && (
|
|
14245
|
+
typeof b.mobile == "boolean" && (_t.isMobile = b.mobile);
|
|
14241
14246
|
}
|
|
14242
|
-
function Q(
|
|
14243
|
-
"content" in b.note && (b.note.content !=
|
|
14247
|
+
function Q(W) {
|
|
14248
|
+
"content" in b.note && (b.note.content != W.content || b.note.title != W.title) && (Pe(), le("change", {
|
|
14244
14249
|
type: "tree",
|
|
14245
14250
|
data: {
|
|
14246
|
-
...
|
|
14251
|
+
...W,
|
|
14247
14252
|
updated_at: Date.now()
|
|
14248
14253
|
}
|
|
14249
14254
|
}));
|
|
@@ -14257,13 +14262,13 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14257
14262
|
function te() {
|
|
14258
14263
|
return q.value.focus();
|
|
14259
14264
|
}
|
|
14260
|
-
function Ce(
|
|
14261
|
-
let ne =
|
|
14262
|
-
typeof
|
|
14263
|
-
type:
|
|
14264
|
-
size:
|
|
14265
|
-
content:
|
|
14266
|
-
name:
|
|
14265
|
+
function Ce(W, oe = b.note) {
|
|
14266
|
+
let ne = W;
|
|
14267
|
+
typeof W == "object" && (ne = JSON.stringify({
|
|
14268
|
+
type: W.type,
|
|
14269
|
+
size: W.size,
|
|
14270
|
+
content: W.content,
|
|
14271
|
+
name: W.name
|
|
14267
14272
|
})), le("change", {
|
|
14268
14273
|
// 兼容处理,type已经没必要了
|
|
14269
14274
|
// 现在只有title和tree两种type
|
|
@@ -14276,83 +14281,83 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14276
14281
|
}
|
|
14277
14282
|
});
|
|
14278
14283
|
}
|
|
14279
|
-
function Pe(
|
|
14284
|
+
function Pe(W = b.note.title) {
|
|
14280
14285
|
if (!b.note.created_at) {
|
|
14281
|
-
const oe = et(), ne = Ue(
|
|
14286
|
+
const oe = et(), ne = Ue(W);
|
|
14282
14287
|
Ee.value = !ne || !oe;
|
|
14283
14288
|
}
|
|
14284
14289
|
}
|
|
14285
|
-
function Ue(
|
|
14286
|
-
return !
|
|
14290
|
+
function Ue(W) {
|
|
14291
|
+
return !W || W === "<p></p>";
|
|
14287
14292
|
}
|
|
14288
14293
|
function et() {
|
|
14289
14294
|
if (F.value.length > 1)
|
|
14290
14295
|
return !1;
|
|
14291
|
-
const
|
|
14292
|
-
return !(
|
|
14296
|
+
const W = F.value[0];
|
|
14297
|
+
return !(W && (W.type || W.text && W.text !== "<p></p>"));
|
|
14293
14298
|
}
|
|
14294
|
-
function Le(
|
|
14295
|
-
ae(), xe.value.addFiles(
|
|
14299
|
+
function Le(W) {
|
|
14300
|
+
ae(), xe.value.addFiles(W, F.value[0], -1);
|
|
14296
14301
|
}
|
|
14297
14302
|
function M() {
|
|
14298
14303
|
le("dbEnter");
|
|
14299
14304
|
}
|
|
14300
|
-
function Ie(
|
|
14301
|
-
F.value =
|
|
14305
|
+
function Ie(W) {
|
|
14306
|
+
F.value = W, Q({
|
|
14302
14307
|
...b.note,
|
|
14303
|
-
content: JSON.stringify(
|
|
14308
|
+
content: JSON.stringify(W)
|
|
14304
14309
|
});
|
|
14305
14310
|
}
|
|
14306
14311
|
function He() {
|
|
14307
|
-
let
|
|
14312
|
+
let W = new KeyboardEvent("keydown", {
|
|
14308
14313
|
bubbles: !0,
|
|
14309
14314
|
cancelable: !0,
|
|
14310
14315
|
key: "Tab",
|
|
14311
14316
|
shiftKey: !0
|
|
14312
14317
|
});
|
|
14313
|
-
const oe =
|
|
14314
|
-
oe && Pt({ uuid: oe }).dispatchEvent(
|
|
14318
|
+
const oe = _t.currentId;
|
|
14319
|
+
oe && Pt({ uuid: oe }).dispatchEvent(W);
|
|
14315
14320
|
}
|
|
14316
14321
|
function Me() {
|
|
14317
|
-
let
|
|
14322
|
+
let W = new KeyboardEvent("keydown", {
|
|
14318
14323
|
bubbles: !0,
|
|
14319
14324
|
cancelable: !0,
|
|
14320
14325
|
key: "Tab",
|
|
14321
14326
|
shiftKey: !1
|
|
14322
14327
|
});
|
|
14323
|
-
const oe =
|
|
14324
|
-
oe && Pt({ uuid: oe }).dispatchEvent(
|
|
14328
|
+
const oe = _t.currentId;
|
|
14329
|
+
oe && Pt({ uuid: oe }).dispatchEvent(W);
|
|
14325
14330
|
}
|
|
14326
14331
|
function Ve() {
|
|
14327
|
-
let
|
|
14332
|
+
let W = new KeyboardEvent("keydown", {
|
|
14328
14333
|
bubbles: !0,
|
|
14329
14334
|
cancelable: !0,
|
|
14330
14335
|
key: "ArrowUp",
|
|
14331
14336
|
shiftKey: !1
|
|
14332
14337
|
});
|
|
14333
|
-
const oe =
|
|
14334
|
-
oe && Pt({ uuid: oe }).dispatchEvent(
|
|
14338
|
+
const oe = _t.currentId;
|
|
14339
|
+
oe && Pt({ uuid: oe }).dispatchEvent(W);
|
|
14335
14340
|
}
|
|
14336
14341
|
function Qe() {
|
|
14337
|
-
let
|
|
14342
|
+
let W = new KeyboardEvent("keydown", {
|
|
14338
14343
|
bubbles: !0,
|
|
14339
14344
|
cancelable: !0,
|
|
14340
14345
|
key: "ArrowDown",
|
|
14341
14346
|
shiftKey: !1
|
|
14342
14347
|
});
|
|
14343
|
-
const oe =
|
|
14344
|
-
oe && Pt({ uuid: oe }).dispatchEvent(
|
|
14348
|
+
const oe = _t.currentId;
|
|
14349
|
+
oe && Pt({ uuid: oe }).dispatchEvent(W);
|
|
14345
14350
|
}
|
|
14346
14351
|
function Ke() {
|
|
14347
|
-
return c0[
|
|
14352
|
+
return c0[_t.currentId];
|
|
14348
14353
|
}
|
|
14349
14354
|
function Fe() {
|
|
14350
|
-
const
|
|
14351
|
-
|
|
14355
|
+
const W = Ke();
|
|
14356
|
+
W && W.dispatch("bold");
|
|
14352
14357
|
}
|
|
14353
|
-
function A(
|
|
14358
|
+
function A(W) {
|
|
14354
14359
|
const oe = Ke();
|
|
14355
|
-
oe && oe.dispatch("color",
|
|
14360
|
+
oe && oe.dispatch("color", W);
|
|
14356
14361
|
}
|
|
14357
14362
|
function e() {
|
|
14358
14363
|
Ye.value = !Ye.value, Ye.value || Vt(() => {
|
|
@@ -14366,27 +14371,27 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14366
14371
|
I.value && I.value.click();
|
|
14367
14372
|
}
|
|
14368
14373
|
function h() {
|
|
14369
|
-
|
|
14374
|
+
_t.isMobile ? Ae.value.click() : we.value = !0;
|
|
14370
14375
|
}
|
|
14371
14376
|
function C() {
|
|
14372
14377
|
N.value = !0;
|
|
14373
14378
|
}
|
|
14374
14379
|
function j() {
|
|
14375
|
-
|
|
14380
|
+
_t.isMobile ? ee.value.click() : he.value = !0;
|
|
14376
14381
|
}
|
|
14377
|
-
function x(
|
|
14378
|
-
typeof
|
|
14382
|
+
function x(W) {
|
|
14383
|
+
typeof W == "string" ? _t.currentId === "" ? Ce(W) : xe.value.appendNode({
|
|
14379
14384
|
uuid: Ut(),
|
|
14380
|
-
text:
|
|
14381
|
-
}) : i(
|
|
14385
|
+
text: W
|
|
14386
|
+
}) : i(W);
|
|
14382
14387
|
}
|
|
14383
|
-
async function i(
|
|
14384
|
-
if (!
|
|
14388
|
+
async function i(W, oe) {
|
|
14389
|
+
if (!W.length)
|
|
14385
14390
|
return;
|
|
14386
|
-
const ne = Array.from(
|
|
14387
|
-
const Te = la(
|
|
14391
|
+
const ne = Array.from(W).map(async (X) => {
|
|
14392
|
+
const Te = la(X.type), Oe = URL.createObjectURL(X);
|
|
14388
14393
|
let z = {};
|
|
14389
|
-
switch ((Te.mainType === "image" || Te.mainType === "video") && (z = await ua(
|
|
14394
|
+
switch ((Te.mainType === "image" || Te.mainType === "video") && (z = await ua(X, Te.mainType)), Te.mainType) {
|
|
14390
14395
|
case "image":
|
|
14391
14396
|
case "audio":
|
|
14392
14397
|
case "video":
|
|
@@ -14402,19 +14407,19 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14402
14407
|
return {
|
|
14403
14408
|
uuid: Ut(),
|
|
14404
14409
|
type: "file",
|
|
14405
|
-
name:
|
|
14410
|
+
name: X.name,
|
|
14406
14411
|
content: Oe,
|
|
14407
|
-
size:
|
|
14412
|
+
size: X.size,
|
|
14408
14413
|
pending: !0,
|
|
14409
14414
|
hash: be.value
|
|
14410
14415
|
};
|
|
14411
14416
|
}
|
|
14412
|
-
}), ye = await Promise.all(ne), Be =
|
|
14413
|
-
oe ? oe(ye) : ye.forEach((
|
|
14414
|
-
Te === 0 && Be ? Ce(
|
|
14417
|
+
}), ye = await Promise.all(ne), Be = _t.currentId === Un;
|
|
14418
|
+
oe ? oe(ye) : ye.forEach((X, Te) => {
|
|
14419
|
+
Te === 0 && Be ? Ce(X) : xe.value.appendNode(X);
|
|
14415
14420
|
});
|
|
14416
14421
|
const ge = b.note.id;
|
|
14417
|
-
ca.uploadFile(
|
|
14422
|
+
ca.uploadFile(W, (X, Te) => {
|
|
14418
14423
|
Te && Te.forEach((Oe, z) => {
|
|
14419
14424
|
const fe = ye[z], l = Oe.data, k = Be && z === 0;
|
|
14420
14425
|
if (Oe.code === 0) {
|
|
@@ -14435,12 +14440,12 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14435
14440
|
});
|
|
14436
14441
|
});
|
|
14437
14442
|
}
|
|
14438
|
-
function se(
|
|
14439
|
-
const ne = `${ra}_${
|
|
14443
|
+
function se(W, oe) {
|
|
14444
|
+
const ne = `${ra}_${W}`, ye = JSON.parse(window.localStorage.getItem(ne) || "[]");
|
|
14440
14445
|
ye.push(oe), window.localStorage.setItem(ne, JSON.stringify(ye));
|
|
14441
14446
|
}
|
|
14442
|
-
function de(
|
|
14443
|
-
const oe = `${ra}_${
|
|
14447
|
+
function de(W) {
|
|
14448
|
+
const oe = `${ra}_${W}`, ne = window.localStorage.getItem(oe);
|
|
14444
14449
|
ne && Vt(() => {
|
|
14445
14450
|
const ye = JSON.parse(ne);
|
|
14446
14451
|
window.localStorage.removeItem(oe), ye.forEach((Be) => {
|
|
@@ -14448,10 +14453,10 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14448
14453
|
});
|
|
14449
14454
|
});
|
|
14450
14455
|
}
|
|
14451
|
-
return (
|
|
14456
|
+
return (W, oe) => (st(), ft("div", {
|
|
14452
14457
|
class: Ot({
|
|
14453
14458
|
"record-tree-container": !0,
|
|
14454
|
-
"record-tree-mobile": $e(
|
|
14459
|
+
"record-tree-mobile": $e(_t).isMobile
|
|
14455
14460
|
})
|
|
14456
14461
|
}, [
|
|
14457
14462
|
tt("div", {
|
|
@@ -14482,8 +14487,7 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14482
14487
|
onDbEnter: M
|
|
14483
14488
|
}, null, 8, ["tags", "readOnly", "enableDbEnter", "note"])) : kt("", !0)
|
|
14484
14489
|
]),
|
|
14485
|
-
|
|
14486
|
-
key: 0,
|
|
14490
|
+
tt("div", {
|
|
14487
14491
|
class: "top-bar-right",
|
|
14488
14492
|
onClick: e
|
|
14489
14493
|
}, [
|
|
@@ -14492,7 +14496,7 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14492
14496
|
width: 20,
|
|
14493
14497
|
height: 20
|
|
14494
14498
|
}, null, 8, ["src"])
|
|
14495
|
-
])
|
|
14499
|
+
])
|
|
14496
14500
|
]),
|
|
14497
14501
|
tt("div", Ln, [
|
|
14498
14502
|
tt("div", In, [
|
|
@@ -14504,10 +14508,10 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14504
14508
|
readOnly: w.readOnly || Ye.value,
|
|
14505
14509
|
enableDbEnter: w.enableDbEnter,
|
|
14506
14510
|
hash: be.value,
|
|
14507
|
-
isMobile: $e(
|
|
14511
|
+
isMobile: $e(_t).isMobile,
|
|
14508
14512
|
onChange: Ie,
|
|
14509
14513
|
onFileUpload: i,
|
|
14510
|
-
onDbEnter: oe[0] || (oe[0] = (ne) =>
|
|
14514
|
+
onDbEnter: oe[0] || (oe[0] = (ne) => W.$emit("dbEnter"))
|
|
14511
14515
|
}, null, 8, ["nodes", "tags", "readOnly", "enableDbEnter", "hash", "isMobile"])
|
|
14512
14516
|
])
|
|
14513
14517
|
])
|
|
@@ -14572,7 +14576,7 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14572
14576
|
height: 20
|
|
14573
14577
|
}, null, 8, ["src"])
|
|
14574
14578
|
]),
|
|
14575
|
-
$e(
|
|
14579
|
+
$e(_t).isMobile ? kt("", !0) : (st(), ft("div", Hn, [
|
|
14576
14580
|
xt($e(na), {
|
|
14577
14581
|
placement: "top",
|
|
14578
14582
|
hover: !0,
|
|
@@ -14637,11 +14641,11 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14637
14641
|
])
|
|
14638
14642
|
])
|
|
14639
14643
|
]),
|
|
14640
|
-
$e(
|
|
14644
|
+
$e(_t).isMobile ? (st(), ft("div", Vn, [
|
|
14641
14645
|
tt("div", {
|
|
14642
14646
|
class: "record-tree-option-item",
|
|
14643
14647
|
onClick: It(s, ["stop"])
|
|
14644
|
-
},
|
|
14648
|
+
}, u0(Ee.value || w.note.created_at ? "完成" : "取消"), 1)
|
|
14645
14649
|
])) : kt("", !0),
|
|
14646
14650
|
tt("div", Pn, [
|
|
14647
14651
|
tt("input", {
|
|
@@ -14670,7 +14674,7 @@ const yn = { class: "record-video" }, gn = { class: "buttons" }, xn = {
|
|
|
14670
14674
|
])) : kt("", !0),
|
|
14671
14675
|
N.value ? (st(), qt($e(bn), {
|
|
14672
14676
|
key: 1,
|
|
14673
|
-
isMobile: $e(
|
|
14677
|
+
isMobile: $e(_t).isMobile,
|
|
14674
14678
|
responsive: w.responsive,
|
|
14675
14679
|
onFinish: x,
|
|
14676
14680
|
onCancel: oe[4] || (oe[4] = (ne) => N.value = !1)
|