@wangeditor-next/video-module 1.3.2 → 1.3.3

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