@wangeditor-next/video-module 1.3.7 → 1.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.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/dist/video-module/src/module/custom-types.d.ts +3 -3
- package/dist/video-module/src/module/menu/config.d.ts +2 -2
- package/package.json +3 -4
- package/CHANGELOG.md +0 -263
- package/LICENSE +0 -21
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,{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}));
|
|
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 p="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function v(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 p&&p)||g("object"==typeof p&&p)||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=!b((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")})),E=Function.prototype.call,O=S?E.bind(E):function(){return E.apply(E,arguments)},x={}.propertyIsEnumerable,I=Object.getOwnPropertyDescriptor,j={f:I&&!x.call({1:2},1)?function(t){var e=I(this,t);return!!e&&e.enumerable}:x},T=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},P=Function.prototype,M=P.call,A=S&&P.bind.bind(M,M),N=S?A:function(t){return function(){return M.apply(t,arguments)}},R=N({}.toString),C=N("".slice),k=function(t){return C(R(t),8,-1)},D=Object,V=N("".split),L=b((function(){return!D("z").propertyIsEnumerable(0)}))?function(t){return"String"===k(t)?V(t,""):D(t)}:D,z=function(t){return null==t},F=TypeError,_=function(t){if(z(t))throw new F("Can't call method on "+t);return t},$=function(t){return L(_(t))},B="object"==typeof document&&document.all,U=void 0===B&&void 0!==B?function(t){return"function"==typeof t||t===B}:function(t){return"function"==typeof t},H=function(t){return"object"==typeof t?null!==t:U(t)},W=function(t,e){return arguments.length<2?(n=m[t],U(n)?n:void 0):m[t]&&m[t][e];var n},G=N({}.isPrototypeOf),q=m.navigator,K=q&&q.userAgent,X=K?String(K):"",Y=m.process,J=m.Deno,Q=Y&&Y.versions||J&&J.version,Z=Q&&Q.v8;Z&&(y=(h=Z.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!y&&X&&(!(h=X.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=X.match(/Chrome\/(\d+)/))&&(y=+h[1]);var tt=y,et=m.String,nt=!!Object.getOwnPropertySymbols&&!b((function(){var t=Symbol("symbol detection");return!et(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&tt&&tt<41})),rt=nt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,ot=Object,it=rt?function(t){return"symbol"==typeof t}:function(t){var e=W("Symbol");return U(e)&&G(e.prototype,ot(t))},ut=String,at=function(t){try{return ut(t)}catch(t){return"Object"}},ct=TypeError,st=function(t){if(U(t))return t;throw new ct(at(t)+" is not a function")},ft=function(t,e){var n=t[e];return z(n)?void 0:st(n)},lt=TypeError,dt=Object.defineProperty,pt=function(t,e){try{dt(m,t,{value:e,configurable:!0,writable:!0})}catch(n){m[t]=e}return e},vt=v((function(t){var e="__core-js_shared__",n=t.exports=m[e]||pt(e,{});(n.versions||(n.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),ht=function(t,e){return vt[t]||(vt[t]=e||{})},yt=Object,gt=function(t){return yt(_(t))},mt=N({}.hasOwnProperty),bt=Object.hasOwn||function(t,e){return mt(gt(t),e)},wt=0,St=Math.random(),Et=N(1..toString),Ot=function(t){return"Symbol("+(void 0===t?"":t)+")_"+Et(++wt+St,36)},xt=m.Symbol,It=ht("wks"),jt=rt?xt.for||xt:xt&&xt.withoutSetter||Ot,Tt=function(t){return bt(It,t)||(It[t]=nt&&bt(xt,t)?xt[t]:jt("Symbol."+t)),It[t]},Pt=TypeError,Mt=Tt("toPrimitive"),At=function(t,e){if(!H(t)||it(t))return t;var n,r=ft(t,Mt);if(r){if(void 0===e&&(e="default"),n=O(r,t,e),!H(n)||it(n))return n;throw new Pt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var n,r;if("string"===e&&U(n=t.toString)&&!H(r=O(n,t)))return r;if(U(n=t.valueOf)&&!H(r=O(n,t)))return r;if("string"!==e&&U(n=t.toString)&&!H(r=O(n,t)))return r;throw new lt("Can't convert object to primitive value")}(t,e)},Nt=function(t){var e=At(t,"string");return it(e)?e:e+""},Rt=m.document,Ct=H(Rt)&&H(Rt.createElement),kt=function(t){return Ct?Rt.createElement(t):{}},Dt=!w&&!b((function(){return 7!==Object.defineProperty(kt("div"),"a",{get:function(){return 7}}).a})),Vt=Object.getOwnPropertyDescriptor,Lt={f:w?Vt:function(t,e){if(t=$(t),e=Nt(e),Dt)try{return Vt(t,e)}catch(t){}if(bt(t,e))return T(!O(j.f,t,e),t[e])}},zt=w&&b((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Ft=String,_t=TypeError,$t=function(t){if(H(t))return t;throw new _t(Ft(t)+" is not an object")},Bt=TypeError,Ut=Object.defineProperty,Ht=Object.getOwnPropertyDescriptor,Wt="enumerable",Gt="configurable",qt="writable",Kt={f:w?zt?function(t,e,n){if($t(t),e=Nt(e),$t(n),"function"==typeof t&&"prototype"===e&&"value"in n&&qt in n&&!n[qt]){var r=Ht(t,e);r&&r[qt]&&(t[e]=n.value,n={configurable:Gt in n?n[Gt]:r[Gt],enumerable:Wt in n?n[Wt]:r[Wt],writable:!1})}return Ut(t,e,n)}:Ut:function(t,e,n){if($t(t),e=Nt(e),$t(n),Dt)try{return Ut(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new Bt("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},Xt=w?function(t,e,n){return Kt.f(t,e,T(1,n))}:function(t,e,n){return t[e]=n,t},Yt=Function.prototype,Jt=w&&Object.getOwnPropertyDescriptor,Qt=bt(Yt,"name"),Zt={EXISTS:Qt,PROPER:Qt&&"something"===function(){}.name,CONFIGURABLE:Qt&&(!w||w&&Jt(Yt,"name").configurable)},te=N(Function.toString);U(vt.inspectSource)||(vt.inspectSource=function(t){return te(t)});var ee,ne,re,oe=vt.inspectSource,ie=m.WeakMap,ue=U(ie)&&/native code/.test(String(ie)),ae=ht("keys"),ce=function(t){return ae[t]||(ae[t]=Ot(t))},se={},fe="Object already initialized",le=m.TypeError,de=m.WeakMap;if(ue||vt.state){var pe=vt.state||(vt.state=new de);pe.get=pe.get,pe.has=pe.has,pe.set=pe.set,ee=function(t,e){if(pe.has(t))throw new le(fe);return e.facade=t,pe.set(t,e),e},ne=function(t){return pe.get(t)||{}},re=function(t){return pe.has(t)}}else{var ve=ce("state");se[ve]=!0,ee=function(t,e){if(bt(t,ve))throw new le(fe);return e.facade=t,Xt(t,ve,e),e},ne=function(t){return bt(t,ve)?t[ve]:{}},re=function(t){return bt(t,ve)}}var he={set:ee,get:ne,has:re,enforce:function(t){return re(t)?ne(t):ee(t,{})},getterFor:function(t){return function(e){var n;if(!H(e)||(n=ne(e)).type!==t)throw new le("Incompatible receiver, "+t+" required");return n}}},ye=v((function(t){var e=Zt.CONFIGURABLE,n=he.enforce,r=he.get,o=String,i=Object.defineProperty,u=N("".slice),a=N("".replace),c=N([].join),s=w&&!b((function(){return 8!==i((function(){}),"length",{value:8}).length})),f=String(String).split("String"),l=t.exports=function(t,r,l){"Symbol("===u(o(r),0,7)&&(r="["+a(o(r),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),l&&l.getter&&(r="get "+r),l&&l.setter&&(r="set "+r),(!bt(t,"name")||e&&t.name!==r)&&(w?i(t,"name",{value:r,configurable:!0}):t.name=r),s&&l&&bt(l,"arity")&&t.length!==l.arity&&i(t,"length",{value:l.arity});try{l&&bt(l,"constructor")&&l.constructor?w&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var d=n(t);return bt(d,"source")||(d.source=c(f,"string"==typeof r?r:"")),t};Function.prototype.toString=l((function(){return U(this)&&r(this).source||oe(this)}),"toString")})),ge=function(t,e,n,r){r||(r={});var o=r.enumerable,i=void 0!==r.name?r.name:e;if(U(n)&&ye(n,i,r),r.global)o?t[e]=n:pt(e,n);else{try{r.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=n:Kt.f(t,e,{value:n,enumerable:!1,configurable:!r.nonConfigurable,writable:!r.nonWritable})}return t},me=Math.ceil,be=Math.floor,we=Math.trunc||function(t){var e=+t;return(e>0?be:me)(e)},Se=function(t){var e=+t;return e!=e||0===e?0:we(e)},Ee=Math.max,Oe=Math.min,xe=function(t,e){var n=Se(t);return n<0?Ee(n+e,0):Oe(n,e)},Ie=Math.min,je=function(t){var e=Se(t);return e>0?Ie(e,9007199254740991):0},Te=function(t){return je(t.length)},Pe=function(t){return function(e,n,r){var o=$(e),i=Te(o);if(0===i)return!t&&-1;var u,a=xe(r,i);if(t&&n!=n){for(;i>a;)if((u=o[a++])!=u)return!0}else for(;i>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}},Me={includes:Pe(!0),indexOf:Pe(!1)},Ae=Me.indexOf,Ne=N([].push),Re=function(t,e){var n,r=$(t),o=0,i=[];for(n in r)!bt(se,n)&&bt(r,n)&&Ne(i,n);for(;e.length>o;)bt(r,n=e[o++])&&(~Ae(i,n)||Ne(i,n));return i},Ce=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],ke=Ce.concat("length","prototype"),De={f:Object.getOwnPropertyNames||function(t){return Re(t,ke)}},Ve={f:Object.getOwnPropertySymbols},Le=N([].concat),ze=W("Reflect","ownKeys")||function(t){var e=De.f($t(t)),n=Ve.f;return n?Le(e,n(t)):e},Fe=function(t,e,n){for(var r=ze(e),o=Kt.f,i=Lt.f,u=0;u<r.length;u++){var a=r[u];bt(t,a)||n&&bt(n,a)||o(t,a,i(e,a))}},_e=/#|\.prototype\./,$e=function(t,e){var n=Ue[Be(t)];return n===We||n!==He&&(U(e)?b(e):!!e)},Be=$e.normalize=function(t){return String(t).replace(_e,".").toLowerCase()},Ue=$e.data={},He=$e.NATIVE="N",We=$e.POLYFILL="P",Ge=$e,qe=Lt.f,Ke=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]||pt(a,{}):m[a]&&m[a].prototype)for(r in e){if(i=e[r],o=t.dontCallGetSet?(u=qe(n,r))&&u.value:n[r],!Ge(c?r:a+(s?".":"#")+r,t.forced)&&void 0!==o){if(typeof i==typeof o)continue;Fe(i,o)}(t.sham||o&&o.sham)&&Xt(i,"sham",!0),ge(n,r,i,t)}},Xe={};Xe[Tt("toStringTag")]="z";var Ye,Je="[object z]"===String(Xe),Qe=Tt("toStringTag"),Ze=Object,tn="Arguments"===k(function(){return arguments}()),en=Je?k: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=Ze(t),Qe))?n:tn?k(e):"Object"===(r=k(e))&&U(e.callee)?"Arguments":r},nn=String,rn=function(t){if("Symbol"===en(t))throw new TypeError("Cannot convert a Symbol value to a string");return nn(t)},on="\t\n\v\f\r \u2028\u2029\ufeff",un=N("".replace),an=RegExp("^["+on+"]+"),cn=RegExp("(^|[^"+on+"])["+on+"]+$"),sn=function(t){return function(e){var n=rn(_(e));return 1&t&&(n=un(n,an,"")),2&t&&(n=un(n,cn,"$1")),n}},fn={start:sn(1),end:sn(2),trim:sn(3)},ln=Zt.PROPER,dn=fn.trim;function pn(t){return t.length?t[0].tagName.toLowerCase():""}function vn(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: ".concat(a,";")),s&&(f+="height: ".concat(s,";")),o.attr("width",e),o.attr("height",n),o.attr("style",f),o[0].outerHTML}Ke({target:"String",proto:!0,forced:(Ye="trim",b((function(){return!!on[Ye]()||"
"!=="
"[Ye]()||ln&&on[Ye].name!==Ye})))},{trim:function(){return dn(this)}}),Ke({global:!0,forced:m.globalThis!==m},{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 hn={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,p=u.width,v=void 0===p?"auto":p,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 E=vn(c,v,y,m);i=n.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w},innerHTML:E})}else{var O=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"!==v&&(O.data.width=v),"auto"!==y&&(O.data.height=y),i=n.jsx("div",{className:"w-e-textarea-video-container","data-selected":S?"true":"",style:{textAlign:w}},O)}return n.h("div",{props:{contentEditable:!1},on:{mousedown:function(t){return t.preventDefault()}}},i)}},yn=Array.isArray||function(t){return"Array"===k(t)},gn=TypeError,mn=function(t){if(t>9007199254740991)throw gn("Maximum allowed index exceeded");return t},bn=function(t,e,n){w?Kt.f(t,e,T(0,n)):t[e]=n},wn=function(){},Sn=W("Reflect","construct"),En=/^\s*(?:class|function)\b/,On=N(En.exec),xn=!En.test(wn),In=function(t){if(!U(t))return!1;try{return Sn(wn,[],t),!0}catch(t){return!1}},jn=function(t){if(!U(t))return!1;switch(en(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return xn||!!On(En,oe(t))}catch(t){return!0}};jn.sham=!0;var Tn=!Sn||b((function(){var t;return In(In.call)||!In(Object)||!In((function(){t=!0}))||t}))?jn:In,Pn=Tt("species"),Mn=Array,An=function(t,e){return new(function(t){var e;return yn(t)&&(e=t.constructor,(Tn(e)&&(e===Mn||yn(e.prototype))||H(e)&&null===(e=e[Pn]))&&(e=void 0)),void 0===e?Mn:e}(t))(0===e?0:e)},Nn=Tt("species"),Rn=function(t){return tt>=51||!b((function(){var e=[];return(e.constructor={})[Nn]=function(){return{foo:1}},1!==e[t](Boolean).foo}))},Cn=Tt("isConcatSpreadable"),kn=tt>=51||!b((function(){var t=[];return t[Cn]=!1,t.concat()[0]!==t})),Dn=function(t){if(!H(t))return!1;var e=t[Cn];return void 0!==e?!!e:yn(t)},Vn=!kn||!Rn("concat");Ke({target:"Array",proto:!0,arity:1,forced:Vn},{concat:function(t){var e,n,r,o,i,u=gt(this),a=An(u,0),c=0;for(e=-1,r=arguments.length;e<r;e++)if(Dn(i=-1===e?u:arguments[e]))for(o=Te(i),mn(c+o),n=0;n<o;n++,c++)n in i&&bn(a,c,i[n]);else mn(c+1),bn(a,c++,i);return a.length=c,a}});var Ln,zn={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,p=n.textAlign,v='<div data-w-e-type="video" data-w-e-is-void style="text-align: '.concat(void 0===p?"center":p,';">\n');if(0===o.trim().indexOf("<iframe ")){v+=vn(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: ".concat(y,";")),m&&(b+="height: ".concat(m,";")),v+='<video poster="'.concat(u,'" controls="true" width="').concat(c,'" height="').concat(f,'" style="').concat(b,'"><source src="').concat(o,'" type="video/mp4"/></video>')}return v+="\n</div>"}},Fn=Object.keys||function(t){return Re(t,Ce)},_n=w&&!zt?Object.defineProperties:function(t,e){$t(t);for(var n,r=$(e),o=Fn(e),i=o.length,u=0;i>u;)Kt.f(t,n=o[u++],r[n]);return t},$n={f:_n},Bn=W("document","documentElement"),Un="prototype",Hn="script",Wn=ce("IE_PROTO"),Gn=function(){},qn=function(t){return"<"+Hn+">"+t+"</"+Hn+">"},Kn=function(t){t.write(qn("")),t.close();var e=t.parentWindow.Object;return t=null,e},Xn=function(){try{Ln=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;Xn="undefined"!=typeof document?document.domain&&Ln?Kn(Ln):(e=kt("iframe"),n="java"+Hn+":",e.style.display="none",Bn.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(qn("document.F=Object")),t.close(),t.F):Kn(Ln);for(var r=Ce.length;r--;)delete Xn[Un][Ce[r]];return Xn()};se[Wn]=!0;var Yn=Object.create||function(t,e){var n;return null!==t?(Gn[Un]=$t(t),n=new Gn,Gn[Un]=null,n[Wn]=t):n=Xn(),void 0===e?n:$n.f(n,e)},Jn=Kt.f,Qn=Tt("unscopables"),Zn=Array.prototype;void 0===Zn[Qn]&&Jn(Zn,Qn,{configurable:!0,value:Yn(null)});var tr=function(t){Zn[Qn][t]=!0},er=Me.includes,nr=b((function(){return!Array(1).includes()}));Ke({target:"Array",proto:!0,forced:nr},{includes:function(t){return er(this,t,arguments.length>1?arguments[1]:void 0)}}),tr("includes");var rr={selector:"iframe,video,p",preParseHtml:function(t){var e=u.default(t),n=e;if("p"===pn(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=pn(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]}},or=function(t){if("Function"===k(t))return N(t)},ir=or(or.bind),ur=function(t,e){return st(t),void 0===e?t:S?ir(t,e):function(){return t.apply(e,arguments)}},ar=N([].push),cr=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,p,v=gt(c),h=L(v),y=Te(h),g=ur(s,f),m=0,b=l||An,w=e?b(c,y):n||u?b(c,0):void 0;y>m;m++)if((a||m in h)&&(p=g(d=h[m],m,v),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return d;case 6:return m;case 2:ar(w,d)}else switch(t){case 4:return!1;case 7:ar(w,d)}return i?-1:r||o?o:w}},sr={forEach:cr(0),map:cr(1),filter:cr(2),some:cr(3),every:cr(4),find:cr(5),findIndex:cr(6),filterReject:cr(7)},fr=sr.find,lr="find",dr=!0;lr in[]&&Array(1)[lr]((function(){dr=!1})),Ke({target:"Array",proto:!0,forced:dr},{find:function(t){return fr(this,t,arguments.length>1?arguments[1]:void 0)}}),tr(lr);var pr=Je?{}.toString:function(){return"[object "+en(this)+"]"};Je||ge(Object.prototype,"toString",pr,{unsafe:!0});var vr,hr,yr=function(){var t=$t(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e},gr=m.RegExp,mr=b((function(){var t=gr("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),br=mr||b((function(){return!gr("a","y").sticky})),wr={BROKEN_CARET:mr||b((function(){var t=gr("^r","gy");return t.lastIndex=2,null!==t.exec("str")})),MISSED_STICKY:br,UNSUPPORTED_Y:mr},Sr=m.RegExp,Er=b((function(){var t=Sr(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)})),Or=m.RegExp,xr=b((function(){var t=Or("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")})),Ir=he.get,jr=ht("native-string-replace",String.prototype.replace),Tr=RegExp.prototype.exec,Pr=Tr,Mr=N("".charAt),Ar=N("".indexOf),Nr=N("".replace),Rr=N("".slice),Cr=(hr=/b*/g,O(Tr,vr=/a/,"a"),O(Tr,hr,"a"),0!==vr.lastIndex||0!==hr.lastIndex),kr=wr.BROKEN_CARET,Dr=void 0!==/()??/.exec("")[1];(Cr||Dr||kr||Er||xr)&&(Pr=function(t){var e,n,r,o,i,u,a,c=this,s=Ir(c),f=rn(t),l=s.raw;if(l)return l.lastIndex=c.lastIndex,e=O(Pr,l,f),c.lastIndex=l.lastIndex,e;var d=s.groups,p=kr&&c.sticky,v=O(yr,c),h=c.source,y=0,g=f;if(p&&(v=Nr(v,"y",""),-1===Ar(v,"g")&&(v+="g"),g=Rr(f,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==Mr(f,c.lastIndex-1))&&(h="(?: "+h+")",g=" "+g,y++),n=new RegExp("^(?:"+h+")",v)),Dr&&(n=new RegExp("^"+h+"$(?!\\s)",v)),Cr&&(r=c.lastIndex),o=O(Tr,p?n:c,g),p?o?(o.input=Rr(o.input,y),o[0]=Rr(o[0],y),o.index=c.lastIndex,c.lastIndex+=o[0].length):c.lastIndex=0:Cr&&o&&(c.lastIndex=c.global?o.index+o[0].length:r),Dr&&o&&o.length>1&&O(jr,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=Yn(null),i=0;i<d.length;i++)u[(a=d[i])[0]]=o[a[1]];return o});var Vr=Pr;Ke({target:"RegExp",proto:!0,forced:/./.exec!==Vr},{exec:Vr});var Lr=Function.prototype,zr=Lr.apply,Fr=Lr.call,_r="object"==typeof Reflect&&Reflect.apply||(S?Fr.bind(zr):function(){return Fr.apply(zr,arguments)}),$r=Tt("species"),Br=RegExp.prototype,Ur=N("".charAt),Hr=N("".charCodeAt),Wr=N("".slice),Gr=function(t){return function(e,n){var r,o,i=rn(_(e)),u=Se(n),a=i.length;return u<0||u>=a?t?"":void 0:(r=Hr(i,u))<55296||r>56319||u+1===a||(o=Hr(i,u+1))<56320||o>57343?t?Ur(i,u):r:t?Wr(i,u,u+2):o-56320+(r-55296<<10)+65536}},qr={codeAt:Gr(!1),charAt:Gr(!0)},Kr=qr.charAt,Xr=function(t,e,n){return e+(n?Kr(t,e).length:1)},Yr=Math.floor,Jr=N("".charAt),Qr=N("".replace),Zr=N("".slice),to=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,eo=/\$([$&'`]|\d{1,2})/g,no=function(t,e,n,r,o,i){var u=n+t.length,a=r.length,c=eo;return void 0!==o&&(o=gt(o),c=to),Qr(i,c,(function(i,c){var s;switch(Jr(c,0)){case"$":return"$";case"&":return t;case"`":return Zr(e,0,n);case"'":return Zr(e,u);case"<":s=o[Zr(c,1,-1)];break;default:var f=+c;if(0===f)return i;if(f>a){var l=Yr(f/10);return 0===l?i:l<=a?void 0===r[l-1]?Jr(c,1):r[l-1]+Jr(c,1):i}s=r[f-1]}return void 0===s?"":s}))},ro=TypeError,oo=function(t,e){var n=t.exec;if(U(n)){var r=O(n,t,e);return null!==r&&$t(r),r}if("RegExp"===k(t))return O(Vr,t,e);throw new ro("RegExp#exec called on incompatible receiver")},io=Tt("replace"),uo=Math.max,ao=Math.min,co=N([].concat),so=N([].push),fo=N("".indexOf),lo=N("".slice),po="$0"==="a".replace(/./,"$0"),vo=!!/./[io]&&""===/./[io]("a","$0");!function(t,e,n,r){var o=Tt(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[$r]=function(){return n},n.flags="",n[o]=/./[o]),n.exec=function(){return e=!0,null},n[o](""),!e}));if(!i||!u||n){var a=/./[o],c=e(o,""[t],(function(t,e,n,r,o){var u=e.exec;return u===Vr||u===Br.exec?i&&!o?{done:!0,value:O(a,e,n,r)}:{done:!0,value:O(t,n,e,r)}:{done:!1}}));ge(String.prototype,t,c[0]),ge(Br,o,c[1])}r&&Xt(Br[o],"sham",!0)}("replace",(function(t,e,n){var r=vo?"$":"$0";return[function(t,n){var r=_(this),o=z(t)?void 0:ft(t,io);return o?O(o,t,r,n):O(e,rn(r),t,n)},function(t,o){var i=$t(this),u=rn(t);if("string"==typeof o&&-1===fo(o,r)&&-1===fo(o,"$<")){var a=n(e,i,u,o);if(a.done)return a.value}var c=U(o);c||(o=rn(o));var s,f=i.global;f&&(s=i.unicode,i.lastIndex=0);for(var l,d=[];null!==(l=oo(i,u))&&(so(d,l),f);){""===rn(l[0])&&(i.lastIndex=Xr(u,je(i.lastIndex),s))}for(var p,v="",h=0,y=0;y<d.length;y++){for(var g,m=rn((l=d[y])[0]),b=uo(ao(Se(l.index),u.length),0),w=[],S=1;S<l.length;S++)so(w,void 0===(p=l[S])?p:String(p));var E=l.groups;if(c){var O=co([m],w,b,u);void 0!==E&&so(O,E),g=rn(_r(o,void 0,O))}else g=no(m,u,b,w,E,o);b>=h&&(v+=lo(u,h,b)+g,h=b+m.length)}return v+lo(u,h)}]}),!!b((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!po||vo);var ho={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},yo=kt("span").classList,go=yo&&yo.constructor&&yo.constructor.prototype,mo=go===Object.prototype?void 0:go,bo=function(t,e){var n=[][t];return!!n&&b((function(){n.call(null,e||function(){return 1},1)}))},wo=sr.forEach,So=bo("forEach")?[].forEach:function(t){return wo(this,t,arguments.length>1?arguments[1]:void 0)},Eo=function(t){if(t&&t.forEach!==So)try{Xt(t,"forEach",So)}catch(e){t.forEach=So}};for(var Oo in ho)ho[Oo]&&Eo(m[Oo]&&m[Oo].prototype);function xo(t){return void 0===t&&(t="r"),"".concat(t,"-").concat(o.nanoid())}function Io(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 jo(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:""}]}}Eo(mo);var To,Po,Mo,Ao,No={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=Io(s=f.attr("style")||""),jo(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",jo(o,i=l.attr("poster")||"",a,c,s=Io(s=l.attr("style")||""))}},Ro=function(t){return X.slice(0,t.length)===t},Co=Ro("Bun/")?"BUN":Ro("Cloudflare-Workers")?"CLOUDFLARE":Ro("Deno/")?"DENO":Ro("Node.js/")?"NODE":m.Bun&&"string"==typeof Bun.version?"BUN":m.Deno&&"object"==typeof Deno.version?"DENO":"process"===k(m.process)?"NODE":m.window&&m.document?"BROWSER":"REST",ko="NODE"===Co,Do=String,Vo=TypeError,Lo=function(t){if(function(t){return H(t)||null===t}(t))return t;throw new Vo("Can't set "+Do(t)+" as a prototype")},zo=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{t=function(t,e,n){try{return N(st(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}(Object.prototype,"__proto__","set"),t(n,[]),e=n instanceof Array}catch(t){}return function(n,r){return _(n),Lo(r),H(n)?(e?t(n,r):n.__proto__=r,n):n}}():void 0),Fo=Kt.f,_o=Tt("toStringTag"),$o=function(t,e,n){t&&!n&&(t=t.prototype),t&&!bt(t,_o)&&Fo(t,_o,{configurable:!0,value:e})},Bo=function(t,e,n){return n.get&&ye(n.get,e,{getter:!0}),n.set&&ye(n.set,e,{setter:!0}),Kt.f(t,e,n)},Uo=Tt("species"),Ho=TypeError,Wo=function(t,e){if(G(e,t))return t;throw new Ho("Incorrect invocation")},Go=TypeError,qo=Tt("species"),Ko=function(t,e){var n,r=$t(t).constructor;return void 0===r||z(n=$t(r)[qo])?e:function(t){if(Tn(t))return t;throw new Go(at(t)+" is not a constructor")}(n)},Xo=N([].slice),Yo=TypeError,Jo=/(?:ipad|iphone|ipod).*applewebkit/i.test(X),Qo=m.setImmediate,Zo=m.clearImmediate,ti=m.process,ei=m.Dispatch,ni=m.Function,ri=m.MessageChannel,oi=m.String,ii=0,ui={},ai="onreadystatechange";b((function(){To=m.location}));var ci=function(t){if(bt(ui,t)){var e=ui[t];delete ui[t],e()}},si=function(t){return function(){ci(t)}},fi=function(t){ci(t.data)},li=function(t){m.postMessage(oi(t),To.protocol+"//"+To.host)};Qo&&Zo||(Qo=function(t){!function(t,e){if(t<e)throw new Yo("Not enough arguments")}(arguments.length,1);var e=U(t)?t:ni(t),n=Xo(arguments,1);return ui[++ii]=function(){_r(e,void 0,n)},Po(ii),ii},Zo=function(t){delete ui[t]},ko?Po=function(t){ti.nextTick(si(t))}:ei&&ei.now?Po=function(t){ei.now(si(t))}:ri&&!Jo?(Ao=(Mo=new ri).port2,Mo.port1.onmessage=fi,Po=ur(Ao.postMessage,Ao)):m.addEventListener&&U(m.postMessage)&&!m.importScripts&&To&&"file:"!==To.protocol&&!b(li)?(Po=li,m.addEventListener("message",fi,!1)):Po=ai in kt("script")?function(t){Bn.appendChild(kt("script"))[ai]=function(){Bn.removeChild(this),ci(t)}}:function(t){setTimeout(si(t),0)});var di={set:Qo,clear:Zo},pi=Object.getOwnPropertyDescriptor,vi=function(){this.head=null,this.tail=null};vi.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var hi,yi,gi,mi,bi,wi=vi,Si=/ipad|iphone|ipod/i.test(X)&&"undefined"!=typeof Pebble,Ei=/web0s(?!.*chrome)/i.test(X),Oi=di.set,xi=m.MutationObserver||m.WebKitMutationObserver,Ii=m.document,ji=m.process,Ti=m.Promise,Pi=function(t){if(!w)return m[t];var e=pi(m,t);return e&&e.value}("queueMicrotask");if(!Pi){var Mi=new wi,Ai=function(){var t,e;for(ko&&(t=ji.domain)&&t.exit();e=Mi.get();)try{e()}catch(t){throw Mi.head&&hi(),t}t&&t.enter()};Jo||ko||Ei||!xi||!Ii?!Si&&Ti&&Ti.resolve?((mi=Ti.resolve(void 0)).constructor=Ti,bi=ur(mi.then,mi),hi=function(){bi(Ai)}):ko?hi=function(){ji.nextTick(Ai)}:(Oi=ur(Oi,m),hi=function(){Oi(Ai)}):(yi=!0,gi=Ii.createTextNode(""),new xi(Ai).observe(gi,{characterData:!0}),hi=function(){gi.data=yi=!yi}),Pi=function(t){Mi.head||hi(),Mi.add(t)}}var Ni=Pi,Ri=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Ci=m.Promise;Ci&&Ci.prototype;var ki,Di,Vi,Li,zi=Tt("species"),Fi=!1,_i=U(m.PromiseRejectionEvent),$i=Ge("Promise",(function(){var t=oe(Ci),e=t!==String(Ci);if(!e&&66===tt)return!0;if(!tt||tt<51||!/native code/.test(t)){var n=new Ci((function(t){t(1)})),r=function(t){t((function(){}),(function(){}))};if((n.constructor={})[zi]=r,!(Fi=n.then((function(){}))instanceof r))return!0}return!(e||"BROWSER"!==Co&&"DENO"!==Co||_i)})),Bi={CONSTRUCTOR:$i,REJECTION_EVENT:_i,SUBCLASSING:Fi},Ui=TypeError,Hi=function(t){var e,n;this.promise=new t((function(t,r){if(void 0!==e||void 0!==n)throw new Ui("Bad Promise constructor");e=t,n=r})),this.resolve=st(e),this.reject=st(n)},Wi={f:function(t){return new Hi(t)}},Gi=di.set,qi="Promise",Ki=Bi.CONSTRUCTOR,Xi=Bi.REJECTION_EVENT,Yi=Bi.SUBCLASSING,Ji=he.getterFor(qi),Qi=he.set,Zi=Ci&&Ci.prototype,tu=Ci,eu=Zi,nu=m.TypeError,ru=m.document,ou=m.process,iu=Wi.f,uu=iu,au=!!(ru&&ru.createEvent&&m.dispatchEvent),cu="unhandledrejection",su=function(t){var e;return!(!H(t)||!U(e=t.then))&&e},fu=function(t,e){var n,r,o,i=e.value,u=1===e.state,a=u?t.ok:t.fail,c=t.resolve,s=t.reject,f=t.domain;try{a?(u||(2===e.rejection&&hu(e),e.rejection=1),!0===a?n=i:(f&&f.enter(),n=a(i),f&&(f.exit(),o=!0)),n===t.promise?s(new nu("Promise-chain cycle")):(r=su(n))?O(r,n,c,s):c(n)):s(i)}catch(t){f&&!o&&f.exit(),s(t)}},lu=function(t,e){t.notified||(t.notified=!0,Ni((function(){for(var n,r=t.reactions;n=r.get();)fu(n,t);t.notified=!1,e&&!t.rejection&&pu(t)})))},du=function(t,e,n){var r,o;au?((r=ru.createEvent("Event")).promise=e,r.reason=n,r.initEvent(t,!1,!0),m.dispatchEvent(r)):r={promise:e,reason:n},!Xi&&(o=m["on"+t])?o(r):t===cu&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",n)},pu=function(t){O(Gi,m,(function(){var e,n=t.facade,r=t.value;if(vu(t)&&(e=Ri((function(){ko?ou.emit("unhandledRejection",r,n):du(cu,n,r)})),t.rejection=ko||vu(t)?2:1,e.error))throw e.value}))},vu=function(t){return 1!==t.rejection&&!t.parent},hu=function(t){O(Gi,m,(function(){var e=t.facade;ko?ou.emit("rejectionHandled",e):du("rejectionhandled",e,t.value)}))},yu=function(t,e,n){return function(r){t(e,r,n)}},gu=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,lu(t,!0))},mu=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new nu("Promise can't be resolved itself");var r=su(e);r?Ni((function(){var n={done:!1};try{O(r,e,yu(mu,n,t),yu(gu,n,t))}catch(e){gu(n,e,t)}})):(t.value=e,t.state=1,lu(t,!1))}catch(e){gu({done:!1},e,t)}}};if(Ki&&(eu=(tu=function(t){Wo(this,eu),st(t),O(ki,this);var e=Ji(this);try{t(yu(mu,e),yu(gu,e))}catch(t){gu(e,t)}}).prototype,(ki=function(t){Qi(this,{type:qi,done:!1,notified:!1,parent:!1,reactions:new wi,rejection:!1,state:0,value:null})}).prototype=ge(eu,"then",(function(t,e){var n=Ji(this),r=iu(Ko(this,tu));return n.parent=!0,r.ok=!U(t)||t,r.fail=U(e)&&e,r.domain=ko?ou.domain:void 0,0===n.state?n.reactions.add(r):Ni((function(){fu(r,n)})),r.promise})),Di=function(){var t=new ki,e=Ji(t);this.promise=t,this.resolve=yu(mu,e),this.reject=yu(gu,e)},Wi.f=iu=function(t){return t===tu||undefined===t?new Di(t):uu(t)},U(Ci)&&Zi!==Object.prototype)){Vi=Zi.then,Yi||ge(Zi,"then",(function(t,e){var n=this;return new tu((function(t,e){O(Vi,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete Zi.constructor}catch(t){}zo&&zo(Zi,eu)}Ke({global:!0,constructor:!0,wrap:!0,forced:Ki},{Promise:tu}),$o(tu,qi,!1),Li=W(qi),w&&Li&&!Li[Uo]&&Bo(Li,Uo,{configurable:!0,get:function(){return this}});var bu={},wu=Tt("iterator"),Su=Array.prototype,Eu=Tt("iterator"),Ou=function(t){if(!z(t))return ft(t,Eu)||ft(t,"@@iterator")||bu[en(t)]},xu=TypeError,Iu=function(t,e,n){var r,o;$t(t);try{if(!(r=ft(t,"return"))){if("throw"===e)throw n;return n}r=O(r,t)}catch(t){o=!0,r=t}if("throw"===e)throw n;if(o)throw r;return $t(r),n},ju=TypeError,Tu=function(t,e){this.stopped=t,this.result=e},Pu=Tu.prototype,Mu=function(t,e,n){var r,o,i,u,a,c,s,f,l=n&&n.that,d=!(!n||!n.AS_ENTRIES),p=!(!n||!n.IS_RECORD),v=!(!n||!n.IS_ITERATOR),h=!(!n||!n.INTERRUPTED),y=ur(e,l),g=function(t){return r&&Iu(r,"normal",t),new Tu(!0,t)},m=function(t){return d?($t(t),h?y(t[0],t[1],g):y(t[0],t[1])):h?y(t,g):y(t)};if(p)r=t.iterator;else if(v)r=t;else{if(!(o=Ou(t)))throw new ju(at(t)+" is not iterable");if(void 0!==(f=o)&&(bu.Array===f||Su[wu]===f)){for(i=0,u=Te(t);u>i;i++)if((a=m(t[i]))&&G(Pu,a))return a;return new Tu(!1)}r=function(t,e){var n=arguments.length<2?Ou(t):e;if(st(n))return $t(O(n,t));throw new xu(at(t)+" is not iterable")}(t,o)}for(c=p?t.next:r.next;!(s=O(c,r)).done;){try{a=m(s.value)}catch(t){Iu(r,"throw",t)}if("object"==typeof a&&a&&G(Pu,a))return a}return new Tu(!1)},Au=Tt("iterator"),Nu=!1;try{var Ru=0,Cu={next:function(){return{done:!!Ru++}},return:function(){Nu=!0}};Cu[Au]=function(){return this},Array.from(Cu,(function(){throw 2}))}catch(t){}var ku=function(t,e){try{if(!e&&!Nu)return!1}catch(t){return!1}var n=!1;try{var r={};r[Au]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n},Du=Bi.CONSTRUCTOR||!ku((function(t){Ci.all(t).then(void 0,(function(){}))}));Ke({target:"Promise",stat:!0,forced:Du},{all:function(t){var e=this,n=Wi.f(e),r=n.resolve,o=n.reject,i=Ri((function(){var n=st(e.resolve),i=[],u=0,a=1;Mu(t,(function(t){var c=u++,s=!1;a++,O(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}});var Vu=Bi.CONSTRUCTOR,Lu=Ci&&Ci.prototype;if(Ke({target:"Promise",proto:!0,forced:Vu,real:!0},{catch:function(t){return this.then(void 0,t)}}),U(Ci)){var zu=W("Promise").prototype.catch;Lu.catch!==zu&&ge(Lu,"catch",zu,{unsafe:!0})}Ke({target:"Promise",stat:!0,forced:Du},{race:function(t){var e=this,n=Wi.f(e),r=n.reject,o=Ri((function(){var o=st(e.resolve);Mu(t,(function(t){O(o,e,t).then(n.resolve,r)}))}));return o.error&&r(o.value),n.promise}}),Ke({target:"Promise",stat:!0,forced:Bi.CONSTRUCTOR},{reject:function(t){var e=Wi.f(this);return(0,e.reject)(t),e.promise}});var Fu=Bi.CONSTRUCTOR;function _u(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,p,v;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!==(p=s.sent()).trim().indexOf("<iframe ")&&(p=p.replace(/</g,"<").replace(/>/g,">")),v={type:"video",src:p,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,v,{mode:"highest"})})),c(v),[2]}}))}))}function $u(){return xo("w-e-insert-video")}W("Promise"),Ke({target:"Promise",stat:!0,forced:Fu},{resolve:function(t){return function(t,e){if($t(t),H(e)&&e.constructor===t)return e;var n=Wi.f(t);return(0,n.resolve)(e),n.promise}(this,t)}});var Bu=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=$u(),this.posterInputId=$u(),this.buttonId=$u()}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],p=f[1],v=l(t.genModalInputElems(t.t("videoModule.videoPoster"),i,t.t("videoModule.videoPosterPlaceHolder")),2),h=v[0],y=v[1],g=u.default(p),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","#".concat(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("#".concat(o)).val().trim(),r=w.find("#".concat(i)).val().trim(),[4,_u(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}(),Uu=N([].join),Hu=L!==Object||!bo("join",",");Ke({target:"Array",proto:!0,forced:Hu},{join:function(t){return Uu($(this),void 0===t?",":t)}});var Wu,Gu,qu,Ku=!b((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),Xu=ce("IE_PROTO"),Yu=Object,Ju=Yu.prototype,Qu=Ku?Yu.getPrototypeOf:function(t){var e=gt(t);if(bt(e,Xu))return e[Xu];var n=e.constructor;return U(n)&&e instanceof n?n.prototype:e instanceof Yu?Ju:null},Zu=Tt("iterator"),ta=!1;[].keys&&("next"in(qu=[].keys())?(Gu=Qu(Qu(qu)))!==Object.prototype&&(Wu=Gu):ta=!0);var ea=!H(Wu)||b((function(){var t={};return Wu[Zu].call(t)!==t}));ea&&(Wu={}),U(Wu[Zu])||ge(Wu,Zu,(function(){return this}));var na={IteratorPrototype:Wu,BUGGY_SAFARI_ITERATORS:ta},ra=na.IteratorPrototype,oa=function(){return this},ia=Zt.PROPER,ua=Zt.CONFIGURABLE,aa=na.IteratorPrototype,ca=na.BUGGY_SAFARI_ITERATORS,sa=Tt("iterator"),fa="keys",la="values",da="entries",pa=function(){return this},va=function(t,e,n,r,o,i,u){!function(t,e,n,r){var o=e+" Iterator";t.prototype=Yn(ra,{next:T(+!r,n)}),$o(t,o,!1),bu[o]=oa}(n,e,r);var a,c,s,f=function(t){if(t===o&&h)return h;if(!ca&&t&&t in p)return p[t];switch(t){case fa:case la:case da:return function(){return new n(this,t)}}return function(){return new n(this)}},l=e+" Iterator",d=!1,p=t.prototype,v=p[sa]||p["@@iterator"]||o&&p[o],h=!ca&&v||f(o),y="Array"===e&&p.entries||v;if(y&&(a=Qu(y.call(new t)))!==Object.prototype&&a.next&&(Qu(a)!==aa&&(zo?zo(a,aa):U(a[sa])||ge(a,sa,pa)),$o(a,l,!0)),ia&&o===la&&v&&v.name!==la&&(ua?Xt(p,"name",la):(d=!0,h=function(){return O(v,this)})),o)if(c={values:f(la),keys:i?h:f(fa),entries:f(da)},u)for(s in c)(ca||d||!(s in p))&&ge(p,s,c[s]);else Ke({target:e,proto:!0,forced:ca||d},c);return p[sa]!==h&&ge(p,sa,h,{name:o}),bu[e]=h,c},ha=function(t,e){return{value:t,done:e}},ya=Kt.f,ga="Array Iterator",ma=he.set,ba=he.getterFor(ga),wa=va(Array,"Array",(function(t,e){ma(this,{type:ga,target:$(t),index:0,kind:e})}),(function(){var t=ba(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=null,ha(void 0,!0);switch(t.kind){case"keys":return ha(n,!1);case"values":return ha(e[n],!1)}return ha([n,e[n]],!1)}),"values"),Sa=bu.Arguments=bu.Array;if(tr("keys"),tr("values"),tr("entries"),w&&"values"!==Sa.name)try{ya(Sa,"name",{value:"values"})}catch(t){}var Ea=Rn("slice"),Oa=Tt("species"),xa=Array,Ia=Math.max;Ke({target:"Array",proto:!0,forced:!Ea},{slice:function(t,e){var n,r,o,i=$(this),u=Te(i),a=xe(t,u),c=xe(void 0===e?u:e,u);if(yn(i)&&(n=i.constructor,(Tn(n)&&(n===xa||yn(n.prototype))||H(n)&&null===(n=n[Oa]))&&(n=void 0),n===xa||void 0===n))return Xo(i,a,c);for(r=new(void 0===n?xa:n)(Ia(c-a,0)),o=0;a<c;a++,o++)a in i&&bn(r,o,i[a]);return r.length=o,r}});var ja=Zt.EXISTS,Ta=Function.prototype,Pa=N(Ta.toString),Ma=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,Aa=N(Ma.exec);w&&!ja&&Bo(Ta,"name",{configurable:!0,get:function(){try{return Aa(Ma,Pa(this))[1]}catch(t){return""}}});var Na=qr.charAt,Ra="String Iterator",Ca=he.set,ka=he.getterFor(Ra);va(String,"String",(function(t){Ca(this,{type:Ra,string:rn(t),index:0})}),(function(){var t,e=ka(this),n=e.string,r=e.index;return r>=n.length?ha(void 0,!0):(t=Na(n,r),e.index+=t.length,ha(t,!1))}));var Da=!b((function(){return Object.isExtensible(Object.preventExtensions({}))})),Va=function(t,e,n){for(var r in e)ge(t,r,e[r],n);return t},La=De.f,za="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Fa={f:function(t){return za&&"Window"===k(t)?function(t){try{return La(t)}catch(t){return Xo(za)}}(t):La($(t))}},_a=b((function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}})),$a=Object.isExtensible,Ba=b((function(){$a(1)}))||_a?function(t){return!!H(t)&&((!_a||"ArrayBuffer"!==k(t))&&(!$a||$a(t)))}:$a,Ua=v((function(t){var e=Kt.f,n=!1,r=Ot("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=De.f,e=N([].splice),o={};o[r]=1,t(o).length&&(De.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},Ke({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:Fa.f}))},fastKey:function(t,e){if(!H(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!bt(t,r)){if(!Ba(t))return"F";if(!e)return"E";i(t)}return t[r].objectID},getWeakData:function(t,e){if(!bt(t,r)){if(!Ba(t))return!0;if(!e)return!1;i(t)}return t[r].weakData},onFreeze:function(t){return Da&&n&&Ba(t)&&!bt(t,r)&&i(t),t}};se[r]=!0})),Ha=Ua.getWeakData,Wa=he.set,Ga=he.getterFor,qa=sr.find,Ka=sr.findIndex,Xa=N([].splice),Ya=0,Ja=function(t){return t.frozen||(t.frozen=new Qa)},Qa=function(){this.entries=[]},Za=function(t,e){return qa(t.entries,(function(t){return t[0]===e}))};Qa.prototype={get:function(t){var e=Za(this,t);if(e)return e[1]},has:function(t){return!!Za(this,t)},set:function(t,e){var n=Za(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=Ka(this.entries,(function(e){return e[0]===t}));return~e&&Xa(this.entries,e,1),!!~e}};var tc,ec={getConstructor:function(t,e,n,r){var o=t((function(t,o){Wo(t,i),Wa(t,{type:e,id:Ya++,frozen:null}),z(o)||Mu(o,t[r],{that:t,AS_ENTRIES:n})})),i=o.prototype,u=Ga(e),a=function(t,e,n){var r=u(t),o=Ha($t(e),!0);return!0===o?Ja(r).set(e,n):o[r.id]=n,t};return Va(i,{delete:function(t){var e=u(this);if(!H(t))return!1;var n=Ha(t);return!0===n?Ja(e).delete(t):n&&bt(n,e.id)&&delete n[e.id]},has:function(t){var e=u(this);if(!H(t))return!1;var n=Ha(t);return!0===n?Ja(e).has(t):n&&bt(n,e.id)}}),Va(i,n?{get:function(t){var e=u(this);if(H(t)){var n=Ha(t);if(!0===n)return Ja(e).get(t);if(n)return n[e.id]}},set:function(t,e){return a(this,t,e)}}:{add:function(t){return a(this,t,!0)}}),o}},nc=he.enforce,rc=Object,oc=Array.isArray,ic=rc.isExtensible,uc=rc.isFrozen,ac=rc.isSealed,cc=rc.freeze,sc=rc.seal,fc=!m.ActiveXObject&&"ActiveXObject"in m,lc=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},dc=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=N(a[t]);ge(a,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!H(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!H(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!H(t))&&e(this,0===t?0:t)}:function(t,n){return e(this,0===t?0:t,n),this})};if(Ge(t,!U(u)||!(o||a.forEach&&!b((function(){(new u).entries().next()})))))c=n.getConstructor(e,t,r,i),Ua.enable();else if(Ge(t,!0)){var l=new c,d=l[i](o?{}:-0,1)!==l,p=b((function(){l.has(1)})),v=ku((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)}));v||((c=e((function(t,e){Wo(t,a);var n=function(t,e,n){var r,o;return zo&&U(r=e.constructor)&&r!==n&&H(o=r.prototype)&&o!==n.prototype&&zo(t,o),t}(new u,t,c);return z(e)||Mu(e,n[i],{that:n,AS_ENTRIES:r}),n}))).prototype=a,a.constructor=c),(p||h)&&(f("delete"),f("has"),r&&f("get")),(h||d)&&f(i),o&&a.clear&&delete a.clear}return s[t]=c,Ke({global:!0,constructor:!0,forced:c!==u},s),$o(c,t),o||n.setStrong(c,t,r),c}("WeakMap",lc,ec),pc=dc.prototype,vc=N(pc.set);if(ue)if(fc){tc=ec.getConstructor(lc,"WeakMap",!0),Ua.enable();var hc=N(pc.delete),yc=N(pc.has),gc=N(pc.get);Va(pc,{delete:function(t){if(H(t)&&!ic(t)){var e=nc(this);return e.frozen||(e.frozen=new tc),hc(this,t)||e.frozen.delete(t)}return hc(this,t)},has:function(t){if(H(t)&&!ic(t)){var e=nc(this);return e.frozen||(e.frozen=new tc),yc(this,t)||e.frozen.has(t)}return yc(this,t)},get:function(t){if(H(t)&&!ic(t)){var e=nc(this);return e.frozen||(e.frozen=new tc),yc(this,t)?gc(this,t):e.frozen.get(t)}return gc(this,t)},set:function(t,e){if(H(t)&&!ic(t)){var n=nc(this);n.frozen||(n.frozen=new tc),yc(this,t)?vc(this,t,e):n.frozen.set(t,e)}else vc(this,t,e);return this}})}else Da&&b((function(){var t=cc([]);return vc(new dc,t,1),!uc(t)}))&&Va(pc,{set:function(t,e){var n;return oc(t)&&(uc(t)?n=cc:ac(t)&&(n=sc)),vc(this,t,e),n&&n(t),this}});var mc=Tt("iterator"),bc=wa.values,wc=function(t,e){if(t){if(t[mc]!==bc)try{Xt(t,mc,bc)}catch(e){t[mc]=bc}if($o(t,e,!0),ho[e])for(var n in wa)if(t[n]!==wa[n])try{Xt(t,n,wa[n])}catch(e){t[n]=wa[n]}}};for(var Sc in ho)wc(m[Sc]&&m[Sc].prototype,Sc);function Ec(t){return t.getMenuConfig("uploadVideo")}wc(mo,"DOMTokenList");var Oc=new WeakMap;function xc(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=Oc.get(e);if(null!=n)return n;var r=Ec(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 _u(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;_u(e,l,void 0===d?"":d),o(t,n)}else u(t,n)},onError:function(t,e,n){s(t,e,n)}})),Oc.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 Ic=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 _u(t,e,n)}));else{var a="";o.length>0&&(a='accept="'.concat(o.join(", "),'"'));var f=u.default("body"),l=u.default('<input type="file" '.concat(a," multiple/>"));l.hide(),f.append(l),l.click(),l.on("change",(function(){var e=l[0].files;!function(t,e){var n,r,o,i;c(this,void 0,void 0,(function(){var u,a,c,f,l,p,v;return s(this,(function(s){switch(s.label){case 0:if(null==e)return[2];u=Array.prototype.slice.call(e),a=Ec(t).customUpload,s.label=1;case 1:s.trys.push([1,12,13,18]),c=!0,f=d(u),s.label=2;case 2:return[4,f.next()];case 3:if(l=s.sent(),n=l.done)return[3,11];i=l.value,c=!1,s.label=4;case 4:return s.trys.push([4,,9,10]),p=i,a?[4,a(p,(function(e,n){return _u(t,e,n)}))]:[3,6];case 5:return s.sent(),[3,8];case 6:return[4,xc(t,p)];case 7:s.sent(),s.label=8;case 8:return[3,10];case 9:return c=!0,[7];case 10:return[3,2];case 11:return[3,18];case 12:return v=s.sent(),r={error:v},[3,18];case 13:return s.trys.push([13,,16,17]),c||n||!(o=f.return)?[3,15]:[4,o.call(f)];case 14:s.sent(),s.label=15;case 15:return[3,17];case 16:if(r)throw r.error;return[7];case 17:return[7];case 18: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 jc(){return xo("w-e-insert-video")}var Tc=function(){function n(){this.title=t.t("videoModule.editSize"),this.tag="button",this.showModal=!0,this.modalWidth=320,this.$content=null,this.widthInputId=jc(),this.heightInputId=jc(),this.buttonId=jc()}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],p=u.default(d),v=l(t.genModalInputElems(t.t("videoModule.height"),i,"auto"),2),h=v[0],y=v[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","#".concat(c),(function(r){r.preventDefault();var u=b.find("#".concat(o)).val().trim(),c=b.find("#".concat(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 p=S.style,v=void 0===p?{}:p;n.restoreSelection();var h={style:a(a({},v),{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 E=S.style,O=void 0===E?{}:E,x=O.width,I=void 0===x?"":x,j=O.height,T=void 0===j?"":j;return p.val(I),g.val(T),setTimeout((function(){p.focus()})),w[0]},n}();function Pc(){return xo("w-e-edit-video")}var Mc=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=Pc(),this.posterInputId=Pc(),this.buttonId=Pc()}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),p=d[0],v=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(v),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","#".concat(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("#".concat(i)).val().trim(),u=S.find("#".concat(a)).val().trim(),c=xo("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 E=this.$content;E.empty(),E.append(p),E.append(y),E.append(w);var O=this.getSelectedVideoNode(n);if(null==O)return E[0];var x=O.src,I=void 0===x?"":x,j=O.poster,T=void 0===j?"":j;return m.val(I),b.val(T),setTimeout((function(){m.focus()})),E[0]},n}();var Ac={renderElems:[hn],elemsToHtml:[zn],preParseHtml:[rr],parseElemsHtml:[No],menus:[{key:"insertVideo",factory:function(){return new Bu},config:{onInsertedVideo:function(t){},checkVideo:function(t,e){return!0},parseVideoSrc:function(t){return t}}},{key:"uploadVideo",factory:function(){return new Ic},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("'".concat(t.name,"' upload failed"),e)},onError:function(t,e,n){console.error("'".concat(t.name," upload error"),e,n)}}},{key:"editVideoSize",factory:function(){return new Tc}},{key:"editVideoSrc",factory:function(){return new Mc}}],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 Ac}));
|
|
2
2
|
//# sourceMappingURL=index.js.map
|