mirror of
https://github.com/SpaceVim/SpaceVim.git
synced 2025-01-24 09:30:04 +08:00
1 line
79 KiB
JavaScript
1 line
79 KiB
JavaScript
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],[function(t,e){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function i(t,e,n,i,r,o,a,s){var c=typeof(t=t||{}).default;"object"!==c&&"function"!==c||(t=t.default);var u,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=n,l._compiled=!0),i&&(l.functional=!0),o&&(l._scopeId=o),a?(u=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),r&&r.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},l._ssrRegister=u):r&&(u=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),u)if(l.functional){l._injectStyles=u;var f=l.render;l.render=function(t,e){return u.call(e),f(t,e)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,u):[u]}return{exports:t,options:l}}n.d(e,"a",function(){return i})},function(t,e,n){var i,r;!function(o,a){i=[n(14),n(13)],void 0===(r=function(t,e){return function(t,e,n){"use strict";function i(t,e){for(var n in e)t[n]=e[n];return t}var r=t.jQuery;function o(t,e){this.element="string"==typeof t?document.querySelector(t):t,r&&(this.$element=r(this.element)),this.options=i({},this.constructor.defaults),this.option(e),this._create()}var a=o.prototype=Object.create(n.prototype);o.defaults={},a.option=function(t){i(this.options,t)};var s={relative:!0,absolute:!0,fixed:!0};function c(t,e,n){return n=n||"round",e?Math[n](t/e)*e:t}a._create=function(){this.position={},this._getPosition(),this.startPoint={x:0,y:0},this.dragPoint={x:0,y:0},this.startPosition=i({},this.position);var t=getComputedStyle(this.element);s[t.position]||(this.element.style.position="relative"),this.on("pointerDown",this.onPointerDown),this.on("pointerMove",this.onPointerMove),this.on("pointerUp",this.onPointerUp),this.enable(),this.setHandles()},a.setHandles=function(){this.handles=this.options.handle?this.element.querySelectorAll(this.options.handle):[this.element],this.bindHandles()},a.dispatchEvent=function(t,e,n){var i=[e].concat(n);this.emitEvent(t,i),this.dispatchJQueryEvent(t,e,n)},a.dispatchJQueryEvent=function(e,n,i){var r=t.jQuery;if(r&&this.$element){var o=r.Event(n);o.type=e,this.$element.trigger(o,i)}},a._getPosition=function(){var t=getComputedStyle(this.element),e=this._getPositionCoord(t.left,"width"),n=this._getPositionCoord(t.top,"height");this.position.x=isNaN(e)?0:e,this.position.y=isNaN(n)?0:n,this._addTransformPosition(t)},a._getPositionCoord=function(t,n){if(-1!=t.indexOf("%")){var i=e(this.element.parentNode);return i?parseFloat(t)/100*i[n]:0}return parseInt(t,10)},a._addTransformPosition=function(t){var e=t.transform;if(0===e.indexOf("matrix")){var n=e.split(","),i=0===e.indexOf("matrix3d")?12:4,r=parseInt(n[i],10),o=parseInt(n[i+1],10);this.position.x+=r,this.position.y+=o}},a.onPointerDown=function(t,e){this.element.classList.add("is-pointer-down"),this.dispatchJQueryEvent("pointerDown",t,[e])},a.dragStart=function(t,e){this.isEnabled&&(this._getPosition(),this.measureContainment(),this.startPosition.x=this.position.x,this.startPosition.y=this.position.y,this.setLeftTop(),this.dragPoint.x=0,this.dragPoint.y=0,this.element.classList.add("is-dragging"),this.dispatchEvent("dragStart",t,[e]),this.animate())},a.measureContainment=function(){var t=this.getContainer();if(t){var n=e(this.element),i=e(t),r=this.element.getBoundingClientRect(),o=t.getBoundingClientRect(),a=i.borderLeftWidth+i.borderRightWidth,s=i.borderTopWidth+i.borderBottomWidth,c=this.relativeStartPosition={x:r.left-(o.left+i.borderLeftWidth),y:r.top-(o.top+i.borderTopWidth)};this.containSize={width:i.width-a-c.x-n.width,height:i.height-s-c.y-n.height}}},a.getContainer=function(){var t=this.options.containment;if(t)return t instanceof HTMLElement?t:"string"==typeof t?document.querySelector(t):this.element.parentNode},a.onPointerMove=function(t,e,n){this.dispatchJQueryEvent("pointerMove",t,[e,n])}
|