@wangeditor-next/video-module 1.3.5 → 1.3.7
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/CHANGELOG.md +22 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@wangeditor-next/core"),require("slate"),require("snabbdom"),require("dom7"),require("nanoid")):"function"==typeof define&&define.amd?define(["@wangeditor-next/core","slate","snabbdom","dom7","nanoid"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorVideoModule=e(t.core,t.slate,t.snabbdom,t.$,t.nanoid)}(this,(function(t,e,n,r,o){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=i(r);t.i18nAddResources("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),t.i18nAddResources("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}});var a=function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)};function c(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))}function s(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=e.call(t,u)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function f(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function d(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=f(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){var e={exports:{}};return t(e,e.exports),e.exports}var h,y,g=function(t){return t&&t.Math==Math&&t},m=g("object"==typeof globalThis&&globalThis)||g("object"==typeof window&&window)||g("object"==typeof self&&self)||g("object"==typeof v&&v)||function(){return this}()||Function("return this")(),b=function(t){try{return!!t()}catch(t){return!0}},w=!b((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),S=Function.prototype.call,x=S.bind?S.bind(S):function(){return S.apply(S,arguments)},E={}.propertyIsEnumerable,O=Object.getOwnPropertyDescriptor,I={f:O&&!E.call({1:2},1)?function(t){var e=O(this,t);return!!e&&e.enumerable}:E},j=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},M=Function.prototype,P=M.bind,T=M.call,A=P&&P.bind(T),k=P?function(t){return t&&A(T,t)}:function(t){return t&&function(){return T.apply(t,arguments)}},N=k({}.toString),R=k("".slice),C=function(t){return R(N(t),8,-1)},V=m.Object,L=k("".split),D=b((function(){return!V("z").propertyIsEnumerable(0)}))?function(t){return"String"==C(t)?L(t,""):V(t)}:V,z=m.TypeError,F=function(t){if(null==t)throw z("Can't call method on "+t);return t},$=function(t){return D(F(t))},_=function(t){return"function"==typeof t},B=function(t){return"object"==typeof t?null!==t:_(t)},H=function(t,e){return arguments.length<2?(n=m[t],_(n)?n:void 0):m[t]&&m[t][e];var n},G=k({}.isPrototypeOf),W=H("navigator","userAgent")||"",U=m.process,q=m.Deno,K=U&&U.versions||q&&q.version,X=K&&K.v8;X&&(y=(h=X.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!y&&W&&(!(h=W.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=W.match(/Chrome\/(\d+)/))&&(y=+h[1]);var Y=y,J=!!Object.getOwnPropertySymbols&&!b((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Y&&Y<41})),Q=J&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Z=m.Object,tt=Q?function(t){return"symbol"==typeof t}:function(t){var e=H("Symbol");return _(e)&&G(e.prototype,Z(t))},et=m.String,nt=function(t){try{return et(t)}catch(t){return"Object"}},rt=m.TypeError,ot=function(t){if(_(t))return t;throw rt(nt(t)+" is not a function")},it=function(t,e){var n=t[e];return null==n?void 0:ot(n)},ut=m.TypeError,at=Object.defineProperty,ct=function(t,e){try{at(m,t,{value:e,configurable:!0,writable:!0})}catch(n){m[t]=e}return e},st="__core-js_shared__",ft=m[st]||ct(st,{}),lt=p((function(t){(t.exports=function(t,e){return ft[t]||(ft[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),dt=m.Object,vt=function(t){return dt(F(t))},pt=k({}.hasOwnProperty),ht=Object.hasOwn||function(t,e){return pt(vt(t),e)},yt=0,gt=Math.random(),mt=k(1..toString),bt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+mt(++yt+gt,36)},wt=lt("wks"),St=m.Symbol,xt=St&&St.for,Et=Q?St:St&&St.withoutSetter||bt,Ot=function(t){if(!ht(wt,t)||!J&&"string"!=typeof wt[t]){var e="Symbol."+t;J&&ht(St,t)?wt[t]=St[t]:wt[t]=Q&&xt?xt(e):Et(e)}return wt[t]},It=m.TypeError,jt=Ot("toPrimitive"),Mt=function(t,e){if(!B(t)||tt(t))return t;var n,r=it(t,jt);if(r){if(void 0===e&&(e="default"),n=x(r,t,e),!B(n)||tt(n))return n;throw It("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&_(n=t.toString)&&!B(r=x(n,t)))return r;if(_(n=t.valueOf)&&!B(r=x(n,t)))return r;if("string"!==e&&_(n=t.toString)&&!B(r=x(n,t)))return r;throw ut("Can't convert object to primitive value")}(t,e)},Pt=function(t){var e=Mt(t,"string");return tt(e)?e:e+""},Tt=m.document,At=B(Tt)&&B(Tt.createElement),kt=function(t){return At?Tt.createElement(t):{}},Nt=!w&&!b((function(){return 7!=Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Rt=Object.getOwnPropertyDescriptor,Ct={f:w?Rt:function(t,e){if(t=$(t),e=Pt(e),Nt)try{return Rt(t,e)}catch(t){}if(ht(t,e))return j(!x(I.f,t,e),t[e])}},Vt=m.String,Lt=m.TypeError,Dt=function(t){if(B(t))return t;throw Lt(Vt(t)+" is not an object")},zt=m.TypeError,Ft=Object.defineProperty,$t={f:w?Ft:function(t,e,n){if(Dt(t),e=Pt(e),Dt(n),Nt)try{return Ft(t,e,n)}catch(t){}if("get"in n||"set"in n)throw zt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},_t=w?function(t,e,n){return $t.f(t,e,j(1,n))}:function(t,e,n){return t[e]=n,t},Bt=k(Function.toString);_(ft.inspectSource)||(ft.inspectSource=function(t){return Bt(t)});var Ht,Gt,Wt,Ut=ft.inspectSource,qt=m.WeakMap,Kt=_(qt)&&/native code/.test(Ut(qt)),Xt=lt("keys"),Yt=function(t){return Xt[t]||(Xt[t]=bt(t))},Jt={},Qt="Object already initialized",Zt=m.TypeError,te=m.WeakMap;if(Kt||ft.state){var ee=ft.state||(ft.state=new te),ne=k(ee.get),re=k(ee.has),oe=k(ee.set);Ht=function(t,e){if(re(ee,t))throw new Zt(Qt);return e.facade=t,oe(ee,t,e),e},Gt=function(t){return ne(ee,t)||{}},Wt=function(t){return re(ee,t)}}else{var ie=Yt("state");Jt[ie]=!0,Ht=function(t,e){if(ht(t,ie))throw new Zt(Qt);return e.facade=t,_t(t,ie,e),e},Gt=function(t){return ht(t,ie)?t[ie]:{}},Wt=function(t){return ht(t,ie)}}var ue={set:Ht,get:Gt,has:Wt,enforce:function(t){return Wt(t)?Gt(t):Ht(t,{})},getterFor:function(t){return function(e){var n;if(!B(e)||(n=Gt(e)).type!==t)throw Zt("Incompatible receiver, "+t+" required");return n}}},ae=Function.prototype,ce=w&&Object.getOwnPropertyDescriptor,se=ht(ae,"name"),fe={EXISTS:se,PROPER:se&&"something"===function(){}.name,CONFIGURABLE:se&&(!w||w&&ce(ae,"name").configurable)},le=p((function(t){var e=fe.CONFIGURABLE,n=ue.get,r=ue.enforce,o=String(String).split("String");(t.exports=function(t,n,i,u){var a,c=!!u&&!!u.unsafe,s=!!u&&!!u.enumerable,f=!!u&&!!u.noTargetGet,l=u&&void 0!==u.name?u.name:n;_(i)&&("Symbol("===String(l).slice(0,7)&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ht(i,"name")||e&&i.name!==l)&&_t(i,"name",l),(a=r(i)).source||(a.source=o.join("string"==typeof l?l:""))),t!==m?(c?!f&&t[n]&&(s=!0):delete t[n],s?t[n]=i:_t(t,n,i)):s?t[n]=i:ct(n,i)})(Function.prototype,"toString",(function(){return _(this)&&n(this).source||Ut(this)}))})),de=Math.ceil,ve=Math.floor,pe=function(t){var e=+t;return e!=e||0===e?0:(e>0?ve:de)(e)},he=Math.max,ye=Math.min,ge=function(t,e){var n=pe(t);return n<0?he(n+e,0):ye(n,e)},me=Math.min,be=function(t){return t>0?me(pe(t),9007199254740991):0},we=function(t){return be(t.length)},Se=function(t){return function(e,n,r){var o,i=$(e),u=we(i),a=ge(r,u);if(t&&n!=n){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},xe={includes:Se(!0),indexOf:Se(!1)},Ee=xe.indexOf,Oe=k([].push),Ie=function(t,e){var n,r=$(t),o=0,i=[];for(n in r)!ht(Jt,n)&&ht(r,n)&&Oe(i,n);for(;e.length>o;)ht(r,n=e[o++])&&(~Ee(i,n)||Oe(i,n));return i},je=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Me=je.concat("length","prototype"),Pe={f:Object.getOwnPropertyNames||function(t){return Ie(t,Me)}},Te={f:Object.getOwnPropertySymbols},Ae=k([].concat),ke=H("Reflect","ownKeys")||function(t){var e=Pe.f(Dt(t)),n=Te.f;return n?Ae(e,n(t)):e},Ne=function(t,e){for(var n=ke(e),r=$t.f,o=Ct.f,i=0;i<n.length;i++){var u=n[i];ht(t,u)||r(t,u,o(e,u))}},Re=/#|\.prototype\./,Ce=function(t,e){var n=Le[Ve(t)];return n==ze||n!=De&&(_(e)?b(e):!!e)},Ve=Ce.normalize=function(t){return String(t).replace(Re,".").toLowerCase()},Le=Ce.data={},De=Ce.NATIVE="N",ze=Ce.POLYFILL="P",Fe=Ce,$e=Ct.f,_e=function(t,e){var n,r,o,i,u,a=t.target,c=t.global,s=t.stat;if(n=c?m:s?m[a]||ct(a,{}):(m[a]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=$e(n,r))&&u.value:n[r],!Fe(c?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ne(i,o)}(t.sham||o&&o.sham)&&_t(i,"sham",!0),le(n,r,i,t)}},Be={};Be[Ot("toStringTag")]="z";var He,Ge="[object z]"===String(Be),We=Ot("toStringTag"),Ue=m.Object,qe="Arguments"==C(function(){return arguments}()),Ke=Ge?C:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Ue(t),We))?n:qe?C(e):"Object"==(r=C(e))&&_(e.callee)?"Arguments":r},Xe=m.String,Ye=function(t){if("Symbol"===Ke(t))throw TypeError("Cannot convert a Symbol value to a string");return Xe(t)},Je="\t\n\v\f\r \u2028\u2029\ufeff",Qe=k("".replace),Ze="["+Je+"]",tn=RegExp("^"+Ze+Ze+"*"),en=RegExp(Ze+Ze+"*$"),nn=function(t){return function(e){var n=Ye(F(e));return 1&t&&(n=Qe(n,tn,"")),2&t&&(n=Qe(n,en,"")),n}},rn={start:nn(1),end:nn(2),trim:nn(3)},on=fe.PROPER,un=rn.trim;function an(t){return t.length?t[0].tagName.toLowerCase():""}function cn(t,e,n,r){void 0===e&&(e="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=u.default(t),i=r.width,a=void 0===i?"":i,c=r.height,s=void 0===c?"":c,f="";return a&&(f+="width: "+a+";"),s&&(f+="height: "+s+";"),o.attr("width",e),o.attr("height",n),o.attr("style",f),o[0].outerHTML}_e({target:"String",proto:!0,forced:(He="trim",b((function(){return!!Je[He]()||"
"!=="
"[He]()||on&&Je[He].name!==He})))},{trim:function(){return un(this)}}),_e({global:!0},{globalThis:m}),r.append&&(u.default.fn.append=r.append),r.on&&(u.default.fn.on=r.on),r.focus&&(u.default.fn.focus=r.focus),r.attr&&(u.default.fn.attr=r.attr),r.val&&(u.default.fn.val=r.val),r.html&&(u.default.fn.html=r.html),r.parent&&(u.default.fn.parent=r.parent),r.hasClass&&(u.default.fn.hasClass=r.hasClass),r.empty&&(u.default.fn.empty=r.empty);var sn={type:"video",renderElem:function(e,r,o){var i,u=e,a=u.src,c=void 0===a?"":a,s=u.poster,f=void 0===s?"":s,l=u.key,d=void 0===l?"":l,v=u.width,p=void 0===v?"auto":v,h=u.height,y=void 0===h?"auto":h,g=u.style,m=void 0===g?{}:g,b=u.textAlign,w=void 0===b?"center":b,S=t.DomEditor.isNodeSelected(o,e);if(0===c.trim().indexOf("<iframe ")){var x=cn(c,p,y,m);i=n.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w},innerHTML:x})}else{var E=n.jsx("video",{key:d,poster:f,controls:!0,style:m},n.jsx("source",{src:c,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==p&&(E.data.width=p),"auto"!==y&&(E.data.height=y),i=n.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w}},E)}return n.h("div",{props:{contentEditable:!1},on:{mousedown:function(t){return t.preventDefault()}}},i)}};var fn,ln={type:"video",elemToHtml:function(t,e){var n=t,r=n.src,o=void 0===r?"":r,i=n.poster,u=void 0===i?"":i,a=n.width,c=void 0===a?"auto":a,s=n.height,f=void 0===s?"auto":s,l=n.style,d=void 0===l?{}:l,v=n.textAlign,p='<div data-w-e-type="video" data-w-e-is-void style="text-align: '+(void 0===v?"center":v)+';">\n';if(0===o.trim().indexOf("<iframe ")){p+=cn(o,c,f,d)}else{var h=d.width,y=void 0===h?"":h,g=d.height,m=void 0===g?"":g,b="";y&&(b+="width: "+y+";"),m&&(b+="height: "+m+";"),p+='<video poster="'+u+'" controls="true" width="'+c+'" height="'+f+'" style="'+b+'"><source src="'+o+'" type="video/mp4"/></video>'}return p+="\n</div>"}},dn=Object.keys||function(t){return Ie(t,je)},vn=w?Object.defineProperties:function(t,e){Dt(t);for(var n,r=$(e),o=dn(e),i=o.length,u=0;i>u;)$t.f(t,n=o[u++],r[n]);return t},pn=H("document","documentElement"),hn="prototype",yn="script",gn=Yt("IE_PROTO"),mn=function(){},bn=function(t){return"<"+yn+">"+t+"</"+yn+">"},wn=function(t){t.write(bn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Sn=function(){try{fn=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Sn="undefined"!=typeof document?document.domain&&fn?wn(fn):(e=kt("iframe"),n="java"+yn+":",e.style.display="none",pn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(bn("document.F=Object")),t.close(),t.F):wn(fn);for(var r=je.length;r--;)delete Sn[hn][je[r]];return Sn()};Jt[gn]=!0;var xn=Object.create||function(t,e){var n;return null!==t?(mn[hn]=Dt(t),n=new mn,mn[hn]=null,n[gn]=t):n=Sn(),void 0===e?n:vn(n,e)},En=Ot("unscopables"),On=Array.prototype;null==On[En]&&$t.f(On,En,{configurable:!0,value:xn(null)});var In=function(t){On[En][t]=!0},jn=xe.includes;_e({target:"Array",proto:!0},{includes:function(t){return jn(this,t,arguments.length>1?arguments[1]:void 0)}}),In("includes");var Mn={selector:"iframe,video,p",preParseHtml:function(t){var e=u.default(t),n=e;if("p"===an(e)){var r=e.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=u.default(o))}}var a=an(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var c=u.default('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return c.append(n),c[0]}},Pn=k(k.bind),Tn=function(t,e){return ot(t),void 0===e?t:Pn?Pn(t,e):function(){return t.apply(e,arguments)}},An=Array.isArray||function(t){return"Array"==C(t)},kn=function(){},Nn=[],Rn=H("Reflect","construct"),Cn=/^\s*(?:class|function)\b/,Vn=k(Cn.exec),Ln=!Cn.exec(kn),Dn=function(t){if(!_(t))return!1;try{return Rn(kn,Nn,t),!0}catch(t){return!1}},zn=!Rn||b((function(){var t;return Dn(Dn.call)||!Dn(Object)||!Dn((function(){t=!0}))||t}))?function(t){if(!_(t))return!1;switch(Ke(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Ln||!!Vn(Cn,Ut(t))}:Dn,Fn=Ot("species"),$n=m.Array,_n=function(t,e){return new(function(t){var e;return An(t)&&(e=t.constructor,(zn(e)&&(e===$n||An(e.prototype))||B(e)&&null===(e=e[Fn]))&&(e=void 0)),void 0===e?$n:e}(t))(0===e?0:e)},Bn=k([].push),Hn=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,s,f,l){for(var d,v,p=vt(c),h=D(p),y=Tn(s,f),g=we(h),m=0,b=l||_n,w=e?b(c,g):n||u?b(c,0):void 0;g>m;m++)if((a||m in h)&&(v=y(d=h[m],m,p),t))if(e)w[m]=v;else if(v)switch(t){case 3:return!0;case 5:return d;case 6:return m;case 2:Bn(w,d)}else switch(t){case 4:return!1;case 7:Bn(w,d)}return i?-1:r||o?o:w}},Gn={forEach:Hn(0),map:Hn(1),filter:Hn(2),some:Hn(3),every:Hn(4),find:Hn(5),findIndex:Hn(6),filterReject:Hn(7)},Wn=Gn.find,Un="find",qn=!0;Un in[]&&Array(1)[Un]((function(){qn=!1})),_e({target:"Array",proto:!0,forced:qn},{find:function(t){return Wn(this,t,arguments.length>1?arguments[1]:void 0)}}),In(Un);var Kn=Ge?{}.toString:function(){return"[object "+Ke(this)+"]"};Ge||le(Object.prototype,"toString",Kn,{unsafe:!0});var Xn,Yn,Jn=function(){var t=Dt(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Qn=m.RegExp,Zn=b((function(){var t=Qn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),tr=Zn||b((function(){return!Qn("a","y").sticky})),er={BROKEN_CARET:Zn||b((function(){var t=Qn("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:tr,UNSUPPORTED_Y:Zn},nr=m.RegExp,rr=b((function(){var t=nr(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),or=m.RegExp,ir=b((function(){var t=or("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),ur=ue.get,ar=lt("native-string-replace",String.prototype.replace),cr=RegExp.prototype.exec,sr=cr,fr=k("".charAt),lr=k("".indexOf),dr=k("".replace),vr=k("".slice),pr=(Yn=/b*/g,x(cr,Xn=/a/,"a"),x(cr,Yn,"a"),0!==Xn.lastIndex||0!==Yn.lastIndex),hr=er.BROKEN_CARET,yr=void 0!==/()??/.exec("")[1];(pr||yr||hr||rr||ir)&&(sr=function(t){var e,n,r,o,i,u,a,c=this,s=ur(c),f=Ye(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=x(sr,l,f),c.lastIndex=l.lastIndex,e;var d=s.groups,v=hr&&c.sticky,p=x(Jn,c),h=c.source,y=0,g=f;if(v&&(p=dr(p,"y",""),-1===lr(p,"g")&&(p+="g"),g=vr(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==fr(f,c.lastIndex-1))&&(h="(?: "+h+")",g=" "+g,y++),n=new RegExp("^(?:"+h+")",p)),yr&&(n=new RegExp("^"+h+"$(?!\\s)",p)),pr&&(r=c.lastIndex),o=x(cr,v?n:c,g),v?o?(o.input=vr(o.input,y),o[0]=vr(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:pr&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),yr&&o&&o.length>1&&x(ar,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=u=xn(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var gr=sr;_e({target:"RegExp",proto:!0,forced:/./.exec!==gr},{exec:gr});var mr=Function.prototype,br=mr.apply,wr=mr.bind,Sr=mr.call,xr="object"==typeof Reflect&&Reflect.apply||(wr?Sr.bind(br):function(){return Sr.apply(br,arguments)}),Er=Ot("species"),Or=RegExp.prototype,Ir=k("".charAt),jr=k("".charCodeAt),Mr=k("".slice),Pr=function(t){return function(e,n){var r,o,i=Ye(F(e)),u=pe(n),a=i.length;return u<0||u>=a?t?"":void 0:(r=jr(i,u))<55296||r>56319||u+1===a||(o=jr(i,u+1))<56320||o>57343?t?Ir(i,u):r:t?Mr(i,u,u+2):o-56320+(r-55296<<10)+65536}},Tr={codeAt:Pr(!1),charAt:Pr(!0)},Ar=Tr.charAt,kr=function(t,e,n){return e+(n?Ar(t,e).length:1)},Nr=Math.floor,Rr=k("".charAt),Cr=k("".replace),Vr=k("".slice),Lr=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Dr=/\$([$&'`]|\d{1,2})/g,zr=function(t,e,n,r,o,i){var u=n+t.length,a=r.length,c=Dr;return void 0!==o&&(o=vt(o),c=Lr),Cr(i,c,(function(i,c){var s;switch(Rr(c,0)){case"$":return"$";case"&":return t;case"`":return Vr(e,0,n);case"'":return Vr(e,u);case"<":s=o[Vr(c,1,-1)];break;default:var f=+c;if(0===f)return i;if(f>a){var l=Nr(f/10);return 0===l?i:l<=a?void 0===r[l-1]?Rr(c,1):r[l-1]+Rr(c,1):i}s=r[f-1]}return void 0===s?"":s}))},Fr=m.TypeError,$r=function(t,e){var n=t.exec;if(_(n)){var r=x(n,t,e);return null!==r&&Dt(r),r}if("RegExp"===C(t))return x(gr,t,e);throw Fr("RegExp#exec called on incompatible receiver")},_r=Ot("replace"),Br=Math.max,Hr=Math.min,Gr=k([].concat),Wr=k([].push),Ur=k("".indexOf),qr=k("".slice),Kr="$0"==="a".replace(/./,"$0"),Xr=!!/./[_r]&&""===/./[_r]("a","$0");!function(t,e,n,r){var o=Ot(t),i=!b((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),u=i&&!b((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[Er]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!u||n){var a=k(/./[o]),c=e(o,""[t],(function(t,e,n,r,o){var u=k(t),c=e.exec;return c===gr||c===Or.exec?i&&!o?{done:!0,value:a(e,n,r)}:{done:!0,value:u(n,e,r)}:{done:!1}}));le(String.prototype,t,c[0]),le(Or,o,c[1])}r&&_t(Or[o],"sham",!0)}("replace",(function(t,e,n){var r=Xr?"$":"$0";return[function(t,n){var r=F(this),o=null==t?void 0:it(t,_r);return o?x(o,t,r,n):x(e,Ye(r),t,n)},function(t,o){var i=Dt(this),u=Ye(t);if("string"==typeof o&&-1===Ur(o,r)&&-1===Ur(o,"$<")){var a=n(e,i,u,o);if(a.done)return a.value}var c=_(o);c||(o=Ye(o));var s=i.global;if(s){var f=i.unicode;i.lastIndex=0}for(var l=[];;){var d=$r(i,u);if(null===d)break;if(Wr(l,d),!s)break;""===Ye(d[0])&&(i.lastIndex=kr(u,be(i.lastIndex),f))}for(var v,p="",h=0,y=0;y<l.length;y++){for(var g=Ye((d=l[y])[0]),m=Br(Hr(pe(d.index),u.length),0),b=[],w=1;w<d.length;w++)Wr(b,void 0===(v=d[w])?v:String(v));var S=d.groups;if(c){var x=Gr([g],b,m,u);void 0!==S&&Wr(x,S);var E=Ye(xr(o,void 0,x))}else E=zr(g,u,m,b,S,o);m>=h&&(p+=qr(u,h,m)+E,h=m+g.length)}return p+qr(u,h)}]}),!!b((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Kr||Xr);var Yr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Jr=kt("span").classList,Qr=Jr&&Jr.constructor&&Jr.constructor.prototype,Zr=Qr===Object.prototype?void 0:Qr,to=function(t,e){var n=[][t];return!!n&&b((function(){n.call(null,e||function(){throw 1},1)}))},eo=Gn.forEach,no=to("forEach")?[].forEach:function(t){return eo(this,t,arguments.length>1?arguments[1]:void 0)},ro=function(t){if(t&&t.forEach!==no)try{_t(t,"forEach",no)}catch(e){t.forEach=no}};for(var oo in Yr)Yr[oo]&&ro(m[oo]&&m[oo].prototype);function io(t){return void 0===t&&(t="r"),t+"-"+o.nanoid()}function uo(t){var e={};return t.trim().split(";").forEach((function(t){if(t){var n=l(t.split(":"),2),r=n[0],o=n[1];r&&o&&(e[r.trim()]=o.trim())}})),e}function ao(t,e,n,r,o){return void 0===e&&(e=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),{type:"video",src:t,poster:e,width:n,height:r,style:o,children:[{text:""}]}}ro(Zr);var co={selector:'div[data-w-e-type="video"]',parseElemHtml:function(t,e,n){var r=u.default(t),o="",i="",a="auto",c="auto",s={},f=r.find("iframe");if(f.length>0)return a=f.attr("width")||"auto",c=f.attr("height")||"auto",s=uo(s=f.attr("style")||""),ao(o=f[0].outerHTML,i,a,c,s);var l=r.find("video");return(o=l.attr("src")||"")||l.length>0&&(o=l.find("source").attr("src")||""),a=l.attr("width")||"auto",c=l.attr("height")||"auto",ao(o,i=l.attr("poster")||"",a,c,s=uo(s=l.attr("style")||""))}},so=m.Promise,fo=function(t,e,n){for(var r in e)le(t,r,e[r],n);return t},lo=m.String,vo=m.TypeError,po=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=k(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Dt(n),function(t){if("object"==typeof t||_(t))return t;throw vo("Can't set "+lo(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),ho=$t.f,yo=Ot("toStringTag"),go=function(t,e,n){t&&!ht(t=n?t:t.prototype,yo)&&ho(t,yo,{configurable:!0,value:e})},mo=Ot("species"),bo=m.TypeError,wo=function(t,e){if(G(e,t))return t;throw bo("Incorrect invocation")},So={},xo=Ot("iterator"),Eo=Array.prototype,Oo=Ot("iterator"),Io=function(t){if(null!=t)return it(t,Oo)||it(t,"@@iterator")||So[Ke(t)]},jo=m.TypeError,Mo=function(t,e,n){var r,o;Dt(t);try{if(!(r=it(t,"return"))){if("throw"===e)throw n;return n}r=x(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Dt(r),n},Po=m.TypeError,To=function(t,e){this.stopped=t,this.result=e},Ao=To.prototype,ko=function(t,e,n){var r,o,i,u,a,c,s,f,l=n&&n.that,d=!(!n||!n.AS_ENTRIES),v=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),h=Tn(e,l),y=function(t){return r&&Mo(r,"normal",t),new To(!0,t)},g=function(t){return d?(Dt(t),p?h(t[0],t[1],y):h(t[0],t[1])):p?h(t,y):h(t)};if(v)r=t;else{if(!(o=Io(t)))throw Po(nt(t)+" is not iterable");if(void 0!==(f=o)&&(So.Array===f||Eo[xo]===f)){for(i=0,u=we(t);u>i;i++)if((a=g(t[i]))&&G(Ao,a))return a;return new To(!1)}r=function(t,e){var n=arguments.length<2?Io(t):e;if(ot(n))return Dt(x(n,t));throw jo(nt(t)+" is not iterable")}(t,o)}for(c=r.next;!(s=x(c,r)).done;){try{a=g(s.value)}catch(t){Mo(r,"throw",t)}if("object"==typeof a&&a&&G(Ao,a))return a}return new To(!1)},No=Ot("iterator"),Ro=!1;try{var Co=0,Vo={next:function(){return{done:!!Co++}},return:function(){Ro=!0}};Vo[No]=function(){return this},Array.from(Vo,(function(){throw 2}))}catch(t){}var Lo,Do,zo,Fo,$o=function(t,e){if(!e&&!Ro)return!1;var n=!1;try{var r={};r[No]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},_o=m.TypeError,Bo=Ot("species"),Ho=function(t,e){var n,r=Dt(t).constructor;return void 0===r||null==(n=Dt(r)[Bo])?e:function(t){if(zn(t))return t;throw _o(nt(t)+" is not a constructor")}(n)},Go=k([].slice),Wo=/(?:ipad|iphone|ipod).*applewebkit/i.test(W),Uo="process"==C(m.process),qo=m.setImmediate,Ko=m.clearImmediate,Xo=m.process,Yo=m.Dispatch,Jo=m.Function,Qo=m.MessageChannel,Zo=m.String,ti=0,ei={},ni="onreadystatechange";try{Lo=m.location}catch(t){}var ri=function(t){if(ht(ei,t)){var e=ei[t];delete ei[t],e()}},oi=function(t){return function(){ri(t)}},ii=function(t){ri(t.data)},ui=function(t){m.postMessage(Zo(t),Lo.protocol+"//"+Lo.host)};qo&&Ko||(qo=function(t){var e=Go(arguments,1);return ei[++ti]=function(){xr(_(t)?t:Jo(t),void 0,e)},Do(ti),ti},Ko=function(t){delete ei[t]},Uo?Do=function(t){Xo.nextTick(oi(t))}:Yo&&Yo.now?Do=function(t){Yo.now(oi(t))}:Qo&&!Wo?(Fo=(zo=new Qo).port2,zo.port1.onmessage=ii,Do=Tn(Fo.postMessage,Fo)):m.addEventListener&&_(m.postMessage)&&!m.importScripts&&Lo&&"file:"!==Lo.protocol&&!b(ui)?(Do=ui,m.addEventListener("message",ii,!1)):Do=ni in kt("script")?function(t){pn.appendChild(kt("script"))[ni]=function(){pn.removeChild(this),ri(t)}}:function(t){setTimeout(oi(t),0)});var ai,ci,si,fi,li,di,vi,pi,hi={set:qo,clear:Ko},yi=/ipad|iphone|ipod/i.test(W)&&void 0!==m.Pebble,gi=/web0s(?!.*chrome)/i.test(W),mi=Ct.f,bi=hi.set,wi=m.MutationObserver||m.WebKitMutationObserver,Si=m.document,xi=m.process,Ei=m.Promise,Oi=mi(m,"queueMicrotask"),Ii=Oi&&Oi.value;Ii||(ai=function(){var t,e;for(Uo&&(t=xi.domain)&&t.exit();ci;){e=ci.fn,ci=ci.next;try{e()}catch(t){throw ci?fi():si=void 0,t}}si=void 0,t&&t.enter()},Wo||Uo||gi||!wi||!Si?!yi&&Ei&&Ei.resolve?((vi=Ei.resolve(void 0)).constructor=Ei,pi=Tn(vi.then,vi),fi=function(){pi(ai)}):Uo?fi=function(){xi.nextTick(ai)}:(bi=Tn(bi,m),fi=function(){bi(ai)}):(li=!0,di=Si.createTextNode(""),new wi(ai).observe(di,{characterData:!0}),fi=function(){di.data=li=!li}));var ji,Mi,Pi,Ti,Ai=Ii||function(t){var e={fn:t,next:void 0};si&&(si.next=e),ci||(ci=e,fi()),si=e},ki=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=ot(e),this.reject=ot(n)},Ni={f:function(t){return new ki(t)}},Ri=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ci="object"==typeof window,Vi=hi.set,Li=Ot("species"),Di="Promise",zi=ue.getterFor(Di),Fi=ue.set,$i=ue.getterFor(Di),_i=so&&so.prototype,Bi=so,Hi=_i,Gi=m.TypeError,Wi=m.document,Ui=m.process,qi=Ni.f,Ki=qi,Xi=!!(Wi&&Wi.createEvent&&m.dispatchEvent),Yi=_(m.PromiseRejectionEvent),Ji="unhandledrejection",Qi=!1,Zi=Fe(Di,(function(){var t=Ut(Bi),e=t!==String(Bi);if(!e&&66===Y)return!0;if(Y>=51&&/native code/.test(t))return!1;var n=new Bi((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[Li]=r,!(Qi=n.then((function(){}))instanceof r)||!e&&Ci&&!Yi})),tu=Zi||!$o((function(t){Bi.all(t).catch((function(){}))})),eu=function(t){var e;return!(!B(t)||!_(e=t.then))&&e},nu=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;Ai((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var u,a,c,s=n[i++],f=o?s.ok:s.fail,l=s.resolve,d=s.reject,v=s.domain;try{f?(o||(2===t.rejection&&uu(t),t.rejection=1),!0===f?u=r:(v&&v.enter(),u=f(r),v&&(v.exit(),c=!0)),u===s.promise?d(Gi("Promise-chain cycle")):(a=eu(u))?x(a,u,l,d):l(u)):d(r)}catch(t){v&&!c&&v.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ou(t)}))}},ru=function(t,e,n){var r,o;Xi?((r=Wi.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),m.dispatchEvent(r)):r={promise:e,reason:n},!Yi&&(o=m["on"+t])?o(r):t===Ji&&function(t,e){var n=m.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},ou=function(t){x(Vi,m,(function(){var e,n=t.facade,r=t.value;if(iu(t)&&(e=Ri((function(){Uo?Ui.emit("unhandledRejection",r,n):ru(Ji,n,r)})),t.rejection=Uo||iu(t)?2:1,e.error))throw e.value}))},iu=function(t){return 1!==t.rejection&&!t.parent},uu=function(t){x(Vi,m,(function(){var e=t.facade;Uo?Ui.emit("rejectionHandled",e):ru("rejectionhandled",e,t.value)}))},au=function(t,e,n){return function(r){t(e,r,n)}},cu=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,nu(t,!0))},su=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Gi("Promise can't be resolved itself");var r=eu(e);r?Ai((function(){var n={done:!1};try{x(r,e,au(su,n,t),au(cu,n,t))}catch(e){cu(n,e,t)}})):(t.value=e,t.state=1,nu(t,!1))}catch(e){cu({done:!1},e,t)}}};if(Zi&&(Hi=(Bi=function(t){wo(this,Hi),ot(t),x(ji,this);var e=zi(this);try{t(au(su,e),au(cu,e))}catch(t){cu(e,t)}}).prototype,(ji=function(t){Fi(this,{type:Di,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=fo(Hi,{then:function(t,e){var n=$i(this),r=n.reactions,o=qi(Ho(this,Bi));return o.ok=!_(t)||t,o.fail=_(e)&&e,o.domain=Uo?Ui.domain:void 0,n.parent=!0,r[r.length]=o,0!=n.state&&nu(n,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),Mi=function(){var t=new ji,e=zi(t);this.promise=t,this.resolve=au(su,e),this.reject=au(cu,e)},Ni.f=qi=function(t){return t===Bi||t===Pi?new Mi(t):Ki(t)},_(so)&&_i!==Object.prototype)){Ti=_i.then,Qi||(le(_i,"then",(function(t,e){var n=this;return new Bi((function(t,e){x(Ti,n,t,e)})).then(t,e)}),{unsafe:!0}),le(_i,"catch",Hi.catch,{unsafe:!0}));try{delete _i.constructor}catch(t){}po&&po(_i,Hi)}function fu(n,r,o,i,u){return void 0===o&&(o=""),void 0===i&&(i=""),void 0===u&&(u=""),c(this,void 0,void 0,(function(){var a,c,f,l,d,v,p;return s(this,(function(s){switch(s.label){case 0:return r?(n.restoreSelection(),a=n.getMenuConfig("insertVideo"),c=a.onInsertedVideo,f=a.checkVideo,l=a.parseVideoSrc,[4,f(r,o)]):[2];case 1:return"string"==typeof(d=s.sent())?(n.alert(d,"error"),[2]):null==d?[2]:[4,l(r)];case 2:return 0!==(v=s.sent()).trim().indexOf("<iframe ")&&(v=v.replace(/</g,"<").replace(/>/g,">")),p={type:"video",src:v,poster:o,children:[{text:""}],style:{width:i,height:u}},Promise.resolve().then((function(){t.DomEditor.isSelectedEmptyParagraph(n)&&e.Transforms.removeNodes(n,{mode:"highest"}),e.Transforms.insertNodes(n,p)})),c(p),[2]}}))}))}function lu(){return io("w-e-insert-video")}_e({global:!0,wrap:!0,forced:Zi},{Promise:Bi}),go(Bi,Di,!1),function(t){var e=H(t),n=$t.f;w&&e&&!e[mo]&&n(e,mo,{configurable:!0,get:function(){return this}})}(Di),Pi=H(Di),_e({target:Di,stat:!0,forced:Zi},{reject:function(t){var e=qi(this);return x(e.reject,void 0,t),e.promise}}),_e({target:Di,stat:!0,forced:Zi},{resolve:function(t){return function(t,e){if(Dt(t),B(e)&&e.constructor===t)return e;var n=Ni.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),_e({target:Di,stat:!0,forced:tu},{all:function(t){var e=this,n=qi(e),r=n.resolve,o=n.reject,i=Ri((function(){var n=ot(e.resolve),i=[],u=0,a=1;ko(t,(function(t){var c=u++,s=!1;a++,x(n,e,t).then((function(t){s||(s=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=qi(e),r=n.reject,o=Ri((function(){var o=ot(e.resolve);ko(t,(function(t){x(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var du=function(){function n(){this.title=t.t("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=lu(),this.posterInputId=lu(),this.buttonId=lu()}return n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){},n.prototype.isDisabled=function(n){var r=n.selection;return null==r||(!e.Range.isCollapsed(r)||!!t.DomEditor.getSelectedElems(n).some((function(e){var r=t.DomEditor.getNodeType(e);return"pre"===r||("list-item"===r||!!n.isVoid(e))})))},n.prototype.getModalPositionNode=function(t){return null},n.prototype.getModalContentElem=function(e){var n=this,r=this,o=r.srcInputId,i=r.posterInputId,a=r.buttonId,f=l(t.genModalInputElems(t.t("videoModule.videoSrc"),o,t.t("videoModule.videoSrcPlaceHolder")),2),d=f[0],v=f[1],p=l(t.genModalInputElems(t.t("videoModule.videoPoster"),i,t.t("videoModule.videoPosterPlaceHolder")),2),h=p[0],y=p[1],g=u.default(v),m=u.default(y),b=l(t.genModalButtonElems(a,t.t("videoModule.ok")),1)[0];if(null==this.$content){var w=u.default("<div></div>");w.on("click","#"+a,(function(t){return c(n,void 0,void 0,(function(){var n,r;return s(this,(function(u){switch(u.label){case 0:return t.preventDefault(),n=w.find("#"+o).val().trim(),r=w.find("#"+i).val().trim(),[4,fu(e,n,r)];case 1:return u.sent(),e.hidePanelOrModal(),[2]}}))}))})),this.$content=w}var S=this.$content;return S.empty(),S.append(d),S.append(h),S.append(b),g.val(""),m.val(""),setTimeout((function(){g.focus()})),S[0]},n}(),vu=k([].join),pu=D!=Object,hu=to("join",",");_e({target:"Array",proto:!0,forced:pu||!hu},{join:function(t){return vu($(this),void 0===t?",":t)}});var yu,gu,mu,bu=!b((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),wu=Yt("IE_PROTO"),Su=m.Object,xu=Su.prototype,Eu=bu?Su.getPrototypeOf:function(t){var e=vt(t);if(ht(e,wu))return e[wu];var n=e.constructor;return _(n)&&e instanceof n?n.prototype:e instanceof Su?xu:null},Ou=Ot("iterator"),Iu=!1;[].keys&&("next"in(mu=[].keys())?(gu=Eu(Eu(mu)))!==Object.prototype&&(yu=gu):Iu=!0);var ju=null==yu||b((function(){var t={};return yu[Ou].call(t)!==t}));ju&&(yu={}),_(yu[Ou])||le(yu,Ou,(function(){return this}));var Mu={IteratorPrototype:yu,BUGGY_SAFARI_ITERATORS:Iu},Pu=Mu.IteratorPrototype,Tu=function(){return this},Au=fe.PROPER,ku=fe.CONFIGURABLE,Nu=Mu.IteratorPrototype,Ru=Mu.BUGGY_SAFARI_ITERATORS,Cu=Ot("iterator"),Vu="keys",Lu="values",Du="entries",zu=function(){return this},Fu=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=xn(Pu,{next:j(+!r,n)}),go(t,o,!1),So[o]=Tu}(n,e,r);var a,c,s,f=function(t){if(t===o&&h)return h;if(!Ru&&t in v)return v[t];switch(t){case Vu:case Lu:case Du:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",d=!1,v=t.prototype,p=v[Cu]||v["@@iterator"]||o&&v[o],h=!Ru&&p||f(o),y="Array"==e&&v.entries||p;if(y&&(a=Eu(y.call(new t)))!==Object.prototype&&a.next&&(Eu(a)!==Nu&&(po?po(a,Nu):_(a[Cu])||le(a,Cu,zu)),go(a,l,!0)),Au&&o==Lu&&p&&p.name!==Lu&&(ku?_t(v,"name",Lu):(d=!0,h=function(){return x(p,this)})),o)if(c={values:f(Lu),keys:i?h:f(Vu),entries:f(Du)},u)for(s in c)(Ru||d||!(s in v))&&le(v,s,c[s]);else _e({target:e,proto:!0,forced:Ru||d},c);return v[Cu]!==h&&le(v,Cu,h,{name:o}),So[e]=h,c},$u="Array Iterator",_u=ue.set,Bu=ue.getterFor($u),Hu=Fu(Array,"Array",(function(t,e){_u(this,{type:$u,target:$(t),index:0,kind:e})}),(function(){var t=Bu(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");So.Arguments=So.Array,In("keys"),In("values"),In("entries");var Gu=function(t,e,n){var r=Pt(e);r in t?$t.f(t,r,j(0,n)):t[r]=n},Wu=Ot("species"),Uu=function(t){return Y>=51||!b((function(){var e=[];return(e.constructor={})[Wu]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("slice"),qu=Ot("species"),Ku=m.Array,Xu=Math.max;_e({target:"Array",proto:!0,forced:!Uu},{slice:function(t,e){var n,r,o,i=$(this),u=we(i),a=ge(t,u),c=ge(void 0===e?u:e,u);if(An(i)&&(n=i.constructor,(zn(n)&&(n===Ku||An(n.prototype))||B(n)&&null===(n=n[qu]))&&(n=void 0),n===Ku||void 0===n))return Go(i,a,c);for(r=new(void 0===n?Ku:n)(Xu(c-a,0)),o=0;a<c;a++,o++)a in i&&Gu(r,o,i[a]);return r.length=o,r}});var Yu=fe.EXISTS,Ju=$t.f,Qu=Function.prototype,Zu=k(Qu.toString),ta=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,ea=k(ta.exec);w&&!Yu&&Ju(Qu,"name",{configurable:!0,get:function(){try{return ea(ta,Zu(this))[1]}catch(t){return""}}});var na=Tr.charAt,ra="String Iterator",oa=ue.set,ia=ue.getterFor(ra);Fu(String,"String",(function(t){oa(this,{type:ra,string:Ye(t),index:0})}),(function(){var t,e=ia(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=na(n,r),e.index+=t.length,{value:t,done:!1})}));var ua=m.Array,aa=Math.max,ca=Pe.f,sa="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],fa=function(t){try{return ca(t)}catch(t){return function(t,e,n){for(var r=we(t),o=ge(e,r),i=ge(void 0===n?r:n,r),u=ua(aa(i-o,0)),a=0;o<i;o++,a++)Gu(u,a,t[o]);return u.length=a,u}(sa)}},la={f:function(t){return sa&&"Window"==C(t)?fa(t):ca($(t))}},da=b((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),va=Object.isExtensible,pa=b((function(){va(1)}))||da?function(t){return!!B(t)&&((!da||"ArrayBuffer"!=C(t))&&(!va||va(t)))}:va,ha=!b((function(){return Object.isExtensible(Object.preventExtensions({}))})),ya=p((function(t){var e=$t.f,n=!1,r=bt("meta"),o=0,i=function(t){e(t,r,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},n=!0;var t=Pe.f,e=k([].splice),o={};o[r]=1,t(o).length&&(Pe.f=function(n){for(var o=t(n),i=0,u=o.length;i<u;i++)if(o[i]===r){e(o,i,1);break}return o},_e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:la.f}))},fastKey:function(t,e){if(!B(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!ht(t,r)){if(!pa(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!ht(t,r)){if(!pa(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return ha&&n&&pa(t)&&!ht(t,r)&&i(t),t}};Jt[r]=!0})),ga=ya.getWeakData,ma=ue.set,ba=ue.getterFor,wa=Gn.find,Sa=Gn.findIndex,xa=k([].splice),Ea=0,Oa=function(t){return t.frozen||(t.frozen=new Ia)},Ia=function(){this.entries=[]},ja=function(t,e){return wa(t.entries,(function(t){return t[0]===e}))};Ia.prototype={get:function(t){var e=ja(this,t);if(e)return e[1]},has:function(t){return!!ja(this,t)},set:function(t,e){var n=ja(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Sa(this.entries,(function(e){return e[0]===t}));return~e&&xa(this.entries,e,1),!!~e}};var Ma,Pa={getConstructor:function(t,e,n,r){var o=t((function(t,o){wo(t,i),ma(t,{type:e,id:Ea++,frozen:void 0}),null!=o&&ko(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=ba(e),a=function(t,e,n){var r=u(t),o=ga(Dt(e),!0);return!0===o?Oa(r).set(e,n):o[r.id]=n,t};return fo(i,{delete:function(t){var e=u(this);if(!B(t))return!1;var n=ga(t);return!0===n?Oa(e).delete(t):n&&ht(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!B(t))return!1;var n=ga(t);return!0===n?Oa(e).has(t):n&&ht(n,e.id)}}),fo(i,n?{get:function(t){var e=u(this);if(B(t)){var n=ga(t);return!0===n?Oa(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},Ta=ue.enforce,Aa=!m.ActiveXObject&&"ActiveXObject"in m,ka=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Na=function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",u=m[t],a=u&&u.prototype,c=u,s={},f=function(t){var e=k(a[t]);le(a,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!B(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return o&&!B(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!B(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(Fe(t,!_(u)||!(o||a.forEach&&!b((function(){(new u).entries().next()})))))c=n.getConstructor(e,t,r,i),ya.enable();else if(Fe(t,!0)){var l=new c,d=l[i](o?{}:-0,1)!=l,v=b((function(){l.has(1)})),p=$o((function(t){new u(t)})),h=!o&&b((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));p||((c=e((function(t,e){wo(t,a);var n=function(t,e,n){var r,o;return po&&_(r=e.constructor)&&r!==n&&B(o=r.prototype)&&o!==n.prototype&&po(t,o),t}(new u,t,c);return null!=e&&ko(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=c),(v||h)&&(f("delete"),f("has"),r&&f("get")),(h||d)&&f(i),o&&a.clear&&delete a.clear}return s[t]=c,_e({global:!0,forced:c!=u},s),go(c,t),o||n.setStrong(c,t,r),c}("WeakMap",ka,Pa);if(Kt&&Aa){Ma=Pa.getConstructor(ka,"WeakMap",!0),ya.enable();var Ra=Na.prototype,Ca=k(Ra.delete),Va=k(Ra.has),La=k(Ra.get),Da=k(Ra.set);fo(Ra,{delete:function(t){if(B(t)&&!pa(t)){var e=Ta(this);return e.frozen||(e.frozen=new Ma),Ca(this,t)||e.frozen.delete(t)}return Ca(this,t)},has:function(t){if(B(t)&&!pa(t)){var e=Ta(this);return e.frozen||(e.frozen=new Ma),Va(this,t)||e.frozen.has(t)}return Va(this,t)},get:function(t){if(B(t)&&!pa(t)){var e=Ta(this);return e.frozen||(e.frozen=new Ma),Va(this,t)?La(this,t):e.frozen.get(t)}return La(this,t)},set:function(t,e){if(B(t)&&!pa(t)){var n=Ta(this);n.frozen||(n.frozen=new Ma),Va(this,t)?Da(this,t,e):n.frozen.set(t,e)}else Da(this,t,e);return this}})}var za=Ot("iterator"),Fa=Ot("toStringTag"),$a=Hu.values,_a=function(t,e){if(t){if(t[za]!==$a)try{_t(t,za,$a)}catch(e){t[za]=$a}if(t[Fa]||_t(t,Fa,e),Yr[e])for(var n in Hu)if(t[n]!==Hu[n])try{_t(t,n,Hu[n])}catch(e){t[n]=Hu[n]}}};for(var Ba in Yr)_a(m[Ba]&&m[Ba].prototype,Ba);function Ha(t){return t.getMenuConfig("uploadVideo")}_a(Zr,"DOMTokenList");var Ga=new WeakMap;function Wa(e,n){return c(this,void 0,void 0,(function(){var r,o,i,u;return s(this,(function(c){switch(c.label){case 0:return r=function(e){var n=Ga.get(e);if(null!=n)return n;var r=Ha(e),o=r.onSuccess,i=r.onProgress,u=r.onFailed,c=r.customInsert,s=r.onError;return n=t.createUploader(a(a({},r),{onProgress:function(t){e.showProgressBar(t),i&&i(t)},onSuccess:function(t,n){if(c)return c(n,(function(t,n){return fu(e,t,n)})),void o(t,n);var r=n.errno,i=void 0===r?1:r,a=n.data,s=void 0===a?{}:a;if(0===i){var f=s.url,l=void 0===f?"":f,d=s.poster;fu(e,l,void 0===d?"":d),o(t,n)}else u(t,n)},onError:function(t,e,n){s(t,e,n)}})),Ga.set(e,n),n}(e),o=n.name,i=n.type,u=n.size,r.addFile({name:o,type:i,size:u,data:n}),[4,r.upload()];case 1:return c.sent(),[2]}}))}))}var Ua=function(){function n(){this.title=t.t("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){var n=this.getMenuConfig(t),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i((function(e,n){return fu(t,e,n)}));else{var a="";o.length>0&&(a='accept="'+o.join(", ")+'"');var f=u.default("body"),l=u.default('<input type="file" '+a+" multiple/>");l.hide(),f.append(l),l.click(),l.on("change",(function(){var e=l[0].files;!function(t,e){var n,r;c(this,void 0,void 0,(function(){var o,i,u,a,c,f;return s(this,(function(s){switch(s.label){case 0:if(null==e)return[2];o=Array.prototype.slice.call(e),i=Ha(t).customUpload,s.label=1;case 1:s.trys.push([1,9,10,15]),u=d(o),s.label=2;case 2:return[4,u.next()];case 3:return(a=s.sent()).done?[3,8]:(c=a.value,i?[4,i(c,(function(e,n){return fu(t,e,n)}))]:[3,5]);case 4:return s.sent(),[3,7];case 5:return[4,Wa(t,c)];case 6:s.sent(),s.label=7;case 7:return[3,2];case 8:return[3,15];case 9:return f=s.sent(),n={error:f},[3,15];case 10:return s.trys.push([10,,13,14]),a&&!a.done&&(r=u.return)?[4,r.call(u)]:[3,12];case 11:s.sent(),s.label=12;case 12:return[3,14];case 13:if(n)throw n.error;return[7];case 14:return[7];case 15:return[2]}}))}))}(t,e)}))}},n.prototype.isDisabled=function(n){var r=n.selection;return null==r||(!e.Range.isCollapsed(r)||!!t.DomEditor.getSelectedElems(n).some((function(e){var r=t.DomEditor.getNodeType(e);return"pre"===r||("list-item"===r||!!n.isVoid(e))})))},n.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadVideo")},n}();function qa(){return io("w-e-insert-video")}var Ka=function(){function n(){this.title=t.t("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=qa(),this.heightInputId=qa(),this.buttonId=qa()}return n.prototype.getSelectedVideoNode=function(e){return t.DomEditor.getSelectedNodeByType(e,"video")},n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){},n.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},n.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},n.prototype.getModalContentElem=function(n){var r=this,o=r.widthInputId,i=r.heightInputId,c=r.buttonId,s=l(t.genModalInputElems(t.t("videoModule.width"),o,"auto"),2),f=s[0],d=s[1],v=u.default(d),p=l(t.genModalInputElems(t.t("videoModule.height"),i,"auto"),2),h=p[0],y=p[1],g=u.default(y),m=l(t.genModalButtonElems(c,t.t("videoModule.ok")),1)[0];if(null==this.$content){var b=u.default("<div></div>");b.on("click","#"+c,(function(r){r.preventDefault();var u=b.find("#"+o).val().trim(),c=b.find("#"+i).val().trim(),s=function(t){return/^\d+(\.\d+)?%$/.test(t)},f=function(t){return/^\d+(\.\d+)?$/.test(t)},l="auto",d="auto";s(u)?l=u:f(u)&&(l=parseInt(u)+"px"),s(c)?d=c:f(c)&&(d=parseInt(c)+"px");var v=S.style,p=void 0===v?{}:v;n.restoreSelection();var h={style:a(a({},p),{width:l,height:d})};e.Transforms.setNodes(n,h,{match:function(e){return t.DomEditor.checkNodeType(e,"video")}}),n.hidePanelOrModal()})),this.$content=b}var w=this.$content;w.empty(),w.append(f),w.append(h),w.append(m);var S=this.getSelectedVideoNode(n);if(null==S)return w[0];var x=S.style,E=void 0===x?{}:x,O=E.width,I=void 0===O?"":O,j=E.height,M=void 0===j?"":j;return v.val(I),g.val(M),setTimeout((function(){v.focus()})),w[0]},n}();function Xa(){return io("w-e-edit-video")}var Ya=function(){function n(){this.title=t.t("videoModule.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=Xa(),this.posterInputId=Xa(),this.buttonId=Xa()}return n.prototype.getSelectedVideoNode=function(e){return t.DomEditor.getSelectedNodeByType(e,"video")},n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){},n.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},n.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},n.prototype.getModalContentElem=function(n){var r=this,o=this,i=o.srcInputId,a=o.posterInputId,f=o.buttonId,d=l(t.genModalInputElems(t.t("videoModule.videoSrc"),i,t.t("videoModule.videoSrcPlaceHolder")),2),v=d[0],p=d[1],h=l(t.genModalInputElems(t.t("videoModule.videoPoster"),a,t.t("videoModule.videoPosterPlaceHolder")),2),y=h[0],g=h[1],m=u.default(p),b=u.default(g),w=l(t.genModalButtonElems(f,t.t("videoModule.ok")),1)[0];if(null==this.$content){var S=u.default("<div></div>");S.on("click","#"+f,(function(o){return c(r,void 0,void 0,(function(){var r,u,c,f;return s(this,(function(s){return o.preventDefault(),r=S.find("#"+i).val().trim(),u=S.find("#"+a).val().trim(),c=io("video-"),f={src:r,poster:u,key:c},n.restoreSelection(),e.Transforms.setNodes(n,f,{match:function(e){return t.DomEditor.checkNodeType(e,"video")}}),n.hidePanelOrModal(),[2]}))}))})),this.$content=S}var x=this.$content;x.empty(),x.append(v),x.append(y),x.append(w);var E=this.getSelectedVideoNode(n);if(null==E)return x[0];var O=E.src,I=void 0===O?"":O,j=E.poster,M=void 0===j?"":j;return m.val(I),b.val(M),setTimeout((function(){m.focus()})),x[0]},n}();var Ja={renderElems:[sn],elemsToHtml:[ln],preParseHtml:[Mn],parseElemsHtml:[co],menus:[{key:"insertVideo",factory:function(){return new du},config:{onInsertedVideo:function(t){},checkVideo:function(t,e){return!0},parseVideoSrc:function(t){return t}}},{key:"uploadVideo",factory:function(){return new Ua},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(t){return t},onProgress:function(t){},onSuccess:function(t,e){},onFailed:function(t,e){console.error("'"+t.name+"' upload failed",e)},onError:function(t,e,n){console.error("'"+t.name+" upload error",e,n)}}},{key:"editVideoSize",factory:function(){return new Ka}},{key:"editVideoSrc",factory:function(){return new Ya}}],editorPlugin:function(n){var r=n.isVoid,o=n.normalizeNode,i=n;return i.isVoid=function(t){return"video"===t.type||r(t)},i.normalizeNode=function(n){var r=l(n,2),u=r[0],a=r[1];"video"===t.DomEditor.getNodeType(u)&&(t.DomEditor.isLastNode(i,u)&&e.Transforms.insertNodes(i,t.DomEditor.genEmptyParagraph(),{at:[a[0]+1]}));return o([u,a])},i}};return Ja}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@wangeditor-next/core"),require("slate"),require("snabbdom"),require("dom7"),require("nanoid")):"function"==typeof define&&define.amd?define(["@wangeditor-next/core","slate","snabbdom","dom7","nanoid"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).WangEditorVideoModule=e(t.core,t.slate,t.snabbdom,t.$,t.nanoid)}(this,(function(t,e,n,r,o){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=i(r);t.i18nAddResources("en",{videoModule:{delete:"Delete",uploadVideo:"Upload video",insertVideo:"Insert video",videoSrc:"Video source",videoSrcPlaceHolder:"Video file url, or third-party <iframe>",videoPoster:"Video poster",videoPosterPlaceHolder:"Poster image url",ok:"Ok",editSize:"Edit size",edit:"Edit video",width:"Width",height:"Height"}}),t.i18nAddResources("zh-CN",{videoModule:{delete:"删除视频",uploadVideo:"上传视频",insertVideo:"插入视频",videoSrc:"视频地址",videoSrcPlaceHolder:"视频文件 url 或第三方 <iframe>",videoPoster:"视频封面",videoPosterPlaceHolder:"封面图片 url",ok:"确定",editSize:"修改尺寸",edit:"编辑视频",width:"宽度",height:"高度"}});var a=function(){return a=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t},a.apply(this,arguments)};function c(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{c(r.next(t))}catch(t){i(t)}}function a(t){try{c(r.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,a)}c((r=r.apply(t,e||[])).next())}))}function s(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(u=0)),u;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return u.label++,{value:a[1],done:!1};case 5:u.label++,r=a[1],a=[0];continue;case 7:a=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){u=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){u.label=a[1];break}if(6===a[0]&&u.label<o[1]){u.label=o[1],o=a;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(a);break}o[2]&&u.ops.pop(),u.trys.pop();continue}a=e.call(t,u)}catch(t){a=[6,t],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function f(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function d(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,n=t[Symbol.asyncIterator];return n?n.call(t):(t=f(t),e={},r("next"),r("throw"),r("return"),e[Symbol.asyncIterator]=function(){return this},e);function r(n){e[n]=t[n]&&function(e){return new Promise((function(r,o){(function(t,e,n,r){Promise.resolve(r).then((function(e){t({value:e,done:n})}),e)})(r,o,(e=t[n](e)).done,e.value)}))}}}"function"==typeof SuppressedError&&SuppressedError;var v="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function p(t){var e={exports:{}};return t(e,e.exports),e.exports}var h,y,g=function(t){return t&&t.Math==Math&&t},m=g("object"==typeof globalThis&&globalThis)||g("object"==typeof window&&window)||g("object"==typeof self&&self)||g("object"==typeof v&&v)||function(){return this}()||Function("return this")(),b=function(t){try{return!!t()}catch(t){return!0}},w=!b((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),S=Function.prototype.call,x=S.bind?S.bind(S):function(){return S.apply(S,arguments)},E={}.propertyIsEnumerable,O=Object.getOwnPropertyDescriptor,I={f:O&&!E.call({1:2},1)?function(t){var e=O(this,t);return!!e&&e.enumerable}:E},j=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},M=Function.prototype,P=M.bind,T=M.call,A=P&&P.bind(T),k=P?function(t){return t&&A(T,t)}:function(t){return t&&function(){return T.apply(t,arguments)}},N=k({}.toString),R=k("".slice),C=function(t){return R(N(t),8,-1)},V=m.Object,L=k("".split),D=b((function(){return!V("z").propertyIsEnumerable(0)}))?function(t){return"String"==C(t)?L(t,""):V(t)}:V,z=m.TypeError,F=function(t){if(null==t)throw z("Can't call method on "+t);return t},$=function(t){return D(F(t))},_=function(t){return"function"==typeof t},B=function(t){return"object"==typeof t?null!==t:_(t)},H=function(t,e){return arguments.length<2?(n=m[t],_(n)?n:void 0):m[t]&&m[t][e];var n},G=k({}.isPrototypeOf),W=H("navigator","userAgent")||"",U=m.process,q=m.Deno,K=U&&U.versions||q&&q.version,X=K&&K.v8;X&&(y=(h=X.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!y&&W&&(!(h=W.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=W.match(/Chrome\/(\d+)/))&&(y=+h[1]);var Y=y,J=!!Object.getOwnPropertySymbols&&!b((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Y&&Y<41})),Q=J&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Z=m.Object,tt=Q?function(t){return"symbol"==typeof t}:function(t){var e=H("Symbol");return _(e)&&G(e.prototype,Z(t))},et=m.String,nt=function(t){try{return et(t)}catch(t){return"Object"}},rt=m.TypeError,ot=function(t){if(_(t))return t;throw rt(nt(t)+" is not a function")},it=function(t,e){var n=t[e];return null==n?void 0:ot(n)},ut=m.TypeError,at=Object.defineProperty,ct=function(t,e){try{at(m,t,{value:e,configurable:!0,writable:!0})}catch(n){m[t]=e}return e},st="__core-js_shared__",ft=m[st]||ct(st,{}),lt=p((function(t){(t.exports=function(t,e){return ft[t]||(ft[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.19.3",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})})),dt=m.Object,vt=function(t){return dt(F(t))},pt=k({}.hasOwnProperty),ht=Object.hasOwn||function(t,e){return pt(vt(t),e)},yt=0,gt=Math.random(),mt=k(1..toString),bt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+mt(++yt+gt,36)},wt=lt("wks"),St=m.Symbol,xt=St&&St.for,Et=Q?St:St&&St.withoutSetter||bt,Ot=function(t){if(!ht(wt,t)||!J&&"string"!=typeof wt[t]){var e="Symbol."+t;J&&ht(St,t)?wt[t]=St[t]:wt[t]=Q&&xt?xt(e):Et(e)}return wt[t]},It=m.TypeError,jt=Ot("toPrimitive"),Mt=function(t,e){if(!B(t)||tt(t))return t;var n,r=it(t,jt);if(r){if(void 0===e&&(e="default"),n=x(r,t,e),!B(n)||tt(n))return n;throw It("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&_(n=t.toString)&&!B(r=x(n,t)))return r;if(_(n=t.valueOf)&&!B(r=x(n,t)))return r;if("string"!==e&&_(n=t.toString)&&!B(r=x(n,t)))return r;throw ut("Can't convert object to primitive value")}(t,e)},Pt=function(t){var e=Mt(t,"string");return tt(e)?e:e+""},Tt=m.document,At=B(Tt)&&B(Tt.createElement),kt=function(t){return At?Tt.createElement(t):{}},Nt=!w&&!b((function(){return 7!=Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Rt=Object.getOwnPropertyDescriptor,Ct={f:w?Rt:function(t,e){if(t=$(t),e=Pt(e),Nt)try{return Rt(t,e)}catch(t){}if(ht(t,e))return j(!x(I.f,t,e),t[e])}},Vt=m.String,Lt=m.TypeError,Dt=function(t){if(B(t))return t;throw Lt(Vt(t)+" is not an object")},zt=m.TypeError,Ft=Object.defineProperty,$t={f:w?Ft:function(t,e,n){if(Dt(t),e=Pt(e),Dt(n),Nt)try{return Ft(t,e,n)}catch(t){}if("get"in n||"set"in n)throw zt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},_t=w?function(t,e,n){return $t.f(t,e,j(1,n))}:function(t,e,n){return t[e]=n,t},Bt=k(Function.toString);_(ft.inspectSource)||(ft.inspectSource=function(t){return Bt(t)});var Ht,Gt,Wt,Ut=ft.inspectSource,qt=m.WeakMap,Kt=_(qt)&&/native code/.test(Ut(qt)),Xt=lt("keys"),Yt=function(t){return Xt[t]||(Xt[t]=bt(t))},Jt={},Qt="Object already initialized",Zt=m.TypeError,te=m.WeakMap;if(Kt||ft.state){var ee=ft.state||(ft.state=new te),ne=k(ee.get),re=k(ee.has),oe=k(ee.set);Ht=function(t,e){if(re(ee,t))throw new Zt(Qt);return e.facade=t,oe(ee,t,e),e},Gt=function(t){return ne(ee,t)||{}},Wt=function(t){return re(ee,t)}}else{var ie=Yt("state");Jt[ie]=!0,Ht=function(t,e){if(ht(t,ie))throw new Zt(Qt);return e.facade=t,_t(t,ie,e),e},Gt=function(t){return ht(t,ie)?t[ie]:{}},Wt=function(t){return ht(t,ie)}}var ue={set:Ht,get:Gt,has:Wt,enforce:function(t){return Wt(t)?Gt(t):Ht(t,{})},getterFor:function(t){return function(e){var n;if(!B(e)||(n=Gt(e)).type!==t)throw Zt("Incompatible receiver, "+t+" required");return n}}},ae=Function.prototype,ce=w&&Object.getOwnPropertyDescriptor,se=ht(ae,"name"),fe={EXISTS:se,PROPER:se&&"something"===function(){}.name,CONFIGURABLE:se&&(!w||w&&ce(ae,"name").configurable)},le=p((function(t){var e=fe.CONFIGURABLE,n=ue.get,r=ue.enforce,o=String(String).split("String");(t.exports=function(t,n,i,u){var a,c=!!u&&!!u.unsafe,s=!!u&&!!u.enumerable,f=!!u&&!!u.noTargetGet,l=u&&void 0!==u.name?u.name:n;_(i)&&("Symbol("===String(l).slice(0,7)&&(l="["+String(l).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!ht(i,"name")||e&&i.name!==l)&&_t(i,"name",l),(a=r(i)).source||(a.source=o.join("string"==typeof l?l:""))),t!==m?(c?!f&&t[n]&&(s=!0):delete t[n],s?t[n]=i:_t(t,n,i)):s?t[n]=i:ct(n,i)})(Function.prototype,"toString",(function(){return _(this)&&n(this).source||Ut(this)}))})),de=Math.ceil,ve=Math.floor,pe=function(t){var e=+t;return e!=e||0===e?0:(e>0?ve:de)(e)},he=Math.max,ye=Math.min,ge=function(t,e){var n=pe(t);return n<0?he(n+e,0):ye(n,e)},me=Math.min,be=function(t){return t>0?me(pe(t),9007199254740991):0},we=function(t){return be(t.length)},Se=function(t){return function(e,n,r){var o,i=$(e),u=we(i),a=ge(r,u);if(t&&n!=n){for(;u>a;)if((o=i[a++])!=o)return!0}else for(;u>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}},xe={includes:Se(!0),indexOf:Se(!1)},Ee=xe.indexOf,Oe=k([].push),Ie=function(t,e){var n,r=$(t),o=0,i=[];for(n in r)!ht(Jt,n)&&ht(r,n)&&Oe(i,n);for(;e.length>o;)ht(r,n=e[o++])&&(~Ee(i,n)||Oe(i,n));return i},je=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Me=je.concat("length","prototype"),Pe={f:Object.getOwnPropertyNames||function(t){return Ie(t,Me)}},Te={f:Object.getOwnPropertySymbols},Ae=k([].concat),ke=H("Reflect","ownKeys")||function(t){var e=Pe.f(Dt(t)),n=Te.f;return n?Ae(e,n(t)):e},Ne=function(t,e){for(var n=ke(e),r=$t.f,o=Ct.f,i=0;i<n.length;i++){var u=n[i];ht(t,u)||r(t,u,o(e,u))}},Re=/#|\.prototype\./,Ce=function(t,e){var n=Le[Ve(t)];return n==ze||n!=De&&(_(e)?b(e):!!e)},Ve=Ce.normalize=function(t){return String(t).replace(Re,".").toLowerCase()},Le=Ce.data={},De=Ce.NATIVE="N",ze=Ce.POLYFILL="P",Fe=Ce,$e=Ct.f,_e=function(t,e){var n,r,o,i,u,a=t.target,c=t.global,s=t.stat;if(n=c?m:s?m[a]||ct(a,{}):(m[a]||{}).prototype)for(r in e){if(i=e[r],o=t.noTargetGet?(u=$e(n,r))&&u.value:n[r],!Fe(c?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Ne(i,o)}(t.sham||o&&o.sham)&&_t(i,"sham",!0),le(n,r,i,t)}},Be={};Be[Ot("toStringTag")]="z";var He,Ge="[object z]"===String(Be),We=Ot("toStringTag"),Ue=m.Object,qe="Arguments"==C(function(){return arguments}()),Ke=Ge?C:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Ue(t),We))?n:qe?C(e):"Object"==(r=C(e))&&_(e.callee)?"Arguments":r},Xe=m.String,Ye=function(t){if("Symbol"===Ke(t))throw TypeError("Cannot convert a Symbol value to a string");return Xe(t)},Je="\t\n\v\f\r \u2028\u2029\ufeff",Qe=k("".replace),Ze="["+Je+"]",tn=RegExp("^"+Ze+Ze+"*"),en=RegExp(Ze+Ze+"*$"),nn=function(t){return function(e){var n=Ye(F(e));return 1&t&&(n=Qe(n,tn,"")),2&t&&(n=Qe(n,en,"")),n}},rn={start:nn(1),end:nn(2),trim:nn(3)},on=fe.PROPER,un=rn.trim;function an(t){return t.length?t[0].tagName.toLowerCase():""}function cn(t,e,n,r){void 0===e&&(e="auto"),void 0===n&&(n="auto"),void 0===r&&(r={});var o=u.default(t),i=r.width,a=void 0===i?"":i,c=r.height,s=void 0===c?"":c,f="";return a&&(f+="width: "+a+";"),s&&(f+="height: "+s+";"),o.attr("width",e),o.attr("height",n),o.attr("style",f),o[0].outerHTML}_e({target:"String",proto:!0,forced:(He="trim",b((function(){return!!Je[He]()||"
"!=="
"[He]()||on&&Je[He].name!==He})))},{trim:function(){return un(this)}}),_e({global:!0},{globalThis:m}),r.append&&(u.default.fn.append=r.append),r.on&&(u.default.fn.on=r.on),r.focus&&(u.default.fn.focus=r.focus),r.attr&&(u.default.fn.attr=r.attr),r.val&&(u.default.fn.val=r.val),r.html&&(u.default.fn.html=r.html),r.parent&&(u.default.fn.parent=r.parent),r.hasClass&&(u.default.fn.hasClass=r.hasClass),r.empty&&(u.default.fn.empty=r.empty);var sn={type:"video",renderElem:function(e,r,o){var i,u=e,a=u.src,c=void 0===a?"":a,s=u.poster,f=void 0===s?"":s,l=u.key,d=void 0===l?"":l,v=u.width,p=void 0===v?"auto":v,h=u.height,y=void 0===h?"auto":h,g=u.style,m=void 0===g?{}:g,b=u.textAlign,w=void 0===b?"center":b,S=t.DomEditor.isNodeSelected(o,e);if(0===c.trim().indexOf("<iframe ")){var x=cn(c,p,y,m);i=n.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w},innerHTML:x})}else{var E=n.jsx("video",{key:d,poster:f,controls:!0,style:m},n.jsx("source",{src:c,type:"video/mp4"}),"Sorry, your browser doesn't support embedded videos.\n 抱歉,浏览器不支持 video 视频");"auto"!==p&&(E.data.width=p),"auto"!==y&&(E.data.height=y),i=n.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w}},E)}return n.h("div",{props:{contentEditable:!1},on:{mousedown:function(t){return t.preventDefault()}}},i)}};var fn,ln={type:"video",elemToHtml:function(t,e){var n=t,r=n.src,o=void 0===r?"":r,i=n.poster,u=void 0===i?"":i,a=n.width,c=void 0===a?"auto":a,s=n.height,f=void 0===s?"auto":s,l=n.style,d=void 0===l?{}:l,v=n.textAlign,p='<div data-w-e-type="video" data-w-e-is-void style="text-align: '+(void 0===v?"center":v)+';">\n';if(0===o.trim().indexOf("<iframe ")){p+=cn(o,c,f,d)}else{var h=d.width,y=void 0===h?"":h,g=d.height,m=void 0===g?"":g,b="";y&&(b+="width: "+y+";"),m&&(b+="height: "+m+";"),p+='<video poster="'+u+'" controls="true" width="'+c+'" height="'+f+'" style="'+b+'"><source src="'+o+'" type="video/mp4"/></video>'}return p+="\n</div>"}},dn=Object.keys||function(t){return Ie(t,je)},vn=w?Object.defineProperties:function(t,e){Dt(t);for(var n,r=$(e),o=dn(e),i=o.length,u=0;i>u;)$t.f(t,n=o[u++],r[n]);return t},pn=H("document","documentElement"),hn="prototype",yn="script",gn=Yt("IE_PROTO"),mn=function(){},bn=function(t){return"<"+yn+">"+t+"</"+yn+">"},wn=function(t){t.write(bn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Sn=function(){try{fn=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Sn="undefined"!=typeof document?document.domain&&fn?wn(fn):(e=kt("iframe"),n="java"+yn+":",e.style.display="none",pn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(bn("document.F=Object")),t.close(),t.F):wn(fn);for(var r=je.length;r--;)delete Sn[hn][je[r]];return Sn()};Jt[gn]=!0;var xn=Object.create||function(t,e){var n;return null!==t?(mn[hn]=Dt(t),n=new mn,mn[hn]=null,n[gn]=t):n=Sn(),void 0===e?n:vn(n,e)},En=Ot("unscopables"),On=Array.prototype;null==On[En]&&$t.f(On,En,{configurable:!0,value:xn(null)});var In=function(t){On[En][t]=!0},jn=xe.includes;_e({target:"Array",proto:!0},{includes:function(t){return jn(this,t,arguments.length>1?arguments[1]:void 0)}}),In("includes");var Mn={selector:"iframe,video,p",preParseHtml:function(t){var e=u.default(t),n=e;if("p"===an(e)){var r=e.children();if(1===r.length){var o=r[0],i=o.tagName.toLowerCase();["iframe","video"].includes(i)&&(n=u.default(o))}}var a=an(n);if("iframe"!==a&&"video"!==a)return n[0];if("video"===n.parent().attr("data-w-e-type"))return n[0];var c=u.default('<div data-w-e-type="video" data-w-e-is-void style="text-align: center;"></div>');return c.append(n),c[0]}},Pn=k(k.bind),Tn=function(t,e){return ot(t),void 0===e?t:Pn?Pn(t,e):function(){return t.apply(e,arguments)}},An=Array.isArray||function(t){return"Array"==C(t)},kn=function(){},Nn=[],Rn=H("Reflect","construct"),Cn=/^\s*(?:class|function)\b/,Vn=k(Cn.exec),Ln=!Cn.exec(kn),Dn=function(t){if(!_(t))return!1;try{return Rn(kn,Nn,t),!0}catch(t){return!1}},zn=!Rn||b((function(){var t;return Dn(Dn.call)||!Dn(Object)||!Dn((function(){t=!0}))||t}))?function(t){if(!_(t))return!1;switch(Ke(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}return Ln||!!Vn(Cn,Ut(t))}:Dn,Fn=Ot("species"),$n=m.Array,_n=function(t,e){return new(function(t){var e;return An(t)&&(e=t.constructor,(zn(e)&&(e===$n||An(e.prototype))||B(e)&&null===(e=e[Fn]))&&(e=void 0)),void 0===e?$n:e}(t))(0===e?0:e)},Bn=k([].push),Hn=function(t){var e=1==t,n=2==t,r=3==t,o=4==t,i=6==t,u=7==t,a=5==t||i;return function(c,s,f,l){for(var d,v,p=vt(c),h=D(p),y=Tn(s,f),g=we(h),m=0,b=l||_n,w=e?b(c,g):n||u?b(c,0):void 0;g>m;m++)if((a||m in h)&&(v=y(d=h[m],m,p),t))if(e)w[m]=v;else if(v)switch(t){case 3:return!0;case 5:return d;case 6:return m;case 2:Bn(w,d)}else switch(t){case 4:return!1;case 7:Bn(w,d)}return i?-1:r||o?o:w}},Gn={forEach:Hn(0),map:Hn(1),filter:Hn(2),some:Hn(3),every:Hn(4),find:Hn(5),findIndex:Hn(6),filterReject:Hn(7)},Wn=Gn.find,Un="find",qn=!0;Un in[]&&Array(1)[Un]((function(){qn=!1})),_e({target:"Array",proto:!0,forced:qn},{find:function(t){return Wn(this,t,arguments.length>1?arguments[1]:void 0)}}),In(Un);var Kn=Ge?{}.toString:function(){return"[object "+Ke(this)+"]"};Ge||le(Object.prototype,"toString",Kn,{unsafe:!0});var Xn,Yn,Jn=function(){var t=Dt(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e},Qn=m.RegExp,Zn=b((function(){var t=Qn("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),tr=Zn||b((function(){return!Qn("a","y").sticky})),er={BROKEN_CARET:Zn||b((function(){var t=Qn("^r","gy");return t.lastIndex=2,null!=t.exec("str")})),MISSED_STICKY:tr,UNSUPPORTED_Y:Zn},nr=m.RegExp,rr=b((function(){var t=nr(".","s");return!(t.dotAll&&t.exec("\n")&&"s"===t.flags)})),or=m.RegExp,ir=b((function(){var t=or("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),ur=ue.get,ar=lt("native-string-replace",String.prototype.replace),cr=RegExp.prototype.exec,sr=cr,fr=k("".charAt),lr=k("".indexOf),dr=k("".replace),vr=k("".slice),pr=(Yn=/b*/g,x(cr,Xn=/a/,"a"),x(cr,Yn,"a"),0!==Xn.lastIndex||0!==Yn.lastIndex),hr=er.BROKEN_CARET,yr=void 0!==/()??/.exec("")[1];(pr||yr||hr||rr||ir)&&(sr=function(t){var e,n,r,o,i,u,a,c=this,s=ur(c),f=Ye(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=x(sr,l,f),c.lastIndex=l.lastIndex,e;var d=s.groups,v=hr&&c.sticky,p=x(Jn,c),h=c.source,y=0,g=f;if(v&&(p=dr(p,"y",""),-1===lr(p,"g")&&(p+="g"),g=vr(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==fr(f,c.lastIndex-1))&&(h="(?: "+h+")",g=" "+g,y++),n=new RegExp("^(?:"+h+")",p)),yr&&(n=new RegExp("^"+h+"$(?!\\s)",p)),pr&&(r=c.lastIndex),o=x(cr,v?n:c,g),v?o?(o.input=vr(o.input,y),o[0]=vr(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:pr&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),yr&&o&&o.length>1&&x(ar,o[0],n,(function(){for(i=1;i<arguments.length-2;i++)void 0===arguments[i]&&(o[i]=void 0)})),o&&d)for(o.groups=u=xn(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var gr=sr;_e({target:"RegExp",proto:!0,forced:/./.exec!==gr},{exec:gr});var mr=Function.prototype,br=mr.apply,wr=mr.bind,Sr=mr.call,xr="object"==typeof Reflect&&Reflect.apply||(wr?Sr.bind(br):function(){return Sr.apply(br,arguments)}),Er=Ot("species"),Or=RegExp.prototype,Ir=k("".charAt),jr=k("".charCodeAt),Mr=k("".slice),Pr=function(t){return function(e,n){var r,o,i=Ye(F(e)),u=pe(n),a=i.length;return u<0||u>=a?t?"":void 0:(r=jr(i,u))<55296||r>56319||u+1===a||(o=jr(i,u+1))<56320||o>57343?t?Ir(i,u):r:t?Mr(i,u,u+2):o-56320+(r-55296<<10)+65536}},Tr={codeAt:Pr(!1),charAt:Pr(!0)},Ar=Tr.charAt,kr=function(t,e,n){return e+(n?Ar(t,e).length:1)},Nr=Math.floor,Rr=k("".charAt),Cr=k("".replace),Vr=k("".slice),Lr=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,Dr=/\$([$&'`]|\d{1,2})/g,zr=function(t,e,n,r,o,i){var u=n+t.length,a=r.length,c=Dr;return void 0!==o&&(o=vt(o),c=Lr),Cr(i,c,(function(i,c){var s;switch(Rr(c,0)){case"$":return"$";case"&":return t;case"`":return Vr(e,0,n);case"'":return Vr(e,u);case"<":s=o[Vr(c,1,-1)];break;default:var f=+c;if(0===f)return i;if(f>a){var l=Nr(f/10);return 0===l?i:l<=a?void 0===r[l-1]?Rr(c,1):r[l-1]+Rr(c,1):i}s=r[f-1]}return void 0===s?"":s}))},Fr=m.TypeError,$r=function(t,e){var n=t.exec;if(_(n)){var r=x(n,t,e);return null!==r&&Dt(r),r}if("RegExp"===C(t))return x(gr,t,e);throw Fr("RegExp#exec called on incompatible receiver")},_r=Ot("replace"),Br=Math.max,Hr=Math.min,Gr=k([].concat),Wr=k([].push),Ur=k("".indexOf),qr=k("".slice),Kr="$0"==="a".replace(/./,"$0"),Xr=!!/./[_r]&&""===/./[_r]("a","$0");!function(t,e,n,r){var o=Ot(t),i=!b((function(){var e={};return e[o]=function(){return 7},7!=""[t](e)})),u=i&&!b((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[Er]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!u||n){var a=k(/./[o]),c=e(o,""[t],(function(t,e,n,r,o){var u=k(t),c=e.exec;return c===gr||c===Or.exec?i&&!o?{done:!0,value:a(e,n,r)}:{done:!0,value:u(n,e,r)}:{done:!1}}));le(String.prototype,t,c[0]),le(Or,o,c[1])}r&&_t(Or[o],"sham",!0)}("replace",(function(t,e,n){var r=Xr?"$":"$0";return[function(t,n){var r=F(this),o=null==t?void 0:it(t,_r);return o?x(o,t,r,n):x(e,Ye(r),t,n)},function(t,o){var i=Dt(this),u=Ye(t);if("string"==typeof o&&-1===Ur(o,r)&&-1===Ur(o,"$<")){var a=n(e,i,u,o);if(a.done)return a.value}var c=_(o);c||(o=Ye(o));var s=i.global;if(s){var f=i.unicode;i.lastIndex=0}for(var l=[];;){var d=$r(i,u);if(null===d)break;if(Wr(l,d),!s)break;""===Ye(d[0])&&(i.lastIndex=kr(u,be(i.lastIndex),f))}for(var v,p="",h=0,y=0;y<l.length;y++){for(var g=Ye((d=l[y])[0]),m=Br(Hr(pe(d.index),u.length),0),b=[],w=1;w<d.length;w++)Wr(b,void 0===(v=d[w])?v:String(v));var S=d.groups;if(c){var x=Gr([g],b,m,u);void 0!==S&&Wr(x,S);var E=Ye(xr(o,void 0,x))}else E=zr(g,u,m,b,S,o);m>=h&&(p+=qr(u,h,m)+E,h=m+g.length)}return p+qr(u,h)}]}),!!b((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!Kr||Xr);var Yr={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Jr=kt("span").classList,Qr=Jr&&Jr.constructor&&Jr.constructor.prototype,Zr=Qr===Object.prototype?void 0:Qr,to=function(t,e){var n=[][t];return!!n&&b((function(){n.call(null,e||function(){throw 1},1)}))},eo=Gn.forEach,no=to("forEach")?[].forEach:function(t){return eo(this,t,arguments.length>1?arguments[1]:void 0)},ro=function(t){if(t&&t.forEach!==no)try{_t(t,"forEach",no)}catch(e){t.forEach=no}};for(var oo in Yr)Yr[oo]&&ro(m[oo]&&m[oo].prototype);function io(t){return void 0===t&&(t="r"),t+"-"+o.nanoid()}function uo(t){var e={};return t.trim().split(";").forEach((function(t){if(t){var n=l(t.split(":"),2),r=n[0],o=n[1];r&&o&&(e[r.trim()]=o.trim())}})),e}function ao(t,e,n,r,o){return void 0===e&&(e=""),void 0===n&&(n="auto"),void 0===r&&(r="auto"),void 0===o&&(o={}),{type:"video",src:t,poster:e,width:n,height:r,style:o,children:[{text:""}]}}ro(Zr);var co={selector:'div[data-w-e-type="video"]',parseElemHtml:function(t,e,n){var r=u.default(t),o="",i="",a="auto",c="auto",s={},f=r.find("iframe");if(f.length>0)return a=f.attr("width")||"auto",c=f.attr("height")||"auto",s=uo(s=f.attr("style")||""),ao(o=f[0].outerHTML,i,a,c,s);var l=r.find("video");return(o=l.attr("src")||"")||l.length>0&&(o=l.find("source").attr("src")||""),a=l.attr("width")||"auto",c=l.attr("height")||"auto",ao(o,i=l.attr("poster")||"",a,c,s=uo(s=l.attr("style")||""))}},so=m.Promise,fo=function(t,e,n){for(var r in e)le(t,r,e[r],n);return t},lo=m.String,vo=m.TypeError,po=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=k(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return Dt(n),function(t){if("object"==typeof t||_(t))return t;throw vo("Can't set "+lo(t)+" as a prototype")}(r),e?t(n,r):n.__proto__=r,n}}():void 0),ho=$t.f,yo=Ot("toStringTag"),go=function(t,e,n){t&&!ht(t=n?t:t.prototype,yo)&&ho(t,yo,{configurable:!0,value:e})},mo=Ot("species"),bo=m.TypeError,wo=function(t,e){if(G(e,t))return t;throw bo("Incorrect invocation")},So={},xo=Ot("iterator"),Eo=Array.prototype,Oo=Ot("iterator"),Io=function(t){if(null!=t)return it(t,Oo)||it(t,"@@iterator")||So[Ke(t)]},jo=m.TypeError,Mo=function(t,e,n){var r,o;Dt(t);try{if(!(r=it(t,"return"))){if("throw"===e)throw n;return n}r=x(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return Dt(r),n},Po=m.TypeError,To=function(t,e){this.stopped=t,this.result=e},Ao=To.prototype,ko=function(t,e,n){var r,o,i,u,a,c,s,f,l=n&&n.that,d=!(!n||!n.AS_ENTRIES),v=!(!n||!n.IS_ITERATOR),p=!(!n||!n.INTERRUPTED),h=Tn(e,l),y=function(t){return r&&Mo(r,"normal",t),new To(!0,t)},g=function(t){return d?(Dt(t),p?h(t[0],t[1],y):h(t[0],t[1])):p?h(t,y):h(t)};if(v)r=t;else{if(!(o=Io(t)))throw Po(nt(t)+" is not iterable");if(void 0!==(f=o)&&(So.Array===f||Eo[xo]===f)){for(i=0,u=we(t);u>i;i++)if((a=g(t[i]))&&G(Ao,a))return a;return new To(!1)}r=function(t,e){var n=arguments.length<2?Io(t):e;if(ot(n))return Dt(x(n,t));throw jo(nt(t)+" is not iterable")}(t,o)}for(c=r.next;!(s=x(c,r)).done;){try{a=g(s.value)}catch(t){Mo(r,"throw",t)}if("object"==typeof a&&a&&G(Ao,a))return a}return new To(!1)},No=Ot("iterator"),Ro=!1;try{var Co=0,Vo={next:function(){return{done:!!Co++}},return:function(){Ro=!0}};Vo[No]=function(){return this},Array.from(Vo,(function(){throw 2}))}catch(t){}var Lo,Do,zo,Fo,$o=function(t,e){if(!e&&!Ro)return!1;var n=!1;try{var r={};r[No]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},_o=m.TypeError,Bo=Ot("species"),Ho=function(t,e){var n,r=Dt(t).constructor;return void 0===r||null==(n=Dt(r)[Bo])?e:function(t){if(zn(t))return t;throw _o(nt(t)+" is not a constructor")}(n)},Go=k([].slice),Wo=/(?:ipad|iphone|ipod).*applewebkit/i.test(W),Uo="process"==C(m.process),qo=m.setImmediate,Ko=m.clearImmediate,Xo=m.process,Yo=m.Dispatch,Jo=m.Function,Qo=m.MessageChannel,Zo=m.String,ti=0,ei={},ni="onreadystatechange";try{Lo=m.location}catch(t){}var ri=function(t){if(ht(ei,t)){var e=ei[t];delete ei[t],e()}},oi=function(t){return function(){ri(t)}},ii=function(t){ri(t.data)},ui=function(t){m.postMessage(Zo(t),Lo.protocol+"//"+Lo.host)};qo&&Ko||(qo=function(t){var e=Go(arguments,1);return ei[++ti]=function(){xr(_(t)?t:Jo(t),void 0,e)},Do(ti),ti},Ko=function(t){delete ei[t]},Uo?Do=function(t){Xo.nextTick(oi(t))}:Yo&&Yo.now?Do=function(t){Yo.now(oi(t))}:Qo&&!Wo?(Fo=(zo=new Qo).port2,zo.port1.onmessage=ii,Do=Tn(Fo.postMessage,Fo)):m.addEventListener&&_(m.postMessage)&&!m.importScripts&&Lo&&"file:"!==Lo.protocol&&!b(ui)?(Do=ui,m.addEventListener("message",ii,!1)):Do=ni in kt("script")?function(t){pn.appendChild(kt("script"))[ni]=function(){pn.removeChild(this),ri(t)}}:function(t){setTimeout(oi(t),0)});var ai,ci,si,fi,li,di,vi,pi,hi={set:qo,clear:Ko},yi=/ipad|iphone|ipod/i.test(W)&&void 0!==m.Pebble,gi=/web0s(?!.*chrome)/i.test(W),mi=Ct.f,bi=hi.set,wi=m.MutationObserver||m.WebKitMutationObserver,Si=m.document,xi=m.process,Ei=m.Promise,Oi=mi(m,"queueMicrotask"),Ii=Oi&&Oi.value;Ii||(ai=function(){var t,e;for(Uo&&(t=xi.domain)&&t.exit();ci;){e=ci.fn,ci=ci.next;try{e()}catch(t){throw ci?fi():si=void 0,t}}si=void 0,t&&t.enter()},Wo||Uo||gi||!wi||!Si?!yi&&Ei&&Ei.resolve?((vi=Ei.resolve(void 0)).constructor=Ei,pi=Tn(vi.then,vi),fi=function(){pi(ai)}):Uo?fi=function(){xi.nextTick(ai)}:(bi=Tn(bi,m),fi=function(){bi(ai)}):(li=!0,di=Si.createTextNode(""),new wi(ai).observe(di,{characterData:!0}),fi=function(){di.data=li=!li}));var ji,Mi,Pi,Ti,Ai=Ii||function(t){var e={fn:t,next:void 0};si&&(si.next=e),ci||(ci=e,fi()),si=e},ki=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=r})),this.resolve=ot(e),this.reject=ot(n)},Ni={f:function(t){return new ki(t)}},Ri=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ci="object"==typeof window,Vi=hi.set,Li=Ot("species"),Di="Promise",zi=ue.getterFor(Di),Fi=ue.set,$i=ue.getterFor(Di),_i=so&&so.prototype,Bi=so,Hi=_i,Gi=m.TypeError,Wi=m.document,Ui=m.process,qi=Ni.f,Ki=qi,Xi=!!(Wi&&Wi.createEvent&&m.dispatchEvent),Yi=_(m.PromiseRejectionEvent),Ji="unhandledrejection",Qi=!1,Zi=Fe(Di,(function(){var t=Ut(Bi),e=t!==String(Bi);if(!e&&66===Y)return!0;if(Y>=51&&/native code/.test(t))return!1;var n=new Bi((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};return(n.constructor={})[Li]=r,!(Qi=n.then((function(){}))instanceof r)||!e&&Ci&&!Yi})),tu=Zi||!$o((function(t){Bi.all(t).catch((function(){}))})),eu=function(t){var e;return!(!B(t)||!_(e=t.then))&&e},nu=function(t,e){if(!t.notified){t.notified=!0;var n=t.reactions;Ai((function(){for(var r=t.value,o=1==t.state,i=0;n.length>i;){var u,a,c,s=n[i++],f=o?s.ok:s.fail,l=s.resolve,d=s.reject,v=s.domain;try{f?(o||(2===t.rejection&&uu(t),t.rejection=1),!0===f?u=r:(v&&v.enter(),u=f(r),v&&(v.exit(),c=!0)),u===s.promise?d(Gi("Promise-chain cycle")):(a=eu(u))?x(a,u,l,d):l(u)):d(r)}catch(t){v&&!c&&v.exit(),d(t)}}t.reactions=[],t.notified=!1,e&&!t.rejection&&ou(t)}))}},ru=function(t,e,n){var r,o;Xi?((r=Wi.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),m.dispatchEvent(r)):r={promise:e,reason:n},!Yi&&(o=m["on"+t])?o(r):t===Ji&&function(t,e){var n=m.console;n&&n.error&&(1==arguments.length?n.error(t):n.error(t,e))}("Unhandled promise rejection",n)},ou=function(t){x(Vi,m,(function(){var e,n=t.facade,r=t.value;if(iu(t)&&(e=Ri((function(){Uo?Ui.emit("unhandledRejection",r,n):ru(Ji,n,r)})),t.rejection=Uo||iu(t)?2:1,e.error))throw e.value}))},iu=function(t){return 1!==t.rejection&&!t.parent},uu=function(t){x(Vi,m,(function(){var e=t.facade;Uo?Ui.emit("rejectionHandled",e):ru("rejectionhandled",e,t.value)}))},au=function(t,e,n){return function(r){t(e,r,n)}},cu=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,nu(t,!0))},su=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw Gi("Promise can't be resolved itself");var r=eu(e);r?Ai((function(){var n={done:!1};try{x(r,e,au(su,n,t),au(cu,n,t))}catch(e){cu(n,e,t)}})):(t.value=e,t.state=1,nu(t,!1))}catch(e){cu({done:!1},e,t)}}};if(Zi&&(Hi=(Bi=function(t){wo(this,Hi),ot(t),x(ji,this);var e=zi(this);try{t(au(su,e),au(cu,e))}catch(t){cu(e,t)}}).prototype,(ji=function(t){Fi(this,{type:Di,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:void 0})}).prototype=fo(Hi,{then:function(t,e){var n=$i(this),r=n.reactions,o=qi(Ho(this,Bi));return o.ok=!_(t)||t,o.fail=_(e)&&e,o.domain=Uo?Ui.domain:void 0,n.parent=!0,r[r.length]=o,0!=n.state&&nu(n,!1),o.promise},catch:function(t){return this.then(void 0,t)}}),Mi=function(){var t=new ji,e=zi(t);this.promise=t,this.resolve=au(su,e),this.reject=au(cu,e)},Ni.f=qi=function(t){return t===Bi||t===Pi?new Mi(t):Ki(t)},_(so)&&_i!==Object.prototype)){Ti=_i.then,Qi||(le(_i,"then",(function(t,e){var n=this;return new Bi((function(t,e){x(Ti,n,t,e)})).then(t,e)}),{unsafe:!0}),le(_i,"catch",Hi.catch,{unsafe:!0}));try{delete _i.constructor}catch(t){}po&&po(_i,Hi)}function fu(n,r,o,i,u){return void 0===o&&(o=""),void 0===i&&(i=""),void 0===u&&(u=""),c(this,void 0,void 0,(function(){var a,c,f,l,d,v,p;return s(this,(function(s){switch(s.label){case 0:return r?(n.restoreSelection(),a=n.getMenuConfig("insertVideo"),c=a.onInsertedVideo,f=a.checkVideo,l=a.parseVideoSrc,[4,f(r,o)]):[2];case 1:return"string"==typeof(d=s.sent())?(n.alert(d,"error"),[2]):null==d?[2]:[4,l(r)];case 2:return 0!==(v=s.sent()).trim().indexOf("<iframe ")&&(v=v.replace(/</g,"<").replace(/>/g,">")),p={type:"video",src:v,poster:o,children:[{text:""}],style:{width:i,height:u}},Promise.resolve().then((function(){t.DomEditor.isSelectedEmptyParagraph(n)&&e.Transforms.removeNodes(n,{mode:"highest"}),e.Transforms.insertNodes(n,p,{mode:"highest"})})),c(p),[2]}}))}))}function lu(){return io("w-e-insert-video")}_e({global:!0,wrap:!0,forced:Zi},{Promise:Bi}),go(Bi,Di,!1),function(t){var e=H(t),n=$t.f;w&&e&&!e[mo]&&n(e,mo,{configurable:!0,get:function(){return this}})}(Di),Pi=H(Di),_e({target:Di,stat:!0,forced:Zi},{reject:function(t){var e=qi(this);return x(e.reject,void 0,t),e.promise}}),_e({target:Di,stat:!0,forced:Zi},{resolve:function(t){return function(t,e){if(Dt(t),B(e)&&e.constructor===t)return e;var n=Ni.f(t);return(0,n.resolve)(e),n.promise}(this,t)}}),_e({target:Di,stat:!0,forced:tu},{all:function(t){var e=this,n=qi(e),r=n.resolve,o=n.reject,i=Ri((function(){var n=ot(e.resolve),i=[],u=0,a=1;ko(t,(function(t){var c=u++,s=!1;a++,x(n,e,t).then((function(t){s||(s=!0,i[c]=t,--a||r(i))}),o)})),--a||r(i)}));return i.error&&o(i.value),n.promise},race:function(t){var e=this,n=qi(e),r=n.reject,o=Ri((function(){var o=ot(e.resolve);ko(t,(function(t){x(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}});var du=function(){function n(){this.title=t.t("videoModule.insertVideo"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M981.184 160.096C837.568 139.456 678.848 128 512 128S186.432 139.456 42.816 160.096C15.296 267.808 0 386.848 0 512s15.264 244.16 42.816 351.904C186.464 884.544 345.152 896 512 896s325.568-11.456 469.184-32.096C1008.704 756.192 1024 637.152 1024 512s-15.264-244.16-42.816-351.904zM384 704V320l320 192-320 192z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.srcInputId=lu(),this.posterInputId=lu(),this.buttonId=lu()}return n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){},n.prototype.isDisabled=function(n){var r=n.selection;return null==r||(!e.Range.isCollapsed(r)||!!t.DomEditor.getSelectedElems(n).some((function(e){var r=t.DomEditor.getNodeType(e);return"pre"===r||("list-item"===r||!!n.isVoid(e))})))},n.prototype.getModalPositionNode=function(t){return null},n.prototype.getModalContentElem=function(e){var n=this,r=this,o=r.srcInputId,i=r.posterInputId,a=r.buttonId,f=l(t.genModalInputElems(t.t("videoModule.videoSrc"),o,t.t("videoModule.videoSrcPlaceHolder")),2),d=f[0],v=f[1],p=l(t.genModalInputElems(t.t("videoModule.videoPoster"),i,t.t("videoModule.videoPosterPlaceHolder")),2),h=p[0],y=p[1],g=u.default(v),m=u.default(y),b=l(t.genModalButtonElems(a,t.t("videoModule.ok")),1)[0];if(null==this.$content){var w=u.default("<div></div>");w.on("click","#"+a,(function(t){return c(n,void 0,void 0,(function(){var n,r;return s(this,(function(u){switch(u.label){case 0:return t.preventDefault(),n=w.find("#"+o).val().trim(),r=w.find("#"+i).val().trim(),[4,fu(e,n,r)];case 1:return u.sent(),e.hidePanelOrModal(),[2]}}))}))})),this.$content=w}var S=this.$content;return S.empty(),S.append(d),S.append(h),S.append(b),g.val(""),m.val(""),setTimeout((function(){g.focus()})),S[0]},n}(),vu=k([].join),pu=D!=Object,hu=to("join",",");_e({target:"Array",proto:!0,forced:pu||!hu},{join:function(t){return vu($(this),void 0===t?",":t)}});var yu,gu,mu,bu=!b((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),wu=Yt("IE_PROTO"),Su=m.Object,xu=Su.prototype,Eu=bu?Su.getPrototypeOf:function(t){var e=vt(t);if(ht(e,wu))return e[wu];var n=e.constructor;return _(n)&&e instanceof n?n.prototype:e instanceof Su?xu:null},Ou=Ot("iterator"),Iu=!1;[].keys&&("next"in(mu=[].keys())?(gu=Eu(Eu(mu)))!==Object.prototype&&(yu=gu):Iu=!0);var ju=null==yu||b((function(){var t={};return yu[Ou].call(t)!==t}));ju&&(yu={}),_(yu[Ou])||le(yu,Ou,(function(){return this}));var Mu={IteratorPrototype:yu,BUGGY_SAFARI_ITERATORS:Iu},Pu=Mu.IteratorPrototype,Tu=function(){return this},Au=fe.PROPER,ku=fe.CONFIGURABLE,Nu=Mu.IteratorPrototype,Ru=Mu.BUGGY_SAFARI_ITERATORS,Cu=Ot("iterator"),Vu="keys",Lu="values",Du="entries",zu=function(){return this},Fu=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=xn(Pu,{next:j(+!r,n)}),go(t,o,!1),So[o]=Tu}(n,e,r);var a,c,s,f=function(t){if(t===o&&h)return h;if(!Ru&&t in v)return v[t];switch(t){case Vu:case Lu:case Du:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",d=!1,v=t.prototype,p=v[Cu]||v["@@iterator"]||o&&v[o],h=!Ru&&p||f(o),y="Array"==e&&v.entries||p;if(y&&(a=Eu(y.call(new t)))!==Object.prototype&&a.next&&(Eu(a)!==Nu&&(po?po(a,Nu):_(a[Cu])||le(a,Cu,zu)),go(a,l,!0)),Au&&o==Lu&&p&&p.name!==Lu&&(ku?_t(v,"name",Lu):(d=!0,h=function(){return x(p,this)})),o)if(c={values:f(Lu),keys:i?h:f(Vu),entries:f(Du)},u)for(s in c)(Ru||d||!(s in v))&&le(v,s,c[s]);else _e({target:e,proto:!0,forced:Ru||d},c);return v[Cu]!==h&&le(v,Cu,h,{name:o}),So[e]=h,c},$u="Array Iterator",_u=ue.set,Bu=ue.getterFor($u),Hu=Fu(Array,"Array",(function(t,e){_u(this,{type:$u,target:$(t),index:0,kind:e})}),(function(){var t=Bu(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values");So.Arguments=So.Array,In("keys"),In("values"),In("entries");var Gu=function(t,e,n){var r=Pt(e);r in t?$t.f(t,r,j(0,n)):t[r]=n},Wu=Ot("species"),Uu=function(t){return Y>=51||!b((function(){var e=[];return(e.constructor={})[Wu]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}("slice"),qu=Ot("species"),Ku=m.Array,Xu=Math.max;_e({target:"Array",proto:!0,forced:!Uu},{slice:function(t,e){var n,r,o,i=$(this),u=we(i),a=ge(t,u),c=ge(void 0===e?u:e,u);if(An(i)&&(n=i.constructor,(zn(n)&&(n===Ku||An(n.prototype))||B(n)&&null===(n=n[qu]))&&(n=void 0),n===Ku||void 0===n))return Go(i,a,c);for(r=new(void 0===n?Ku:n)(Xu(c-a,0)),o=0;a<c;a++,o++)a in i&&Gu(r,o,i[a]);return r.length=o,r}});var Yu=fe.EXISTS,Ju=$t.f,Qu=Function.prototype,Zu=k(Qu.toString),ta=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,ea=k(ta.exec);w&&!Yu&&Ju(Qu,"name",{configurable:!0,get:function(){try{return ea(ta,Zu(this))[1]}catch(t){return""}}});var na=Tr.charAt,ra="String Iterator",oa=ue.set,ia=ue.getterFor(ra);Fu(String,"String",(function(t){oa(this,{type:ra,string:Ye(t),index:0})}),(function(){var t,e=ia(this),n=e.string,r=e.index;return r>=n.length?{value:void 0,done:!0}:(t=na(n,r),e.index+=t.length,{value:t,done:!1})}));var ua=m.Array,aa=Math.max,ca=Pe.f,sa="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],fa=function(t){try{return ca(t)}catch(t){return function(t,e,n){for(var r=we(t),o=ge(e,r),i=ge(void 0===n?r:n,r),u=ua(aa(i-o,0)),a=0;o<i;o++,a++)Gu(u,a,t[o]);return u.length=a,u}(sa)}},la={f:function(t){return sa&&"Window"==C(t)?fa(t):ca($(t))}},da=b((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),va=Object.isExtensible,pa=b((function(){va(1)}))||da?function(t){return!!B(t)&&((!da||"ArrayBuffer"!=C(t))&&(!va||va(t)))}:va,ha=!b((function(){return Object.isExtensible(Object.preventExtensions({}))})),ya=p((function(t){var e=$t.f,n=!1,r=bt("meta"),o=0,i=function(t){e(t,r,{value:{objectID:"O"+o++,weakData:{}}})},u=t.exports={enable:function(){u.enable=function(){},n=!0;var t=Pe.f,e=k([].splice),o={};o[r]=1,t(o).length&&(Pe.f=function(n){for(var o=t(n),i=0,u=o.length;i<u;i++)if(o[i]===r){e(o,i,1);break}return o},_e({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:la.f}))},fastKey:function(t,e){if(!B(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!ht(t,r)){if(!pa(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!ht(t,r)){if(!pa(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return ha&&n&&pa(t)&&!ht(t,r)&&i(t),t}};Jt[r]=!0})),ga=ya.getWeakData,ma=ue.set,ba=ue.getterFor,wa=Gn.find,Sa=Gn.findIndex,xa=k([].splice),Ea=0,Oa=function(t){return t.frozen||(t.frozen=new Ia)},Ia=function(){this.entries=[]},ja=function(t,e){return wa(t.entries,(function(t){return t[0]===e}))};Ia.prototype={get:function(t){var e=ja(this,t);if(e)return e[1]},has:function(t){return!!ja(this,t)},set:function(t,e){var n=ja(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Sa(this.entries,(function(e){return e[0]===t}));return~e&&xa(this.entries,e,1),!!~e}};var Ma,Pa={getConstructor:function(t,e,n,r){var o=t((function(t,o){wo(t,i),ma(t,{type:e,id:Ea++,frozen:void 0}),null!=o&&ko(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=ba(e),a=function(t,e,n){var r=u(t),o=ga(Dt(e),!0);return!0===o?Oa(r).set(e,n):o[r.id]=n,t};return fo(i,{delete:function(t){var e=u(this);if(!B(t))return!1;var n=ga(t);return!0===n?Oa(e).delete(t):n&&ht(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!B(t))return!1;var n=ga(t);return!0===n?Oa(e).has(t):n&&ht(n,e.id)}}),fo(i,n?{get:function(t){var e=u(this);if(B(t)){var n=ga(t);return!0===n?Oa(e).get(t):n?n[e.id]:void 0}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},Ta=ue.enforce,Aa=!m.ActiveXObject&&"ActiveXObject"in m,ka=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Na=function(t,e,n){var r=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),i=r?"set":"add",u=m[t],a=u&&u.prototype,c=u,s={},f=function(t){var e=k(a[t]);le(a,t,"add"==t?function(t){return e(this,0===t?0:t),this}:"delete"==t?function(t){return!(o&&!B(t))&&e(this,0===t?0:t)}:"get"==t?function(t){return o&&!B(t)?void 0:e(this,0===t?0:t)}:"has"==t?function(t){return!(o&&!B(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(Fe(t,!_(u)||!(o||a.forEach&&!b((function(){(new u).entries().next()})))))c=n.getConstructor(e,t,r,i),ya.enable();else if(Fe(t,!0)){var l=new c,d=l[i](o?{}:-0,1)!=l,v=b((function(){l.has(1)})),p=$o((function(t){new u(t)})),h=!o&&b((function(){for(var t=new u,e=5;e--;)t[i](e,e);return!t.has(-0)}));p||((c=e((function(t,e){wo(t,a);var n=function(t,e,n){var r,o;return po&&_(r=e.constructor)&&r!==n&&B(o=r.prototype)&&o!==n.prototype&&po(t,o),t}(new u,t,c);return null!=e&&ko(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=c),(v||h)&&(f("delete"),f("has"),r&&f("get")),(h||d)&&f(i),o&&a.clear&&delete a.clear}return s[t]=c,_e({global:!0,forced:c!=u},s),go(c,t),o||n.setStrong(c,t,r),c}("WeakMap",ka,Pa);if(Kt&&Aa){Ma=Pa.getConstructor(ka,"WeakMap",!0),ya.enable();var Ra=Na.prototype,Ca=k(Ra.delete),Va=k(Ra.has),La=k(Ra.get),Da=k(Ra.set);fo(Ra,{delete:function(t){if(B(t)&&!pa(t)){var e=Ta(this);return e.frozen||(e.frozen=new Ma),Ca(this,t)||e.frozen.delete(t)}return Ca(this,t)},has:function(t){if(B(t)&&!pa(t)){var e=Ta(this);return e.frozen||(e.frozen=new Ma),Va(this,t)||e.frozen.has(t)}return Va(this,t)},get:function(t){if(B(t)&&!pa(t)){var e=Ta(this);return e.frozen||(e.frozen=new Ma),Va(this,t)?La(this,t):e.frozen.get(t)}return La(this,t)},set:function(t,e){if(B(t)&&!pa(t)){var n=Ta(this);n.frozen||(n.frozen=new Ma),Va(this,t)?Da(this,t,e):n.frozen.set(t,e)}else Da(this,t,e);return this}})}var za=Ot("iterator"),Fa=Ot("toStringTag"),$a=Hu.values,_a=function(t,e){if(t){if(t[za]!==$a)try{_t(t,za,$a)}catch(e){t[za]=$a}if(t[Fa]||_t(t,Fa,e),Yr[e])for(var n in Hu)if(t[n]!==Hu[n])try{_t(t,n,Hu[n])}catch(e){t[n]=Hu[n]}}};for(var Ba in Yr)_a(m[Ba]&&m[Ba].prototype,Ba);function Ha(t){return t.getMenuConfig("uploadVideo")}_a(Zr,"DOMTokenList");var Ga=new WeakMap;function Wa(e,n){return c(this,void 0,void 0,(function(){var r,o,i,u;return s(this,(function(c){switch(c.label){case 0:return r=function(e){var n=Ga.get(e);if(null!=n)return n;var r=Ha(e),o=r.onSuccess,i=r.onProgress,u=r.onFailed,c=r.customInsert,s=r.onError;return n=t.createUploader(a(a({},r),{onProgress:function(t){e.showProgressBar(t),i&&i(t)},onSuccess:function(t,n){if(c)return c(n,(function(t,n){return fu(e,t,n)})),void o(t,n);var r=n.errno,i=void 0===r?1:r,a=n.data,s=void 0===a?{}:a;if(0===i){var f=s.url,l=void 0===f?"":f,d=s.poster;fu(e,l,void 0===d?"":d),o(t,n)}else u(t,n)},onError:function(t,e,n){s(t,e,n)}})),Ga.set(e,n),n}(e),o=n.name,i=n.type,u=n.size,r.addFile({name:o,type:i,size:u,data:n}),[4,r.upload()];case 1:return c.sent(),[2]}}))}))}var Ua=function(){function n(){this.title=t.t("videoModule.uploadVideo"),this.iconSvg='<svg viewBox="0 0 1056 1024"><path d="M805.902261 521.819882a251.441452 251.441452 0 0 0-251.011972 246.600033 251.051015 251.051015 0 1 0 502.023944 8.823877 253.237463 253.237463 0 0 0-251.011972-255.42391z m59.463561 240.001647v129.898403h-116.701631v-129.898403h-44.041298l101.279368-103.504859 101.279368 103.504859z" p-id="6802"></path><path d="M788.254507 0.000781H99.094092A98.663439 98.663439 0 0 0 0.001171 99.093701v590.067495a98.663439 98.663439 0 0 0 99.092921 99.092921h411.7549a266.434235 266.434235 0 0 1-2.186448-41.815807 275.843767 275.843767 0 0 1 275.180024-270.729042 270.650955 270.650955 0 0 1 103.504859 19.834201V99.093701A101.51363 101.51363 0 0 0 788.254507 0.000781zM295.054441 640.747004V147.507894l394.146189 246.600033z"></path></svg>',this.tag="button"}return n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){var n=this.getMenuConfig(t),r=n.allowedFileTypes,o=void 0===r?[]:r,i=n.customBrowseAndUpload;if(i)i((function(e,n){return fu(t,e,n)}));else{var a="";o.length>0&&(a='accept="'+o.join(", ")+'"');var f=u.default("body"),l=u.default('<input type="file" '+a+" multiple/>");l.hide(),f.append(l),l.click(),l.on("change",(function(){var e=l[0].files;!function(t,e){var n,r;c(this,void 0,void 0,(function(){var o,i,u,a,c,f;return s(this,(function(s){switch(s.label){case 0:if(null==e)return[2];o=Array.prototype.slice.call(e),i=Ha(t).customUpload,s.label=1;case 1:s.trys.push([1,9,10,15]),u=d(o),s.label=2;case 2:return[4,u.next()];case 3:return(a=s.sent()).done?[3,8]:(c=a.value,i?[4,i(c,(function(e,n){return fu(t,e,n)}))]:[3,5]);case 4:return s.sent(),[3,7];case 5:return[4,Wa(t,c)];case 6:s.sent(),s.label=7;case 7:return[3,2];case 8:return[3,15];case 9:return f=s.sent(),n={error:f},[3,15];case 10:return s.trys.push([10,,13,14]),a&&!a.done&&(r=u.return)?[4,r.call(u)]:[3,12];case 11:s.sent(),s.label=12;case 12:return[3,14];case 13:if(n)throw n.error;return[7];case 14:return[7];case 15:return[2]}}))}))}(t,e)}))}},n.prototype.isDisabled=function(n){var r=n.selection;return null==r||(!e.Range.isCollapsed(r)||!!t.DomEditor.getSelectedElems(n).some((function(e){var r=t.DomEditor.getNodeType(e);return"pre"===r||("list-item"===r||!!n.isVoid(e))})))},n.prototype.getMenuConfig=function(t){return t.getMenuConfig("uploadVideo")},n}();function qa(){return io("w-e-insert-video")}var Ka=function(){function n(){this.title=t.t("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=qa(),this.heightInputId=qa(),this.buttonId=qa()}return n.prototype.getSelectedVideoNode=function(e){return t.DomEditor.getSelectedNodeByType(e,"video")},n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){},n.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},n.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},n.prototype.getModalContentElem=function(n){var r=this,o=r.widthInputId,i=r.heightInputId,c=r.buttonId,s=l(t.genModalInputElems(t.t("videoModule.width"),o,"auto"),2),f=s[0],d=s[1],v=u.default(d),p=l(t.genModalInputElems(t.t("videoModule.height"),i,"auto"),2),h=p[0],y=p[1],g=u.default(y),m=l(t.genModalButtonElems(c,t.t("videoModule.ok")),1)[0];if(null==this.$content){var b=u.default("<div></div>");b.on("click","#"+c,(function(r){r.preventDefault();var u=b.find("#"+o).val().trim(),c=b.find("#"+i).val().trim(),s=function(t){return/^\d+(\.\d+)?%$/.test(t)},f=function(t){return/^\d+(\.\d+)?$/.test(t)},l="auto",d="auto";s(u)?l=u:f(u)&&(l=parseInt(u)+"px"),s(c)?d=c:f(c)&&(d=parseInt(c)+"px");var v=S.style,p=void 0===v?{}:v;n.restoreSelection();var h={style:a(a({},p),{width:l,height:d})};e.Transforms.setNodes(n,h,{match:function(e){return t.DomEditor.checkNodeType(e,"video")}}),n.hidePanelOrModal()})),this.$content=b}var w=this.$content;w.empty(),w.append(f),w.append(h),w.append(m);var S=this.getSelectedVideoNode(n);if(null==S)return w[0];var x=S.style,E=void 0===x?{}:x,O=E.width,I=void 0===O?"":O,j=E.height,M=void 0===j?"":j;return v.val(I),g.val(M),setTimeout((function(){v.focus()})),w[0]},n}();function Xa(){return io("w-e-edit-video")}var Ya=function(){function n(){this.title=t.t("videoModule.edit"),this.iconSvg='<svg viewBox="0 0 1024 1024"><path d="M864 0a160 160 0 0 1 128 256l-64 64-224-224 64-64c26.752-20.096 59.968-32 96-32zM64 736l-64 288 288-64 592-592-224-224L64 736z m651.584-372.416l-448 448-55.168-55.168 448-448 55.168 55.168z"></path></svg>',this.tag="button",this.showModal=!0,this.modalWidth=300,this.$content=null,this.srcInputId=Xa(),this.posterInputId=Xa(),this.buttonId=Xa()}return n.prototype.getSelectedVideoNode=function(e){return t.DomEditor.getSelectedNodeByType(e,"video")},n.prototype.getValue=function(t){return""},n.prototype.isActive=function(t){return!1},n.prototype.exec=function(t,e){},n.prototype.isDisabled=function(t){return null==t.selection||null==this.getSelectedVideoNode(t)},n.prototype.getModalPositionNode=function(t){return this.getSelectedVideoNode(t)},n.prototype.getModalContentElem=function(n){var r=this,o=this,i=o.srcInputId,a=o.posterInputId,f=o.buttonId,d=l(t.genModalInputElems(t.t("videoModule.videoSrc"),i,t.t("videoModule.videoSrcPlaceHolder")),2),v=d[0],p=d[1],h=l(t.genModalInputElems(t.t("videoModule.videoPoster"),a,t.t("videoModule.videoPosterPlaceHolder")),2),y=h[0],g=h[1],m=u.default(p),b=u.default(g),w=l(t.genModalButtonElems(f,t.t("videoModule.ok")),1)[0];if(null==this.$content){var S=u.default("<div></div>");S.on("click","#"+f,(function(o){return c(r,void 0,void 0,(function(){var r,u,c,f;return s(this,(function(s){return o.preventDefault(),r=S.find("#"+i).val().trim(),u=S.find("#"+a).val().trim(),c=io("video-"),f={src:r,poster:u,key:c},n.restoreSelection(),e.Transforms.setNodes(n,f,{match:function(e){return t.DomEditor.checkNodeType(e,"video")}}),n.hidePanelOrModal(),[2]}))}))})),this.$content=S}var x=this.$content;x.empty(),x.append(v),x.append(y),x.append(w);var E=this.getSelectedVideoNode(n);if(null==E)return x[0];var O=E.src,I=void 0===O?"":O,j=E.poster,M=void 0===j?"":j;return m.val(I),b.val(M),setTimeout((function(){m.focus()})),x[0]},n}();var Ja={renderElems:[sn],elemsToHtml:[ln],preParseHtml:[Mn],parseElemsHtml:[co],menus:[{key:"insertVideo",factory:function(){return new du},config:{onInsertedVideo:function(t){},checkVideo:function(t,e){return!0},parseVideoSrc:function(t){return t}}},{key:"uploadVideo",factory:function(){return new Ua},config:{server:"",fieldName:"wangeditor-uploaded-video",maxFileSize:10485760,maxNumberOfFiles:5,allowedFileTypes:["video/*"],meta:{},metaWithUrl:!1,withCredentials:!1,timeout:3e4,onBeforeUpload:function(t){return t},onProgress:function(t){},onSuccess:function(t,e){},onFailed:function(t,e){console.error("'"+t.name+"' upload failed",e)},onError:function(t,e,n){console.error("'"+t.name+" upload error",e,n)}}},{key:"editVideoSize",factory:function(){return new Ka}},{key:"editVideoSrc",factory:function(){return new Ya}}],editorPlugin:function(n){var r=n.isVoid,o=n.normalizeNode,i=n;return i.isVoid=function(t){return"video"===t.type||r(t)},i.normalizeNode=function(n){var r=l(n,2),u=r[0],a=r[1];"video"===t.DomEditor.getNodeType(u)&&(t.DomEditor.isLastNode(i,u)&&e.Transforms.insertNodes(i,t.DomEditor.genEmptyParagraph(),{at:[a[0]+1]}));return o([u,a])},i}};return Ja}));
|
|
2
2
|
//# sourceMappingURL=index.js.map
|