2021-01-03 17:35:23 +00:00
|
|
|
var fails=function(t){try{return!!t()}catch(t){return!0}},t=!fails((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t){var e={exports:{}};return t(e,e.exports),e.exports}var check=function(t){return t&&t.Math==Math&&t},r=check("object"==typeof globalThis&&globalThis)||check("object"==typeof window&&window)||check("object"==typeof self&&self)||check("object"==typeof e&&e)||function(){return this}()||Function("return this")(),isObject=function(t){return"object"==typeof t?null!==t:"function"==typeof t},n=r.document,o=isObject(n)&&isObject(n.createElement),documentCreateElement=function(t){return o?n.createElement(t):{}},i=!t&&!fails((function(){return 7!=Object.defineProperty(documentCreateElement("div"),"a",{get:function(){return 7}}).a})),anObject=function(t){if(!isObject(t))throw TypeError(String(t)+" is not an object");return t},toPrimitive=function(t,e){if(!isObject(t))return t;var r,n;if(e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;if("function"==typeof(r=t.valueOf)&&!isObject(n=r.call(t)))return n;if(!e&&"function"==typeof(r=t.toString)&&!isObject(n=r.call(t)))return n;throw TypeError("Can't convert object to primitive value")},a=Object.defineProperty,c={f:t?a:function defineProperty(t,e,r){if(anObject(t),e=toPrimitive(e,!0),anObject(r),i)try{return a(t,e,r)}catch(t){}if("get"in r||"set"in r)throw TypeError("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},u=c.f,f=Function.prototype,s=f.toString,l=/^\s*function ([^ (]*)/;t&&!("name"in f)&&u(f,"name",{configurable:!0,get:function(){try{return s.call(this).match(l)[1]}catch(t){return""}}});var createPropertyDescriptor=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},p=t?function(t,e,r){return c.f(t,e,createPropertyDescriptor(1,r))}:function(t,e,r){return t[e]=r,t},setGlobal=function(t,e){try{p(r,t,e)}catch(n){r[t]=e}return e},h=r["__core-js_shared__"]||setGlobal("__core-js_shared__",{}),y=createCommonjsModule((function(t){(t.exports=function(t,e){return h[t]||(h[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.7.0",mode:"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})})),v={}.hasOwnProperty,has=function(t,e){return v.call(t,e)},d=0,g=Math.random(),uid=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++d+g).toString(36)},m=!!Object.getOwnPropertySymbols&&!fails((function(){return!String(Symbol())})),b=m&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,w=y("wks"),S=r.Symbol,O=b?S:S&&S.withoutSetter||uid,wellKnownSymbol=function(t){return has(w,t)||(m&&has(S,t)?w[t]=S[t]:w[t]=O("Symbol."+t)),w[t]},j={};j[wellKnownSymbol("toStringTag")]="z";var x="[object z]"===String(j),E=Function.toString;"function"!=typeof h.inspectSource&&(h.inspectSource=function(t){return E.call(t)});var P,_,T,A=h.inspectSource,L=r.WeakMap,I="function"==typeof L&&/native code/.test(A(L)),k=y("keys"),sharedKey=function(t){return k[t]||(k[t]=uid(t))},M={},G=r.WeakMap;if(I){var C=h.state||(h.state=new G),R=C.get,N=C.has,D=C.set;P=function(t,e){return e.facade=t,D.call(C,t,e),e},_=function(t){return R.call(C,t)||{}},T=function(t){return N.call(C,t)}}else{var U=sharedKey("state");M[U]=!0,P=function(t,e){return e.facade=t,p(t,U,e),e},_=function(t){return has(t,U)?t[U]:{}},T=function(t){return has(t,U)}}var W={set:P,get:_,has:T,enforce:function(t){return T(t)?_(t):P(t,{})},getterFor:function(t){return function(e){var r;if(!isObject(e)||(r=_(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return r}}},z=createCommonjsModule((function(t){var e=W.get,n=W.enforce,o=String(String).split("String");(t.exports=function(t,e,i,a){var c,u=!!a&&!!a.unsafe,f=!!a&&!!a.enumerable,s=!!a&&!!a.noTargetGet;"function"==typeof i&&("string"!=typeof e||has(i,"name")||p(i,"name",e),(c=n(i)).source||(c.source=o.join("string"==typeof e?e:""))),t!==r?(u?!s&&t[e]&&(f=!0):delete t[e],f?t[e]=i:p(t,e,i)):f?t[e]=i
|
2021-01-03 17:35:23 +00:00
|
|
|
*/var Un=function(){var t=_asyncToGenerator(regeneratorRuntime.mark((function _callee(t){var e;return regeneratorRuntime.wrap((function _callee$(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,__variableDynamicImportRuntime0__("./locale/".concat(encodeURIComponent(t),".js"));case 3:e=r.sent,r.next=12;break;case 6:return r.prev=6,r.t0=r.catch(0),console.error("Missing translation (".concat(t,") - using 'en'")),r.next=11,Promise.resolve().then((function(){return zn}));case 11:e=r.sent;case 12:return r.abrupt("return",e.default);case 13:case"end":return r.stop()}}),_callee,null,[[0,6]])})));return function loadExtensionTranslation(e){return t.apply(this,arguments)}}(),Wn={name:"panning",init:function init(t){var e=this;return _asyncToGenerator(regeneratorRuntime.mark((function _callee2(){var r,n,o,i;return regeneratorRuntime.wrap((function _callee2$(a){for(;;)switch(a.prev=a.next){case 0:return t.importLocale,r=e,a.next=4,Un(r.configObj.pref("lang"));case 4:return n=a.sent,o=r.svgCanvas,i={id:"ext-panning",click:function click(){o.setMode("ext-panning")}},a.abrupt("return",{newUI:!0,name:n.name,events:i,mouseDown:function mouseDown(){if("ext-panning"===o.getMode())return r.setPanning(!0),{started:!0}},mouseUp:function mouseUp(){if("ext-panning"===o.getMode())return r.setPanning(!1),{keep:!1,element:null}}});case 8:case"end":return a.stop()}}),_callee2)})))()}},zn=Object.freeze({__proto__:null,default:{name:"Extension Panning",buttons:[{title:"Panning"}]}}),Vn=Object.freeze({__proto__:null,default:{name:"移动",buttons:[{title:"移动"}]}});export default Wn;
|