@calibur/sakura
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=64)}({64:function(e,t,r){}})})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=65)}({65:function(e,t,r){}})})); |
@@ -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["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},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=34)}({0:function(t,e,n){"use strict";function o(t,e,n,o,r,i,a,c){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(l=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)},u._ssrRegister=l):r&&(l=c?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var s=u.render;u.render=function(t,e){return l.call(e),s(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:u}}n.d(e,"a",(function(){return o}))},34:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{class:t.classList,attrs:{disabled:t.disabled||t.loading},on:{click:t.handle}},[t.loading?n("em",{staticClass:"loading"}):t._e(),t._v(" "),t._t("default")],2)};o._withStripped=!0;n(48);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i={name:"VButton",props:{text:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},block:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},theme:{type:String,default:"primary",validator:function(t){return~["primary","success","info","warning","danger"].indexOf(t)}},size:{type:String,default:"medium",validator:function(t){return~["small","medium","large"].indexOf(t)}}},computed:{classList:function(){var t,e="v-button";return r(t={},e,!0),r(t,"".concat(e,"--text"),!!this.text),r(t,"".concat(e,"--icon"),!!this.icon),r(t,"".concat(e,"--plain"),!!this.plain),r(t,"".concat(e,"--block"),!!this.block),r(t,"".concat(e,"--loading"),!!this.loading),r(t,"".concat(e,"--disabled"),!!this.disabled),r(t,"".concat(e,"--").concat(this.theme),!!this.theme),r(t,"".concat(e,"--").concat(this.size),!!this.size),t}},methods:{handle:function(){this.loading||this.disabled||this.$emit("click")}}},a=n(0),c=Object(a.a)(i,o,[],!1,null,null,null);c.options.__file="src/components/button/button.vue";var l=c.exports;e.default=l},48:function(t,e,n){}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},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=34)}({0:function(t,e,n){"use strict";function o(t,e,n,o,r,i,a,c){var l,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(l=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)},u._ssrRegister=l):r&&(l=c?function(){r.call(this,this.$root.$options.shadowRoot)}:r),l)if(u.functional){u._injectStyles=l;var s=u.render;u.render=function(t,e){return l.call(e),s(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,l):[l]}return{exports:t,options:u}}n.d(e,"a",(function(){return o}))},34:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("button",{class:t.classList,attrs:{disabled:t.disabled||t.loading},on:{click:t.handle}},[t.loading?n("em",{staticClass:"loading"}):t._e(),t._v(" "),t._t("default")],2)};o._withStripped=!0;n(49);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i={name:"VButton",props:{text:{type:Boolean,default:!1},plain:{type:Boolean,default:!1},block:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},theme:{type:String,default:"primary",validator:function(t){return~["primary","success","info","warning","danger"].indexOf(t)}},size:{type:String,default:"medium",validator:function(t){return~["small","medium","large"].indexOf(t)}}},computed:{classList:function(){var t,e="v-button";return r(t={},e,!0),r(t,"".concat(e,"--text"),!!this.text),r(t,"".concat(e,"--icon"),!!this.icon),r(t,"".concat(e,"--plain"),!!this.plain),r(t,"".concat(e,"--block"),!!this.block),r(t,"".concat(e,"--loading"),!!this.loading),r(t,"".concat(e,"--disabled"),!!this.disabled),r(t,"".concat(e,"--").concat(this.theme),!!this.theme),r(t,"".concat(e,"--").concat(this.size),!!this.size),t}},methods:{handle:function(){this.loading||this.disabled||this.$emit("click")}}},a=n(0),c=Object(a.a)(i,o,[],!1,null,null,null);c.options.__file="src/components/button/button.vue";var l=c.exports;e.default=l},49:function(t,e,n){}})})); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=23)}({23:function(e,t,n){"use strict";n.r(t),n.d(t,"set",(function(){return r})),n.d(t,"get",(function(){return o})),n.d(t,"del",(function(){return u})),n.d(t,"has",(function(){return i}));var r=function(e,t,n){if("undefined"!=typeof window)try{localStorage.setItem(e,JSON.stringify(t)),n&&localStorage.setItem("".concat(e,"-timeout"),Date.now()+1e3*n)}catch(r){}},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("undefined"==typeof window)return t;try{var n=localStorage.getItem(e);if(!n)return t;var r=localStorage.getItem("".concat(e,"-timeout"));return r&&parseInt(r)<Date.now()?(localStorage.removeItem(e),localStorage.removeItem("".concat(e,"-timeout")),t):JSON.parse(n)}catch(o){return t}},u=function(e){if("undefined"!=typeof window)try{localStorage.removeItem(e)}catch(t){}},i=function(e){if("undefined"==typeof window)return!1;try{return!!localStorage.getItem(e)}catch(t){return!1}}}})})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=23)}({23:function(e,t,n){"use strict";n.r(t),n.d(t,"set",(function(){return r})),n.d(t,"get",(function(){return o})),n.d(t,"del",(function(){return u})),n.d(t,"has",(function(){return i}));n(48);var r=function(e,t,n){if("undefined"!=typeof window)try{localStorage.setItem(e,JSON.stringify(t)),n&&localStorage.setItem("".concat(e,"-timeout"),Date.now()+1e3*n)}catch(r){}},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("undefined"==typeof window)return t;try{var n=localStorage.getItem(e);if(!n)return t;var r=localStorage.getItem("".concat(e,"-timeout"));return r&&parseInt(r)<Date.now()?(localStorage.removeItem(e),localStorage.removeItem("".concat(e,"-timeout")),t):JSON.parse(n)}catch(o){return t}},u=function(e){if("undefined"!=typeof window)try{localStorage.removeItem(e)}catch(t){}},i=function(e){if("undefined"==typeof window)return!1;try{return!!localStorage.getItem(e)}catch(t){return!1}}},48:function(e,t,n){}})})); |
@@ -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["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(o,a,function(e){return t[e]}.bind(null,a));return o},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=35)}({0:function(t,e,n){"use strict";function o(t,e,n,o,a,r,i,s){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),i?(l=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__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=l):a&&(l=s?function(){a.call(this,this.$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(t,e){return l.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return o}))},18:function(t,e,n){"use strict";var o=n(2);e.a={name:"CollapseTransition",functional:!0,render:function(t,e){var n=e.props,a=e.children,r={};return n.use&&(r.on={beforeEnter:function(t){Object(o.a)(t,"v-transition--collapse"),t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.style.height="0",t.style.paddingTop=0,t.style.paddingBottom=0},enter:function(t){t.dataset.oldOverflow=t.style.overflow,0!==t.scrollHeight?(t.style.height=t.scrollHeight+"px",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom):(t.style.height="",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom),t.style.overflow="hidden"},afterEnter:function(t){Object(o.f)(t,"v-collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow},beforeLeave:function(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.dataset.oldOverflow=t.style.overflow,t.style.height=t.scrollHeight+"px",t.style.overflow="hidden"},leave:function(t){0!==t.scrollHeight&&(Object(o.a)(t,"v-collapse-transition"),t.style.height=0,t.style.paddingTop=0,t.style.paddingBottom=0)},afterLeave:function(t){Object(o.f)(t,"v-collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom}}),t("transition",r,a)}}},2:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"f",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return l})),n.d(e,"c",(function(){return c})),n.d(e,"e",(function(){return d}));var o=function(t,e){if(t){for(var n=t.className,o=(e||"").split(" "),a=0,r=o.length;a<r;a++){var s=o[a];s&&(t.classList?t.classList.add(s):i(t,s)||(n+=" "+s))}t.classList||(t.className=n)}},a=function(t,e){if(t&&e){for(var n=e.split(" "),o=" "+t.className+" ",a=0,s=n.length;a<s;a++){var l=n[a];l&&(t.classList?t.classList.remove(l):i(t,l)&&(o=o.replace(" "+l+" "," ")))}t.classList||(t.className=r(o))}},r=function(t){return(t||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},i=function(t,e){if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):(" "+t.className+" ").includes(" "+e+" ")},s=function(t,e){var n=-1;return t.map((function(t){return t.route})).forEach((function(t,o){e.startsWith(t)&&(n=o)})),n},l=function(t,e){var n=e?"scrollTop":"scrollLeft",o=t[e?"pageYOffset":"pageXOffset"];return"number"!=typeof o&&(o=window.document.documentElement[n]),o},c=function(t){var e=t.getBoundingClientRect(),n=l(window,!0),o=l(window),a=window.document.body,r=a.clientTop||0,i=a.clientLeft||0;return{top:e.top+n-r,left:e.left+o-i}},d=function(t){var e=t;if(!e)return null;for(;e&&"HTML"!==e.tagName&&"BOYD"!==e.tagName&&1===e.nodeType;){var n=window.getComputedStyle(e).overflowY;if("scroll"===n||"auto"===n)return"HTML"===e.tagName||"BODY"===e.tagName?document:e;e=e.parentNode}return document}},3:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=function(t){return"[object Array]"===Object.prototype.toString.call(t)}},35:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"v-collapse"},t._l(t.count,(function(e,o){return n("div",{key:o,staticClass:"v-collapse__item",class:{"v-collapse__item--active":t.selected[o]}},[n("div",{staticClass:"v-collapse__header",class:{"v-collapse__header--disabled":t.blocked[o]},on:{click:function(e){return t.toggle(o)}}},[t.arrow?t._t("arrow-"+o,[n("i",{staticClass:"bili-font ic_into v-collapse__arrow",class:{"v-collapse__arrow--expanded":t.selected[o]}})]):t._e(),t._v(" "),n("div",{staticClass:"v-collapse__title"},[t._t("title-"+o)],2)],2),t._v(" "),n("collapse-transition",{attrs:{use:t.animate}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.selected[o],expression:"selected[index]"}],staticClass:"v-collapse__panel"},[t._t("panel-"+o)],2)])],1)})),0)};o._withStripped=!0;n(49);var a=n(3),r=n(18),i=function(t,e,n){var o=new Array(t).fill(!1);return void 0!==e||n?(Object(a.a)(e)?e.forEach((function(e){e<t&&(o[e]=!0)})):o[parseInt(e)]=!0,n&&n.forEach((function(e,n){n<t&&(o[n]=e)})),o):o},s={name:"VCollapse",components:{CollapseTransition:r.a},props:{active:{type:[Array,Number,String]},disabled:{type:[Array,Number,String]},count:{type:Number,required:!0,validator:function(t){return t>1}},arrow:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},only:{type:Boolean,default:!1}},data:function(){return{selected:i(this.count,this.active),blocked:i(this.count,this.disabled)}},watch:{count:function(t){this.selected=i(t,this.active,this.selected)}},methods:{toggle:function(t){var e=this.disabled;if(void 0!==e){if(Object(a.a)(e)&&e.some((function(e){return+e===t})))return;if(+e===t)return}if(this.only&&!this.selected[t]){var n=new Array(this.count).fill(!1);n[t]=!0,this.selected=n,this.$emit("open",t)}else{var o=!this.selected[t];this.$set(this.selected,t,o),o&&this.$emit("open",t)}}}},l=n(0),c=Object(l.a)(s,o,[],!1,null,null,null);c.options.__file="src/components/collapse/collapse.vue";var d=c.exports;e.default=d},49:function(t,e,n){}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var a=e[o]={i:o,l:!1,exports:{}};return t[o].call(a.exports,a,a.exports,n),a.l=!0,a.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)n.d(o,a,function(e){return t[e]}.bind(null,a));return o},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=35)}({0:function(t,e,n){"use strict";function o(t,e,n,o,a,r,i,s){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=n,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),i?(l=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__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},c._ssrRegister=l):a&&(l=s?function(){a.call(this,this.$root.$options.shadowRoot)}:a),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(t,e){return l.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}n.d(e,"a",(function(){return o}))},18:function(t,e,n){"use strict";var o=n(2);e.a={name:"CollapseTransition",functional:!0,render:function(t,e){var n=e.props,a=e.children,r={};return n.use&&(r.on={beforeEnter:function(t){Object(o.a)(t,"v-transition--collapse"),t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.style.height="0",t.style.paddingTop=0,t.style.paddingBottom=0},enter:function(t){t.dataset.oldOverflow=t.style.overflow,0!==t.scrollHeight?(t.style.height=t.scrollHeight+"px",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom):(t.style.height="",t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom),t.style.overflow="hidden"},afterEnter:function(t){Object(o.f)(t,"v-collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow},beforeLeave:function(t){t.dataset||(t.dataset={}),t.dataset.oldPaddingTop=t.style.paddingTop,t.dataset.oldPaddingBottom=t.style.paddingBottom,t.dataset.oldOverflow=t.style.overflow,t.style.height=t.scrollHeight+"px",t.style.overflow="hidden"},leave:function(t){0!==t.scrollHeight&&(Object(o.a)(t,"v-collapse-transition"),t.style.height=0,t.style.paddingTop=0,t.style.paddingBottom=0)},afterLeave:function(t){Object(o.f)(t,"v-collapse-transition"),t.style.height="",t.style.overflow=t.dataset.oldOverflow,t.style.paddingTop=t.dataset.oldPaddingTop,t.style.paddingBottom=t.dataset.oldPaddingBottom}}),t("transition",r,a)}}},2:function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"f",(function(){return a})),n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return l})),n.d(e,"c",(function(){return c})),n.d(e,"e",(function(){return d}));var o=function(t,e){if(t){for(var n=t.className,o=(e||"").split(" "),a=0,r=o.length;a<r;a++){var s=o[a];s&&(t.classList?t.classList.add(s):i(t,s)||(n+=" "+s))}t.classList||(t.className=n)}},a=function(t,e){if(t&&e){for(var n=e.split(" "),o=" "+t.className+" ",a=0,s=n.length;a<s;a++){var l=n[a];l&&(t.classList?t.classList.remove(l):i(t,l)&&(o=o.replace(" "+l+" "," ")))}t.classList||(t.className=r(o))}},r=function(t){return(t||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},i=function(t,e){if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):(" "+t.className+" ").includes(" "+e+" ")},s=function(t,e){var n=-1;return t.map((function(t){return t.route})).forEach((function(t,o){e.startsWith(t)&&(n=o)})),n},l=function(t,e){var n=e?"scrollTop":"scrollLeft",o=t[e?"pageYOffset":"pageXOffset"];return"number"!=typeof o&&(o=window.document.documentElement[n]),o},c=function(t){var e=t.getBoundingClientRect(),n=l(window,!0),o=l(window),a=window.document.body,r=a.clientTop||0,i=a.clientLeft||0;return{top:e.top+n-r,left:e.left+o-i}},d=function(t){var e=t;if(!e)return null;for(;e&&"HTML"!==e.tagName&&"BOYD"!==e.tagName&&1===e.nodeType;){var n=window.getComputedStyle(e).overflowY;if("scroll"===n||"auto"===n)return"HTML"===e.tagName||"BODY"===e.tagName?document:e;e=e.parentNode}return document}},3:function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var o=function(t){return"[object Array]"===Object.prototype.toString.call(t)}},35:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"v-collapse"},t._l(t.count,(function(e,o){return n("div",{key:o,staticClass:"v-collapse__item",class:{"v-collapse__item--active":t.selected[o]}},[n("div",{staticClass:"v-collapse__header",class:{"v-collapse__header--disabled":t.blocked[o]},on:{click:function(e){return t.toggle(o)}}},[t.arrow?t._t("arrow-"+o,[n("i",{staticClass:"bili-font ic_into v-collapse__arrow",class:{"v-collapse__arrow--expanded":t.selected[o]}})]):t._e(),t._v(" "),n("div",{staticClass:"v-collapse__title"},[t._t("title-"+o)],2)],2),t._v(" "),n("collapse-transition",{attrs:{use:t.animate}},[n("div",{directives:[{name:"show",rawName:"v-show",value:t.selected[o],expression:"selected[index]"}],staticClass:"v-collapse__panel"},[t._t("panel-"+o)],2)])],1)})),0)};o._withStripped=!0;n(50);var a=n(3),r=n(18),i=function(t,e,n){var o=new Array(t).fill(!1);return void 0!==e||n?(Object(a.a)(e)?e.forEach((function(e){e<t&&(o[e]=!0)})):o[parseInt(e)]=!0,n&&n.forEach((function(e,n){n<t&&(o[n]=e)})),o):o},s={name:"VCollapse",components:{CollapseTransition:r.a},props:{active:{type:[Array,Number,String]},disabled:{type:[Array,Number,String]},count:{type:Number,required:!0,validator:function(t){return t>1}},arrow:{type:Boolean,default:!0},animate:{type:Boolean,default:!0},only:{type:Boolean,default:!1}},data:function(){return{selected:i(this.count,this.active),blocked:i(this.count,this.disabled)}},watch:{count:function(t){this.selected=i(t,this.active,this.selected)}},methods:{toggle:function(t){var e=this.disabled;if(void 0!==e){if(Object(a.a)(e)&&e.some((function(e){return+e===t})))return;if(+e===t)return}if(this.only&&!this.selected[t]){var n=new Array(this.count).fill(!1);n[t]=!0,this.selected=n,this.$emit("open",t)}else{var o=!this.selected[t];this.$set(this.selected,t,o),o&&this.$emit("open",t)}}}},l=n(0),c=Object(l.a)(s,o,[],!1,null,null,null);c.options.__file="src/components/collapse/collapse.vue";var d=c.exports;e.default=d},50:function(t,e,n){}})})); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=36)}({0:function(e,t,r){"use strict";function o(e,t,r,o,n,i,s,a){var c,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=r,u._compiled=!0),o&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=c):n&&(c=a?function(){n.call(this,this.$root.$options.shadowRoot)}:n),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(e,t){return c.call(t),l(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:u}}r.d(t,"a",(function(){return o}))},36:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"v-field"},[r("div",{staticClass:"v-field__before",class:{"v-field__before--line":e.beforeLine,"v-field__before--has":e.hasBefore}},[e._t("before")],2),e._v(" "),r("div",{staticClass:"v-field__main"},[e.showClose&&e.score?r("div",{staticClass:"v-field__cancel",on:{click:e.clear}},[r("i",{staticClass:"bili-font ic_input_close"})]):e._e(),e._v(" "),r("div",{staticClass:"v-field__input",class:{"v-field__input--error":e.showError,"v-field__input--close":e.showClose}},["checkbox"===e.inputAttr.type&&e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.score)?e._i(e.score,null)>-1:e.score},on:{change:function(t){var r=e.score,o=t.target,n=!!o.checked;if(Array.isArray(r)){var i=e._i(r,null);o.checked?i<0&&(e.score=r.concat([null])):i>-1&&(e.score=r.slice(0,i).concat(r.slice(i+1)))}else e.score=n}}},"input",e.inputAttr,!1)):"radio"===e.inputAttr.type&&e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:"radio"},domProps:{checked:e._q(e.score,null)},on:{change:function(t){e.score=null}}},"input",e.inputAttr,!1)):e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:e.inputAttr.type},domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"input",e.inputAttr,!1)):r("div",{staticClass:"v-field__textarea"},[e.isAutoSize?r("div",{class:{"v-field__textarea--auto":e.isAutoSize}},[e.isAutoSize?r("pre",{style:e.preShimStyle,domProps:{textContent:e._s(e.score)}}):e._e(),e._v(" "),r("textarea",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"textarea",e.inputAttr,!1))]):r("textarea",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{rows:e.minRow},domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"textarea",e.inputAttr,!1)),e._v(" "),e.counter?r("div",{staticClass:"v-field__counter",domProps:{textContent:e._s(e.maxLen?e.score.length+"/"+e.maxLen:e.score.length)}}):e._e()])])]),e._v(" "),r("div",{staticClass:"v-field__after",class:{"v-field__after--line":e.afterLine,"v-field__after--has":e.hasAfter}},[e._t("after")],2)])};o._withStripped=!0;r(50);function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s={name:"VField",props:{value:{type:String,required:!0},attr:{type:Object,default:function(){return{type:"text",placeholder:"请输入"}}},minRow:{type:Number,default:1},maxRow:{type:Number,default:1},maxLen:{type:Number,default:0},close:{type:Boolean,default:!0},counter:{type:Boolean,default:!1},beforeLine:{type:Boolean,default:!1},afterLine:{type:Boolean,default:!1},error:{type:Number,default:0}},data:function(){return{score:this.value,showError:!!this.error}},computed:{hasBefore:function(){return!!this.$slots.before},hasAfter:function(){return!!this.$slots.after},showClose:function(){return this.close&&this.isInput},inputAttr:function(){return this.maxLen?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},this.attr,{maxLength:this.maxLen}):this.attr},isInput:function(){return 1===this.minRow&&1===this.maxRow},isAutoSize:function(){return this.maxRow>this.minRow||0===this.maxRow},preShimStyle:function(){var e={};return this.maxRow&&(e["-webkit-line-clamp"]=this.maxRow),this.minRow>1&&(e["min-height"]="".concat(20*this.minRow,"px")),e}},watch:{value:function(e){this.showError=!1,this.score=e},score:function(e){this.showError=!1,this.$emit("input",e.trim())},error:function(e){this.showError=!!e}},methods:{clear:function(){this.score=""}}},a=r(0),c=Object(a.a)(s,o,[],!1,null,null,null);c.options.__file="src/components/field/field.vue";var u=c.exports;t.default=u},50:function(e,t,r){}})})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function r(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,r),n.l=!0,n.exports}return r.m=e,r.c=t,r.d=function(e,t,o){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(r.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(o,n,function(t){return e[t]}.bind(null,n));return o},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=36)}({0:function(e,t,r){"use strict";function o(e,t,r,o,n,i,s,a){var c,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=r,u._compiled=!0),o&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=c):n&&(c=a?function(){n.call(this,this.$root.$options.shadowRoot)}:n),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(e,t){return c.call(t),l(e,t)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:e,options:u}}r.d(t,"a",(function(){return o}))},36:function(e,t,r){"use strict";r.r(t);var o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"v-field"},[r("div",{staticClass:"v-field__before",class:{"v-field__before--line":e.beforeLine,"v-field__before--has":e.hasBefore}},[e._t("before")],2),e._v(" "),r("div",{staticClass:"v-field__main"},[e.showClose&&e.score?r("div",{staticClass:"v-field__cancel",on:{click:e.clear}},[r("i",{staticClass:"bili-font ic_input_close"})]):e._e(),e._v(" "),r("div",{staticClass:"v-field__input",class:{"v-field__input--error":e.showError,"v-field__input--close":e.showClose}},["checkbox"===e.inputAttr.type&&e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.score)?e._i(e.score,null)>-1:e.score},on:{change:function(t){var r=e.score,o=t.target,n=!!o.checked;if(Array.isArray(r)){var i=e._i(r,null);o.checked?i<0&&(e.score=r.concat([null])):i>-1&&(e.score=r.slice(0,i).concat(r.slice(i+1)))}else e.score=n}}},"input",e.inputAttr,!1)):"radio"===e.inputAttr.type&&e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:"radio"},domProps:{checked:e._q(e.score,null)},on:{change:function(t){e.score=null}}},"input",e.inputAttr,!1)):e.isInput?r("input",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{type:e.inputAttr.type},domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"input",e.inputAttr,!1)):r("div",{staticClass:"v-field__textarea"},[e.isAutoSize?r("div",{class:{"v-field__textarea--auto":e.isAutoSize}},[e.isAutoSize?r("pre",{style:e.preShimStyle,domProps:{textContent:e._s(e.score)}}):e._e(),e._v(" "),r("textarea",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"textarea",e.inputAttr,!1))]):r("textarea",e._b({directives:[{name:"model",rawName:"v-model",value:e.score,expression:"score"}],attrs:{rows:e.minRow},domProps:{value:e.score},on:{input:function(t){t.target.composing||(e.score=t.target.value)}}},"textarea",e.inputAttr,!1)),e._v(" "),e.counter?r("div",{staticClass:"v-field__counter",domProps:{textContent:e._s(e.maxLen?e.score.length+"/"+e.maxLen:e.score.length)}}):e._e()])])]),e._v(" "),r("div",{staticClass:"v-field__after",class:{"v-field__after--line":e.afterLine,"v-field__after--has":e.hasAfter}},[e._t("after")],2)])};o._withStripped=!0;r(51);function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function i(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s={name:"VField",props:{value:{type:String,required:!0},attr:{type:Object,default:function(){return{type:"text",placeholder:"请输入"}}},minRow:{type:Number,default:1},maxRow:{type:Number,default:1},maxLen:{type:Number,default:0},close:{type:Boolean,default:!0},counter:{type:Boolean,default:!1},beforeLine:{type:Boolean,default:!1},afterLine:{type:Boolean,default:!1},error:{type:Number,default:0}},data:function(){return{score:this.value,showError:!!this.error}},computed:{hasBefore:function(){return!!this.$slots.before},hasAfter:function(){return!!this.$slots.after},showClose:function(){return this.close&&this.isInput},inputAttr:function(){return this.maxLen?function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){i(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},this.attr,{maxLength:this.maxLen}):this.attr},isInput:function(){return 1===this.minRow&&1===this.maxRow},isAutoSize:function(){return this.maxRow>this.minRow||0===this.maxRow},preShimStyle:function(){var e={};return this.maxRow&&(e["-webkit-line-clamp"]=this.maxRow),this.minRow>1&&(e["min-height"]="".concat(20*this.minRow,"px")),e}},watch:{value:function(e){this.showError=!1,this.score=e},score:function(e){this.showError=!1,this.$emit("input",e.trim())},error:function(e){this.showError=!!e}},methods:{clear:function(){this.score=""}}},a=r(0),c=Object(a.a)(s,o,[],!1,null,null,null);c.options.__file="src/components/field/field.vue";var u=c.exports;t.default=u},51:function(e,t,r){}})})); |
@@ -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["@calibur/sakura"]=e():t["@calibur/sakura"]=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=38)}({0:function(t,e,n){"use strict";function r(t,e,n,r,o,a,i,c){var s,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),i?(s=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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=s):o&&(s=c?function(){o.call(this,this.$root.$options.shadowRoot)}:o),s)if(u.functional){u._injectStyles=s;var l=u.render;u.render=function(t,e){return s.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,s):[s]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},2:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"f",(function(){return o})),n.d(e,"b",(function(){return c})),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"e",(function(){return l}));var r=function(t,e){if(t){for(var n=t.className,r=(e||"").split(" "),o=0,a=r.length;o<a;o++){var c=r[o];c&&(t.classList?t.classList.add(c):i(t,c)||(n+=" "+c))}t.classList||(t.className=n)}},o=function(t,e){if(t&&e){for(var n=e.split(" "),r=" "+t.className+" ",o=0,c=n.length;o<c;o++){var s=n[o];s&&(t.classList?t.classList.remove(s):i(t,s)&&(r=r.replace(" "+s+" "," ")))}t.classList||(t.className=a(r))}},a=function(t){return(t||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},i=function(t,e){if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):(" "+t.className+" ").includes(" "+e+" ")},c=function(t,e){var n=-1;return t.map((function(t){return t.route})).forEach((function(t,r){e.startsWith(t)&&(n=r)})),n},s=function(t,e){var n=e?"scrollTop":"scrollLeft",r=t[e?"pageYOffset":"pageXOffset"];return"number"!=typeof r&&(r=window.document.documentElement[n]),r},u=function(t){var e=t.getBoundingClientRect(),n=s(window,!0),r=s(window),o=window.document.body,a=o.clientTop||0,i=o.clientLeft||0;return{top:e.top+n-a,left:e.left+r-i}},l=function(t){var e=t;if(!e)return null;for(;e&&"HTML"!==e.tagName&&"BOYD"!==e.tagName&&1===e.nodeType;){var n=window.getComputedStyle(e).overflowY;if("scroll"===n||"auto"===n)return"HTML"===e.tagName||"BODY"===e.tagName?document:e;e=e.parentNode}return document}},38:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"v-navbar__outer"},[n("div",{staticClass:"v-navbar",class:{"v-navbar--fixed":t.isFixed,"v-navbar--border":t.showBorder,"v-navbar--bg":t.backgroundHeight}},[n("div",{staticClass:"v-navbar__shim"}),t._v(" "),n("div",{staticClass:"v-navbar__body",style:t.bodyStyle},[n("div",{staticClass:"v-navbar__wrap"},[n("div",{staticClass:"v-navbar__wrap__title",domProps:{textContent:t._s(t.title)}}),t._v(" "),n("div",{staticClass:"v-navbar__wrap__before"},[t.showBack?n("i",{staticClass:"bili-font ic_into v-navbar__wrap__before__back",on:{click:t.back}}):t._e(),t._v(" "),t._t("before")],2),t._v(" "),n("div",{staticClass:"v-navbar__wrap__after"},[t._t("after")],2)])])]),t._v(" "),t.backgroundHeight?n("div",{staticClass:"v-navbar__background",style:{backgroundColor:t.backgroundColor}},[n("div",{staticClass:"v-navbar__background__wrap",style:t.backgroundStyle},[t._t("background")],2)]):t._e()])};r._withStripped=!0;var o=n(6),a=n(2),i=(n(56),{name:"VNavbar",props:{color:{type:String,default:"#fff"},backgroundColor:{type:String,default:"#FB7299"},backgroundHeight:{type:Number,default:0,validator:function(t){return t>=0}},title:{type:String,default:""},showBack:{type:Boolean,default:!0},showBorder:{type:Boolean,default:!1}},data:function(){return{scrollHgt:0}},computed:{bodyStyle:function(){var t={backgroundColor:this.backgroundColor,color:this.color};return this.backgroundHeight?this.isFixed?t:{backgroundColor:"transparent",color:"#fff"}:t},backgroundStyle:function(){var t=this.scrollHgt,e=this.backgroundHeight,n=1;return t>100?n=.2:t>20&&(n=(120-t)/100),{opacity:n,height:"".concat(e,"px")}},isFixed:function(){return!this.backgroundHeight||this.scrollHgt+90>=this.backgroundHeight}},mounted:function(){this.initScroll()},methods:{back:function(){this.$emit("back")},initScroll:function(){var t=this;this.backgroundHeight&&Object(a.e)(this.$el).addEventListener("scroll",Object(o.b)(100,(function(e){t.scrollHgt=e.target.scrollTop})))}}}),c=n(0),s=Object(c.a)(i,r,[],!1,null,null,null);s.options.__file="src/components/navbar/navbar.vue";var u=s.exports;e.default=u},56:function(t,e,n){},6:function(t,e,n){"use strict";function r(t,e,n,r){var o,a=!1,i=0;function c(){o&&clearTimeout(o)}function s(){var s=this,u=Date.now()-i,l=arguments;function f(){i=Date.now(),n.apply(s,l)}a||(r&&!o&&f(),c(),void 0===r&&u>t?f():!0!==e&&(o=setTimeout(r?function(){o=void 0}:f,void 0===r?t-u:t)))}return"boolean"!=typeof e&&(r=n,n=e,e=void 0),s.cancel=function(){c(),a=!0},s}function o(t,e,n){return void 0===n?r(t,e,!1):r(t,n,!1!==e)}n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o}))}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=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=38)}({0:function(t,e,n){"use strict";function r(t,e,n,r,o,a,i,c){var s,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),a&&(u._scopeId="data-v-"+a),i?(s=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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},u._ssrRegister=s):o&&(s=c?function(){o.call(this,this.$root.$options.shadowRoot)}:o),s)if(u.functional){u._injectStyles=s;var l=u.render;u.render=function(t,e){return s.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,s):[s]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},2:function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"f",(function(){return o})),n.d(e,"b",(function(){return c})),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return u})),n.d(e,"e",(function(){return l}));var r=function(t,e){if(t){for(var n=t.className,r=(e||"").split(" "),o=0,a=r.length;o<a;o++){var c=r[o];c&&(t.classList?t.classList.add(c):i(t,c)||(n+=" "+c))}t.classList||(t.className=n)}},o=function(t,e){if(t&&e){for(var n=e.split(" "),r=" "+t.className+" ",o=0,c=n.length;o<c;o++){var s=n[o];s&&(t.classList?t.classList.remove(s):i(t,s)&&(r=r.replace(" "+s+" "," ")))}t.classList||(t.className=a(r))}},a=function(t){return(t||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},i=function(t,e){if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):(" "+t.className+" ").includes(" "+e+" ")},c=function(t,e){var n=-1;return t.map((function(t){return t.route})).forEach((function(t,r){e.startsWith(t)&&(n=r)})),n},s=function(t,e){var n=e?"scrollTop":"scrollLeft",r=t[e?"pageYOffset":"pageXOffset"];return"number"!=typeof r&&(r=window.document.documentElement[n]),r},u=function(t){var e=t.getBoundingClientRect(),n=s(window,!0),r=s(window),o=window.document.body,a=o.clientTop||0,i=o.clientLeft||0;return{top:e.top+n-a,left:e.left+r-i}},l=function(t){var e=t;if(!e)return null;for(;e&&"HTML"!==e.tagName&&"BOYD"!==e.tagName&&1===e.nodeType;){var n=window.getComputedStyle(e).overflowY;if("scroll"===n||"auto"===n)return"HTML"===e.tagName||"BODY"===e.tagName?document:e;e=e.parentNode}return document}},38:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"v-navbar__outer"},[n("div",{staticClass:"v-navbar",class:{"v-navbar--fixed":t.isFixed,"v-navbar--border":t.showBorder,"v-navbar--bg":t.backgroundHeight}},[n("div",{staticClass:"v-navbar__shim"}),t._v(" "),n("div",{staticClass:"v-navbar__body",style:t.bodyStyle},[n("div",{staticClass:"v-navbar__wrap"},[n("div",{staticClass:"v-navbar__wrap__title",domProps:{textContent:t._s(t.title)}}),t._v(" "),n("div",{staticClass:"v-navbar__wrap__before"},[t.showBack?n("i",{staticClass:"bili-font ic_into v-navbar__wrap__before__back",on:{click:t.back}}):t._e(),t._v(" "),t._t("before")],2),t._v(" "),n("div",{staticClass:"v-navbar__wrap__after"},[t._t("after")],2)])])]),t._v(" "),t.backgroundHeight?n("div",{staticClass:"v-navbar__background",style:{backgroundColor:t.backgroundColor}},[n("div",{staticClass:"v-navbar__background__wrap",style:t.backgroundStyle},[t._t("background")],2)]):t._e()])};r._withStripped=!0;var o=n(6),a=n(2),i=(n(57),{name:"VNavbar",props:{color:{type:String,default:"#fff"},backgroundColor:{type:String,default:"#FB7299"},backgroundHeight:{type:Number,default:0,validator:function(t){return t>=0}},title:{type:String,default:""},showBack:{type:Boolean,default:!0},showBorder:{type:Boolean,default:!1}},data:function(){return{scrollHgt:0}},computed:{bodyStyle:function(){var t={backgroundColor:this.backgroundColor,color:this.color};return this.backgroundHeight?this.isFixed?t:{backgroundColor:"transparent",color:"#fff"}:t},backgroundStyle:function(){var t=this.scrollHgt,e=this.backgroundHeight,n=1;return t>100?n=.2:t>20&&(n=(120-t)/100),{opacity:n,height:"".concat(e,"px")}},isFixed:function(){return!this.backgroundHeight||this.scrollHgt+90>=this.backgroundHeight}},mounted:function(){this.initScroll()},methods:{back:function(){this.$emit("back")},initScroll:function(){var t=this;this.backgroundHeight&&Object(a.e)(this.$el).addEventListener("scroll",Object(o.b)(100,(function(e){t.scrollHgt=e.target.scrollTop})))}}}),c=n(0),s=Object(c.a)(i,r,[],!1,null,null,null);s.options.__file="src/components/navbar/navbar.vue";var u=s.exports;e.default=u},57:function(t,e,n){},6:function(t,e,n){"use strict";function r(t,e,n,r){var o,a=!1,i=0;function c(){o&&clearTimeout(o)}function s(){var s=this,u=Date.now()-i,l=arguments;function f(){i=Date.now(),n.apply(s,l)}a||(r&&!o&&f(),c(),void 0===r&&u>t?f():!0!==e&&(o=setTimeout(r?function(){o=void 0}:f,void 0===r?t-u:t)))}return"boolean"!=typeof e&&(r=n,n=e,e=void 0),s.cancel=function(){c(),a=!0},s}function o(t,e,n){return void 0===n?r(t,e,!1):r(t,n,!1!==e)}n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o}))}})})); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=41)}({0:function(e,t,i){"use strict";function n(e,t,i,n,s,r,o,l){var a,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=i,d._compiled=!0),n&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),o?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},d._ssrRegister=a):s&&(a=l?function(){s.call(this,this.$root.$options.shadowRoot)}:s),a)if(d.functional){d._injectStyles=a;var c=d.render;d.render=function(e,t){return a.call(t),c(e,t)}}else{var u=d.beforeCreate;d.beforeCreate=u?[].concat(u,a):[a]}return{exports:e,options:d}}i.d(t,"a",(function(){return n}))},41:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"v-radio",class:["v-radio--"+e.size,{"v-radio--circle":e.circle},e.inline?"v-radio--hoz":"v-radio--ver"]},[e.isSingle?i("div",{staticClass:"v-radio__item",class:{"is-disabled":e.disabled,"is-selected":e.selected},on:{click:e._singleToggle}},[i("div",{staticClass:"v-radio__label"}),e._v(" "),i("div",{staticClass:"v-radio__text",domProps:{textContent:e._s(e.text)}})]):i("div",{staticClass:"v-radio__list"},e._l(e.text,(function(t){return i("div",{key:e.pureText?t:t.value,staticClass:"v-radio__item",class:[{"is-disabled":e.disabled||!e.pureText&&t.disabled||e.max&&e.selected.length>=e.max&&-1===e.selected.indexOf(e.pureText?t:t.value)},{"is-selected":-1!==e.selected.indexOf(e.pureText?t:t.value)}],on:{click:function(i){return e._multiToggle(t)}}},[i("div",{staticClass:"v-radio__label"}),e._v(" "),i("div",{staticClass:"v-radio__text",domProps:{textContent:e._s(e.pureText?t:t.label)}})])})),0)])};n._withStripped=!0;i(60);var s={name:"VRadio",props:{value:{type:[Boolean,Array],required:!0},text:{type:[String,Array],required:!0},size:{type:String,default:"normal",validator:function(e){return~["normal","small"].indexOf(e)}},max:{type:Number,default:0},min:{type:Number,default:0},disabled:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},data:function(){var e="[object Boolean]"===Object.prototype.toString.call(this.value);return{selected:this.value,pureText:!!e||"string"==typeof this.text[0],isSingle:e}},watch:{value:function(e){this.selected=e},selected:function(e){this.$emit("input",e)}},methods:{_singleToggle:function(){this.disabled||(this.selected=!this.selected)},_multiToggle:function(e){if(!(this.disabled||!this.pureText&&e.disabled)){var t=this.selected.indexOf(this.pureText?e:e.value);if(-1===t)this.max&&this.selected.length>=this.max||this.selected.push(this.pureText?e:e.value);else{if(this.min&&this.selected.length<=this.min)return;this.selected.splice(t,1)}}},checkAll:function(e){var t=this;this.isSingle?this.selected=e:e?(this.selected=[],this.text.forEach((function(e){t.selected.push(t.pureText?e:e.value)}))):this.selected=[]},toggleAll:function(){this.isSingle?this.selected=!this.selected:this.checkAll(!this.selected.length)}}},r=i(0),o=Object(r.a)(s,n,[],!1,null,null,null);o.options.__file="src/components/radio/radio.vue";var l=o.exports;t.default=l},60:function(e,t,i){}})})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function i(n){if(t[n])return t[n].exports;var s=t[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var s in e)i.d(n,s,function(t){return e[t]}.bind(null,s));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=41)}({0:function(e,t,i){"use strict";function n(e,t,i,n,s,r,o,l){var a,d="function"==typeof e?e.options:e;if(t&&(d.render=t,d.staticRenderFns=i,d._compiled=!0),n&&(d.functional=!0),r&&(d._scopeId="data-v-"+r),o?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),s&&s.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(o)},d._ssrRegister=a):s&&(a=l?function(){s.call(this,this.$root.$options.shadowRoot)}:s),a)if(d.functional){d._injectStyles=a;var c=d.render;d.render=function(e,t){return a.call(t),c(e,t)}}else{var u=d.beforeCreate;d.beforeCreate=u?[].concat(u,a):[a]}return{exports:e,options:d}}i.d(t,"a",(function(){return n}))},41:function(e,t,i){"use strict";i.r(t);var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"v-radio",class:["v-radio--"+e.size,{"v-radio--circle":e.circle},e.inline?"v-radio--hoz":"v-radio--ver"]},[e.isSingle?i("div",{staticClass:"v-radio__item",class:{"is-disabled":e.disabled,"is-selected":e.selected},on:{click:e._singleToggle}},[i("div",{staticClass:"v-radio__label"}),e._v(" "),i("div",{staticClass:"v-radio__text",domProps:{textContent:e._s(e.text)}})]):i("div",{staticClass:"v-radio__list"},e._l(e.text,(function(t){return i("div",{key:e.pureText?t:t.value,staticClass:"v-radio__item",class:[{"is-disabled":e.disabled||!e.pureText&&t.disabled||e.max&&e.selected.length>=e.max&&-1===e.selected.indexOf(e.pureText?t:t.value)},{"is-selected":-1!==e.selected.indexOf(e.pureText?t:t.value)}],on:{click:function(i){return e._multiToggle(t)}}},[i("div",{staticClass:"v-radio__label"}),e._v(" "),i("div",{staticClass:"v-radio__text",domProps:{textContent:e._s(e.pureText?t:t.label)}})])})),0)])};n._withStripped=!0;i(61);var s={name:"VRadio",props:{value:{type:[Boolean,Array],required:!0},text:{type:[String,Array],required:!0},size:{type:String,default:"normal",validator:function(e){return~["normal","small"].indexOf(e)}},max:{type:Number,default:0},min:{type:Number,default:0},disabled:{type:Boolean,default:!1},circle:{type:Boolean,default:!1},inline:{type:Boolean,default:!1}},data:function(){var e="[object Boolean]"===Object.prototype.toString.call(this.value);return{selected:this.value,pureText:!!e||"string"==typeof this.text[0],isSingle:e}},watch:{value:function(e){this.selected=e},selected:function(e){this.$emit("input",e)}},methods:{_singleToggle:function(){this.disabled||(this.selected=!this.selected)},_multiToggle:function(e){if(!(this.disabled||!this.pureText&&e.disabled)){var t=this.selected.indexOf(this.pureText?e:e.value);if(-1===t)this.max&&this.selected.length>=this.max||this.selected.push(this.pureText?e:e.value);else{if(this.min&&this.selected.length<=this.min)return;this.selected.splice(t,1)}}},checkAll:function(e){var t=this;this.isSingle?this.selected=e:e?(this.selected=[],this.text.forEach((function(e){t.selected.push(t.pureText?e:e.value)}))):this.selected=[]},toggleAll:function(){this.isSingle?this.selected=!this.selected:this.checkAll(!this.selected.length)}}},r=i(0),o=Object(r.a)(s,n,[],!1,null,null,null);o.options.__file="src/components/radio/radio.vue";var l=o.exports;t.default=l},61:function(e,t,i){}})})); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=31)}({0:function(e,t,n){"use strict";function i(e,t,n,i,r,o,s,f){var a,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),s?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=a):r&&(a=f?function(){r.call(this,this.$root.$options.shadowRoot)}:r),a)if(u.functional){u._injectStyles=a;var c=u.render;u.render=function(e,t){return a.call(t),c(e,t)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,a):[a]}return{exports:e,options:u}}n.d(t,"a",(function(){return i}))},31:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"v-refresher",class:{"is-default":this.isDefault,"is-loading":this.loading,"is-closing":this.closing},style:this.style},[t("div",{staticClass:"v-refresher__image",style:{height:this.height+"px",backgroundImage:"url("+this.renderImage+")"}})])};i._withStripped=!0;var r=n.p+"64ba0248017221a4309b7da81e2bef08.png",o=(n(59),{name:"VRefresher",props:{image:{type:String,default:""},height:{type:Number,default:60}},data:function(){return{offset:0,renderImage:this.image||r,isDefault:!this.image,loading:!1,closing:!1}},computed:{style:function(){var e=2*this.height;return this.offset?this.closing?{height:"".concat(this.offset,"px")}:{height:"".concat(e*(1+Math.log10(this.offset/e)),"px")}:{height:"0px"}}},methods:{pull:function(e){this.closing=!1,this.offset=e,e>this.height&&(this.loading=!0)},fire:function(){this.closing=!0,this.offset<this.height?this.offset=0:(this.offset=this.height,this.$emit("refresh"))},close:function(){this.loading=!1,this.offset=0}}}),s=n(0),f=Object(s.a)(o,i,[],!1,null,null,null);f.options.__file="src/components/refresher/refresher.vue";var a=f.exports;t.default=a},59:function(e,t,n){}})})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function n(i){if(t[i])return t[i].exports;var r=t[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,i){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=31)}({0:function(e,t,n){"use strict";function i(e,t,n,i,r,o,s,f){var a,u="function"==typeof e?e.options:e;if(t&&(u.render=t,u.staticRenderFns=n,u._compiled=!0),i&&(u.functional=!0),o&&(u._scopeId="data-v-"+o),s?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),r&&r.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},u._ssrRegister=a):r&&(a=f?function(){r.call(this,this.$root.$options.shadowRoot)}:r),a)if(u.functional){u._injectStyles=a;var c=u.render;u.render=function(e,t){return a.call(t),c(e,t)}}else{var l=u.beforeCreate;u.beforeCreate=l?[].concat(l,a):[a]}return{exports:e,options:u}}n.d(t,"a",(function(){return i}))},31:function(e,t,n){"use strict";n.r(t);var i=function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"v-refresher",class:{"is-default":this.isDefault,"is-loading":this.loading,"is-closing":this.closing},style:this.style},[t("div",{staticClass:"v-refresher__image",style:{height:this.height+"px",backgroundImage:"url("+this.renderImage+")"}})])};i._withStripped=!0;var r=n.p+"64ba0248017221a4309b7da81e2bef08.png",o=(n(60),{name:"VRefresher",props:{image:{type:String,default:""},height:{type:Number,default:60}},data:function(){return{offset:0,renderImage:this.image||r,isDefault:!this.image,loading:!1,closing:!1}},computed:{style:function(){var e=2*this.height;return this.offset?this.closing?{height:"".concat(this.offset,"px")}:{height:"".concat(e*(1+Math.log10(this.offset/e)),"px")}:{height:"0px"}}},methods:{pull:function(e){this.closing=!1,this.offset=e,e>this.height&&(this.loading=!0)},fire:function(){this.closing=!0,this.offset<this.height?this.offset=0:(this.offset=this.height,this.$emit("refresh"))},close:function(){this.loading=!1,this.offset=0}}}),s=n(0),f=Object(s.a)(o,i,[],!1,null,null,null);f.options.__file="src/components/refresher/refresher.vue";var a=f.exports;t.default=a},60:function(e,t,n){}})})); |
@@ -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["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(o,r,function(e){return t[e]}.bind(null,r));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}({0:function(t,e,i){"use strict";function o(t,e,i,o,r,n,a,s){var f,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),o&&(l.functional=!0),n&&(l._scopeId="data-v-"+n),a?(f=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=f):r&&(f=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),f)if(l.functional){l._injectStyles=f;var h=l.render;l.render=function(t,e){return f.call(e),h(t,e)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,f):[f]}return{exports:t,options:l}}i.d(e,"a",(function(){return o}))},44:function(t,e,i){"use strict";i.r(e);i(51);function o(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var r={name:"VRender",props:{column:{type:Number,default:1,validator:function(t){return t>=1}},height:{type:Number,default:0,validator:function(t){return t>=0}},remain:{type:Number,required:!0},total:{type:Number,required:!0,default:0},item:{type:Object,default:null},getter:{type:Function,default:function(){}}},data:function(){return{wrapHeight:0,offsetTop:0,lastScrollTop:0,start:0,flowHeight:0,paddingTop:0,cache:{}}},computed:{isSameHeight:function(){return 0!==this.height},isSingleColumn:function(){return 1===this.column}},watch:{total:function(t,e){t?t<e?(this.clear(),this._computeRenderHeight(this.$slots.default,0)):this._computeRenderHeight(this.isSameHeight?void 0:this.$slots.default.slice(e,t),e):this.clear(),this.scroll(this.lastScrollTop,!1)}},mounted:function(){this.setOffset(),this.setWrap(),this._computeRenderHeight(this.$slots.default,0)},methods:{setOffset:function(){this.offsetTop=this.$el.offsetTop},setWrap:function(t){this.wrapHeight=(t||function(t){for(var e=t;e&&"HTML"!==e.tagName&&1===e.nodeType;){var i=window.getComputedStyle(e);if("hidden"===i.overflowY||"hidden"===i.overflow)return e;e=e.parentNode}return t.parentNode}(this.$el)).clientHeight},getRect:function(t){return this.cache[t]},scroll:function(t,e){var i=this,o=void 0===e?t<this.lastScrollTop:e;this.lastScrollTop=t;var r=this.cache,n=this.start,a=this.remain,s=this.total;if(!(a>=s)){var f=t-this.offsetTop;if(f<=0)return this.paddingTop=0,void(this.start=0);var l=f+this.wrapHeight;if(l>=r[s-1].bottom)return this.start=s-a,void(this.paddingTop=r[s-a].top);var h=this.isSameHeight,u=this.column,c=this.height;o?function(){var t=r[n].top-f;if(!(t<=0))if(h){var e=Math.abs(Math.ceil(t/c/u)),o=Math.max(n-e-a/2|0,0);i.start=o,i.paddingTop=r[o].top}else for(var s=n-1;s>=0;s--)if(r[s].top<=f){var l=Math.max(s-a/2|0,0);i.paddingTop=r[l].top,i.start=l;break}}():function(){var t=r[n+a-1].bottom-l;if(!(t>=0))if(h){var e=Math.abs(Math.floor(t/c/u)),o=Math.min(n+e+a/2|0,s-a);i.start=o,i.paddingTop=r[o].top}else for(var f=n+a;f<s;f++)if(r[f].bottom>=l){var p=Math.min(f+1-a/2|0,s-a);i.paddingTop=r[p].top,i.start=p;break}}()}},clear:function(){this.flowHeight=0,this.paddingTop=0,this.start=0,this.cache={}},_computeRenderHeight:function(t,e){var i=this.total,r=this.column,n=this.cache;if(i)if(this.isSameHeight){var a=this.height,s=t?t.length+e:i;if(this.isSingleColumn){for(var f=e;f<s;f++){var l=a*Math.floor(f/r);n[f]={top:l,height:a,bottom:a+l}}this.flowHeight=a*Math.ceil(i/r)}else{for(var h=e;h<s;h++){var u=a*h;n[h]={top:u,height:a,bottom:a+u}}this.flowHeight=a*i}}else if(this.isSingleColumn){var c=e?n[e-1].bottom:0;t.forEach((function(t,i){var o=parseInt(t.data.style.height,10);n[i+e]={top:c,bottom:o+c,height:o},c+=o})),this.flowHeight=c}else{var p;if(e){p=[];for(var d=e-r,g=e-1;d<=g;d++)p.push(n[d].bottom)}else p=new Array(r).fill(0);t.forEach((function(t,i){var r=Math.min.apply(Math,o(p)),a=parseInt(t.data.style.height,10);n[i+e]={top:r,bottom:a+r,height:a},p[p.indexOf(r)]+=a})),this.flowHeight=Math.max.apply(Math,o(p))}},_filter:function(t){var e=this.remain,i=this.total,o=this.start,r=this.item,n=e>=i?i:o+e;if(r){for(var a=[],s=o;s<n;s++)a.push(t(r,this.getter(s)));return a}return this.$slots.default?this.$slots.default.slice(o,n):[]}},render:function(t){return t("div",{style:{position:"relative",boxSizing:"border-box",willChange:"padding-top",paddingTop:"".concat(this.paddingTop,"px"),height:"".concat(this.flowHeight,"px")},class:"v-render"},this._filter(t))}},n=i(0),a=Object(n.a)(r,void 0,void 0,!1,null,null,null);a.options.__file="src/components/render/render.vue";var s=a.exports;e.default=s},51:function(t,e,i){}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function i(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,o){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(i.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(o,r,function(e){return t[e]}.bind(null,r));return o},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=44)}({0:function(t,e,i){"use strict";function o(t,e,i,o,r,n,a,s){var f,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),o&&(l.functional=!0),n&&(l._scopeId="data-v-"+n),a?(f=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=f):r&&(f=s?function(){r.call(this,this.$root.$options.shadowRoot)}:r),f)if(l.functional){l._injectStyles=f;var h=l.render;l.render=function(t,e){return f.call(e),h(t,e)}}else{var u=l.beforeCreate;l.beforeCreate=u?[].concat(u,f):[f]}return{exports:t,options:l}}i.d(e,"a",(function(){return o}))},44:function(t,e,i){"use strict";i.r(e);i(52);function o(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var r={name:"VRender",props:{column:{type:Number,default:1,validator:function(t){return t>=1}},height:{type:Number,default:0,validator:function(t){return t>=0}},remain:{type:Number,required:!0},total:{type:Number,required:!0,default:0},item:{type:Object,default:null},getter:{type:Function,default:function(){}}},data:function(){return{wrapHeight:0,offsetTop:0,lastScrollTop:0,start:0,flowHeight:0,paddingTop:0,cache:{}}},computed:{isSameHeight:function(){return 0!==this.height},isSingleColumn:function(){return 1===this.column}},watch:{total:function(t,e){t?t<e?(this.clear(),this._computeRenderHeight(this.$slots.default,0)):this._computeRenderHeight(this.isSameHeight?void 0:this.$slots.default.slice(e,t),e):this.clear(),this.scroll(this.lastScrollTop,!1)}},mounted:function(){this.setOffset(),this.setWrap(),this._computeRenderHeight(this.$slots.default,0)},methods:{setOffset:function(){this.offsetTop=this.$el.offsetTop},setWrap:function(t){this.wrapHeight=(t||function(t){for(var e=t;e&&"HTML"!==e.tagName&&1===e.nodeType;){var i=window.getComputedStyle(e);if("hidden"===i.overflowY||"hidden"===i.overflow)return e;e=e.parentNode}return t.parentNode}(this.$el)).clientHeight},getRect:function(t){return this.cache[t]},scroll:function(t,e){var i=this,o=void 0===e?t<this.lastScrollTop:e;this.lastScrollTop=t;var r=this.cache,n=this.start,a=this.remain,s=this.total;if(!(a>=s)){var f=t-this.offsetTop;if(f<=0)return this.paddingTop=0,void(this.start=0);var l=f+this.wrapHeight;if(l>=r[s-1].bottom)return this.start=s-a,void(this.paddingTop=r[s-a].top);var h=this.isSameHeight,u=this.column,c=this.height;o?function(){var t=r[n].top-f;if(!(t<=0))if(h){var e=Math.abs(Math.ceil(t/c/u)),o=Math.max(n-e-a/2|0,0);i.start=o,i.paddingTop=r[o].top}else for(var s=n-1;s>=0;s--)if(r[s].top<=f){var l=Math.max(s-a/2|0,0);i.paddingTop=r[l].top,i.start=l;break}}():function(){var t=r[n+a-1].bottom-l;if(!(t>=0))if(h){var e=Math.abs(Math.floor(t/c/u)),o=Math.min(n+e+a/2|0,s-a);i.start=o,i.paddingTop=r[o].top}else for(var f=n+a;f<s;f++)if(r[f].bottom>=l){var p=Math.min(f+1-a/2|0,s-a);i.paddingTop=r[p].top,i.start=p;break}}()}},clear:function(){this.flowHeight=0,this.paddingTop=0,this.start=0,this.cache={}},_computeRenderHeight:function(t,e){var i=this.total,r=this.column,n=this.cache;if(i)if(this.isSameHeight){var a=this.height,s=t?t.length+e:i;if(this.isSingleColumn){for(var f=e;f<s;f++){var l=a*Math.floor(f/r);n[f]={top:l,height:a,bottom:a+l}}this.flowHeight=a*Math.ceil(i/r)}else{for(var h=e;h<s;h++){var u=a*h;n[h]={top:u,height:a,bottom:a+u}}this.flowHeight=a*i}}else if(this.isSingleColumn){var c=e?n[e-1].bottom:0;t.forEach((function(t,i){var o=parseInt(t.data.style.height,10);n[i+e]={top:c,bottom:o+c,height:o},c+=o})),this.flowHeight=c}else{var p;if(e){p=[];for(var d=e-r,g=e-1;d<=g;d++)p.push(n[d].bottom)}else p=new Array(r).fill(0);t.forEach((function(t,i){var r=Math.min.apply(Math,o(p)),a=parseInt(t.data.style.height,10);n[i+e]={top:r,bottom:a+r,height:a},p[p.indexOf(r)]+=a})),this.flowHeight=Math.max.apply(Math,o(p))}},_filter:function(t){var e=this.remain,i=this.total,o=this.start,r=this.item,n=e>=i?i:o+e;if(r){for(var a=[],s=o;s<n;s++)a.push(t(r,this.getter(s)));return a}return this.$slots.default?this.$slots.default.slice(o,n):[]}},render:function(t){return t("div",{style:{position:"relative",boxSizing:"border-box",willChange:"padding-top",paddingTop:"".concat(this.paddingTop,"px"),height:"".concat(this.flowHeight,"px")},class:"v-render"},this._filter(t))}},n=i(0),a=Object(n.a)(r,void 0,void 0,!1,null,null,null);a.options.__file="src/components/render/render.vue";var s=a.exports;e.default=s},52:function(t,e,i){}})})); |
@@ -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["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},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=40)}({0:function(t,e,n){"use strict";function o(t,e,n,o,i,r,s,a){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),s?(c=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__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):i&&(c=a?function(){i.call(this,this.$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return o}))},40:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"v-search",class:{"v-search--fixed":t.fixed,"v-search--border":t.showBorder,"v-search--nav":t.isNav}},[n("div",{staticClass:"v-search__shim"}),t._v(" "),n("div",{staticClass:"v-search__body"},[n("div",{staticClass:"v-search__wrap"},[t.showCancel?n("div",{staticClass:"v-search__cancel",on:{click:t.handleCancel}},[t._v("取消")]):t._e(),t._v(" "),n("div",{staticClass:"v-search__box"},[t._m(0),t._v(" "),t.text?n("div",{staticClass:"v-search__icon v-search__icon--close",on:{click:t.handleRemove}},[n("i",{staticClass:"bili-font ic_input_close"})]):t._e(),t._v(" "),n("form",{staticClass:"v-search__form",attrs:{method:"get",action:"#"},on:{submit:function(e){return e.preventDefault(),t.submit(!1)}}},[n("input",t._b({directives:[{name:"model",rawName:"v-model",value:t.text,expression:"text"}],attrs:{placeholder:t.placeholder,type:"search"},domProps:{value:t.text},on:{focus:t.handleFocus,blur:t.handleBlur,input:function(e){e.target.composing||(t.text=e.target.value)}}},"input",t.attr,!1))])])])])])};o._withStripped=!0;n(58);var i=n(6),r={name:"VSearch",props:{value:{type:String,required:!0},placeholder:{type:String,default:"搜索词"},attr:{type:Object,default:function(){}},fixed:{type:Boolean,default:!1},realtime:{type:Boolean,default:!1},stayCancel:{type:Boolean,default:!1},showBorder:{type:Boolean,default:!1},isNav:{type:Boolean,default:!0}},data:function(){return{text:this.value,isFocus:!1}},computed:{showCancel:function(){return!!this.stayCancel||(this.isFocus||this.text)}},watch:{text:function(t){this.$emit("input",t),this.realtime&&this.submit(!0)},value:function(t){this.text=t}},methods:{handleCancel:function(){this.$emit("cancel")},handleRemove:function(){this.text=""},handleFocus:function(){this.isFocus=!0,this.$emit("focus")},handleBlur:function(){var t=this;this.$emit("blur"),setTimeout((function(){t.isFocus=!1}),20)},submit:Object(i.a)(150,(function(t){this.$emit(t?"change":"submit")}))}},s=n(0),a=Object(s.a)(r,o,[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-search__icon v-search__icon--query"},[e("i",{staticClass:"bili-font ic_search"})])}],!1,null,null,null);a.options.__file="src/components/search/search.vue";var c=a.exports;e.default=c},58:function(t,e,n){},6:function(t,e,n){"use strict";function o(t,e,n,o){var i,r=!1,s=0;function a(){i&&clearTimeout(i)}function c(){var c=this,u=Date.now()-s,l=arguments;function f(){s=Date.now(),n.apply(c,l)}r||(o&&!i&&f(),a(),void 0===o&&u>t?f():!0!==e&&(i=setTimeout(o?function(){i=void 0}:f,void 0===o?t-u:t)))}return"boolean"!=typeof e&&(o=n,n=e,e=void 0),c.cancel=function(){a(),r=!0},c}function i(t,e,n){return void 0===n?o(t,e,!1):o(t,n,!1!==e)}n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i}))}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},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 o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},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=40)}({0:function(t,e,n){"use strict";function o(t,e,n,o,i,r,s,a){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),o&&(u.functional=!0),r&&(u._scopeId="data-v-"+r),s?(c=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__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(s)},u._ssrRegister=c):i&&(c=a?function(){i.call(this,this.$root.$options.shadowRoot)}:i),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var f=u.beforeCreate;u.beforeCreate=f?[].concat(f,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return o}))},40:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"v-search",class:{"v-search--fixed":t.fixed,"v-search--border":t.showBorder,"v-search--nav":t.isNav}},[n("div",{staticClass:"v-search__shim"}),t._v(" "),n("div",{staticClass:"v-search__body"},[n("div",{staticClass:"v-search__wrap"},[t.showCancel?n("div",{staticClass:"v-search__cancel",on:{click:t.handleCancel}},[t._v("取消")]):t._e(),t._v(" "),n("div",{staticClass:"v-search__box"},[t._m(0),t._v(" "),t.text?n("div",{staticClass:"v-search__icon v-search__icon--close",on:{click:t.handleRemove}},[n("i",{staticClass:"bili-font ic_input_close"})]):t._e(),t._v(" "),n("form",{staticClass:"v-search__form",attrs:{method:"get",action:"#"},on:{submit:function(e){return e.preventDefault(),t.submit(!1)}}},[n("input",t._b({directives:[{name:"model",rawName:"v-model",value:t.text,expression:"text"}],attrs:{placeholder:t.placeholder,type:"search"},domProps:{value:t.text},on:{focus:t.handleFocus,blur:t.handleBlur,input:function(e){e.target.composing||(t.text=e.target.value)}}},"input",t.attr,!1))])])])])])};o._withStripped=!0;n(59);var i=n(6),r={name:"VSearch",props:{value:{type:String,required:!0},placeholder:{type:String,default:"搜索词"},attr:{type:Object,default:function(){}},fixed:{type:Boolean,default:!1},realtime:{type:Boolean,default:!1},stayCancel:{type:Boolean,default:!1},showBorder:{type:Boolean,default:!1},isNav:{type:Boolean,default:!0}},data:function(){return{text:this.value,isFocus:!1}},computed:{showCancel:function(){return!!this.stayCancel||(this.isFocus||this.text)}},watch:{text:function(t){this.$emit("input",t),this.realtime&&this.submit(!0)},value:function(t){this.text=t}},methods:{handleCancel:function(){this.$emit("cancel")},handleRemove:function(){this.text=""},handleFocus:function(){this.isFocus=!0,this.$emit("focus")},handleBlur:function(){var t=this;this.$emit("blur"),setTimeout((function(){t.isFocus=!1}),20)},submit:Object(i.a)(150,(function(t){this.$emit(t?"change":"submit")}))}},s=n(0),a=Object(s.a)(r,o,[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-search__icon v-search__icon--query"},[e("i",{staticClass:"bili-font ic_search"})])}],!1,null,null,null);a.options.__file="src/components/search/search.vue";var c=a.exports;e.default=c},59:function(t,e,n){},6:function(t,e,n){"use strict";function o(t,e,n,o){var i,r=!1,s=0;function a(){i&&clearTimeout(i)}function c(){var c=this,u=Date.now()-s,l=arguments;function f(){s=Date.now(),n.apply(c,l)}r||(o&&!i&&f(),a(),void 0===o&&u>t?f():!0!==e&&(i=setTimeout(o?function(){i=void 0}:f,void 0===o?t-u:t)))}return"boolean"!=typeof e&&(o=n,n=e,e=void 0),c.cancel=function(){a(),r=!0},c}function i(t,e,n){return void 0===n?o(t,e,!1):o(t,n,!1!==e)}n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return i}))}})})); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=42)}({0:function(e,t,n){"use strict";function r(e,t,n,r,o,i,s,c){var u,a="function"==typeof e?e.options:e;if(t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),i&&(a._scopeId="data-v-"+i),s?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},a._ssrRegister=u):o&&(u=c?function(){o.call(this,this.$root.$options.shadowRoot)}:o),u)if(a.functional){a._injectStyles=u;var l=a.render;a.render=function(e,t){return u.call(t),l(e,t)}}else{var f=a.beforeCreate;a.beforeCreate=f?[].concat(f,u):[u]}return{exports:e,options:a}}n.d(t,"a",(function(){return r}))},42:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"v-step",class:[[e.vertical?"v-step--vertical":"v-step--horizontal"],[e.desc?"v-step--desc":"v-step--asc"]]},e._l(e.list,(function(t,r){return n("div",{key:r,staticClass:"v-step__item",class:"v-step__item--"+(e.current===r?"active":e.current>r?"before":"after"),on:{click:function(t){return e.handleClick(r)}}},[e._t("icon-"+r,[n("div",{staticClass:"v-step__item__icon"},[n("span",{domProps:{textContent:e._s(r+1)}})])]),e._v(" "),e._t("text-"+r,[n("div",{staticClass:"v-step__item__text",domProps:{textContent:e._s(t)}})])],2)})),0)};r._withStripped=!0;n(61);var o={name:"VStep",props:{vertical:{type:Boolean,default:!1},desc:{type:Boolean,default:!1},current:{type:Number,default:0},list:{type:Array,default:function(){return[]}}},methods:{handleClick:function(e){this.$emit("click",e)}}},i=n(0),s=Object(i.a)(o,r,[],!1,null,null,null);s.options.__file="src/components/step/step.vue";var c=s.exports;t.default=c},61:function(e,t,n){}})})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=42)}({0:function(e,t,n){"use strict";function r(e,t,n,r,o,i,s,c){var u,a="function"==typeof e?e.options:e;if(t&&(a.render=t,a.staticRenderFns=n,a._compiled=!0),r&&(a.functional=!0),i&&(a._scopeId="data-v-"+i),s?(u=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},a._ssrRegister=u):o&&(u=c?function(){o.call(this,this.$root.$options.shadowRoot)}:o),u)if(a.functional){a._injectStyles=u;var l=a.render;a.render=function(e,t){return u.call(t),l(e,t)}}else{var f=a.beforeCreate;a.beforeCreate=f?[].concat(f,u):[u]}return{exports:e,options:a}}n.d(t,"a",(function(){return r}))},42:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"v-step",class:[[e.vertical?"v-step--vertical":"v-step--horizontal"],[e.desc?"v-step--desc":"v-step--asc"]]},e._l(e.list,(function(t,r){return n("div",{key:r,staticClass:"v-step__item",class:"v-step__item--"+(e.current===r?"active":e.current>r?"before":"after"),on:{click:function(t){return e.handleClick(r)}}},[e._t("icon-"+r,[n("div",{staticClass:"v-step__item__icon"},[n("span",{domProps:{textContent:e._s(r+1)}})])]),e._v(" "),e._t("text-"+r,[n("div",{staticClass:"v-step__item__text",domProps:{textContent:e._s(t)}})])],2)})),0)};r._withStripped=!0;n(62);var o={name:"VStep",props:{vertical:{type:Boolean,default:!1},desc:{type:Boolean,default:!1},current:{type:Number,default:0},list:{type:Array,default:function(){return[]}}},methods:{handleClick:function(e){this.$emit("click",e)}}},i=n(0),s=Object(i.a)(o,r,[],!1,null,null,null);s.options.__file="src/components/step/step.vue";var c=s.exports;t.default=c},62:function(e,t,n){}})})); |
@@ -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["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=39)}({0:function(t,e,i){"use strict";function n(t,e,i,n,s,a,o,r){var h,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),a&&(l._scopeId="data-v-"+a),o?(h=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__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=h):s&&(h=r?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(l.functional){l._injectStyles=h;var u=l.render;l.render=function(t,e){return h.call(e),u(t,e)}}else{var c=l.beforeCreate;l.beforeCreate=c?[].concat(c,h):[h]}return{exports:t,options:l}}i.d(e,"a",(function(){return n}))},12:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i(5);function s(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=function(){function t(e){var i=this;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.wrap=e.wrap,this.loop=e.loop,this.index=e.index,this.animated=e.animated,this.duration=e.duration,this.callback=e.callback,this._calcCssPrefix(),this._setupConst(),this.loop?setTimeout((function(){i._useAnimate(),i._cloneShadow(),i._bindEvents()}),0):(this._useAnimate(),this._cloneShadow(),this._bindEvents()),this}var e,i,o;return e=t,(i=[{key:"slide",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t===this.index||this.move||(this._lockEvent(1.2),this._animateSlide(t,this.index,e))}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.slides.length;1===e||this.touching||this.move||this.index===e-1&&!this.loop||t&&Date.now()-this.lastNextAt<t||this.slide(this.index+1,!0)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart,{passive:!0}),t.removeEventListener("touchmove",e.touchmove,{passive:!0}),t.removeEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_updateEvents",value:function(t){this.destroy(),this.el=this.slides[t],this.index=t,this.events={},this._bindEvents()}},{key:"_setupConst",value:function(){this.slides=s(this.wrap.children),this.startAt=0,this.lastNextAt=0,this.move=!1,this.touching=!1,this.isMoveSlide=!1,this.maxDeltaPoint={x:0,y:0},this.deltaPoint={x:0,y:0},this.el=this.slides[this.index],this.events={}}},{key:"_cloneShadow",value:function(){var t=this.slides,e=this.index,i=this.offsetWidth;if(this.loop&&1!==t.length){var n=t[t.length-1].cloneNode(!0),s=t[0].cloneNode(!0);this.wrap.appendChild(n),this.wrap.appendChild(s),n.style.transform="translateX(".concat((-1-e)*i,"px)"),s.style.transform="translateX(".concat((t.length-e)*i,"px)"),this.beforeShadow=n,this.afterShadow=s}}},{key:"_useAnimate",value:function(){var t=this,e=this.wrap,i=e.offsetWidth;if(i||setTimeout((function(){t._useAnimate()}),200),this.offsetWidth=i,this.animated){var n=this.slides,s=this.index,a=n.length;if(a<=1)return e.style.visibility="visible",void[].forEach.call(n,(function(t){t.style.transform="translateX(0px)"}));e.style.width="".concat(100*a,"%");var o="".concat(100/a,"%");[].forEach.call(n,(function(t,e){t.style.width=o,t.style.transform="translateX(".concat((e-s)*i,"px)")})),e.style.visibility="visible"}else e.style.visibility="visible"}},{key:"_bindEvents",value:function(){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart,{passive:!0}),t.addEventListener("touchmove",e.touchmove,{passive:!0}),t.addEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_start",value:function(t){this.touching=!0;var e=t.touches[0];this.startPoint={x:e.pageX,y:e.pageY},this.startAt=+new Date}},{key:"_move",value:function(t){var e=t.touches[0],i=this.startPoint,n=this.maxDeltaPoint,s={x:e.pageX-i.x,y:e.pageY-i.y};if(this.maxDeltaPoint={x:Math.max(n.x,Math.abs(s.x)),y:Math.max(n.y,Math.abs(s.y))},this.deltaPoint=s,this.isMoveSlide=!0,this._lockedSwipeEvents(),!this._isVerticalScroll(this.maxDeltaPoint)&&this.animated&&!this._isEnded(s)){var a=s.x,o=a>0,r=this.slides,h=this.index,l=this.offsetWidth;this._translate(r[h],a),o?this._translate(r[h-1],a-l):this._translate(r[h+1],l+a),this._loopAdjust(o,h,a)}}},{key:"_end",value:function(){if(this.touching=!1,this.startAt&&this.isMoveSlide){this.isMoveSlide=!1,this._unlockSwipeEvents();var t=this.maxDeltaPoint,e=this.deltaPoint,i=this.offsetWidth,n=e.x>0;if(this.maxDeltaPoint={x:0,y:0},this._isVerticalScroll(t)||this._isEnded(e)||!this._isValidSlide(e)){if(!this.animated)return;var s=this.slides,a=this.index,o=this.duration;return this._translate(s[a],0,o),n?(this._translate(s[a-1],-i,o),this._translate(s[a+1],i)):(this._translate(s[a+1],i,o),this._translate(s[a-1],-i)),this.loop&&(n&&0===a?this._translate(this.beforeShadow,-i,o):n||a!==s.length-1||this._translate(this.afterShadow,i,o)),void this._lockEvent()}var r=n?this.index-1:this.index+1;if(this.animated){var h=this.slides,l=this.index,u=this.duration;this._translate(h[l],n?i:-i,u),this._translate(h[l-1],n?0:-i,n?u:0),this._translate(h[l+1],n?i:0,n?0:u),this.loop&&(r=this._loopJump(n,l,r))}this.callback&&this.callback(r),this._updateEvents(r),this._lockEvent()}}},{key:"_animateSlide",value:function(t,e,i){var n=this;if(this.animated){var s=this.offsetWidth,a=this.slides,o=this.duration,r=t<e;this._loopAdjust(r,t),this._translate(a[t],r?-s:s);var h=t;setTimeout((function(){n._translate(a[t],0,o),n._translate(a[e],r?s:-s,o),e!==t+1&&n._translate(a[t+1],s),e!==t-1&&n._translate(a[t-1],-s),n.loop&&(h=n._loopJump(r,e,t)),n._updateEvents(h),i&&setTimeout((function(){n.callback&&n.callback(h)}),n.duration)}),0)}}},{key:"_loopJump",value:function(t,e,i){var n,s=this.slides,a=this.duration,o=this.offsetWidth;return t&&0===e?(n=s.length-1,this._translate(this.beforeShadow,0,a),this._translate(this.afterShadow,o),this._loopReset(!0)):t||e!==s.length-1?n=i:(n=0,this._translate(this.afterShadow,0,a),this._translate(this.beforeShadow,-o),this._loopReset(!1)),n}},{key:"_loopAdjust",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.loop){var n=this.offsetWidth,s=this.slides;t&&0===e?this._translate(this.beforeShadow,i-n):t||e!==s.length-1||this._translate(this.afterShadow,n+i)}}},{key:"_loopReset",value:function(t){var e=this,i=this.offsetWidth,n=this.slides;setTimeout((function(){t?(e._translate(n[n.length-1],0,0),e._translate(n[n.length-2],-i,0),e._translate(e.beforeShadow,i,0)):(e._translate(n[0],0,0),e._translate(n[1],i,0),e._translate(e.afterShadow,-i,0))}),this.duration)}},{key:"_lockEvent",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.lastNextAt=Date.now(),this.move=!0,setTimeout((function(){t.move=!1}),this.duration*e)}},{key:"_lockedSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="none")}},{key:"_unlockSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="auto")}},{key:"_isVerticalScroll",value:function(t){return Math.abs(t.x)<1.5*Math.abs(t.y)}},{key:"_isValidSlide",value:function(t){var e=Math.abs(t.x),i=Number(+new Date-this.startAt)<250&&e>20||e>this.offsetWidth/2;return this.startAt=0,i}},{key:"_translate",value:function(t,e){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t&&(t.style["".concat(this.cssPrefix,"transition-duration")]=n?"".concat(n,"ms"):"",requestAnimationFrame((function(){t.style["".concat(i.cssPrefix,"transform")]="translateX(".concat(e,"px)")})))}},{key:"_isEnded",value:function(t){if(this.loop)return!1;var e=t.x>0;return e&&0===this.index||!e&&this.index===this.slides.length-1}},{key:"_calcCssPrefix",value:function(){this.animated&&(this.cssPrefix=Object(n.c)())}}])&&a(e.prototype,i),o&&a(e,o),t}()},39:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.length?i("div",{staticClass:"v-swipe",on:{touchstart:function(t){t.stopPropagation()},touchmove:function(t){t.stopPropagation()},touchend:function(t){t.stopPropagation()}}},[i("div",{ref:"wrap",staticClass:"v-swipe__wrap"},t._l(t.length,(function(e,n){return i("div",{key:e,staticClass:"v-swipe__item"},[t._t(""+n)],2)})),0),t._v(" "),t.length>1&&t.indicator?i("div",{staticClass:"v-swipe__indicator"},t._l(t.length,(function(e,n){return i("div",{key:e,staticClass:"v-swipe__indicator__item",class:{"is-active":n===t.active}})})),0):t._e()]):t._e()};n._withStripped=!0;i(57);var s=i(12),a={name:"VSwipe",props:{duration:{type:Number,default:500},autoplay:{type:Number,default:2e3},index:{type:Number,default:0},length:{type:Number,default:0},indicator:{type:Boolean,default:!0}},data:function(){return{active:this.index,timer:0,slider:null,stats:[this.index]}},mounted:function(){this.init(),this.play(),this.$emit("change",this.active),this.$emit("report",this.active)},beforeDestroy:function(){clearInterval(this.timer)},methods:{init:function(){var t=this;this.slider=new s.a({wrap:this.$refs.wrap,loop:!0,index:this.active,animated:!0,duration:this.duration,callback:function(e){t.active=e,t.$emit("change",e),~t.stats.indexOf(e)||(t.stats.push(e),t.$emit("report",e))}})},play:function(){var t=this;this.autoplay&&(this.timer=setInterval((function(){t.slider.offsetWidth&&t.slider.next(t.autoplay)}),this.autoplay))}}},o=i(0),r=Object(o.a)(a,n,[],!1,null,null,null);r.options.__file="src/components/swipe/swipe.vue";var h=r.exports;e.default=h},5:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return s})),i.d(e,"c",(function(){return a}));var n=function(){if("undefined"!=typeof window)return document.addEventListener?function(t,e,i){t&&e&&i&&t.addEventListener(e,i,!1)}:function(t,e,i){t&&e&&i&&t.attachEvent("on"+e,i)}}(),s=function(){if("undefined"!=typeof window)return document.removeEventListener?function(t,e,i){t&&e&&t.removeEventListener(e,i,!1)}:function(t,e,i){t&&e&&t.detachEvent("on"+e,i)}}(),a=function(){var t="",e=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,i=document.getElementsByTagName("script")[0].style;for(var n in i)e.test(n)&&(t="-"+n.match(e)[0].toLowerCase()+"-");return!t&&"WebkitOpacity"in i&&(t="-webkit-"),!t&&"KhtmlOpacity"in i&&(t="-khtml-"),t}},57:function(t,e,i){}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=39)}({0:function(t,e,i){"use strict";function n(t,e,i,n,s,a,o,r){var h,l="function"==typeof t?t.options:t;if(e&&(l.render=e,l.staticRenderFns=i,l._compiled=!0),n&&(l.functional=!0),a&&(l._scopeId="data-v-"+a),o?(h=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__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},l._ssrRegister=h):s&&(h=r?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(l.functional){l._injectStyles=h;var u=l.render;l.render=function(t,e){return h.call(e),u(t,e)}}else{var c=l.beforeCreate;l.beforeCreate=c?[].concat(c,h):[h]}return{exports:t,options:l}}i.d(e,"a",(function(){return n}))},12:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i(5);function s(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=function(){function t(e){var i=this;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.wrap=e.wrap,this.loop=e.loop,this.index=e.index,this.animated=e.animated,this.duration=e.duration,this.callback=e.callback,this._calcCssPrefix(),this._setupConst(),this.loop?setTimeout((function(){i._useAnimate(),i._cloneShadow(),i._bindEvents()}),0):(this._useAnimate(),this._cloneShadow(),this._bindEvents()),this}var e,i,o;return e=t,(i=[{key:"slide",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t===this.index||this.move||(this._lockEvent(1.2),this._animateSlide(t,this.index,e))}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.slides.length;1===e||this.touching||this.move||this.index===e-1&&!this.loop||t&&Date.now()-this.lastNextAt<t||this.slide(this.index+1,!0)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart,{passive:!0}),t.removeEventListener("touchmove",e.touchmove,{passive:!0}),t.removeEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_updateEvents",value:function(t){this.destroy(),this.el=this.slides[t],this.index=t,this.events={},this._bindEvents()}},{key:"_setupConst",value:function(){this.slides=s(this.wrap.children),this.startAt=0,this.lastNextAt=0,this.move=!1,this.touching=!1,this.isMoveSlide=!1,this.maxDeltaPoint={x:0,y:0},this.deltaPoint={x:0,y:0},this.el=this.slides[this.index],this.events={}}},{key:"_cloneShadow",value:function(){var t=this.slides,e=this.index,i=this.offsetWidth;if(this.loop&&1!==t.length){var n=t[t.length-1].cloneNode(!0),s=t[0].cloneNode(!0);this.wrap.appendChild(n),this.wrap.appendChild(s),n.style.transform="translateX(".concat((-1-e)*i,"px)"),s.style.transform="translateX(".concat((t.length-e)*i,"px)"),this.beforeShadow=n,this.afterShadow=s}}},{key:"_useAnimate",value:function(){var t=this,e=this.wrap,i=e.offsetWidth;if(i||setTimeout((function(){t._useAnimate()}),200),this.offsetWidth=i,this.animated){var n=this.slides,s=this.index,a=n.length;if(a<=1)return e.style.visibility="visible",void[].forEach.call(n,(function(t){t.style.transform="translateX(0px)"}));e.style.width="".concat(100*a,"%");var o="".concat(100/a,"%");[].forEach.call(n,(function(t,e){t.style.width=o,t.style.transform="translateX(".concat((e-s)*i,"px)")})),e.style.visibility="visible"}else e.style.visibility="visible"}},{key:"_bindEvents",value:function(){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart,{passive:!0}),t.addEventListener("touchmove",e.touchmove,{passive:!0}),t.addEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_start",value:function(t){this.touching=!0;var e=t.touches[0];this.startPoint={x:e.pageX,y:e.pageY},this.startAt=+new Date}},{key:"_move",value:function(t){var e=t.touches[0],i=this.startPoint,n=this.maxDeltaPoint,s={x:e.pageX-i.x,y:e.pageY-i.y};if(this.maxDeltaPoint={x:Math.max(n.x,Math.abs(s.x)),y:Math.max(n.y,Math.abs(s.y))},this.deltaPoint=s,this.isMoveSlide=!0,this._lockedSwipeEvents(),!this._isVerticalScroll(this.maxDeltaPoint)&&this.animated&&!this._isEnded(s)){var a=s.x,o=a>0,r=this.slides,h=this.index,l=this.offsetWidth;this._translate(r[h],a),o?this._translate(r[h-1],a-l):this._translate(r[h+1],l+a),this._loopAdjust(o,h,a)}}},{key:"_end",value:function(){if(this.touching=!1,this.startAt&&this.isMoveSlide){this.isMoveSlide=!1,this._unlockSwipeEvents();var t=this.maxDeltaPoint,e=this.deltaPoint,i=this.offsetWidth,n=e.x>0;if(this.maxDeltaPoint={x:0,y:0},this._isVerticalScroll(t)||this._isEnded(e)||!this._isValidSlide(e)){if(!this.animated)return;var s=this.slides,a=this.index,o=this.duration;return this._translate(s[a],0,o),n?(this._translate(s[a-1],-i,o),this._translate(s[a+1],i)):(this._translate(s[a+1],i,o),this._translate(s[a-1],-i)),this.loop&&(n&&0===a?this._translate(this.beforeShadow,-i,o):n||a!==s.length-1||this._translate(this.afterShadow,i,o)),void this._lockEvent()}var r=n?this.index-1:this.index+1;if(this.animated){var h=this.slides,l=this.index,u=this.duration;this._translate(h[l],n?i:-i,u),this._translate(h[l-1],n?0:-i,n?u:0),this._translate(h[l+1],n?i:0,n?0:u),this.loop&&(r=this._loopJump(n,l,r))}this.callback&&this.callback(r),this._updateEvents(r),this._lockEvent()}}},{key:"_animateSlide",value:function(t,e,i){var n=this;if(this.animated){var s=this.offsetWidth,a=this.slides,o=this.duration,r=t<e;this._loopAdjust(r,t),this._translate(a[t],r?-s:s);var h=t;setTimeout((function(){n._translate(a[t],0,o),n._translate(a[e],r?s:-s,o),e!==t+1&&n._translate(a[t+1],s),e!==t-1&&n._translate(a[t-1],-s),n.loop&&(h=n._loopJump(r,e,t)),n._updateEvents(h),i&&setTimeout((function(){n.callback&&n.callback(h)}),n.duration)}),0)}}},{key:"_loopJump",value:function(t,e,i){var n,s=this.slides,a=this.duration,o=this.offsetWidth;return t&&0===e?(n=s.length-1,this._translate(this.beforeShadow,0,a),this._translate(this.afterShadow,o),this._loopReset(!0)):t||e!==s.length-1?n=i:(n=0,this._translate(this.afterShadow,0,a),this._translate(this.beforeShadow,-o),this._loopReset(!1)),n}},{key:"_loopAdjust",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.loop){var n=this.offsetWidth,s=this.slides;t&&0===e?this._translate(this.beforeShadow,i-n):t||e!==s.length-1||this._translate(this.afterShadow,n+i)}}},{key:"_loopReset",value:function(t){var e=this,i=this.offsetWidth,n=this.slides;setTimeout((function(){t?(e._translate(n[n.length-1],0,0),e._translate(n[n.length-2],-i,0),e._translate(e.beforeShadow,i,0)):(e._translate(n[0],0,0),e._translate(n[1],i,0),e._translate(e.afterShadow,-i,0))}),this.duration)}},{key:"_lockEvent",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.lastNextAt=Date.now(),this.move=!0,setTimeout((function(){t.move=!1}),this.duration*e)}},{key:"_lockedSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="none")}},{key:"_unlockSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="auto")}},{key:"_isVerticalScroll",value:function(t){return Math.abs(t.x)<1.5*Math.abs(t.y)}},{key:"_isValidSlide",value:function(t){var e=Math.abs(t.x),i=Number(+new Date-this.startAt)<250&&e>20||e>this.offsetWidth/2;return this.startAt=0,i}},{key:"_translate",value:function(t,e){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t&&(t.style["".concat(this.cssPrefix,"transition-duration")]=n?"".concat(n,"ms"):"",requestAnimationFrame((function(){t.style["".concat(i.cssPrefix,"transform")]="translateX(".concat(e,"px)")})))}},{key:"_isEnded",value:function(t){if(this.loop)return!1;var e=t.x>0;return e&&0===this.index||!e&&this.index===this.slides.length-1}},{key:"_calcCssPrefix",value:function(){this.animated&&(this.cssPrefix=Object(n.c)())}}])&&a(e.prototype,i),o&&a(e,o),t}()},39:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.length?i("div",{staticClass:"v-swipe",on:{touchstart:function(t){t.stopPropagation()},touchmove:function(t){t.stopPropagation()},touchend:function(t){t.stopPropagation()}}},[i("div",{ref:"wrap",staticClass:"v-swipe__wrap"},t._l(t.length,(function(e,n){return i("div",{key:e,staticClass:"v-swipe__item"},[t._t(""+n)],2)})),0),t._v(" "),t.length>1&&t.indicator?i("div",{staticClass:"v-swipe__indicator"},t._l(t.length,(function(e,n){return i("div",{key:e,staticClass:"v-swipe__indicator__item",class:{"is-active":n===t.active}})})),0):t._e()]):t._e()};n._withStripped=!0;i(58);var s=i(12),a={name:"VSwipe",props:{duration:{type:Number,default:500},autoplay:{type:Number,default:2e3},index:{type:Number,default:0},length:{type:Number,default:0},indicator:{type:Boolean,default:!0}},data:function(){return{active:this.index,timer:0,slider:null,stats:[this.index]}},mounted:function(){this.init(),this.play(),this.$emit("change",this.active),this.$emit("report",this.active)},beforeDestroy:function(){clearInterval(this.timer)},methods:{init:function(){var t=this;this.slider=new s.a({wrap:this.$refs.wrap,loop:!0,index:this.active,animated:!0,duration:this.duration,callback:function(e){t.active=e,t.$emit("change",e),~t.stats.indexOf(e)||(t.stats.push(e),t.$emit("report",e))}})},play:function(){var t=this;this.autoplay&&(this.timer=setInterval((function(){t.slider.offsetWidth&&t.slider.next(t.autoplay)}),this.autoplay))}}},o=i(0),r=Object(o.a)(a,n,[],!1,null,null,null);r.options.__file="src/components/swipe/swipe.vue";var h=r.exports;e.default=h},5:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return s})),i.d(e,"c",(function(){return a}));var n=function(){if("undefined"!=typeof window)return document.addEventListener?function(t,e,i){t&&e&&i&&t.addEventListener(e,i,!1)}:function(t,e,i){t&&e&&i&&t.attachEvent("on"+e,i)}}(),s=function(){if("undefined"!=typeof window)return document.removeEventListener?function(t,e,i){t&&e&&t.removeEventListener(e,i,!1)}:function(t,e,i){t&&e&&t.detachEvent("on"+e,i)}}(),a=function(){var t="",e=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,i=document.getElementsByTagName("script")[0].style;for(var n in i)e.test(n)&&(t="-"+n.match(e)[0].toLowerCase()+"-");return!t&&"WebkitOpacity"in i&&(t="-webkit-"),!t&&"KhtmlOpacity"in i&&(t="-khtml-"),t}},58:function(t,e,i){}})})); |
@@ -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["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=30)}({0:function(t,e,i){"use strict";function n(t,e,i,n,s,a,o,r){var h,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),o?(h=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__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=h):s&&(h=r?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(c.functional){c._injectStyles=h;var l=c.render;c.render=function(t,e){return h.call(e),l(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,h):[h]}return{exports:t,options:c}}i.d(e,"a",(function(){return n}))},12:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i(5);function s(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=function(){function t(e){var i=this;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.wrap=e.wrap,this.loop=e.loop,this.index=e.index,this.animated=e.animated,this.duration=e.duration,this.callback=e.callback,this._calcCssPrefix(),this._setupConst(),this.loop?setTimeout((function(){i._useAnimate(),i._cloneShadow(),i._bindEvents()}),0):(this._useAnimate(),this._cloneShadow(),this._bindEvents()),this}var e,i,o;return e=t,(i=[{key:"slide",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t===this.index||this.move||(this._lockEvent(1.2),this._animateSlide(t,this.index,e))}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.slides.length;1===e||this.touching||this.move||this.index===e-1&&!this.loop||t&&Date.now()-this.lastNextAt<t||this.slide(this.index+1,!0)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart,{passive:!0}),t.removeEventListener("touchmove",e.touchmove,{passive:!0}),t.removeEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_updateEvents",value:function(t){this.destroy(),this.el=this.slides[t],this.index=t,this.events={},this._bindEvents()}},{key:"_setupConst",value:function(){this.slides=s(this.wrap.children),this.startAt=0,this.lastNextAt=0,this.move=!1,this.touching=!1,this.isMoveSlide=!1,this.maxDeltaPoint={x:0,y:0},this.deltaPoint={x:0,y:0},this.el=this.slides[this.index],this.events={}}},{key:"_cloneShadow",value:function(){var t=this.slides,e=this.index,i=this.offsetWidth;if(this.loop&&1!==t.length){var n=t[t.length-1].cloneNode(!0),s=t[0].cloneNode(!0);this.wrap.appendChild(n),this.wrap.appendChild(s),n.style.transform="translateX(".concat((-1-e)*i,"px)"),s.style.transform="translateX(".concat((t.length-e)*i,"px)"),this.beforeShadow=n,this.afterShadow=s}}},{key:"_useAnimate",value:function(){var t=this,e=this.wrap,i=e.offsetWidth;if(i||setTimeout((function(){t._useAnimate()}),200),this.offsetWidth=i,this.animated){var n=this.slides,s=this.index,a=n.length;if(a<=1)return e.style.visibility="visible",void[].forEach.call(n,(function(t){t.style.transform="translateX(0px)"}));e.style.width="".concat(100*a,"%");var o="".concat(100/a,"%");[].forEach.call(n,(function(t,e){t.style.width=o,t.style.transform="translateX(".concat((e-s)*i,"px)")})),e.style.visibility="visible"}else e.style.visibility="visible"}},{key:"_bindEvents",value:function(){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart,{passive:!0}),t.addEventListener("touchmove",e.touchmove,{passive:!0}),t.addEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_start",value:function(t){this.touching=!0;var e=t.touches[0];this.startPoint={x:e.pageX,y:e.pageY},this.startAt=+new Date}},{key:"_move",value:function(t){var e=t.touches[0],i=this.startPoint,n=this.maxDeltaPoint,s={x:e.pageX-i.x,y:e.pageY-i.y};if(this.maxDeltaPoint={x:Math.max(n.x,Math.abs(s.x)),y:Math.max(n.y,Math.abs(s.y))},this.deltaPoint=s,this.isMoveSlide=!0,this._lockedSwipeEvents(),!this._isVerticalScroll(this.maxDeltaPoint)&&this.animated&&!this._isEnded(s)){var a=s.x,o=a>0,r=this.slides,h=this.index,c=this.offsetWidth;this._translate(r[h],a),o?this._translate(r[h-1],a-c):this._translate(r[h+1],c+a),this._loopAdjust(o,h,a)}}},{key:"_end",value:function(){if(this.touching=!1,this.startAt&&this.isMoveSlide){this.isMoveSlide=!1,this._unlockSwipeEvents();var t=this.maxDeltaPoint,e=this.deltaPoint,i=this.offsetWidth,n=e.x>0;if(this.maxDeltaPoint={x:0,y:0},this._isVerticalScroll(t)||this._isEnded(e)||!this._isValidSlide(e)){if(!this.animated)return;var s=this.slides,a=this.index,o=this.duration;return this._translate(s[a],0,o),n?(this._translate(s[a-1],-i,o),this._translate(s[a+1],i)):(this._translate(s[a+1],i,o),this._translate(s[a-1],-i)),this.loop&&(n&&0===a?this._translate(this.beforeShadow,-i,o):n||a!==s.length-1||this._translate(this.afterShadow,i,o)),void this._lockEvent()}var r=n?this.index-1:this.index+1;if(this.animated){var h=this.slides,c=this.index,l=this.duration;this._translate(h[c],n?i:-i,l),this._translate(h[c-1],n?0:-i,n?l:0),this._translate(h[c+1],n?i:0,n?0:l),this.loop&&(r=this._loopJump(n,c,r))}this.callback&&this.callback(r),this._updateEvents(r),this._lockEvent()}}},{key:"_animateSlide",value:function(t,e,i){var n=this;if(this.animated){var s=this.offsetWidth,a=this.slides,o=this.duration,r=t<e;this._loopAdjust(r,t),this._translate(a[t],r?-s:s);var h=t;setTimeout((function(){n._translate(a[t],0,o),n._translate(a[e],r?s:-s,o),e!==t+1&&n._translate(a[t+1],s),e!==t-1&&n._translate(a[t-1],-s),n.loop&&(h=n._loopJump(r,e,t)),n._updateEvents(h),i&&setTimeout((function(){n.callback&&n.callback(h)}),n.duration)}),0)}}},{key:"_loopJump",value:function(t,e,i){var n,s=this.slides,a=this.duration,o=this.offsetWidth;return t&&0===e?(n=s.length-1,this._translate(this.beforeShadow,0,a),this._translate(this.afterShadow,o),this._loopReset(!0)):t||e!==s.length-1?n=i:(n=0,this._translate(this.afterShadow,0,a),this._translate(this.beforeShadow,-o),this._loopReset(!1)),n}},{key:"_loopAdjust",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.loop){var n=this.offsetWidth,s=this.slides;t&&0===e?this._translate(this.beforeShadow,i-n):t||e!==s.length-1||this._translate(this.afterShadow,n+i)}}},{key:"_loopReset",value:function(t){var e=this,i=this.offsetWidth,n=this.slides;setTimeout((function(){t?(e._translate(n[n.length-1],0,0),e._translate(n[n.length-2],-i,0),e._translate(e.beforeShadow,i,0)):(e._translate(n[0],0,0),e._translate(n[1],i,0),e._translate(e.afterShadow,-i,0))}),this.duration)}},{key:"_lockEvent",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.lastNextAt=Date.now(),this.move=!0,setTimeout((function(){t.move=!1}),this.duration*e)}},{key:"_lockedSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="none")}},{key:"_unlockSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="auto")}},{key:"_isVerticalScroll",value:function(t){return Math.abs(t.x)<1.5*Math.abs(t.y)}},{key:"_isValidSlide",value:function(t){var e=Math.abs(t.x),i=Number(+new Date-this.startAt)<250&&e>20||e>this.offsetWidth/2;return this.startAt=0,i}},{key:"_translate",value:function(t,e){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t&&(t.style["".concat(this.cssPrefix,"transition-duration")]=n?"".concat(n,"ms"):"",requestAnimationFrame((function(){t.style["".concat(i.cssPrefix,"transform")]="translateX(".concat(e,"px)")})))}},{key:"_isEnded",value:function(t){if(this.loop)return!1;var e=t.x>0;return e&&0===this.index||!e&&this.index===this.slides.length-1}},{key:"_calcCssPrefix",value:function(){this.animated&&(this.cssPrefix=Object(n.c)())}}])&&a(e.prototype,i),o&&a(e,o),t}()},14:function(t,e,i){"use strict";var n=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-affix"},[e("div",{directives:[{name:"show",rawName:"v-show",value:this.showFixedShim,expression:"showFixedShim"}],style:this.fixedShimStyle}),this._v(" "),e("div",{ref:"wrap",class:{"v-affix--fixed":!this.disabled&&this.isFixed},style:this.fixedSlotStyle},[this._t("default")],2)])};n._withStripped=!0;i(21);var s=i(5),a=i(2),o={name:"VAffix",props:{fixedTop:{type:Number},disabled:{type:Boolean,default:!1}},data:function(){return{isFixed:!1,showFixedShim:!1,fixedShimStyle:{},fixedSlotStyle:{}}},mounted:function(){var t=this;if(void 0!==this.fixedTop){var e=Object(a.e)(this.$el);Object(s.b)(e,"scroll",this.handleScroll),Object(s.b)(e,"resize",this.handleScroll),this.$nextTick((function(){t.handleScroll()}))}},beforeDestroy:function(){if(void 0!==this.fixedTop){var t=Object(a.e)(this.$el);Object(s.a)(t,"scroll",this.handleScroll),Object(s.a)(t,"resize",this.handleScroll)}},methods:{handleScroll:function(){var t=this.isFixed,e=Object(a.d)(window,!0),i=Object(a.c)(this.$el);if(i.top-this.fixedTop<=e&&!t){this.isFixed=!0;var n=this.$refs.wrap;this.fixedShimStyle={width:"".concat(n.clientWidth,"px"),height:"".concat(n.clientHeight,"px")},this.showFixedShim=!0,this.fixedSlotStyle={top:"".concat(this.fixedTop,"px"),left:"".concat(i.left,"px"),width:"".concat(this.$el.offsetWidth,"px")},this.$emit("on-fixed",!0)}else i.top-this.fixedTop>e&&t&&(this.showFixedShim=!1,this.fixedShimStyle={},this.isFixed=!1,this.fixedSlotStyle=null,this.$emit("on-fixed",!1))}}},r=i(0),h=Object(r.a)(o,n,[],!1,null,null,null);h.options.__file="src/components/affix/affix.vue";e.a=h.exports},2:function(t,e,i){"use strict";i.d(e,"a",(function(){return n})),i.d(e,"f",(function(){return s})),i.d(e,"b",(function(){return r})),i.d(e,"d",(function(){return h})),i.d(e,"c",(function(){return c})),i.d(e,"e",(function(){return l}));var n=function(t,e){if(t){for(var i=t.className,n=(e||"").split(" "),s=0,a=n.length;s<a;s++){var r=n[s];r&&(t.classList?t.classList.add(r):o(t,r)||(i+=" "+r))}t.classList||(t.className=i)}},s=function(t,e){if(t&&e){for(var i=e.split(" "),n=" "+t.className+" ",s=0,r=i.length;s<r;s++){var h=i[s];h&&(t.classList?t.classList.remove(h):o(t,h)&&(n=n.replace(" "+h+" "," ")))}t.classList||(t.className=a(n))}},a=function(t){return(t||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},o=function(t,e){if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):(" "+t.className+" ").includes(" "+e+" ")},r=function(t,e){var i=-1;return t.map((function(t){return t.route})).forEach((function(t,n){e.startsWith(t)&&(i=n)})),i},h=function(t,e){var i=e?"scrollTop":"scrollLeft",n=t[e?"pageYOffset":"pageXOffset"];return"number"!=typeof n&&(n=window.document.documentElement[i]),n},c=function(t){var e=t.getBoundingClientRect(),i=h(window,!0),n=h(window),s=window.document.body,a=s.clientTop||0,o=s.clientLeft||0;return{top:e.top+i-a,left:e.left+n-o}},l=function(t){var e=t;if(!e)return null;for(;e&&"HTML"!==e.tagName&&"BOYD"!==e.tagName&&1===e.nodeType;){var i=window.getComputedStyle(e).overflowY;if("scroll"===i||"auto"===i)return"HTML"===e.tagName||"BODY"===e.tagName?document:e;e=e.parentNode}return document}},21:function(t,e,i){},30:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"v-switcher"},[i("v-affix",{directives:[{name:"show",rawName:"v-show",value:t.headerCount>1,expression:"headerCount > 1"}],attrs:{"fixed-top":t.fixedTop,disabled:void 0===t.fixedTop||t.headerCount<=1}},[i("div",{ref:"headerWrap",staticClass:"v-switcher__header",style:{height:t.headerHeight+"px"}},[i("div",{staticClass:"v-switcher__header__before"},[t._t("header-before")],2),t._v(" "),i("div",{staticClass:"v-switcher__header__after"},[t._t("header-after")],2),t._v(" "),i("div",{ref:"tabWrap",staticClass:"v-switcher__header__tabs__wrap"},[i("ul",{ref:"header",staticClass:"v-switcher__header__tabs__list",class:"v-switcher__header--"+t.align},[t._l(t.formatHeaders,(function(e,n){return i("li",{key:n,ref:"tab",refInFor:!0,staticClass:"v-switcher__header__tabs__item",class:{"is-active":n===t.focusIndex},style:t.headerItemStyle,on:{click:function(e){return t._handleTabSwitch(n)}}},[t._t("tab-"+n,[e.icon?i("i",{class:e.icon}):t._e(),t._v(" "),i("span",{domProps:{textContent:t._s(e.text)}})])],2)})),t._v(" "),i("div",{staticClass:"v-switcher__header__anchor",style:t.anchorStyle},[t._t("anchor")],2)],2)])])]),t._v(" "),t.routable?t._e():i("div",{ref:"content",staticClass:"v-switcher__content",class:"v-switcher__content--"+t.contentMode,style:t.contentWrapStyle},[i("div",{ref:"contentWrap",staticClass:"v-switcher__content__wrap"},t._l(t.headers,(function(e,n){return i("div",{key:n,staticClass:"v-switcher__content__item",class:{"is-active":~t.displayContent.indexOf(n)}},[t._t(n)],2)})),0)])],1)};n._withStripped=!0;i(52);var s=i(5),a=i(2),o=i(14),r=i(12);function h(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var c=function(){function t(e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e.el,this.vertical=e.vertical||!1,this.maxOffset=e.maxOffset||0,this.lastOffset=0,this.offset=0,this.delta=0,this.prefix=Object(s.c)(),this.events={},this.scroll(),this._bind(),this}var e,i,n;return e=t,(i=[{key:"scroll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.maxOffset){var i=t;t<this.maxOffset?i=this.maxOffset:t>0&&(i=0),this.el.style["".concat(this.prefix,"transition-duration")]=e?"".concat(e,"ms"):"",this.el.style["".concat(this.prefix,"transform")]=this.vertical?"translateY(".concat(i,"px)"):"translateX(".concat(i,"px)"),this.offset=i}}},{key:"reset",value:function(t,e){this.maxOffset=e,this.scroll(t)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart),t.removeEventListener("touchmove",e.touchmove),t.removeEventListener("touchend",e.touchend))}},{key:"_bind",value:function(){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart),t.addEventListener("touchmove",e.touchmove),t.addEventListener("touchend",e.touchend))}},{key:"_start",value:function(t){t.stopPropagation();var e=t.touches[0];this.delta=this.vertical?e.pageY:e.pageX}},{key:"_move",value:function(t){t.stopPropagation();var e=t.touches[0],i=(this.vertical?e.pageY:e.pageX)-this.delta,n=this.lastOffset+i;this.scroll(n)}},{key:"_end",value:function(t){t.stopPropagation(),this.lastOffset=this.offset}}])&&h(e.prototype,i),n&&h(e,n),t}(),l={name:"VSwitcher",components:{VAffix:o.a},props:{headers:{type:Array,required:!0},defaultIndex:{type:Number,default:0},routable:{type:Boolean,default:!1},align:{type:String,default:"start",validator:function(t){return~["around","start","center","end"].indexOf(t)}},anchorPadding:{type:Number,default:16,validator:function(t){return t>=0}},headerHeight:{type:Number,default:40,validator:function(t){return t>=0}},fixedTop:{type:Number},swipe:{type:Boolean,default:!0},sticky:{type:Boolean,default:!0},duration:{type:Number,default:300,validator:function(t){return t>=0}}},data:function(){return{focusIndex:this.routable?Object(a.b)(this.headers,this.$route.path):this.defaultIndex,oldFocusIndex:-1,anchorStyle:{},slider:null,scroller:null,sizeCache:{tabs:[],header:null,tabsWrapWidth:0,headerWrapWidth:0,headerScrollMaxSize:0}}},computed:{displayContent:function(){var t=this.focusIndex;return"swipe"===this.contentMode?[this.oldFocusIndex,t-1,t,t+1]:[t]},formatHeaders:function(){var t=this,e=[];return this.headers.forEach((function(i,n){e.push({text:t._computeItemText(i,n),icon:t._computeItemIcon(i,n)})})),e},headerCount:function(){return this.headers.length},headerItemStyle:function(){return{height:"".concat(this.headerHeight,"px"),lineHeight:"".concat(this.headerHeight,"px")}},contentWrapStyle:function(){return this.headerCount<=1?{}:{paddingTop:"".concat(this.headerHeight,"px"),marginTop:"-".concat(this.headerHeight,"px")}},contentMode:function(){return this.sticky&&this.duration&&this.swipe?"swipe":!this.swipe||this.sticky&&this.duration?"click":"slide"}},mounted:function(){var t=this;this.$nextTick((function(){t._setComponentSize(),t._initSwipe(),t._initScroller(),t._computeAnchorStyle(t.focusIndex),t._computeHeaderStyle(0),t.$watch("headers",(function(e){t.$nextTick((function(){var i=t.focusIndex;t._setComponentSize(),t.routable&&t._handleTabSwitch(Object(a.b)(e,t.$route.path)),i!==t.focusIndex&&(t._computeAnchorStyle(t.focusIndex),t._computeHeaderStyle(i))}))})),t.$watch("focusIndex",(function(e,i){t._computeAnchorStyle(e),t._computeHeaderStyle(i),t.$emit("change",e)})),t.routable&&t.$watch("$route",(function(e){t._handleTabSwitch(Object(a.b)(t.headers,e.path))})),t.$emit("change",t.focusIndex),Object(s.b)(window,"resize",t._setComponentSize)}))},beforeDestroy:function(){Object(s.a)(window,"resize",this._setComponentSize),this.slider&&this.slider.destroy(),this.scroller&&this.scroller.destroy()},methods:{slide:function(t){t<0||t>this.headerCount-1||this._handleTabSwitch(t)},_initSwipe:function(){var t=this;"click"!==this.contentMode&&(this.slider=new r.a({wrap:this.$refs.contentWrap,loop:!1,index:this.focusIndex,animated:"swipe"===this.contentMode,duration:this.duration,callback:function(e){t.focusIndex=e}}))},_initScroller:function(){"start"===this.align&&(this.scroller=new c({el:this.$refs.header,maxOffset:this.sizeCache.headerScrollMaxSize}))},_handleTabSwitch:function(t){if(this.slider){if(this.slider.move)return;this.oldFocusIndex=this.focusIndex,this.slider.slide(t)}this.focusIndex=t,t<0&&(this.anchorStyle.transform="translateX(-100%)")},_computeHeaderStyle:function(t){var e=this;if(0!==this.sizeCache.headerScrollMaxSize){var i=this.focusIndex;if(!(i<0)){var n=this.scroller?this.scroller.offset:0,s=this.sizeCache.headerScrollMaxSize;if(i)if(i===this.headerCount-1)n=s;else{var a=this._getComponentSize("tabs",0).left,o=this._getComponentSize("tabs",i),r=function(){var t=e._getComponentSize("tabs",i+1).right-a-e.sizeCache.tabsWrapWidth;t>0&&(n=-t);var s=o.left-a;n+s<0&&(n=-s)};if(t>i){var h=this._getComponentSize("tabs",i-1);if(h.left+n<a){n=a-h.left;var c=o.right-a-this.sizeCache.tabsWrapWidth;c>n>0&&(n=-c)}else r()}else r()}else n=0;n<s?n=s:n>0&&(n=0),this.scroller&&this.scroller.scroll(n,this.duration)}}},_computeAnchorStyle:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(t<0)){var n=this._getComponentSize("tabs",t);if(n){var s=+this.anchorPadding,a=this._getComponentSize("header"),o="around"===this.align;this.anchorStyle={width:"".concat(o?n.width:n.width-2*s,"px"),transform:"translateX(".concat(o?n.left-a.left:n.left-a.left+s,"px)"),transitionDuration:"".concat(this.duration,"ms")}}else i<5&&setTimeout((function(){e._computeAnchorStyle(e.focusIndex,i+1)}),200)}},_computeItemText:function(t,e){var i;if("string"==typeof t)i=t;else if(i=t.label||t.name||t.text,this.focusIndex===e){var n=t["label-active"]||t["name-active"]||t["text-active"];n&&(i=n)}return i},_computeItemIcon:function(t,e){var i;return"string"!=typeof t&&t.icon?(i=t.icon,this.focusIndex===e&&t["icon-active"]&&(i=t["icon-active"])):i="",i},_setComponentSize:function(){var t=this.$refs.tab;if(t){var e=[];t.forEach((function(t){var i=t.getBoundingClientRect();e.push({top:i.top,left:i.left,right:i.right,bottom:i.bottom,width:i.width,height:i.height})})),this.sizeCache.tabs=e}var i=this.$refs.headerWrap;i&&(this.sizeCache.headerWrapWidth=i.clientWidth);var n=this.$refs.tabWrap;n&&(this.sizeCache.tabsWrapWidth=n.clientWidth);var s=this.$refs.header;if(s){var a=s.getBoundingClientRect();this.sizeCache.header={top:a.top,left:a.left,right:a.right,bottom:a.bottom}}var o=this.sizeCache.tabs[this.headerCount-1].right-this.sizeCache.tabs[0].left;this.sizeCache.headerScrollMaxSize=o<this.sizeCache.tabsWrapWidth?0:this.sizeCache.tabsWrapWidth-o},_getComponentSize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=this.sizeCache[t];return i?e>=0?i[e]?i[e]:null:i:null}}},d=i(0),u=Object(d.a)(l,n,[],!1,null,null,null);u.options.__file="src/components/switcher/switcher.vue";var f=u.exports;e.default=f},5:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return s})),i.d(e,"c",(function(){return a}));var n=function(){if("undefined"!=typeof window)return document.addEventListener?function(t,e,i){t&&e&&i&&t.addEventListener(e,i,!1)}:function(t,e,i){t&&e&&i&&t.attachEvent("on"+e,i)}}(),s=function(){if("undefined"!=typeof window)return document.removeEventListener?function(t,e,i){t&&e&&t.removeEventListener(e,i,!1)}:function(t,e,i){t&&e&&t.detachEvent("on"+e,i)}}(),a=function(){var t="",e=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,i=document.getElementsByTagName("script")[0].style;for(var n in i)e.test(n)&&(t="-"+n.match(e)[0].toLowerCase()+"-");return!t&&"WebkitOpacity"in i&&(t="-webkit-"),!t&&"KhtmlOpacity"in i&&(t="-khtml-"),t}},52:function(t,e,i){}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(n,s,function(e){return t[e]}.bind(null,s));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=30)}({0:function(t,e,i){"use strict";function n(t,e,i,n,s,a,o,r){var h,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=i,c._compiled=!0),n&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),o?(h=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__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=h):s&&(h=r?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(c.functional){c._injectStyles=h;var l=c.render;c.render=function(t,e){return h.call(e),l(t,e)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,h):[h]}return{exports:t,options:c}}i.d(e,"a",(function(){return n}))},12:function(t,e,i){"use strict";i.d(e,"a",(function(){return o}));var n=i(5);function s(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function a(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=function(){function t(e){var i=this;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.wrap=e.wrap,this.loop=e.loop,this.index=e.index,this.animated=e.animated,this.duration=e.duration,this.callback=e.callback,this._calcCssPrefix(),this._setupConst(),this.loop?setTimeout((function(){i._useAnimate(),i._cloneShadow(),i._bindEvents()}),0):(this._useAnimate(),this._cloneShadow(),this._bindEvents()),this}var e,i,o;return e=t,(i=[{key:"slide",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];t===this.index||this.move||(this._lockEvent(1.2),this._animateSlide(t,this.index,e))}},{key:"next",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=this.slides.length;1===e||this.touching||this.move||this.index===e-1&&!this.loop||t&&Date.now()-this.lastNextAt<t||this.slide(this.index+1,!0)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart,{passive:!0}),t.removeEventListener("touchmove",e.touchmove,{passive:!0}),t.removeEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_updateEvents",value:function(t){this.destroy(),this.el=this.slides[t],this.index=t,this.events={},this._bindEvents()}},{key:"_setupConst",value:function(){this.slides=s(this.wrap.children),this.startAt=0,this.lastNextAt=0,this.move=!1,this.touching=!1,this.isMoveSlide=!1,this.maxDeltaPoint={x:0,y:0},this.deltaPoint={x:0,y:0},this.el=this.slides[this.index],this.events={}}},{key:"_cloneShadow",value:function(){var t=this.slides,e=this.index,i=this.offsetWidth;if(this.loop&&1!==t.length){var n=t[t.length-1].cloneNode(!0),s=t[0].cloneNode(!0);this.wrap.appendChild(n),this.wrap.appendChild(s),n.style.transform="translateX(".concat((-1-e)*i,"px)"),s.style.transform="translateX(".concat((t.length-e)*i,"px)"),this.beforeShadow=n,this.afterShadow=s}}},{key:"_useAnimate",value:function(){var t=this,e=this.wrap,i=e.offsetWidth;if(i||setTimeout((function(){t._useAnimate()}),200),this.offsetWidth=i,this.animated){var n=this.slides,s=this.index,a=n.length;if(a<=1)return e.style.visibility="visible",void[].forEach.call(n,(function(t){t.style.transform="translateX(0px)"}));e.style.width="".concat(100*a,"%");var o="".concat(100/a,"%");[].forEach.call(n,(function(t,e){t.style.width=o,t.style.transform="translateX(".concat((e-s)*i,"px)")})),e.style.visibility="visible"}else e.style.visibility="visible"}},{key:"_bindEvents",value:function(){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart,{passive:!0}),t.addEventListener("touchmove",e.touchmove,{passive:!0}),t.addEventListener("touchend",e.touchend,{passive:!0}))}},{key:"_start",value:function(t){this.touching=!0;var e=t.touches[0];this.startPoint={x:e.pageX,y:e.pageY},this.startAt=+new Date}},{key:"_move",value:function(t){var e=t.touches[0],i=this.startPoint,n=this.maxDeltaPoint,s={x:e.pageX-i.x,y:e.pageY-i.y};if(this.maxDeltaPoint={x:Math.max(n.x,Math.abs(s.x)),y:Math.max(n.y,Math.abs(s.y))},this.deltaPoint=s,this.isMoveSlide=!0,this._lockedSwipeEvents(),!this._isVerticalScroll(this.maxDeltaPoint)&&this.animated&&!this._isEnded(s)){var a=s.x,o=a>0,r=this.slides,h=this.index,c=this.offsetWidth;this._translate(r[h],a),o?this._translate(r[h-1],a-c):this._translate(r[h+1],c+a),this._loopAdjust(o,h,a)}}},{key:"_end",value:function(){if(this.touching=!1,this.startAt&&this.isMoveSlide){this.isMoveSlide=!1,this._unlockSwipeEvents();var t=this.maxDeltaPoint,e=this.deltaPoint,i=this.offsetWidth,n=e.x>0;if(this.maxDeltaPoint={x:0,y:0},this._isVerticalScroll(t)||this._isEnded(e)||!this._isValidSlide(e)){if(!this.animated)return;var s=this.slides,a=this.index,o=this.duration;return this._translate(s[a],0,o),n?(this._translate(s[a-1],-i,o),this._translate(s[a+1],i)):(this._translate(s[a+1],i,o),this._translate(s[a-1],-i)),this.loop&&(n&&0===a?this._translate(this.beforeShadow,-i,o):n||a!==s.length-1||this._translate(this.afterShadow,i,o)),void this._lockEvent()}var r=n?this.index-1:this.index+1;if(this.animated){var h=this.slides,c=this.index,l=this.duration;this._translate(h[c],n?i:-i,l),this._translate(h[c-1],n?0:-i,n?l:0),this._translate(h[c+1],n?i:0,n?0:l),this.loop&&(r=this._loopJump(n,c,r))}this.callback&&this.callback(r),this._updateEvents(r),this._lockEvent()}}},{key:"_animateSlide",value:function(t,e,i){var n=this;if(this.animated){var s=this.offsetWidth,a=this.slides,o=this.duration,r=t<e;this._loopAdjust(r,t),this._translate(a[t],r?-s:s);var h=t;setTimeout((function(){n._translate(a[t],0,o),n._translate(a[e],r?s:-s,o),e!==t+1&&n._translate(a[t+1],s),e!==t-1&&n._translate(a[t-1],-s),n.loop&&(h=n._loopJump(r,e,t)),n._updateEvents(h),i&&setTimeout((function(){n.callback&&n.callback(h)}),n.duration)}),0)}}},{key:"_loopJump",value:function(t,e,i){var n,s=this.slides,a=this.duration,o=this.offsetWidth;return t&&0===e?(n=s.length-1,this._translate(this.beforeShadow,0,a),this._translate(this.afterShadow,o),this._loopReset(!0)):t||e!==s.length-1?n=i:(n=0,this._translate(this.afterShadow,0,a),this._translate(this.beforeShadow,-o),this._loopReset(!1)),n}},{key:"_loopAdjust",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(this.loop){var n=this.offsetWidth,s=this.slides;t&&0===e?this._translate(this.beforeShadow,i-n):t||e!==s.length-1||this._translate(this.afterShadow,n+i)}}},{key:"_loopReset",value:function(t){var e=this,i=this.offsetWidth,n=this.slides;setTimeout((function(){t?(e._translate(n[n.length-1],0,0),e._translate(n[n.length-2],-i,0),e._translate(e.beforeShadow,i,0)):(e._translate(n[0],0,0),e._translate(n[1],i,0),e._translate(e.afterShadow,-i,0))}),this.duration)}},{key:"_lockEvent",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.lastNextAt=Date.now(),this.move=!0,setTimeout((function(){t.move=!1}),this.duration*e)}},{key:"_lockedSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="none")}},{key:"_unlockSwipeEvents",value:function(){this.animated&&(this.el.style["touch-action"]="auto")}},{key:"_isVerticalScroll",value:function(t){return Math.abs(t.x)<1.5*Math.abs(t.y)}},{key:"_isValidSlide",value:function(t){var e=Math.abs(t.x),i=Number(+new Date-this.startAt)<250&&e>20||e>this.offsetWidth/2;return this.startAt=0,i}},{key:"_translate",value:function(t,e){var i=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t&&(t.style["".concat(this.cssPrefix,"transition-duration")]=n?"".concat(n,"ms"):"",requestAnimationFrame((function(){t.style["".concat(i.cssPrefix,"transform")]="translateX(".concat(e,"px)")})))}},{key:"_isEnded",value:function(t){if(this.loop)return!1;var e=t.x>0;return e&&0===this.index||!e&&this.index===this.slides.length-1}},{key:"_calcCssPrefix",value:function(){this.animated&&(this.cssPrefix=Object(n.c)())}}])&&a(e.prototype,i),o&&a(e,o),t}()},14:function(t,e,i){"use strict";var n=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-affix"},[e("div",{directives:[{name:"show",rawName:"v-show",value:this.showFixedShim,expression:"showFixedShim"}],style:this.fixedShimStyle}),this._v(" "),e("div",{ref:"wrap",class:{"v-affix--fixed":!this.disabled&&this.isFixed},style:this.fixedSlotStyle},[this._t("default")],2)])};n._withStripped=!0;i(21);var s=i(5),a=i(2),o={name:"VAffix",props:{fixedTop:{type:Number},disabled:{type:Boolean,default:!1}},data:function(){return{isFixed:!1,showFixedShim:!1,fixedShimStyle:{},fixedSlotStyle:{}}},mounted:function(){var t=this;if(void 0!==this.fixedTop){var e=Object(a.e)(this.$el);Object(s.b)(e,"scroll",this.handleScroll),Object(s.b)(e,"resize",this.handleScroll),this.$nextTick((function(){t.handleScroll()}))}},beforeDestroy:function(){if(void 0!==this.fixedTop){var t=Object(a.e)(this.$el);Object(s.a)(t,"scroll",this.handleScroll),Object(s.a)(t,"resize",this.handleScroll)}},methods:{handleScroll:function(){var t=this.isFixed,e=Object(a.d)(window,!0),i=Object(a.c)(this.$el);if(i.top-this.fixedTop<=e&&!t){this.isFixed=!0;var n=this.$refs.wrap;this.fixedShimStyle={width:"".concat(n.clientWidth,"px"),height:"".concat(n.clientHeight,"px")},this.showFixedShim=!0,this.fixedSlotStyle={top:"".concat(this.fixedTop,"px"),left:"".concat(i.left,"px"),width:"".concat(this.$el.offsetWidth,"px")},this.$emit("on-fixed",!0)}else i.top-this.fixedTop>e&&t&&(this.showFixedShim=!1,this.fixedShimStyle={},this.isFixed=!1,this.fixedSlotStyle=null,this.$emit("on-fixed",!1))}}},r=i(0),h=Object(r.a)(o,n,[],!1,null,null,null);h.options.__file="src/components/affix/affix.vue";e.a=h.exports},2:function(t,e,i){"use strict";i.d(e,"a",(function(){return n})),i.d(e,"f",(function(){return s})),i.d(e,"b",(function(){return r})),i.d(e,"d",(function(){return h})),i.d(e,"c",(function(){return c})),i.d(e,"e",(function(){return l}));var n=function(t,e){if(t){for(var i=t.className,n=(e||"").split(" "),s=0,a=n.length;s<a;s++){var r=n[s];r&&(t.classList?t.classList.add(r):o(t,r)||(i+=" "+r))}t.classList||(t.className=i)}},s=function(t,e){if(t&&e){for(var i=e.split(" "),n=" "+t.className+" ",s=0,r=i.length;s<r;s++){var h=i[s];h&&(t.classList?t.classList.remove(h):o(t,h)&&(n=n.replace(" "+h+" "," ")))}t.classList||(t.className=a(n))}},a=function(t){return(t||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")},o=function(t,e){if(!t||!e)return!1;if(e.includes(" "))throw new Error("className should not contain space.");return t.classList?t.classList.contains(e):(" "+t.className+" ").includes(" "+e+" ")},r=function(t,e){var i=-1;return t.map((function(t){return t.route})).forEach((function(t,n){e.startsWith(t)&&(i=n)})),i},h=function(t,e){var i=e?"scrollTop":"scrollLeft",n=t[e?"pageYOffset":"pageXOffset"];return"number"!=typeof n&&(n=window.document.documentElement[i]),n},c=function(t){var e=t.getBoundingClientRect(),i=h(window,!0),n=h(window),s=window.document.body,a=s.clientTop||0,o=s.clientLeft||0;return{top:e.top+i-a,left:e.left+n-o}},l=function(t){var e=t;if(!e)return null;for(;e&&"HTML"!==e.tagName&&"BOYD"!==e.tagName&&1===e.nodeType;){var i=window.getComputedStyle(e).overflowY;if("scroll"===i||"auto"===i)return"HTML"===e.tagName||"BODY"===e.tagName?document:e;e=e.parentNode}return document}},21:function(t,e,i){},30:function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"v-switcher"},[i("v-affix",{directives:[{name:"show",rawName:"v-show",value:t.headerCount>1,expression:"headerCount > 1"}],attrs:{"fixed-top":t.fixedTop,disabled:void 0===t.fixedTop||t.headerCount<=1}},[i("div",{ref:"headerWrap",staticClass:"v-switcher__header",style:{height:t.headerHeight+"px"}},[i("div",{staticClass:"v-switcher__header__before"},[t._t("header-before")],2),t._v(" "),i("div",{staticClass:"v-switcher__header__after"},[t._t("header-after")],2),t._v(" "),i("div",{ref:"tabWrap",staticClass:"v-switcher__header__tabs__wrap"},[i("ul",{ref:"header",staticClass:"v-switcher__header__tabs__list",class:"v-switcher__header--"+t.align},[t._l(t.formatHeaders,(function(e,n){return i("li",{key:n,ref:"tab",refInFor:!0,staticClass:"v-switcher__header__tabs__item",class:{"is-active":n===t.focusIndex},style:t.headerItemStyle,on:{click:function(e){return t._handleTabSwitch(n)}}},[t._t("tab-"+n,[e.icon?i("i",{class:e.icon}):t._e(),t._v(" "),i("span",{domProps:{textContent:t._s(e.text)}})])],2)})),t._v(" "),i("div",{staticClass:"v-switcher__header__anchor",style:t.anchorStyle},[t._t("anchor")],2)],2)])])]),t._v(" "),t.routable?t._e():i("div",{ref:"content",staticClass:"v-switcher__content",class:"v-switcher__content--"+t.contentMode,style:t.contentWrapStyle},[i("div",{ref:"contentWrap",staticClass:"v-switcher__content__wrap"},t._l(t.headers,(function(e,n){return i("div",{key:n,staticClass:"v-switcher__content__item",class:{"is-active":~t.displayContent.indexOf(n)}},[t._t(n)],2)})),0)])],1)};n._withStripped=!0;i(53);var s=i(5),a=i(2),o=i(14),r=i(12);function h(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var c=function(){function t(e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e.el,this.vertical=e.vertical||!1,this.maxOffset=e.maxOffset||0,this.lastOffset=0,this.offset=0,this.delta=0,this.prefix=Object(s.c)(),this.events={},this.scroll(),this._bind(),this}var e,i,n;return e=t,(i=[{key:"scroll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.maxOffset){var i=t;t<this.maxOffset?i=this.maxOffset:t>0&&(i=0),this.el.style["".concat(this.prefix,"transition-duration")]=e?"".concat(e,"ms"):"",this.el.style["".concat(this.prefix,"transform")]=this.vertical?"translateY(".concat(i,"px)"):"translateX(".concat(i,"px)"),this.offset=i}}},{key:"reset",value:function(t,e){this.maxOffset=e,this.scroll(t)}},{key:"destroy",value:function(){var t=this.el,e=this.events;t&&(t.removeEventListener("touchstart",e.touchstart),t.removeEventListener("touchmove",e.touchmove),t.removeEventListener("touchend",e.touchend))}},{key:"_bind",value:function(){var t=this.el,e=this.events;t&&(e.touchstart=this._start.bind(this),e.touchmove=this._move.bind(this),e.touchend=this._end.bind(this),t.addEventListener("touchstart",e.touchstart),t.addEventListener("touchmove",e.touchmove),t.addEventListener("touchend",e.touchend))}},{key:"_start",value:function(t){t.stopPropagation();var e=t.touches[0];this.delta=this.vertical?e.pageY:e.pageX}},{key:"_move",value:function(t){t.stopPropagation();var e=t.touches[0],i=(this.vertical?e.pageY:e.pageX)-this.delta,n=this.lastOffset+i;this.scroll(n)}},{key:"_end",value:function(t){t.stopPropagation(),this.lastOffset=this.offset}}])&&h(e.prototype,i),n&&h(e,n),t}(),l={name:"VSwitcher",components:{VAffix:o.a},props:{headers:{type:Array,required:!0},defaultIndex:{type:Number,default:0},routable:{type:Boolean,default:!1},align:{type:String,default:"start",validator:function(t){return~["around","start","center","end"].indexOf(t)}},anchorPadding:{type:Number,default:16,validator:function(t){return t>=0}},headerHeight:{type:Number,default:40,validator:function(t){return t>=0}},fixedTop:{type:Number},swipe:{type:Boolean,default:!0},sticky:{type:Boolean,default:!0},duration:{type:Number,default:300,validator:function(t){return t>=0}}},data:function(){return{focusIndex:this.routable?Object(a.b)(this.headers,this.$route.path):this.defaultIndex,oldFocusIndex:-1,anchorStyle:{},slider:null,scroller:null,sizeCache:{tabs:[],header:null,tabsWrapWidth:0,headerWrapWidth:0,headerScrollMaxSize:0}}},computed:{displayContent:function(){var t=this.focusIndex;return"swipe"===this.contentMode?[this.oldFocusIndex,t-1,t,t+1]:[t]},formatHeaders:function(){var t=this,e=[];return this.headers.forEach((function(i,n){e.push({text:t._computeItemText(i,n),icon:t._computeItemIcon(i,n)})})),e},headerCount:function(){return this.headers.length},headerItemStyle:function(){return{height:"".concat(this.headerHeight,"px"),lineHeight:"".concat(this.headerHeight,"px")}},contentWrapStyle:function(){return this.headerCount<=1?{}:{paddingTop:"".concat(this.headerHeight,"px"),marginTop:"-".concat(this.headerHeight,"px")}},contentMode:function(){return this.sticky&&this.duration&&this.swipe?"swipe":!this.swipe||this.sticky&&this.duration?"click":"slide"}},mounted:function(){var t=this;this.$nextTick((function(){t._setComponentSize(),t._initSwipe(),t._initScroller(),t._computeAnchorStyle(t.focusIndex),t._computeHeaderStyle(0),t.$watch("headers",(function(e){t.$nextTick((function(){var i=t.focusIndex;t._setComponentSize(),t.routable&&t._handleTabSwitch(Object(a.b)(e,t.$route.path)),i!==t.focusIndex&&(t._computeAnchorStyle(t.focusIndex),t._computeHeaderStyle(i))}))})),t.$watch("focusIndex",(function(e,i){t._computeAnchorStyle(e),t._computeHeaderStyle(i),t.$emit("change",e)})),t.routable&&t.$watch("$route",(function(e){t._handleTabSwitch(Object(a.b)(t.headers,e.path))})),t.$emit("change",t.focusIndex),Object(s.b)(window,"resize",t._setComponentSize)}))},beforeDestroy:function(){Object(s.a)(window,"resize",this._setComponentSize),this.slider&&this.slider.destroy(),this.scroller&&this.scroller.destroy()},methods:{slide:function(t){t<0||t>this.headerCount-1||this._handleTabSwitch(t)},_initSwipe:function(){var t=this;"click"!==this.contentMode&&(this.slider=new r.a({wrap:this.$refs.contentWrap,loop:!1,index:this.focusIndex,animated:"swipe"===this.contentMode,duration:this.duration,callback:function(e){t.focusIndex=e}}))},_initScroller:function(){"start"===this.align&&(this.scroller=new c({el:this.$refs.header,maxOffset:this.sizeCache.headerScrollMaxSize}))},_handleTabSwitch:function(t){if(this.slider){if(this.slider.move)return;this.oldFocusIndex=this.focusIndex,this.slider.slide(t)}this.focusIndex=t,t<0&&(this.anchorStyle.transform="translateX(-100%)")},_computeHeaderStyle:function(t){var e=this;if(0!==this.sizeCache.headerScrollMaxSize){var i=this.focusIndex;if(!(i<0)){var n=this.scroller?this.scroller.offset:0,s=this.sizeCache.headerScrollMaxSize;if(i)if(i===this.headerCount-1)n=s;else{var a=this._getComponentSize("tabs",0).left,o=this._getComponentSize("tabs",i),r=function(){var t=e._getComponentSize("tabs",i+1).right-a-e.sizeCache.tabsWrapWidth;t>0&&(n=-t);var s=o.left-a;n+s<0&&(n=-s)};if(t>i){var h=this._getComponentSize("tabs",i-1);if(h.left+n<a){n=a-h.left;var c=o.right-a-this.sizeCache.tabsWrapWidth;c>n>0&&(n=-c)}else r()}else r()}else n=0;n<s?n=s:n>0&&(n=0),this.scroller&&this.scroller.scroll(n,this.duration)}}},_computeAnchorStyle:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(t<0)){var n=this._getComponentSize("tabs",t);if(n){var s=+this.anchorPadding,a=this._getComponentSize("header"),o="around"===this.align;this.anchorStyle={width:"".concat(o?n.width:n.width-2*s,"px"),transform:"translateX(".concat(o?n.left-a.left:n.left-a.left+s,"px)"),transitionDuration:"".concat(this.duration,"ms")}}else i<5&&setTimeout((function(){e._computeAnchorStyle(e.focusIndex,i+1)}),200)}},_computeItemText:function(t,e){var i;if("string"==typeof t)i=t;else if(i=t.label||t.name||t.text,this.focusIndex===e){var n=t["label-active"]||t["name-active"]||t["text-active"];n&&(i=n)}return i},_computeItemIcon:function(t,e){var i;return"string"!=typeof t&&t.icon?(i=t.icon,this.focusIndex===e&&t["icon-active"]&&(i=t["icon-active"])):i="",i},_setComponentSize:function(){var t=this.$refs.tab;if(t){var e=[];t.forEach((function(t){var i=t.getBoundingClientRect();e.push({top:i.top,left:i.left,right:i.right,bottom:i.bottom,width:i.width,height:i.height})})),this.sizeCache.tabs=e}var i=this.$refs.headerWrap;i&&(this.sizeCache.headerWrapWidth=i.clientWidth);var n=this.$refs.tabWrap;n&&(this.sizeCache.tabsWrapWidth=n.clientWidth);var s=this.$refs.header;if(s){var a=s.getBoundingClientRect();this.sizeCache.header={top:a.top,left:a.left,right:a.right,bottom:a.bottom}}var o=this.sizeCache.tabs[this.headerCount-1].right-this.sizeCache.tabs[0].left;this.sizeCache.headerScrollMaxSize=o<this.sizeCache.tabsWrapWidth?0:this.sizeCache.tabsWrapWidth-o},_getComponentSize:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=this.sizeCache[t];return i?e>=0?i[e]?i[e]:null:i:null}}},d=i(0),u=Object(d.a)(l,n,[],!1,null,null,null);u.options.__file="src/components/switcher/switcher.vue";var f=u.exports;e.default=f},5:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"a",(function(){return s})),i.d(e,"c",(function(){return a}));var n=function(){if("undefined"!=typeof window)return document.addEventListener?function(t,e,i){t&&e&&i&&t.addEventListener(e,i,!1)}:function(t,e,i){t&&e&&i&&t.attachEvent("on"+e,i)}}(),s=function(){if("undefined"!=typeof window)return document.removeEventListener?function(t,e,i){t&&e&&t.removeEventListener(e,i,!1)}:function(t,e,i){t&&e&&t.detachEvent("on"+e,i)}}(),a=function(){var t="",e=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,i=document.getElementsByTagName("script")[0].style;for(var n in i)e.test(n)&&(t="-"+n.match(e)[0].toLowerCase()+"-");return!t&&"WebkitOpacity"in i&&(t="-webkit-"),!t&&"KhtmlOpacity"in i&&(t="-khtml-"),t}},53:function(t,e,i){}})})); |
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=37)}({0:function(e,t,n){"use strict";function o(e,t,n,o,i,r,s,l){var a,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=a):i&&(a=l?function(){i.call(this,this.$root.$options.shadowRoot)}:i),a)if(c.functional){c._injectStyles=a;var u=c.render;c.render=function(e,t){return a.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,a):[a]}return{exports:e,options:c}}n.d(t,"a",(function(){return o}))},37:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this.$createElement,t=this._self._c||e;return t("button",{staticClass:"v-toggle",class:[{"v-toggle--disabled":this.disabled,"v-toggle--loading":this.loading},[this.isAndroid?"v-toggle--md":"v-toggle--ios"],[this.selected?"v-toggle--on":"v-toggle--off"]],on:{click:this.handle}},[t("span",{staticClass:"v-toggle__core"},[this.loading?t("svg",{attrs:{viewBox:"25 25 50 50"}},[t("circle",{attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]):this._e()])])};o._withStripped=!0;n(53);var i={name:"VToggle",props:{value:{type:Boolean,required:!0},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},confirm:{type:Function,default:null}},data:function(){return{selected:this.value}},computed:{isAndroid:function(){return!!this.$sakura&&this.$sakura.md}},watch:{value:function(e){this.selected=e},selected:function(e){this.$emit("input",e)}},methods:{handle:function(){var e=this;if(!this.disabled&&!this.loading)if(this.confirm){var t=this.confirm();t?t.then((function(){e.change()})):this.change()}else this.change()},change:function(){this.selected=!this.selected,this.$emit("change",this.selected)}}},r=n(0),s=Object(r.a)(i,o,[],!1,null,null,null);s.options.__file="src/components/toggle/toggle.vue";var l=s.exports;t.default=l},53:function(e,t,n){}})})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["@calibur/sakura"]=t():e["@calibur/sakura"]=t()}(this,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=37)}({0:function(e,t,n){"use strict";function o(e,t,n,o,i,r,s,l){var a,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=n,c._compiled=!0),o&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),s?(a=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=a):i&&(a=l?function(){i.call(this,this.$root.$options.shadowRoot)}:i),a)if(c.functional){c._injectStyles=a;var u=c.render;c.render=function(e,t){return a.call(t),u(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,a):[a]}return{exports:e,options:c}}n.d(t,"a",(function(){return o}))},37:function(e,t,n){"use strict";n.r(t);var o=function(){var e=this.$createElement,t=this._self._c||e;return t("button",{staticClass:"v-toggle",class:[{"v-toggle--disabled":this.disabled,"v-toggle--loading":this.loading},[this.isAndroid?"v-toggle--md":"v-toggle--ios"],[this.selected?"v-toggle--on":"v-toggle--off"]],on:{click:this.handle}},[t("span",{staticClass:"v-toggle__core"},[this.loading?t("svg",{attrs:{viewBox:"25 25 50 50"}},[t("circle",{attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})]):this._e()])])};o._withStripped=!0;n(54);var i={name:"VToggle",props:{value:{type:Boolean,required:!0},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},confirm:{type:Function,default:null}},data:function(){return{selected:this.value}},computed:{isAndroid:function(){return!!this.$sakura&&this.$sakura.md}},watch:{value:function(e){this.selected=e},selected:function(e){this.$emit("input",e)}},methods:{handle:function(){var e=this;if(!this.disabled&&!this.loading)if(this.confirm){var t=this.confirm();t?t.then((function(){e.change()})):this.change()}else this.change()},change:function(){this.selected=!this.selected,this.$emit("change",this.selected)}}},r=n(0),s=Object(r.a)(i,o,[],!1,null,null,null);s.options.__file="src/components/toggle/toggle.vue";var l=s.exports;t.default=l},54:function(e,t,n){}})})); |
@@ -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["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=29)}({0:function(t,e,r){"use strict";function n(t,e,r,n,i,s,o,a){var u,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=r,c._compiled=!0),n&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),o?(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__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=u):i&&(u=a?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(t,e){return u.call(e),l(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,u):[u]}return{exports:t,options:c}}r.d(e,"a",(function(){return n}))},29:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"v-uploader",class:{"v-uploader--custom":t.hasSlot}},[t._t("list",[t.fileList.length?r("span",{staticClass:"v-uploader__files"},t._l(t.fileList,(function(e,n){return r("div",{key:n+e.id,staticClass:"v-uploader__item"},[e.url?r("img",{staticClass:"v-uploader__item__poster",attrs:{src:e.url}}):t._e(),t._v(" "),"loading"!==e.status&&1!==t.limit?r("i",{staticClass:"bili-font ic_input_close v-uploader__item__cancel",on:{click:function(e){return t.remove(n)}}}):t._e(),t._v(" "),"loading"===e.status?r("div",{staticClass:"v-uploader__item__loading v-uploader__item__mask"},[r("div")]):t._e(),t._v(" "),"success"===e.status?r("div",{staticClass:"v-uploader__item__status is-success"},[r("i",{staticClass:"bili-font ic_success"})]):t._e(),t._v(" "),"error"===e.status?r("div",{staticClass:"v-uploader__item__mask"},[r("span",{domProps:{textContent:t._s(e.message)}}),t._v(" "),t._m(0,!0)]):t._e()])})),0):t._e()],{list:t.fileList}),t._v(" "),r("div",{staticClass:"v-uploader__action",on:{click:t._emitActionClick}},[r("input",{ref:"input",attrs:{multiple:1!==t.limit,disabled:t.isDisabled,accept:t.fileAccept,type:"file",name:"file"},on:{change:t._handleInputSelect}}),t._v(" "),r("div",{staticClass:"v-uploader__action__wrap"},[t._t("action",[t._m(1)])],2)])],2)};n._withStripped=!0;var i=r(3);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var u=function(t){var e=new RegExp("(^| )"+t+"=([^;]*)(;|$)"),r=document.cookie.match(e);return r?unescape(r[2]):null};function c(t){if(!t)return[];var e=function(t){var e={};return"string"==typeof t?(e.url=t,e.status="success"):(t.id&&(e.id=t.id),t.url&&(e.url=t.url),t.url&&t.url.startsWith("http")?(e.status="success",e.data=t):e=o({},e,{},t)),o({},{id:Math.random().toString(36).substring(3,6),url:"",status:"",message:"",data:null,file:null},{},e)};return Object(i.a)(t)?t.map(e):e(t)}r(55);function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var p={name:"VUploader",props:{value:{type:[Array,Object,String],default:""},url:{type:String,default:"//api.bilibili.com/x/upload/web/image"},bucket:{type:String,default:""},disabled:{type:Boolean,default:!1},accept:{type:[String,Array],default:"image/*"},limit:{type:Number,default:1,validator:function(t){return t>=1}},oversize:{type:[String,Number],default:0,validator:function(t){return t>=0}},cookie:{type:Boolean,default:!0},auto:{type:Boolean,default:!0},http:{type:Function,default:function(t){if("undefined"!=typeof XMLHttpRequest){var e=new XMLHttpRequest,r=t.action;e.onerror=function(e){t.onError(e)},e.onload=function(){if(e.status<200||e.status>=400)return t.onError(function(t,e,r){var n;n=r.response?"".concat(r.response.error||r.response):r.responseText?"".concat(r.responseText):"fail to post ".concat(t," ").concat(r.status);var i=new Error(n);return i.status=r.status,i.method="post",i.url=t,i}(r,0,e));t.onSuccess(function(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch(r){return e}}(e))},e.open("POST",r,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var n={Accept:"application/json, text/plain, */*"};return"setRequestHeader"in e&&Object.keys(n).forEach((function(t){e.setRequestHeader(t,n[t])})),e.send(t.data),e}}},transformRequest:{type:Function,default:function(t){return t.csrf=u("bili_jct"),t}},transformResponse:{type:Function,default:function(t){return t&&0===t.code?{url:t.data.location,data:t.data}:t}}},data:function(){return{fileList:Object(i.a)(this.value)?c(this.value.slice(0,this.limit)):c(this.value)}},computed:{hasSlot:function(){return this.$slots.action||this.$slots.list},isDisabled:function(){return this.disabled||this.fileList.length>this.limit},fileAccept:function(){return"string"==typeof this.accept?this.accept:this.accept.map((function(t){return t.startsWith("image/")?t:"image/".concat(t)})).join(", ")}},watch:{value:function(t){this.fileList=t},fileList:function(t){this.$emit("input",t)}},methods:{upload:function(){this._updateToServer(this.fileList)},images:function(){return this.fileList.filter((function(t){return"success"===t.status}))},remove:function(t){this.fileList.splice(t,1),this.$refs.input.value="",this.$emit("change")},_readImage:function(t){var e=this;Promise.all(t.map((function(t){return function(t){return new Promise((function(e){var r=new FileReader;r.onload=function(t){e(t.target.result)},r.readAsDataURL(t)}))}(t)}))).then((function(r){!function(t){1===e.limit?e.fileList=t.filter((function(t){return t})):e.fileList=e.fileList.concat(t.filter((function(t){return t}))),e.auto&&e._updateToServer(t)}(t.map((function(t,n){var i={file:t};return r[n]?(i.url=r[n],e.oversize&&e.oversize<t.size?(i.status="error",i.message="图片体积过大"):i.status="preview"):(i.status="error",i.message="图片读取失败"),c(i)})))}))},_emitActionClick:function(){this.$emit("click")},_updateImage:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.fileList.forEach((function(n){n.id===t&&(n.status=e,r&&Object.keys(r).forEach((function(t){n[t]=r[t]})))}))},_updateToServer:function(t){var e=this,r=t.filter((function(t){return"preview"===t.status}));r.length&&r.map((function(t){var r={file:t.file};return e.bucket&&(r.bucket=e.bucket),{id:t.id,form:e.transformRequest?e.transformRequest(r):r}})).map((function(t){var e=new FormData;return Object.keys(t.form).forEach((function(r){e.append(r,t.form[r])})),function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{form:e})})).forEach((function(t){e._updateImage(t.id,"loading");var r={withCredentials:e.cookie,data:t.form,action:e.url,onSuccess:function(r){e._handleUploadSuccess(t,r)},onError:function(){e._handleUploadError(t)}};e.http(r)}))},_handleInputSelect:function(t){var e=t.target.files,r=this.limit-this.fileList.length;if(!(this.disabled||!e.length||r<=0)){var n=[].slice.call(e);n=n.slice(0,r),this._readImage(n)}},_handleUploadError:function(t){this._updateImage(t.id,"error",{message:"上传失败"}),this.$emit("change")},_handleUploadSuccess:function(t,e){var r=this.transformResponse?this.transformResponse(e):e,n=t.id;r.url?this._updateImage(n,"success",{url:r.url,data:r.data}):this._updateImage(n,"error",{message:r.message}),this.$emit("change")}}},d=r(0),_=Object(d.a)(p,n,[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-uploader__item__status is-error"},[e("i",{staticClass:"bili-font ic_error"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-uploader__btn"},[e("i",{staticClass:"bili-font ic_add"})])}],!1,null,null,null);_.options.__file="src/components/uploader/uploader.vue";var m=_.exports;e.default=m},3:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n=function(t){return"[object Array]"===Object.prototype.toString.call(t)}},55:function(t,e,r){}})})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@calibur/sakura"]=e():t["@calibur/sakura"]=e()}(this,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=29)}({0:function(t,e,r){"use strict";function n(t,e,r,n,i,s,o,a){var u,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=r,c._compiled=!0),n&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),o?(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__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(o)},c._ssrRegister=u):i&&(u=a?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(c.functional){c._injectStyles=u;var l=c.render;c.render=function(t,e){return u.call(e),l(t,e)}}else{var f=c.beforeCreate;c.beforeCreate=f?[].concat(f,u):[u]}return{exports:t,options:c}}r.d(e,"a",(function(){return n}))},29:function(t,e,r){"use strict";r.r(e);var n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"v-uploader",class:{"v-uploader--custom":t.hasSlot}},[t._t("list",[t.fileList.length?r("span",{staticClass:"v-uploader__files"},t._l(t.fileList,(function(e,n){return r("div",{key:n+e.id,staticClass:"v-uploader__item"},[e.url?r("img",{staticClass:"v-uploader__item__poster",attrs:{src:e.url}}):t._e(),t._v(" "),"loading"!==e.status&&1!==t.limit?r("i",{staticClass:"bili-font ic_input_close v-uploader__item__cancel",on:{click:function(e){return t.remove(n)}}}):t._e(),t._v(" "),"loading"===e.status?r("div",{staticClass:"v-uploader__item__loading v-uploader__item__mask"},[r("div")]):t._e(),t._v(" "),"success"===e.status?r("div",{staticClass:"v-uploader__item__status is-success"},[r("i",{staticClass:"bili-font ic_success"})]):t._e(),t._v(" "),"error"===e.status?r("div",{staticClass:"v-uploader__item__mask"},[r("span",{domProps:{textContent:t._s(e.message)}}),t._v(" "),t._m(0,!0)]):t._e()])})),0):t._e()],{list:t.fileList}),t._v(" "),r("div",{staticClass:"v-uploader__action",on:{click:t._emitActionClick}},[r("input",{ref:"input",attrs:{multiple:1!==t.limit,disabled:t.isDisabled,accept:t.fileAccept,type:"file",name:"file"},on:{change:t._handleInputSelect}}),t._v(" "),r("div",{staticClass:"v-uploader__action__wrap"},[t._t("action",[t._m(1)])],2)])],2)};n._withStripped=!0;var i=r(3);function s(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function o(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(Object(r),!0).forEach((function(e){a(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var u=function(t){var e=new RegExp("(^| )"+t+"=([^;]*)(;|$)"),r=document.cookie.match(e);return r?unescape(r[2]):null};function c(t){if(!t)return[];var e=function(t){var e={};return"string"==typeof t?(e.url=t,e.status="success"):(t.id&&(e.id=t.id),t.url&&(e.url=t.url),t.url&&t.url.startsWith("http")?(e.status="success",e.data=t):e=o({},e,{},t)),o({},{id:Math.random().toString(36).substring(3,6),url:"",status:"",message:"",data:null,file:null},{},e)};return Object(i.a)(t)?t.map(e):e(t)}r(56);function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function f(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var p={name:"VUploader",props:{value:{type:[Array,Object,String],default:""},url:{type:String,default:"//api.bilibili.com/x/upload/web/image"},bucket:{type:String,default:""},disabled:{type:Boolean,default:!1},accept:{type:[String,Array],default:"image/*"},limit:{type:Number,default:1,validator:function(t){return t>=1}},oversize:{type:[String,Number],default:0,validator:function(t){return t>=0}},cookie:{type:Boolean,default:!0},auto:{type:Boolean,default:!0},http:{type:Function,default:function(t){if("undefined"!=typeof XMLHttpRequest){var e=new XMLHttpRequest,r=t.action;e.onerror=function(e){t.onError(e)},e.onload=function(){if(e.status<200||e.status>=400)return t.onError(function(t,e,r){var n;n=r.response?"".concat(r.response.error||r.response):r.responseText?"".concat(r.responseText):"fail to post ".concat(t," ").concat(r.status);var i=new Error(n);return i.status=r.status,i.method="post",i.url=t,i}(r,0,e));t.onSuccess(function(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch(r){return e}}(e))},e.open("POST",r,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var n={Accept:"application/json, text/plain, */*"};return"setRequestHeader"in e&&Object.keys(n).forEach((function(t){e.setRequestHeader(t,n[t])})),e.send(t.data),e}}},transformRequest:{type:Function,default:function(t){return t.csrf=u("bili_jct"),t}},transformResponse:{type:Function,default:function(t){return t&&0===t.code?{url:t.data.location,data:t.data}:t}}},data:function(){return{fileList:Object(i.a)(this.value)?c(this.value.slice(0,this.limit)):c(this.value)}},computed:{hasSlot:function(){return this.$slots.action||this.$slots.list},isDisabled:function(){return this.disabled||this.fileList.length>this.limit},fileAccept:function(){return"string"==typeof this.accept?this.accept:this.accept.map((function(t){return t.startsWith("image/")?t:"image/".concat(t)})).join(", ")}},watch:{value:function(t){this.fileList=t},fileList:function(t){this.$emit("input",t)}},methods:{upload:function(){this._updateToServer(this.fileList)},images:function(){return this.fileList.filter((function(t){return"success"===t.status}))},remove:function(t){this.fileList.splice(t,1),this.$refs.input.value="",this.$emit("change")},_readImage:function(t){var e=this;Promise.all(t.map((function(t){return function(t){return new Promise((function(e){var r=new FileReader;r.onload=function(t){e(t.target.result)},r.readAsDataURL(t)}))}(t)}))).then((function(r){!function(t){1===e.limit?e.fileList=t.filter((function(t){return t})):e.fileList=e.fileList.concat(t.filter((function(t){return t}))),e.auto&&e._updateToServer(t)}(t.map((function(t,n){var i={file:t};return r[n]?(i.url=r[n],e.oversize&&e.oversize<t.size?(i.status="error",i.message="图片体积过大"):i.status="preview"):(i.status="error",i.message="图片读取失败"),c(i)})))}))},_emitActionClick:function(){this.$emit("click")},_updateImage:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.fileList.forEach((function(n){n.id===t&&(n.status=e,r&&Object.keys(r).forEach((function(t){n[t]=r[t]})))}))},_updateToServer:function(t){var e=this,r=t.filter((function(t){return"preview"===t.status}));r.length&&r.map((function(t){var r={file:t.file};return e.bucket&&(r.bucket=e.bucket),{id:t.id,form:e.transformRequest?e.transformRequest(r):r}})).map((function(t){var e=new FormData;return Object.keys(t.form).forEach((function(r){e.append(r,t.form[r])})),function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},t,{form:e})})).forEach((function(t){e._updateImage(t.id,"loading");var r={withCredentials:e.cookie,data:t.form,action:e.url,onSuccess:function(r){e._handleUploadSuccess(t,r)},onError:function(){e._handleUploadError(t)}};e.http(r)}))},_handleInputSelect:function(t){var e=t.target.files,r=this.limit-this.fileList.length;if(!(this.disabled||!e.length||r<=0)){var n=[].slice.call(e);n=n.slice(0,r),this._readImage(n)}},_handleUploadError:function(t){this._updateImage(t.id,"error",{message:"上传失败"}),this.$emit("change")},_handleUploadSuccess:function(t,e){var r=this.transformResponse?this.transformResponse(e):e,n=t.id;r.url?this._updateImage(n,"success",{url:r.url,data:r.data}):this._updateImage(n,"error",{message:r.message}),this.$emit("change")}}},d=r(0),_=Object(d.a)(p,n,[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-uploader__item__status is-error"},[e("i",{staticClass:"bili-font ic_error"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"v-uploader__btn"},[e("i",{staticClass:"bili-font ic_add"})])}],!1,null,null,null);_.options.__file="src/components/uploader/uploader.vue";var m=_.exports;e.default=m},3:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var n=function(t){return"[object Array]"===Object.prototype.toString.call(t)}},56:function(t,e,r){}})})); |
{ | ||
"name": "@calibur/sakura", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "bilibili h5 vue components", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
780265
97