Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@gaoding/editor-sdk

Package Overview
Dependencies
Maintainers
14
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@gaoding/editor-sdk - npm Package Compare versions

Comparing version 0.3.4 to 0.3.5-beta.1

2

dist/gd-editor-sdk.min.js

@@ -1,1 +0,1 @@

(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["gd-editor-sdk"]=e():t["gd-editor-sdk"]=e()})(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=73)}([function(t,e,n){var r=n(18)("wks"),o=n(17),i=n(1).Symbol,c="function"==typeof i,s=t.exports=function(t){return r[t]||(r[t]=c&&i[t]||(c?i:o)("Symbol."+t))};s.store=r},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(10),o=n(25);t.exports=n(4)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=!n(15)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,e,n){var r=n(1),o=n(3),i=n(11),c=n(17)("src"),s=n(43),a="toString",u=(""+s).split(a);n(5).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var a="function"==typeof n;a&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(a&&(i(n,c)||o(n,c,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,a,(function(){return"function"==typeof this&&this[c]||s.call(this)}))},function(t,e){t.exports={}},function(t,e,n){var r=n(1),o=n(5),i=n(3),c=n(7),s=n(12),a="prototype",u=function(t,e,n){var f,l,p,d,h=t&u.F,v=t&u.G,y=t&u.S,m=t&u.P,g=t&u.B,x=v?r:y?r[e]||(r[e]={}):(r[e]||{})[a],w=v?o:o[e]||(o[e]={}),b=w[a]||(w[a]={});for(f in v&&(n=e),n)l=!h&&x&&void 0!==x[f],p=(l?x:n)[f],d=g&&l?s(p,r):m&&"function"==typeof p?s(Function.call,p):p,x&&c(x,f,p,t&u.U),w[f]!=p&&i(w,f,d),m&&b[f]!=p&&(b[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(2),o=n(41),i=n(42),c=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return c(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(13);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){var r=n(6),o=n(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(5),o=n(1),i="__core-js_shared__",c=o[i]||(o[i]={});(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(19)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,n){var r=n(27),o=n(28);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(47),o=n(32);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(18)("keys"),o=n(17);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(10).f,o=n(11),i=n(0)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(14),o=n(0)("toStringTag"),i="Arguments"==r(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=c(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(20),o=n(29),i=n(44);t.exports=function(t){return function(e,n,c){var s,a=r(e),u=o(a.length),f=i(c,u);if(t&&n!=n){while(u>f)if(s=a[f++],s!=s)return!0}else for(;u>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(14);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(30),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(0)("unscopables"),o=Array.prototype;void 0==o[r]&&n(3)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(28);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e,n){"use strict";var r=n(24),o={};o[n(0)("toStringTag")]="z",o+""!="[object z]"&&n(7)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,e,n){var r,o,i,c=n(12),s=n(65),a=n(34),u=n(16),f=n(1),l=f.process,p=f.setImmediate,d=f.clearImmediate,h=f.MessageChannel,v=f.Dispatch,y=0,m={},g="onreadystatechange",x=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},w=function(t){x.call(t.data)};p&&d||(p=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return m[++y]=function(){s("function"==typeof t?t:Function(t),e)},r(y),y},d=function(t){delete m[t]},"process"==n(14)(l)?r=function(t){l.nextTick(c(x,t,1))}:v&&v.now?r=function(t){v.now(c(x,t,1))}:h?(o=new h,i=o.port2,o.port1.onmessage=w,r=c(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",w,!1)):r=g in u("script")?function(t){a.appendChild(u("script"))[g]=function(){a.removeChild(this),x.call(t)}}:function(t){setTimeout(c(x,t,1),0)}),t.exports={set:p,clear:d}},function(t,e,n){"use strict";var r=n(13);function o(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=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}t.exports=r},function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},function(t,e,n){"use strict";var r=n(9),o=n(26)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(31)("includes")},function(t,e,n){t.exports=!n(4)&&!n(15)((function(){return 7!=Object.defineProperty(n(16)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){t.exports=n(18)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(30),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(9);r(r.S+r.F,"Object",{assign:n(46)})},function(t,e,n){"use strict";var r=n(4),o=n(21),i=n(48),c=n(49),s=n(33),a=n(27),u=Object.assign;t.exports=!u||n(15)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r}))?function(t,e){var n=s(t),u=arguments.length,f=1,l=i.f,p=c.f;while(u>f){var d,h=a(arguments[f++]),v=l?o(h).concat(l(h)):o(h),y=v.length,m=0;while(y>m)d=v[m++],r&&!p.call(h,d)||(n[d]=h[d])}return n}:u},function(t,e,n){var r=n(11),o=n(20),i=n(26)(!1),c=n(22)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),a=0,u=[];for(n in s)n!=c&&r(s,n)&&u.push(n);while(e.length>a)r(s,n=e[a++])&&(~i(u,n)||u.push(n));return u}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){for(var r=n(51),o=n(21),i=n(7),c=n(1),s=n(3),a=n(8),u=n(0),f=u("iterator"),l=u("toStringTag"),p=a.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),v=0;v<h.length;v++){var y,m=h[v],g=d[m],x=c[m],w=x&&x.prototype;if(w&&(w[f]||s(w,f,p),w[l]||s(w,l,m),a[m]=p,g))for(y in r)w[y]||i(w,y,r[y],!0)}},function(t,e,n){"use strict";var r=n(31),o=n(52),i=n(8),c=n(20);t.exports=n(53)(Array,"Array",(function(t,e){this._t=c(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(19),o=n(9),i=n(7),c=n(3),s=n(8),a=n(54),u=n(23),f=n(57),l=n(0)("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",y=function(){return this};t.exports=function(t,e,n,m,g,x,w){a(n,e,m);var b,_,S,j=function(t){if(!p&&t in M)return M[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",E=g==v,k=!1,M=t.prototype,T=M[l]||M[d]||g&&M[g],P=T||j(g),L=g?E?j("entries"):P:void 0,C="Array"==e&&M.entries||T;if(C&&(S=f(C.call(new t)),S!==Object.prototype&&S.next&&(u(S,O,!0),r||"function"==typeof S[l]||c(S,l,y))),E&&T&&T.name!==v&&(k=!0,P=function(){return T.call(this)}),r&&!w||!p&&!k&&M[l]||c(M,l,P),s[e]=P,s[O]=y,g)if(b={values:E?P:j(v),keys:x?P:j(h),entries:L},w)for(_ in b)_ in M||i(M,_,b[_]);else o(o.P+o.F*(p||k),e,b);return b}},function(t,e,n){"use strict";var r=n(55),o=n(25),i=n(23),c={};n(3)(c,n(0)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(c,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(2),o=n(56),i=n(32),c=n(22)("IE_PROTO"),s=function(){},a="prototype",u=function(){var t,e=n(16)("iframe"),r=i.length,o="<",c=">";e.style.display="none",n(34).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+c+"document.F=Object"+o+"/script"+c),t.close(),u=t.F;while(r--)delete u[a][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[a]=r(t),n=new s,s[a]=null,n[c]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(10),o=n(2),i=n(21);t.exports=n(4)?Object.defineProperties:function(t,e){o(t);var n,c=i(e),s=c.length,a=0;while(s>a)r.f(t,n=c[a++],e[n]);return t}},function(t,e,n){var r=n(11),o=n(33),i=n(22)("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,e,n){"use strict";var r,o,i,c,s=n(19),a=n(1),u=n(12),f=n(24),l=n(9),p=n(6),d=n(13),h=n(59),v=n(60),y=n(64),m=n(36).set,g=n(66)(),x=n(37),w=n(67),b=n(68),_=n(69),S="Promise",j=a.TypeError,O=a.process,E=O&&O.versions,k=E&&E.v8||"",M=a[S],T="process"==f(O),P=function(){},L=o=x.f,C=!!function(){try{var t=M.resolve(1),e=(t.constructor={})[n(0)("species")]=function(t){t(P,P)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(P)instanceof e&&0!==k.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(r){}}(),I=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},A=function(t,e){if(!t._n){t._n=!0;var n=t._c;g((function(){var r=t._v,o=1==t._s,i=0,c=function(e){var n,i,c,s=o?e.ok:e.fail,a=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&z(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),c=!0)),n===e.promise?u(j("Promise-chain cycle")):(i=I(n))?i.call(n,a,u):a(n)):u(r)}catch(l){f&&!c&&f.exit(),u(l)}};while(n.length>i)c(n[i++]);t._c=[],t._n=!1,e&&!t._h&&R(t)}))}},R=function(t){m.call(a,(function(){var e,n,r,o=t._v,i=F(t);if(i&&(e=w((function(){T?O.emit("unhandledRejection",o,t):(n=a.onunhandledrejection)?n({promise:t,reason:o}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=T||F(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},F=function(t){return 1!==t._h&&0===(t._a||t._c).length},z=function(t){m.call(a,(function(){var e;T?O.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})}))},N=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),A(e,!0))},G=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw j("Promise can't be resolved itself");(e=I(t))?g((function(){var r={_w:n,_d:!1};try{e.call(t,u(G,r,1),u(N,r,1))}catch(o){N.call(r,o)}})):(n._v=t,n._s=1,A(n,!1))}catch(r){N.call({_w:n,_d:!1},r)}}};C||(M=function(t){h(this,M,S,"_h"),d(t),r.call(this);try{t(u(G,this,1),u(N,this,1))}catch(e){N.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(70)(M.prototype,{then:function(t,e){var n=L(y(this,M));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=T?O.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&A(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(G,t,1),this.reject=u(N,t,1)},x.f=L=function(t){return t===M||t===c?new i(t):o(t)}),l(l.G+l.W+l.F*!C,{Promise:M}),n(23)(M,S),n(71)(S),c=n(5)[S],l(l.S+l.F*!C,S,{reject:function(t){var e=L(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(s||!C),S,{resolve:function(t){return _(s&&this===c?M:this,t)}}),l(l.S+l.F*!(C&&n(72)((function(t){M.all(t)["catch"](P)}))),S,{all:function(t){var e=this,n=L(e),r=n.resolve,o=n.reject,i=w((function(){var n=[],i=0,c=1;v(t,!1,(function(t){var s=i++,a=!1;n.push(void 0),c++,e.resolve(t).then((function(t){a||(a=!0,n[s]=t,--c||r(n))}),o)})),--c||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=L(e),r=n.reject,o=w((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(12),o=n(61),i=n(62),c=n(2),s=n(29),a=n(63),u={},f={};e=t.exports=function(t,e,n,l,p){var d,h,v,y,m=p?function(){return t}:a(t),g=r(n,l,e?2:1),x=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(d=s(t.length);d>x;x++)if(y=e?g(c(h=t[x])[0],h[1]):g(t[x]),y===u||y===f)return y}else for(v=m.call(t);!(h=v.next()).done;)if(y=o(v,g,h.value,e),y===u||y===f)return y};e.BREAK=u,e.RETURN=f},function(t,e,n){var r=n(2);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(c){var i=t["return"];throw void 0!==i&&r(i.call(t)),c}}},function(t,e,n){var r=n(8),o=n(0)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){var r=n(24),o=n(0)("iterator"),i=n(8);t.exports=n(5).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(2),o=n(13),i=n(0)("species");t.exports=function(t,e){var n,c=r(t).constructor;return void 0===c||void 0==(n=r(c)[i])?e:o(n)}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(1),o=n(36).set,i=r.MutationObserver||r.WebKitMutationObserver,c=r.process,s=r.Promise,a="process"==n(14)(c);t.exports=function(){var t,e,n,u=function(){var r,o;a&&(r=c.domain)&&r.exit();while(t){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,r&&r.enter()};if(a)n=function(){c.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},function(t,e,n){var r=n(1),o=r.navigator;t.exports=o&&o.userAgent||""},function(t,e,n){var r=n(2),o=n(6),i=n(37);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),c=n.resolve;return c(e),n.promise}},function(t,e,n){var r=n(7);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";var r=n(1),o=n(10),i=n(4),c=n(0)("species");t.exports=function(t){var e=r[t];i&&e&&!e[c]&&o.f(e,c,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(0)("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(c){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],s=i[r]();s.next=function(){return{done:n=!0}},i[r]=function(){return s},t(i)}catch(c){}return n}},function(t,e,n){"use strict";var r;(n.r(e),n.d(e,"GdEditorSdk",(function(){return f})),"undefined"!==typeof window)&&(n(39),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n(40),n(45),n(50),n(35),n(58);var o=n(38),i=n.n(o),c={},s=c,a=function(){function t(t){this.config=t}i()(t,[{key:"width",get:function(){return this.config.width}},{key:"height",get:function(){return this.config.height}}]);var e=t.prototype;return e.addElement=function(t){var e=JSON.parse(JSON.stringify(t)),n=Math.random();return this.postMessage("editor.addElement",e,n)},e.setWatermark=function(t){var e=Math.random();return this.postMessage("editor.setWatermark",t,e)},e.postMessage=function(t,e,n){var r=this,o=function(){r.config.frame.contentWindow.postMessage({action:t,asyncId:n,payload:e},"*")};if(n)return new Promise((function(t){o(),s[n]=t}));o()},t}(),u={qiye_common_image_editor:"6693cbd0b5aace0079a25d141b268c3e",qiye_comon_image_editor:"6693cbd0b5aace0079a25d141b268c3e",qiye_common_poster_editor:"1bea7e76dfc224a79e50a36d034c485d",qiye_odyssey_poster_editor:"c35a0dec1aa39c07696d8f4eaee319e2"},f=function(){function t(t){var e=this;if(this.wrapper=null,this.frame=null,this.mask=null,this.container=null,this.cb=function(t){"editor.download"===t.data.action&&(e.config.onUpload&&e.config.onUpload(t.data.blob),e.config.onCompleted&&e.config.onCompleted(t.data.file),!1!==e.config.autoClose&&e.close()),"editor.templetLoaded"===t.data.action&&e.config.onTempletLoaded&&e.config.onTempletLoaded(new a({width:t.data.payload.width,height:t.data.payload.height,frame:e.frame})),t.data.asyncId&&s[t.data.asyncId]&&s[t.data.asyncId](t.data.payload)},!t.onCompleted&&!t.onUpload)throw new Error("缺少必填参数 onCompleted");this.config=t,this.autoResize=function(){var t=e.container;t&&(t.style.width=Math.max(document.documentElement.clientWidth-100,800)+"px",t.style.height=Math.max(document.documentElement.clientHeight-80,500)+"px",e.config.style&&Object.keys(e.config.style).forEach((function(n){t.style[n]=e.config.style[n]})))}}var e=t.prototype;return e.open=function(t){var e=this;this.close(!0),window.addEventListener("resize",this.autoResize,!1);var n=document.createElement("iframe");n.style.display="block",n.style.width="100%",n.style.height="100%",n.setAttribute("frameborder","0");var r=this.config.env||"",o=t.ext||{};Object.assign(o,{buttonText:this.config.buttonText});var i=Object.keys(o).reduce((function(t,e){return void 0!==o[e]&&(t+="&"+e+"="+o[e]),t}),""),c="";c+=""+i;var s="https://www.gaoding.com";"local"===r?s="http://design.dev.gaoding.com":"dev"===r?s="http://www.dev.gaoding.com":"fat"===r?s="http://fat.gaoding.com":"stage"===r&&(s="https://stage.gaoding.com");var a=u[this.config.appId];r.includes("http")?n.src=r+(r.includes("?")?"&":"?")+c:a?(s="https://sdk.open.gaoding.com/utms/"+a,n.src=s+"?"+c):n.src=s+"/utm-editors/"+(this.config.appId?this.config.appId:encodeURIComponent(location.hostname))+"?"+c,this.frame=n,window.addEventListener("message",this.cb,!1);var f=this.config.container&&document.querySelector(this.config.container);if(f)f.appendChild(n);else{var l=document.createElement("div");l.className="gaoding-iframe "+(this.config.container?"":"gaoding-iframe-dialog"),l.style.position="fixed",l.style.left="0px",l.style.top="0px",l.style.width="100%",l.style.height="100%",l.style.zIndex="1000",document.documentElement.clientHeight>800&&(l.style.display="flex",l.style.alignItems="center",l.style.justifyContent="center"),this.wrapper=l;var p=this.container=document.createElement("div");p.style.position="relative",p.style.width=Math.max(document.documentElement.clientWidth-100,800)+"px",p.style.height=Math.max(document.documentElement.clientHeight-80,500)+"px",p.style.minHeight="500px",p.style.margin="40px auto",p.style.background="#fff",p.style.display="block",p.appendChild(this.createCloseBtn()),this.config.style&&Object.keys(this.config.style).forEach((function(t){p.style[t]=e.config.style[t]})),p.appendChild(n),l.appendChild(p),this.createMask(),document.body.appendChild(this.wrapper),this.autoResize(),this.toggleScrollSwitch()}},e.close=function(t){window.removeEventListener("message",this.cb,!1),window.removeEventListener("resize",this.autoResize,!1),this.wrapper&&this.wrapper.parentElement&&this.wrapper.parentElement.removeChild(this.wrapper),this.mask&&this.mask.parentElement&&this.mask.parentElement.removeChild(this.mask);try{var e=this.config.container&&document.querySelector(this.config.container);e&&this.frame&&e.removeChild(this.frame)}catch(n){console.error(n)}this.frame&&!t&&(this.frame=null,this.config.onClose&&this.config.onClose()),this.toggleScrollSwitch()},e.createMask=function(){var t=document.createElement("div");t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.bottom="0px",t.style.right="0px",t.style.zIndex=parseFloat(this.wrapper.style.zIndex)-1+"",t.style.backgroundColor="#000",t.style.opacity=".5",this.mask=t,document.body.appendChild(t)},e.createCloseBtn=function(){var t=this,e=document.createElement("div");e.style.fontSize="13px",e.style.width="42px",e.style.height="42px",e.style.textAlign="right",e.style.position="absolute",e.style.right="-42px",e.style.top="0px",e.style.background="#000",e.style.cursor="pointer",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center",e.style.backgroundRepeat="no-repeat";var n=document.createElement("img");return n.style.display="block",n.style.width="24px",n.src="https://st-gdx.dancf.com/gaodingx/34555636/design/20190509-142237-249d.png",e.appendChild(n),e.addEventListener("click",(function(){return t.close()})),e},e.toggleScrollSwitch=function(){var t=document.querySelector(".gaoding-iframe-dialog");t&&0!==t.offsetWidth?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow=""},t}();window&&(window.GdEditorSdk=f);e["default"]=void 0}])}));
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["gd-editor-sdk"]=e():t["gd-editor-sdk"]=e()})(this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=73)}([function(t,e,n){var r=n(18)("wks"),o=n(17),i=n(1).Symbol,c="function"==typeof i,s=t.exports=function(t){return r[t]||(r[t]=c&&i[t]||(c?i:o)("Symbol."+t))};s.store=r},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(6);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){var r=n(10),o=n(25);t.exports=n(4)?function(t,e,n){return r.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){t.exports=!n(15)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},function(t,e,n){var r=n(1),o=n(3),i=n(11),c=n(17)("src"),s=n(43),a="toString",u=(""+s).split(a);n(5).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var a="function"==typeof n;a&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(a&&(i(n,c)||o(n,c,t[e]?""+t[e]:u.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,a,(function(){return"function"==typeof this&&this[c]||s.call(this)}))},function(t,e){t.exports={}},function(t,e,n){var r=n(1),o=n(5),i=n(3),c=n(7),s=n(12),a="prototype",u=function(t,e,n){var f,l,p,d,h=t&u.F,v=t&u.G,y=t&u.S,m=t&u.P,g=t&u.B,x=v?r:y?r[e]||(r[e]={}):(r[e]||{})[a],w=v?o:o[e]||(o[e]={}),b=w[a]||(w[a]={});for(f in v&&(n=e),n)l=!h&&x&&void 0!==x[f],p=(l?x:n)[f],d=g&&l?s(p,r):m&&"function"==typeof p?s(Function.call,p):p,x&&c(x,f,p,t&u.U),w[f]!=p&&i(w,f,d),m&&b[f]!=p&&(b[f]=p)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){var r=n(2),o=n(41),i=n(42),c=Object.defineProperty;e.f=n(4)?Object.defineProperty:function(t,e,n){if(r(t),e=i(e,!0),r(n),o)try{return c(t,e,n)}catch(s){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(13);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e,n){var r=n(6),o=n(1).document,i=r(o)&&r(o.createElement);t.exports=function(t){return i?o.createElement(t):{}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},function(t,e,n){var r=n(5),o=n(1),i="__core-js_shared__",c=o[i]||(o[i]={});(t.exports=function(t,e){return c[t]||(c[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n(19)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e){t.exports=!1},function(t,e,n){var r=n(27),o=n(28);t.exports=function(t){return r(o(t))}},function(t,e,n){var r=n(47),o=n(32);t.exports=Object.keys||function(t){return r(t,o)}},function(t,e,n){var r=n(18)("keys"),o=n(17);t.exports=function(t){return r[t]||(r[t]=o(t))}},function(t,e,n){var r=n(10).f,o=n(11),i=n(0)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,i)&&r(t,i,{configurable:!0,value:e})}},function(t,e,n){var r=n(14),o=n(0)("toStringTag"),i="Arguments"==r(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=c(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(20),o=n(29),i=n(44);t.exports=function(t){return function(e,n,c){var s,a=r(e),u=o(a.length),f=i(c,u);if(t&&n!=n){while(u>f)if(s=a[f++],s!=s)return!0}else for(;u>f;f++)if((t||f in a)&&a[f]===n)return t||f||0;return!t&&-1}}},function(t,e,n){var r=n(14);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(30),o=Math.min;t.exports=function(t){return t>0?o(r(t),9007199254740991):0}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(0)("unscopables"),o=Array.prototype;void 0==o[r]&&n(3)(o,r,{}),t.exports=function(t){o[r][t]=!0}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var r=n(28);t.exports=function(t){return Object(r(t))}},function(t,e,n){var r=n(1).document;t.exports=r&&r.documentElement},function(t,e,n){"use strict";var r=n(24),o={};o[n(0)("toStringTag")]="z",o+""!="[object z]"&&n(7)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(t,e,n){var r,o,i,c=n(12),s=n(65),a=n(34),u=n(16),f=n(1),l=f.process,p=f.setImmediate,d=f.clearImmediate,h=f.MessageChannel,v=f.Dispatch,y=0,m={},g="onreadystatechange",x=function(){var t=+this;if(m.hasOwnProperty(t)){var e=m[t];delete m[t],e()}},w=function(t){x.call(t.data)};p&&d||(p=function(t){var e=[],n=1;while(arguments.length>n)e.push(arguments[n++]);return m[++y]=function(){s("function"==typeof t?t:Function(t),e)},r(y),y},d=function(t){delete m[t]},"process"==n(14)(l)?r=function(t){l.nextTick(c(x,t,1))}:v&&v.now?r=function(t){v.now(c(x,t,1))}:h?(o=new h,i=o.port2,o.port1.onmessage=w,r=c(i.postMessage,i,1)):f.addEventListener&&"function"==typeof postMessage&&!f.importScripts?(r=function(t){f.postMessage(t+"","*")},f.addEventListener("message",w,!1)):r=g in u("script")?function(t){a.appendChild(u("script"))[g]=function(){a.removeChild(this),x.call(t)}}:function(t){setTimeout(c(x,t,1),0)}),t.exports={set:p,clear:d}},function(t,e,n){"use strict";var r=n(13);function o(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=r(e),this.reject=r(n)}t.exports.f=function(t){return new o(t)}},function(t,e){function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function r(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}t.exports=r},function(t,e){(function(t){var e="currentScript",n=t.getElementsByTagName("script");e in t||Object.defineProperty(t,e,{get:function(){try{throw new Error}catch(r){var t,e=(/.*at [^\(]*\((.*):.+:.+\)$/gi.exec(r.stack)||[!1])[1];for(t in n)if(n[t].src==e||"interactive"==n[t].readyState)return n[t];return null}}})})(document)},function(t,e,n){"use strict";var r=n(9),o=n(26)(!0);r(r.P,"Array",{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(31)("includes")},function(t,e,n){t.exports=!n(4)&&!n(15)((function(){return 7!=Object.defineProperty(n(16)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(6);t.exports=function(t,e){if(!r(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!r(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!r(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){t.exports=n(18)("native-function-to-string",Function.toString)},function(t,e,n){var r=n(30),o=Math.max,i=Math.min;t.exports=function(t,e){return t=r(t),t<0?o(t+e,0):i(t,e)}},function(t,e,n){var r=n(9);r(r.S+r.F,"Object",{assign:n(46)})},function(t,e,n){"use strict";var r=n(4),o=n(21),i=n(48),c=n(49),s=n(33),a=n(27),u=Object.assign;t.exports=!u||n(15)((function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||Object.keys(u({},e)).join("")!=r}))?function(t,e){var n=s(t),u=arguments.length,f=1,l=i.f,p=c.f;while(u>f){var d,h=a(arguments[f++]),v=l?o(h).concat(l(h)):o(h),y=v.length,m=0;while(y>m)d=v[m++],r&&!p.call(h,d)||(n[d]=h[d])}return n}:u},function(t,e,n){var r=n(11),o=n(20),i=n(26)(!1),c=n(22)("IE_PROTO");t.exports=function(t,e){var n,s=o(t),a=0,u=[];for(n in s)n!=c&&r(s,n)&&u.push(n);while(e.length>a)r(s,n=e[a++])&&(~i(u,n)||u.push(n));return u}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){for(var r=n(51),o=n(21),i=n(7),c=n(1),s=n(3),a=n(8),u=n(0),f=u("iterator"),l=u("toStringTag"),p=a.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=o(d),v=0;v<h.length;v++){var y,m=h[v],g=d[m],x=c[m],w=x&&x.prototype;if(w&&(w[f]||s(w,f,p),w[l]||s(w,l,m),a[m]=p,g))for(y in r)w[y]||i(w,y,r[y],!0)}},function(t,e,n){"use strict";var r=n(31),o=n(52),i=n(8),c=n(20);t.exports=n(53)(Array,"Array",(function(t,e){this._t=c(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):o(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var r=n(19),o=n(9),i=n(7),c=n(3),s=n(8),a=n(54),u=n(23),f=n(57),l=n(0)("iterator"),p=!([].keys&&"next"in[].keys()),d="@@iterator",h="keys",v="values",y=function(){return this};t.exports=function(t,e,n,m,g,x,w){a(n,e,m);var b,_,S,j=function(t){if(!p&&t in M)return M[t];switch(t){case h:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},O=e+" Iterator",E=g==v,k=!1,M=t.prototype,T=M[l]||M[d]||g&&M[g],P=T||j(g),L=g?E?j("entries"):P:void 0,C="Array"==e&&M.entries||T;if(C&&(S=f(C.call(new t)),S!==Object.prototype&&S.next&&(u(S,O,!0),r||"function"==typeof S[l]||c(S,l,y))),E&&T&&T.name!==v&&(k=!0,P=function(){return T.call(this)}),r&&!w||!p&&!k&&M[l]||c(M,l,P),s[e]=P,s[O]=y,g)if(b={values:E?P:j(v),keys:x?P:j(h),entries:L},w)for(_ in b)_ in M||i(M,_,b[_]);else o(o.P+o.F*(p||k),e,b);return b}},function(t,e,n){"use strict";var r=n(55),o=n(25),i=n(23),c={};n(3)(c,n(0)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(c,{next:o(1,n)}),i(t,e+" Iterator")}},function(t,e,n){var r=n(2),o=n(56),i=n(32),c=n(22)("IE_PROTO"),s=function(){},a="prototype",u=function(){var t,e=n(16)("iframe"),r=i.length,o="<",c=">";e.style.display="none",n(34).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+c+"document.F=Object"+o+"/script"+c),t.close(),u=t.F;while(r--)delete u[a][i[r]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(s[a]=r(t),n=new s,s[a]=null,n[c]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(10),o=n(2),i=n(21);t.exports=n(4)?Object.defineProperties:function(t,e){o(t);var n,c=i(e),s=c.length,a=0;while(s>a)r.f(t,n=c[a++],e[n]);return t}},function(t,e,n){var r=n(11),o=n(33),i=n(22)("IE_PROTO"),c=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),r(t,i)?t[i]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},function(t,e,n){"use strict";var r,o,i,c,s=n(19),a=n(1),u=n(12),f=n(24),l=n(9),p=n(6),d=n(13),h=n(59),v=n(60),y=n(64),m=n(36).set,g=n(66)(),x=n(37),w=n(67),b=n(68),_=n(69),S="Promise",j=a.TypeError,O=a.process,E=O&&O.versions,k=E&&E.v8||"",M=a[S],T="process"==f(O),P=function(){},L=o=x.f,C=!!function(){try{var t=M.resolve(1),e=(t.constructor={})[n(0)("species")]=function(t){t(P,P)};return(T||"function"==typeof PromiseRejectionEvent)&&t.then(P)instanceof e&&0!==k.indexOf("6.6")&&-1===b.indexOf("Chrome/66")}catch(r){}}(),I=function(t){var e;return!(!p(t)||"function"!=typeof(e=t.then))&&e},A=function(t,e){if(!t._n){t._n=!0;var n=t._c;g((function(){var r=t._v,o=1==t._s,i=0,c=function(e){var n,i,c,s=o?e.ok:e.fail,a=e.resolve,u=e.reject,f=e.domain;try{s?(o||(2==t._h&&N(t),t._h=1),!0===s?n=r:(f&&f.enter(),n=s(r),f&&(f.exit(),c=!0)),n===e.promise?u(j("Promise-chain cycle")):(i=I(n))?i.call(n,a,u):a(n)):u(r)}catch(l){f&&!c&&f.exit(),u(l)}};while(n.length>i)c(n[i++]);t._c=[],t._n=!1,e&&!t._h&&R(t)}))}},R=function(t){m.call(a,(function(){var e,n,r,o=t._v,i=F(t);if(i&&(e=w((function(){T?O.emit("unhandledRejection",o,t):(n=a.onunhandledrejection)?n({promise:t,reason:o}):(r=a.console)&&r.error&&r.error("Unhandled promise rejection",o)})),t._h=T||F(t)?2:1),t._a=void 0,i&&e.e)throw e.v}))},F=function(t){return 1!==t._h&&0===(t._a||t._c).length},N=function(t){m.call(a,(function(){var e;T?O.emit("rejectionHandled",t):(e=a.onrejectionhandled)&&e({promise:t,reason:t._v})}))},z=function(t){var e=this;e._d||(e._d=!0,e=e._w||e,e._v=t,e._s=2,e._a||(e._a=e._c.slice()),A(e,!0))},G=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw j("Promise can't be resolved itself");(e=I(t))?g((function(){var r={_w:n,_d:!1};try{e.call(t,u(G,r,1),u(z,r,1))}catch(o){z.call(r,o)}})):(n._v=t,n._s=1,A(n,!1))}catch(r){z.call({_w:n,_d:!1},r)}}};C||(M=function(t){h(this,M,S,"_h"),d(t),r.call(this);try{t(u(G,this,1),u(z,this,1))}catch(e){z.call(this,e)}},r=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},r.prototype=n(70)(M.prototype,{then:function(t,e){var n=L(y(this,M));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=T?O.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&A(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),i=function(){var t=new r;this.promise=t,this.resolve=u(G,t,1),this.reject=u(z,t,1)},x.f=L=function(t){return t===M||t===c?new i(t):o(t)}),l(l.G+l.W+l.F*!C,{Promise:M}),n(23)(M,S),n(71)(S),c=n(5)[S],l(l.S+l.F*!C,S,{reject:function(t){var e=L(this),n=e.reject;return n(t),e.promise}}),l(l.S+l.F*(s||!C),S,{resolve:function(t){return _(s&&this===c?M:this,t)}}),l(l.S+l.F*!(C&&n(72)((function(t){M.all(t)["catch"](P)}))),S,{all:function(t){var e=this,n=L(e),r=n.resolve,o=n.reject,i=w((function(){var n=[],i=0,c=1;v(t,!1,(function(t){var s=i++,a=!1;n.push(void 0),c++,e.resolve(t).then((function(t){a||(a=!0,n[s]=t,--c||r(n))}),o)})),--c||r(n)}));return i.e&&o(i.v),n.promise},race:function(t){var e=this,n=L(e),r=n.reject,o=w((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(t,e){t.exports=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var r=n(12),o=n(61),i=n(62),c=n(2),s=n(29),a=n(63),u={},f={};e=t.exports=function(t,e,n,l,p){var d,h,v,y,m=p?function(){return t}:a(t),g=r(n,l,e?2:1),x=0;if("function"!=typeof m)throw TypeError(t+" is not iterable!");if(i(m)){for(d=s(t.length);d>x;x++)if(y=e?g(c(h=t[x])[0],h[1]):g(t[x]),y===u||y===f)return y}else for(v=m.call(t);!(h=v.next()).done;)if(y=o(v,g,h.value,e),y===u||y===f)return y};e.BREAK=u,e.RETURN=f},function(t,e,n){var r=n(2);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(c){var i=t["return"];throw void 0!==i&&r(i.call(t)),c}}},function(t,e,n){var r=n(8),o=n(0)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},function(t,e,n){var r=n(24),o=n(0)("iterator"),i=n(8);t.exports=n(5).getIteratorMethod=function(t){if(void 0!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(2),o=n(13),i=n(0)("species");t.exports=function(t,e){var n,c=r(t).constructor;return void 0===c||void 0==(n=r(c)[i])?e:o(n)}},function(t,e){t.exports=function(t,e,n){var r=void 0===n;switch(e.length){case 0:return r?t():t.call(n);case 1:return r?t(e[0]):t.call(n,e[0]);case 2:return r?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return r?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return r?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},function(t,e,n){var r=n(1),o=n(36).set,i=r.MutationObserver||r.WebKitMutationObserver,c=r.process,s=r.Promise,a="process"==n(14)(c);t.exports=function(){var t,e,n,u=function(){var r,o;a&&(r=c.domain)&&r.exit();while(t){o=t.fn,t=t.next;try{o()}catch(i){throw t?n():e=void 0,i}}e=void 0,r&&r.enter()};if(a)n=function(){c.nextTick(u)};else if(!i||r.navigator&&r.navigator.standalone)if(s&&s.resolve){var f=s.resolve(void 0);n=function(){f.then(u)}}else n=function(){o.call(r,u)};else{var l=!0,p=document.createTextNode("");new i(u).observe(p,{characterData:!0}),n=function(){p.data=l=!l}}return function(r){var o={fn:r,next:void 0};e&&(e.next=o),t||(t=o,n()),e=o}}},function(t,e){t.exports=function(t){try{return{e:!1,v:t()}}catch(e){return{e:!0,v:e}}}},function(t,e,n){var r=n(1),o=r.navigator;t.exports=o&&o.userAgent||""},function(t,e,n){var r=n(2),o=n(6),i=n(37);t.exports=function(t,e){if(r(t),o(e)&&e.constructor===t)return e;var n=i.f(t),c=n.resolve;return c(e),n.promise}},function(t,e,n){var r=n(7);t.exports=function(t,e,n){for(var o in e)r(t,o,e[o],n);return t}},function(t,e,n){"use strict";var r=n(1),o=n(10),i=n(4),c=n(0)("species");t.exports=function(t){var e=r[t];i&&e&&!e[c]&&o.f(e,c,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(0)("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(c){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],s=i[r]();s.next=function(){return{done:n=!0}},i[r]=function(){return s},t(i)}catch(c){}return n}},function(t,e,n){"use strict";var r;(n.r(e),n.d(e,"GdEditorSdk",(function(){return f})),"undefined"!==typeof window)&&(n(39),(r=window.document.currentScript)&&(r=r.src.match(/(.+\/)[^/]+\.js(\?.*)?$/))&&(n.p=r[1]));n(40),n(45),n(50),n(35),n(58);var o=n(38),i=n.n(o),c={},s=c,a=function(){function t(t){this.config=t}i()(t,[{key:"width",get:function(){return this.config.width}},{key:"height",get:function(){return this.config.height}}]);var e=t.prototype;return e.addElement=function(t){var e=JSON.parse(JSON.stringify(t)),n=Math.random();return this.postMessage("editor.addElement",e,n)},e.setWatermark=function(t){var e=Math.random();return this.postMessage("editor.setWatermark",t,e)},e.batchSetElement=function(t){console.log(t,"data");var e=JSON.parse(JSON.stringify(t)),n=Math.random();return this.postMessage("editor.batchSetElement",e,n)},e.postMessage=function(t,e,n){var r=this,o=function(){r.config.frame.contentWindow.postMessage({action:t,asyncId:n,payload:e},"*")};if(n)return new Promise((function(t){o(),s[n]=t}));o()},t}(),u={qiye_common_image_editor:"6693cbd0b5aace0079a25d141b268c3e",qiye_comon_image_editor:"6693cbd0b5aace0079a25d141b268c3e",qiye_common_poster_editor:"1bea7e76dfc224a79e50a36d034c485d",qiye_odyssey_poster_editor:"c35a0dec1aa39c07696d8f4eaee319e2"},f=function(){function t(t){var e=this;if(this.wrapper=null,this.frame=null,this.mask=null,this.container=null,this.cb=function(t){"editor.download"===t.data.action&&(e.config.onUpload&&e.config.onUpload(t.data.blob),e.config.onCompleted&&e.config.onCompleted(t.data.file),!1!==e.config.autoClose&&e.close()),"editor.templetLoaded"===t.data.action&&e.config.onTempletLoaded&&e.config.onTempletLoaded(new a({width:t.data.payload.width,height:t.data.payload.height,frame:e.frame})),t.data.asyncId&&s[t.data.asyncId]&&s[t.data.asyncId](t.data.payload)},!t.onCompleted&&!t.onUpload)throw new Error("缺少必填参数 onCompleted");this.config=t,this.autoResize=function(){var t=e.container;t&&(t.style.width=Math.max(document.documentElement.clientWidth-100,800)+"px",t.style.height=Math.max(document.documentElement.clientHeight-80,500)+"px",e.config.style&&Object.keys(e.config.style).forEach((function(n){t.style[n]=e.config.style[n]})))}}var e=t.prototype;return e.open=function(t){var e=this;this.close(!0),window.addEventListener("resize",this.autoResize,!1);var n=document.createElement("iframe");n.style.display="block",n.style.width="100%",n.style.height="100%",n.setAttribute("frameborder","0");var r=this.config.env||"",o=t.ext||{};Object.assign(o,{buttonText:this.config.buttonText});var i=Object.keys(o).reduce((function(t,e){return void 0!==o[e]&&(t+="&"+e+"="+o[e]),t}),""),c="";c+=""+i;var s="https://www.gaoding.com";"local"===r?s="http://design.dev.gaoding.com":"dev"===r?s="http://www.dev.gaoding.com":"fat"===r?s="http://fat.gaoding.com":"stage"===r&&(s="https://stage.gaoding.com");var a=u[this.config.appId];r.includes("http")?n.src=r+(r.includes("?")?"&":"?")+c:a?(s="https://sdk.open.gaoding.com/utms/"+a,n.src=s+"?"+c):n.src=s+"/utm-editors/"+(this.config.appId?this.config.appId:encodeURIComponent(location.hostname))+"?"+c,this.frame=n,window.addEventListener("message",this.cb,!1);var f=this.config.container&&document.querySelector(this.config.container);if(f)f.appendChild(n);else{var l=document.createElement("div");l.className="gaoding-iframe "+(this.config.container?"":"gaoding-iframe-dialog"),l.style.position="fixed",l.style.left="0px",l.style.top="0px",l.style.width="100%",l.style.height="100%",l.style.zIndex="1000",document.documentElement.clientHeight>800&&(l.style.display="flex",l.style.alignItems="center",l.style.justifyContent="center"),this.wrapper=l;var p=this.container=document.createElement("div");p.style.position="relative",p.style.width=Math.max(document.documentElement.clientWidth-100,800)+"px",p.style.height=Math.max(document.documentElement.clientHeight-80,500)+"px",p.style.minHeight="500px",p.style.margin="40px auto",p.style.background="#fff",p.style.display="block",p.appendChild(this.createCloseBtn()),this.config.style&&Object.keys(this.config.style).forEach((function(t){p.style[t]=e.config.style[t]})),p.appendChild(n),l.appendChild(p),this.createMask(),document.body.appendChild(this.wrapper),this.autoResize(),this.toggleScrollSwitch()}},e.close=function(t){window.removeEventListener("message",this.cb,!1),window.removeEventListener("resize",this.autoResize,!1),this.wrapper&&this.wrapper.parentElement&&this.wrapper.parentElement.removeChild(this.wrapper),this.mask&&this.mask.parentElement&&this.mask.parentElement.removeChild(this.mask);try{var e=this.config.container&&document.querySelector(this.config.container);e&&this.frame&&e.removeChild(this.frame)}catch(n){console.error(n)}this.frame&&!t&&(this.frame=null,this.config.onClose&&this.config.onClose()),this.toggleScrollSwitch()},e.createMask=function(){var t=document.createElement("div");t.style.position="fixed",t.style.top="0px",t.style.left="0px",t.style.bottom="0px",t.style.right="0px",t.style.zIndex=parseFloat(this.wrapper.style.zIndex)-1+"",t.style.backgroundColor="#000",t.style.opacity=".5",this.mask=t,document.body.appendChild(t)},e.createCloseBtn=function(){var t=this,e=document.createElement("div");e.style.fontSize="13px",e.style.width="42px",e.style.height="42px",e.style.textAlign="right",e.style.position="absolute",e.style.right="-42px",e.style.top="0px",e.style.background="#000",e.style.cursor="pointer",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center",e.style.backgroundRepeat="no-repeat";var n=document.createElement("img");return n.style.display="block",n.style.width="24px",n.src="https://st-gdx.dancf.com/gaodingx/34555636/design/20190509-142237-249d.png",e.appendChild(n),e.addEventListener("click",(function(){return t.close()})),e},e.toggleScrollSwitch=function(){var t=document.querySelector(".gaoding-iframe-dialog");t&&0!==t.offsetWidth?document.documentElement.style.overflow="hidden":document.documentElement.style.overflow=""},t}();window&&(window.GdEditorSdk=f);e["default"]=void 0}])}));
{
"publicPath": "/",
"assets": {
"main.js": "gd-editor-sdk.min.js"
"main.js": "gd-editor-sdk.js"
}
}

@@ -215,3 +215,3 @@ // modules are defined as an array

var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
var ws = new WebSocket(protocol + '://' + hostname + ':' + "55826" + '/');
var ws = new WebSocket(protocol + '://' + hostname + ':' + "65432" + '/');

@@ -218,0 +218,0 @@ ws.onmessage = function (event) {

@@ -356,4 +356,4 @@ // modules are defined as an array

container.style.height = Math.max(document.documentElement.clientHeight - 80, 500) + 'px';
container.style.minHeight = '604px';
container.style.margin = '50px auto';
container.style.minHeight = '500px';
container.style.margin = '40px auto';
container.style.background = '#fff';

@@ -501,3 +501,3 @@ container.style.display = 'block';

var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
var ws = new WebSocket(protocol + '://' + hostname + ':' + "55826" + '/');
var ws = new WebSocket(protocol + '://' + hostname + ':' + "65432" + '/');

@@ -504,0 +504,0 @@ ws.onmessage = function (event) {

@@ -12,2 +12,3 @@ interface IConfig {

setWatermark(url: string): Promise<unknown> | undefined;
batchSetElement(data: any): Promise<unknown> | undefined;
private postMessage;

@@ -14,0 +15,0 @@ private config;

@@ -31,2 +31,8 @@ "use strict";

};
Editor.prototype.batchSetElement = function (data) {
console.log(data, 'data');
var payload = JSON.parse(JSON.stringify(data));
var asyncId = Math.random();
return this.postMessage('editor.batchSetElement', payload, asyncId);
};
Editor.prototype.postMessage = function (action, payload, asyncId) {

@@ -33,0 +39,0 @@ var _this = this;

{
"name": "@gaoding/editor-sdk",
"version": "0.3.4",
"version": "0.3.5-beta.1",
"description": "稿定编辑器对外 SDK",

@@ -22,2 +22,20 @@ "main": "lib/index.js",

"author": "",
"maintainers": [
{
"name": "juanbai",
"email": "juanbai@gaoding.com"
},
{
"name": "facai",
"email": "facai@gaoding.com"
},
{
"name": "luyou",
"email": "luyou@gaoding.com"
},
{
"name": "zongzi",
"email": "zongzi@gaoding.com"
}
],
"license": "UNLICENSE",

@@ -24,0 +42,0 @@ "devDependencies": {

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc