ts-glitter 13.8.757 → 13.8.791
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +2 -1
- package/lowcode/assets/vendor/nouislider/dist/nouislider.min.mjs +1 -1
- package/lowcode/assets/vendor/nouislider/dist/nouislider.mjs +8 -8
- package/lowcode/assets/vendor/nouislider/src/nouislider.ts +2 -2
- package/lowcode/cms-plugin/POS-setting.js +101 -100
- package/lowcode/cms-plugin/POS-setting.ts +97 -96
- package/lowcode/cms-plugin/ai-message.js +1 -1
- package/lowcode/cms-plugin/ai-message.ts +1 -1
- package/lowcode/cms-plugin/pos-pages/connection-mode.js +6 -1
- package/lowcode/cms-plugin/pos-pages/connection-mode.ts +6 -1
- package/lowcode/cms-plugin/shopping-order-manager.js +903 -704
- package/lowcode/cms-plugin/shopping-order-manager.ts +2245 -2046
- package/lowcode/editor-config.js +1 -1
- package/lowcode/editor-config.ts +1 -1
- package/lowcode/glitterBundle/module/html-generate.js +2 -2
- package/lowcode/glitterBundle/module/html-generate.ts +2 -2
- package/lowcode/landing-page/about-us.js +20 -0
- package/lowcode/landing-page/about-us.ts +24 -0
- package/lowcode/landing-page/app-intro.js +46 -0
- package/lowcode/landing-page/app-intro.ts +66 -0
- package/lowcode/landing-page/icon/android.svg +9 -0
- package/lowcode/landing-page/icon/ios.svg +9 -0
- package/lowcode/landing-page/icon/linear.svg +9 -0
- package/lowcode/landing-page/icon/logo.svg +15 -0
- package/lowcode/landing-page/icon/mobile.png +0 -0
- package/lowcode/landing-page/icon/step1.svg +33 -0
- package/package.json +1 -1
- package/src/export/export-test.js +10 -10
- package/src/export/export-test.js.map +1 -1
- package/src/export/export-test.ts +10 -10
package/lowcode/Entry.js
CHANGED
|
@@ -68,7 +68,7 @@ export class Entry {
|
|
|
68
68
|
}
|
|
69
69
|
window.renderClock = (_a = window.renderClock) !== null && _a !== void 0 ? _a : clockF();
|
|
70
70
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
71
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.791';
|
|
72
72
|
glitter.share.start = new Date();
|
|
73
73
|
const vm = {
|
|
74
74
|
appConfig: [],
|
package/lowcode/Entry.ts
CHANGED
|
@@ -68,7 +68,7 @@ export class Entry {
|
|
|
68
68
|
}
|
|
69
69
|
(window as any).renderClock = (window as any).renderClock ?? clockF();
|
|
70
70
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
71
|
-
glitter.share.editerVersion = 'V_13.8.
|
|
71
|
+
glitter.share.editerVersion = 'V_13.8.791';
|
|
72
72
|
glitter.share.start = new Date();
|
|
73
73
|
const vm: {
|
|
74
74
|
appConfig: any;
|
|
@@ -189,6 +189,7 @@ export class Entry {
|
|
|
189
189
|
location.reload();
|
|
190
190
|
} else {
|
|
191
191
|
try {
|
|
192
|
+
|
|
192
193
|
const appList = (await ApiPageConfig.getAppList(undefined, GlobalUser.token)).response.result;
|
|
193
194
|
localStorage.setItem('select_item', '0');
|
|
194
195
|
if (appList.length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var PipsMode,PipsType;function isValidFormatter(t){return isValidPartialFormatter(t)&&"function"==typeof t.from}function isValidPartialFormatter(t){return"object"==typeof t&&"function"==typeof t.to}function removeElement(t){t.parentElement.removeChild(t)}function isSet(t){return null!=t}function preventDefault(t){t.preventDefault()}function unique(t){return t.filter(function(t){return!this[t]&&(this[t]=!0)},{})}function closest(t,e){return Math.round(t/e)*e}function offset(t,e){var r=t.getBoundingClientRect(),n=t.ownerDocument,t=n.documentElement,n=getPageOffset(n);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(n.x=0),e?r.top+n.y-t.clientTop:r.left+n.x-t.clientLeft}function isNumeric(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function addClassFor(t,e,r){0<r&&(addClass(t,e),setTimeout(function(){removeClass(t,e)},r))}function limit(t){return Math.max(Math.min(t,100),0)}function asArray(t){return Array.isArray(t)?t:[t]}function countDecimals(t){t=(t=String(t)).split(".");return 1<t.length?t[1].length:0}function addClass(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function removeClass(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function hasClass(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function getPageOffset(t){var e=void 0!==window.pageXOffset,r="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:(r?t.documentElement:t.body).scrollLeft,y:e?window.pageYOffset:(r?t.documentElement:t.body).scrollTop}}function getActions(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function getSupportsPassive(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}function getSupportsTouchActionNone(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function subRangeRatio(t,e){return 100/(e-t)}function fromPercentage(t,e,r){return 100*e/(t[r+1]-t[r])}function toPercentage(t,e){return fromPercentage(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}function isPercentage(t,e){return e*(t[1]-t[0])/100+t[0]}function getJ(t,e){for(var r=1;t>=e[r];)r+=1;return r}function toStepping(t,e,r){if(r>=t.slice(-1)[0])return 100;var n=getJ(r,t),i=t[n-1],s=t[n],t=e[n-1],n=e[n];return t+toPercentage([i,s],r)/subRangeRatio(t,n)}function fromStepping(t,e,r){if(100<=r)return t.slice(-1)[0];var n=getJ(r,e),i=t[n-1],s=t[n],t=e[n-1];return isPercentage([i,s],(r-t)*subRangeRatio(t,e[n]))}function getStep(t,e,r,n){if(100===n)return n;var i=getJ(n,t),s=t[i-1],o=t[i];return r?(o-s)/2<n-s?o:s:e[i-1]?t[i-1]+closest(n-t[i-1],e[i-1]):n}!function(t){t.Range="range",t.Steps="steps",t.Positions="positions",t.Count="count",t.Values="values"}(PipsMode=PipsMode||{}),function(t){t[t.None=-1]="None",t[t.NoValue=0]="NoValue",t[t.LargeValue=1]="LargeValue",t[t.SmallValue=2]="SmallValue"}(PipsType=PipsType||{});var Spectrum=function(){function t(e,t,r){var n;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=t;var i=[];for(Object.keys(e).forEach(function(t){i.push([asArray(e[t]),t])}),i.sort(function(t,e){return t[0][0]-e[0][0]}),n=0;n<i.length;n++)this.handleEntryPoint(i[n][1],i[n][0]);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)this.handleStepPoint(n,this.xNumSteps[n])}return t.prototype.getDistance=function(t){for(var e=[],r=0;r<this.xNumSteps.length-1;r++)e[r]=fromPercentage(this.xVal,t,r);return e},t.prototype.getAbsoluteDistance=function(t,e,r){var n=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[n+1];)n++;else t===this.xPct[this.xPct.length-1]&&(n=this.xPct.length-2);r||t!==this.xPct[n+1]||n++;for(var i,s=1,o=(e=null===e?[]:e)[n],a=0,l=0,u=0,c=r?(t-this.xPct[n])/(this.xPct[n+1]-this.xPct[n]):(this.xPct[n+1]-t)/(this.xPct[n+1]-this.xPct[n]);0<o;)i=this.xPct[n+1+u]-this.xPct[n+u],100<e[n+u]*s+100-100*c?(a=i*c,s=(o-100*c)/e[n+u],c=1):(a=e[n+u]*i/100*s,s=0),r?(l-=a,1<=this.xPct.length+u&&u--):(l+=a,1<=this.xPct.length-u&&u++),o=e[n+u]*s;return t+l},t.prototype.toStepping=function(t){return t=toStepping(this.xVal,this.xPct,t)},t.prototype.fromStepping=function(t){return fromStepping(this.xVal,this.xPct,t)},t.prototype.getStep=function(t){return t=getStep(this.xPct,this.xSteps,this.snap,t)},t.prototype.getDefaultStep=function(t,e,r){var n=getJ(t,this.xPct);return(100===t||e&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/r},t.prototype.getNearbySteps=function(t){t=getJ(t,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},t.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(countDecimals);return Math.max.apply(null,t)},t.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},t.prototype.convert=function(t){return this.getStep(this.toStepping(t))},t.prototype.handleEntryPoint=function(t,e){t="min"===t?0:"max"===t?100:parseFloat(t);if(!isNumeric(t)||!isNumeric(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(t),this.xVal.push(e[0]);e=Number(e[1]);t?this.xSteps.push(!isNaN(e)&&e):isNaN(e)||(this.xSteps[0]=e),this.xHighestCompleteStep.push(0)},t.prototype.handleStepPoint=function(t,e){e&&(this.xVal[t]!==this.xVal[t+1]?(this.xSteps[t]=fromPercentage([this.xVal[t],this.xVal[t+1]],e,0)/subRangeRatio(this.xPct[t],this.xPct[t+1]),e=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],e=Math.ceil(Number(e.toFixed(3))-1),e=this.xVal[t]+this.xNumSteps[t]*e,this.xHighestCompleteStep[t]=e):this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t])},t}(),defaultFormatter={to:function(t){return void 0===t?"":t.toFixed(2)},from:Number},cssClasses={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},INTERNAL_EVENT_NS={tooltips:".__tooltips",aria:".__aria"};function testStep(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function testKeyboardPageMultiplier(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");t.keyboardPageMultiplier=e}function testKeyboardMultiplier(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");t.keyboardMultiplier=e}function testKeyboardDefaultStep(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");t.keyboardDefaultStep=e}function testRange(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new Spectrum(e,t.snap||!1,t.singleStep)}function testStart(t,e){if(e=asArray(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function testSnap(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.");t.snap=e}function testAnimate(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.");t.animate=e}function testAnimationDuration(t,e){if("number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.");t.animationDuration=e}function testConnect(t,e){var r,n=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(r=1;r<t.handles;r++)n.push(e);n.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");n=e}t.connect=n}function testOrientation(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function testMargin(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'margin' option must be numeric.");0!==e&&(t.margin=t.spectrum.getDistance(e))}function testLimit(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getDistance(e),!t.limit||t.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.")}function testPadding(t,e){var r;if(!isNumeric(e)&&!Array.isArray(e))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(e)&&2!==e.length&&!isNumeric(e[0])&&!isNumeric(e[1]))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==e){for(Array.isArray(e)||(e=[e,e]),t.padding=[t.spectrum.getDistance(e[0]),t.spectrum.getDistance(e[1])],r=0;r<t.spectrum.xNumSteps.length-1;r++)if(t.padding[0][r]<0||t.padding[1][r]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var n=e[0]+e[1],e=t.spectrum.xVal[0];if(1<n/(t.spectrum.xVal[t.spectrum.xVal.length-1]-e))throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function testDirection(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function testBehaviour(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=0<=e.indexOf("tap"),n=0<=e.indexOf("drag"),i=0<=e.indexOf("fixed"),s=0<=e.indexOf("snap"),o=0<=e.indexOf("hover"),a=0<=e.indexOf("unconstrained"),e=0<=e.indexOf("drag-all");if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");testMargin(t,t.start[1]-t.start[0])}if(a&&(t.margin||t.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:r||s,drag:n,dragAll:e,fixed:i,snap:s,hover:o,unconstrained:a}}function testTooltips(t,e){if(!1!==e)if(!0===e||isValidPartialFormatter(e)){t.tooltips=[];for(var r=0;r<t.handles;r++)t.tooltips.push(e)}else{if((e=asArray(e)).length!==t.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");e.forEach(function(t){if("boolean"!=typeof t&&!isValidPartialFormatter(t))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),t.tooltips=e}}function testHandleAttributes(t,e){if(e.length!==t.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");t.handleAttributes=e}function testAriaFormat(t,e){if(!isValidPartialFormatter(e))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");t.ariaFormat=e}function testFormat(t,e){if(!isValidFormatter(e))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");t.format=e}function testKeyboardSupport(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");t.keyboardSupport=e}function testDocumentElement(t,e){t.documentElement=e}function testCssPrefix(t,e){if("string"!=typeof e&&!1!==e)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function testCssClasses(e,r){if("object"!=typeof r)throw new Error("noUiSlider: 'cssClasses' must be an object.");"string"==typeof e.cssPrefix?(e.cssClasses={},Object.keys(r).forEach(function(t){e.cssClasses[t]=e.cssPrefix+r[t]})):e.cssClasses=r}function testOptions(e){var r={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:defaultFormatter,format:defaultFormatter},n={step:{r:!1,t:testStep},keyboardPageMultiplier:{r:!1,t:testKeyboardPageMultiplier},keyboardMultiplier:{r:!1,t:testKeyboardMultiplier},keyboardDefaultStep:{r:!1,t:testKeyboardDefaultStep},start:{r:!0,t:testStart},connect:{r:!0,t:testConnect},direction:{r:!0,t:testDirection},snap:{r:!1,t:testSnap},animate:{r:!1,t:testAnimate},animationDuration:{r:!1,t:testAnimationDuration},range:{r:!0,t:testRange},orientation:{r:!1,t:testOrientation},margin:{r:!1,t:testMargin},limit:{r:!1,t:testLimit},padding:{r:!1,t:testPadding},behaviour:{r:!0,t:testBehaviour},ariaFormat:{r:!1,t:testAriaFormat},format:{r:!1,t:testFormat},tooltips:{r:!1,t:testTooltips},keyboardSupport:{r:!0,t:testKeyboardSupport},documentElement:{r:!1,t:testDocumentElement},cssPrefix:{r:!0,t:testCssPrefix},cssClasses:{r:!0,t:testCssClasses},handleAttributes:{r:!1,t:testHandleAttributes}},i={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:cssClasses,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(n).forEach(function(t){if(isSet(e[t])||void 0!==i[t])n[t].t(r,(isSet(e[t])?e:i)[t]);else if(n[t].r)throw new Error("noUiSlider: '"+t+"' is required.")}),r.pips=e.pips;var t=document.createElement("div"),s=void 0!==t.style.msTransform,t=void 0!==t.style.transform;r.transformRule=t?"transform":s?"msTransform":"webkitTransform";return r.style=[["left","top"],["right","bottom"]][r.dir][r.ort],r}function scope(t,d,s){var r,a,l,n,i,u,c=getActions(),p=getSupportsTouchActionNone()&&getSupportsPassive(),f=t,b=d.spectrum,h=[],m=[],g=[],o=0,v={},S=t.ownerDocument,x=d.documentElement||S.documentElement,y=S.body,E="rtl"===S.dir||1===d.ort?0:100;function N(t,e){var r=S.createElement("div");return e&&addClass(r,e),t.appendChild(r),r}function P(t,e){var r,t=N(t,d.cssClasses.origin),n=N(t,d.cssClasses.handle);return N(n,d.cssClasses.touchArea),n.setAttribute("data-handle",String(e)),d.keyboardSupport&&(n.setAttribute("tabindex","0"),n.addEventListener("keydown",function(t){return function(t,e){if(C()||V(e))return!1;var r=["Left","Right"],n=["Down","Up"],i=["PageDown","PageUp"],s=["Home","End"];d.dir&&!d.ort?r.reverse():d.ort&&!d.dir&&(n.reverse(),i.reverse());var o=t.key.replace("Arrow",""),a=o===i[0],l=o===i[1],i=o===n[0]||o===r[0]||a,n=o===n[1]||o===r[1]||l,r=o===s[0],s=o===s[1];if(!(i||n||r||s))return!0;if(t.preventDefault(),n||i){var u=i?0:1,u=nt(e)[u];if(null===u)return!1;!1===u&&(u=b.getDefaultStep(m[e],i,d.keyboardDefaultStep)),u*=l||a?d.keyboardPageMultiplier:d.keyboardMultiplier,u=Math.max(u,1e-7),u*=i?-1:1,u=h[e]+u}else u=s?d.spectrum.xVal[d.spectrum.xVal.length-1]:d.spectrum.xVal[0];return Q(e,b.toStepping(u),!0,!0),J("slide",e),J("update",e),J("change",e),J("set",e),!1}(t,e)})),void 0!==d.handleAttributes&&(r=d.handleAttributes[e],Object.keys(r).forEach(function(t){n.setAttribute(t,r[t])})),n.setAttribute("role","slider"),n.setAttribute("aria-orientation",d.ort?"vertical":"horizontal"),0===e?addClass(n,d.cssClasses.handleLower):e===d.handles-1&&addClass(n,d.cssClasses.handleUpper),t}function w(t,e){return!!e&&N(t,d.cssClasses.connect)}function e(t,e){return!(!d.tooltips||!d.tooltips[e])&&N(t.firstChild,d.cssClasses.tooltip)}function C(){return f.hasAttribute("disabled")}function V(t){return a[t].hasAttribute("disabled")}function A(){i&&(q("update"+INTERNAL_EVENT_NS.tooltips),i.forEach(function(t){t&&removeElement(t)}),i=null)}function k(){A(),i=a.map(e),K("update"+INTERNAL_EVENT_NS.tooltips,function(t,e,r){i&&d.tooltips&&!1!==i[e]&&(t=t[e],!0!==d.tooltips[e]&&(t=d.tooltips[e].to(r[e])),i[e].innerHTML=t)})}function M(t,e){return t.map(function(t){return b.fromStepping(e?b.getStep(t):t)})}function D(f){var h=function(t){if(t.mode===PipsMode.Range||t.mode===PipsMode.Steps)return b.xVal;if(t.mode!==PipsMode.Count)return t.mode===PipsMode.Positions?M(t.values,t.stepped):t.mode===PipsMode.Values?t.stepped?t.values.map(function(t){return b.fromStepping(b.getStep(b.toStepping(t)))}):t.values:[];if(t.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var e=t.values-1,r=100/e,n=[];e--;)n[e]=e*r;return n.push(100),M(n,t.stepped)}(f),m={},t=b.xVal[0],e=b.xVal[b.xVal.length-1],g=!1,v=!1,S=0;return(h=unique(h.slice().sort(function(t,e){return t-e})))[0]!==t&&(h.unshift(t),g=!0),h[h.length-1]!==e&&(h.push(e),v=!0),h.forEach(function(t,e){var r,n,i,s,o,a,l,u,t=t,c=h[e+1],p=f.mode===PipsMode.Steps,d=(d=p?b.xNumSteps[e]:d)||c-t;for(void 0===c&&(c=t),d=Math.max(d,1e-7),r=t;r<=c;r=Number((r+d).toFixed(7))){for(a=(s=(i=b.toStepping(r))-S)/(f.density||1),u=s/(l=Math.round(a)),n=1;n<=l;n+=1)m[(o=S+n*u).toFixed(5)]=[b.fromStepping(o),0];a=-1<h.indexOf(r)?PipsType.LargeValue:p?PipsType.SmallValue:PipsType.NoValue,!e&&g&&r!==c&&(a=0),r===c&&v||(m[i.toFixed(5)]=[r,a]),S=i}}),m}function T(i,s,o){var t,a=S.createElement("div"),n=((t={})[PipsType.None]="",t[PipsType.NoValue]=d.cssClasses.valueNormal,t[PipsType.LargeValue]=d.cssClasses.valueLarge,t[PipsType.SmallValue]=d.cssClasses.valueSub,t),l=((t={})[PipsType.None]="",t[PipsType.NoValue]=d.cssClasses.markerNormal,t[PipsType.LargeValue]=d.cssClasses.markerLarge,t[PipsType.SmallValue]=d.cssClasses.markerSub,t),u=[d.cssClasses.valueHorizontal,d.cssClasses.valueVertical],c=[d.cssClasses.markerHorizontal,d.cssClasses.markerVertical];function p(t,e){var r=e===d.cssClasses.value;return e+" "+(r?u:c)[d.ort]+" "+(r?n:l)[t]}return addClass(a,d.cssClasses.pips),addClass(a,0===d.ort?d.cssClasses.pipsHorizontal:d.cssClasses.pipsVertical),Object.keys(i).forEach(function(t){var e,r,n;r=i[e=t][0],n=i[t][1],(n=s?s(r,n):n)!==PipsType.None&&((t=N(a,!1)).className=p(n,d.cssClasses.marker),t.style[d.style]=e+"%",n>PipsType.NoValue&&((t=N(a,!1)).className=p(n,d.cssClasses.value),t.setAttribute("data-value",String(r)),t.style[d.style]=e+"%",t.innerHTML=String(o.to(r))))}),a}function U(){n&&(removeElement(n),n=null)}function L(t){U();var e=D(t),r=t.filter,t=t.format||{to:function(t){return String(Math.round(t))}};return n=f.appendChild(T(e,r,t))}function O(){var t=r.getBoundingClientRect(),e="offset"+["Width","Height"][d.ort];return 0===d.ort?t.width||r[e]:t.height||r[e]}function F(e,r,n,i){function s(t){return!!(t=function(e,t,r){var n=0===e.type.indexOf("touch"),i=0===e.type.indexOf("mouse"),s=0===e.type.indexOf("pointer"),o=0,a=0;0===e.type.indexOf("MSPointer")&&(s=!0);if("mousedown"===e.type&&!e.buttons&&!e.touches)return!1;if(n){var l=function(t){t=t.target;return t===r||r.contains(t)||e.composed&&e.composedPath().shift()===r};if("touchstart"===e.type){n=Array.prototype.filter.call(e.touches,l);if(1<n.length)return!1;o=n[0].pageX,a=n[0].pageY}else{l=Array.prototype.find.call(e.changedTouches,l);if(!l)return!1;o=l.pageX,a=l.pageY}}t=t||getPageOffset(S),(i||s)&&(o=e.clientX+t.x,a=e.clientY+t.y);return e.pageOffset=t,e.points=[o,a],e.cursor=i||s,e}(t,i.pageOffset,i.target||r))&&(!(C()&&!i.doNotReject)&&(!(hasClass(f,d.cssClasses.tap)&&!i.doNotReject)&&(!(e===c.start&&void 0!==t.buttons&&1<t.buttons)&&((!i.hover||!t.buttons)&&(p||t.preventDefault(),t.calcPoint=t.points[d.ort],void n(t,i))))))}var o=[];return e.split(" ").forEach(function(t){r.addEventListener(t,s,!!p&&{passive:!0}),o.push([t,s])}),o}function R(t){t=limit(t=100*(t-offset(r,d.ort))/O());return d.dir?100-t:t}function _(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&H(t,e)}function z(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return H(t,e);t=(d.dir?-1:1)*(t.calcPoint-e.startCalcPoint);W(0<t,100*t/e.baseSize,e.locations,e.handleNumbers,e.connect)}function H(t,e){e.handle&&(removeClass(e.handle,d.cssClasses.active),--o),e.listeners.forEach(function(t){x.removeEventListener(t[0],t[1])}),0===o&&(removeClass(f,d.cssClasses.drag),G(),t.cursor&&(y.style.cursor="",y.removeEventListener("selectstart",preventDefault))),e.handleNumbers.forEach(function(t){J("change",t),J("set",t),J("end",t)})}function j(t,e){var r,n,i,s;e.handleNumbers.some(V)||(1===e.handleNumbers.length&&(s=a[e.handleNumbers[0]].children[0],o+=1,addClass(s,d.cssClasses.active)),t.stopPropagation(),n=F(c.move,x,z,{target:t.target,handle:s,connect:e.connect,listeners:r=[],startCalcPoint:t.calcPoint,baseSize:O(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:m.slice()}),i=F(c.end,x,H,{target:t.target,handle:s,listeners:r,doNotReject:!0,handleNumbers:e.handleNumbers}),s=F("mouseout",x,_,{target:t.target,handle:s,listeners:r,doNotReject:!0,handleNumbers:e.handleNumbers}),r.push.apply(r,n.concat(i,s)),t.cursor&&(y.style.cursor=getComputedStyle(t.target).cursor,1<a.length&&addClass(f,d.cssClasses.drag),y.addEventListener("selectstart",preventDefault,!1)),e.handleNumbers.forEach(function(t){J("start",t)}))}function I(t){t.stopPropagation();var i,s,o,e=R(t.calcPoint),r=(i=e,o=!(s=100),a.forEach(function(t,e){var r,n;V(e)||(r=m[e],((n=Math.abs(r-i))<s||n<=s&&r<i||100===n&&100===s)&&(o=e,s=n))}),o);!1!==r&&(d.events.snap||addClassFor(f,d.cssClasses.tap,d.animationDuration),Q(r,e,!0,!0),G(),J("slide",r,!0),J("update",r,!0),d.events.snap?j(t,{handleNumbers:[r]}):(J("change",r,!0),J("set",r,!0)))}function B(t){var t=R(t.calcPoint),t=b.getStep(t),e=b.fromStepping(t);Object.keys(v).forEach(function(t){"hover"===t.split(".")[0]&&v[t].forEach(function(t){t.call(it,e)})})}function K(t,e){v[t]=v[t]||[],v[t].push(e),"update"===t.split(".")[0]&&a.forEach(function(t,e){J("update",e)})}function q(t){var n=t&&t.split(".")[0],i=n?t.substring(n.length):t;Object.keys(v).forEach(function(t){var e=t.split(".")[0],r=t.substring(e.length);n&&n!==e||i&&i!==r||((e=r)!==INTERNAL_EVENT_NS.aria&&e!==INTERNAL_EVENT_NS.tooltips||i===r)&&delete v[t]})}function J(r,n,i){Object.keys(v).forEach(function(t){var e=t.split(".")[0];r===e&&v[t].forEach(function(t){t.call(it,h.map(d.format.to),n,h.slice(),i||!1,m.slice(),it)})})}function X(t,e,r,n,i,s){var o;return 1<a.length&&!d.events.unconstrained&&(n&&0<e&&(o=b.getAbsoluteDistance(t[e-1],d.margin,!1),r=Math.max(r,o)),i&&e<a.length-1&&(o=b.getAbsoluteDistance(t[e+1],d.margin,!0),r=Math.min(r,o))),1<a.length&&d.limit&&(n&&0<e&&(o=b.getAbsoluteDistance(t[e-1],d.limit,!1),r=Math.min(r,o)),i&&e<a.length-1&&(o=b.getAbsoluteDistance(t[e+1],d.limit,!0),r=Math.max(r,o))),d.padding&&(0===e&&(o=b.getAbsoluteDistance(0,d.padding[0],!1),r=Math.max(r,o)),e===a.length-1&&(o=b.getAbsoluteDistance(100,d.padding[1],!0),r=Math.min(r,o))),!((r=limit(r=b.getStep(r)))===t[e]&&!s)&&r}function Y(t,e){var r=d.ort;return(r?e:t)+", "+(r?t:e)}function W(t,r,n,e,i){var s=n.slice(),o=e[0],a=[!t,t],l=[t,!t];e=e.slice(),t&&e.reverse(),1<e.length?e.forEach(function(t,e){e=X(s,t,s[t]+r,a[e],l[e],!1);!1===e?r=0:(r=e-s[t],s[t]=e)}):a=l=[!0];var u=!1;e.forEach(function(t,e){u=Q(t,n[t]+r,a[e],l[e])||u}),u&&(e.forEach(function(t){J("update",t),J("slide",t)}),null!=i&&J("drag",o))}function $(t,e){return d.dir?100-t-e:t}function G(){g.forEach(function(t){var e=50<m[t]?-1:1,e=3+(a.length+e*t);a[t].style.zIndex=String(e)})}function Q(t,e,r,n,i){return!1!==(e=i?e:X(m,t,e,r,n,!1))&&(e=e,m[t=t]=e,h[t]=b.fromStepping(e),e="translate("+Y($(e,0)-E+"%","0")+")",a[t].style[d.transformRule]=e,Z(t),Z(t+1),!0)}function Z(t){var e,r;l[t]&&(r=100,e="translate("+Y($(e=(e=0)!==t?m[t-1]:e,r=(r=t!==l.length-1?m[t]:r)-e)+"%","0")+")",r="scale("+Y(r/100,"1")+")",l[t].style[d.transformRule]=e+" "+r)}function tt(t,e){return null===t||!1===t||void 0===t?m[e]:("number"==typeof t&&(t=String(t)),!1===(t=!1!==(t=d.format.from(t))?b.toStepping(t):t)||isNaN(t)?m[e]:t)}function et(t,e,r){var n=asArray(t),t=void 0===m[0];e=void 0===e||e,d.animate&&!t&&addClassFor(f,d.cssClasses.tap,d.animationDuration),g.forEach(function(t){Q(t,tt(n[t],t),!0,!1,r)});var i,s=1===g.length?0:1;for(t&&b.hasNoSize()&&(r=!0,m[0]=0,1<g.length&&(i=100/(g.length-1),g.forEach(function(t){m[t]=t*i})));s<g.length;++s)g.forEach(function(t){Q(t,m[t],!0,!0,r)});G(),g.forEach(function(t){J("update",t),null!==n[t]&&e&&J("set",t)})}function rt(t){if(t=void 0===t?!1:t)return 1===h.length?h[0]:h.slice(0);t=h.map(d.format.to);return 1===t.length?t[0]:t}function nt(t){var e=m[t],r=b.getNearbySteps(e),n=h[t],i=r.thisStep.step,t=null;if(d.snap)return[n-r.stepBefore.startValue||null,r.stepAfter.startValue-n||null];!1!==i&&n+i>r.stepAfter.startValue&&(i=r.stepAfter.startValue-n),t=n>r.thisStep.startValue?r.thisStep.step:!1!==r.stepBefore.step&&n-r.stepBefore.highestStep,100===e?i=null:0===e&&(t=null);e=b.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(e))),[t=null!==t&&!1!==t?Number(t.toFixed(e)):t,i]}addClass(t=f,d.cssClasses.target),0===d.dir?addClass(t,d.cssClasses.ltr):addClass(t,d.cssClasses.rtl),0===d.ort?addClass(t,d.cssClasses.horizontal):addClass(t,d.cssClasses.vertical),addClass(t,"rtl"===getComputedStyle(t).direction?d.cssClasses.textDirectionRtl:d.cssClasses.textDirectionLtr),r=N(t,d.cssClasses.base),function(t,e){var r=N(e,d.cssClasses.connects);a=[],(l=[]).push(w(r,t[0]));for(var n=0;n<d.handles;n++)a.push(P(e,n)),g[n]=n,l.push(w(r,t[n+1]))}(d.connect,r),(u=d.events).fixed||a.forEach(function(t,e){F(c.start,t.children[0],j,{handleNumbers:[e]})}),u.tap&&F(c.start,r,I,{}),u.hover&&F(c.move,r,B,{hover:!0}),u.drag&&l.forEach(function(e,t){var r,n,i,s,o;!1!==e&&0!==t&&t!==l.length-1&&(r=a[t-1],n=a[t],i=[e],s=[r,n],o=[t-1,t],addClass(e,d.cssClasses.draggable),u.fixed&&(i.push(r.children[0]),i.push(n.children[0])),u.dragAll&&(s=a,o=g),i.forEach(function(t){F(c.start,t,j,{handles:s,handleNumbers:o,connect:e})}))}),et(d.start),d.pips&&L(d.pips),d.tooltips&&k(),q("update"+INTERNAL_EVENT_NS.aria),K("update"+INTERNAL_EVENT_NS.aria,function(t,e,s,r,o){g.forEach(function(t){var e=a[t],r=X(m,t,0,!0,!0,!0),n=X(m,t,100,!0,!0,!0),i=o[t],t=String(d.ariaFormat.to(s[t])),r=b.fromStepping(r).toFixed(1),n=b.fromStepping(n).toFixed(1),i=b.fromStepping(i).toFixed(1);e.children[0].setAttribute("aria-valuemin",r),e.children[0].setAttribute("aria-valuemax",n),e.children[0].setAttribute("aria-valuenow",i),e.children[0].setAttribute("aria-valuetext",t)})});var it={destroy:function(){for(q(INTERNAL_EVENT_NS.aria),q(INTERNAL_EVENT_NS.tooltips),Object.keys(d.cssClasses).forEach(function(t){removeClass(f,d.cssClasses[t])});f.firstChild;)f.removeChild(f.firstChild);delete f.noUiSlider},steps:function(){return g.map(nt)},on:K,off:q,get:rt,set:et,setHandle:function(t,e,r,n){if(!(0<=(t=Number(t))&&t<g.length))throw new Error("noUiSlider: invalid handle number, got: "+t);Q(t,tt(e,t),!0,!0,n),J("update",t),r&&J("set",t)},reset:function(t){et(d.start,t)},__moveHandles:function(t,e,r){W(t,e,m,r)},options:s,updateOptions:function(e,t){var r=rt(),n=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];n.forEach(function(t){void 0!==e[t]&&(s[t]=e[t])});var i=testOptions(s);n.forEach(function(t){void 0!==e[t]&&(d[t]=i[t])}),b=i.spectrum,d.margin=i.margin,d.limit=i.limit,d.padding=i.padding,d.pips?L(d.pips):U(),(d.tooltips?k:A)(),m=[],et(isSet(e.start)?e.start:r,t)},target:f,removePips:U,removeTooltips:A,getPositions:function(){return m.slice()},getTooltips:function(){return i},getOrigins:function(){return a},pips:L};return it}function initialize(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");e=scope(t,testOptions(e),e);return t.noUiSlider=e}export default{__spectrum:Spectrum,cssClasses:cssClasses,create:initialize};export{PipsMode,PipsType,initialize as create,cssClasses};
|
|
1
|
+
"use strict";var PipsMode,PipsType;function isValidFormatter(t){return isValidPartialFormatter(t)&&"function"==typeof t.from}function isValidPartialFormatter(t){return"object"==typeof t&&"function"==typeof t.to}function removeElement(t){t.parentElement.removeChild(t)}function isSet(t){return null!=t}function preventDefault(t){t.preventDefault()}function unique(t){return t.filter(function(t){return!this[t]&&(this[t]=!0)},{})}function closest(t,e){return Math.round(t/e)*e}function offset(t,e){var r=t.getBoundingClientRect(),n=t.ownerDocument,t=n.documentElement,n=getPageOffset(n);return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(n.x=0),e?r.top+n.y-t.clientTop:r.left+n.x-t.clientLeft}function isNumeric(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function addClassFor(t,e,r){0<r&&(addClass(t,e),setTimeout(function(){removeClass(t,e)},r))}function limit(t){return Math.max(Math.min(t,100),0)}function asArray(t){return Array.isArray(t)?t:[t]}function countDecimals(t){t=(t=String(t)).split(".");return 1<t.length?t[1].length:0}function addClass(t,e){t.classList&&!/\s/.test(e)?t.classList.add(e):t.className+=" "+e}function removeClass(t,e){t.classList&&!/\s/.test(e)?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function hasClass(t,e){return t.classList?t.classList.contains(e):new RegExp("\\b"+e+"\\b").test(t.className)}function getPageOffset(t){var e=void 0!==window.pageXOffset,r="CSS1Compat"===(t.compatMode||"");return{x:e?window.pageXOffset:(r?t.documentElement:t.body).scrollLeft,y:e?window.pageYOffset:(r?t.documentElement:t.body).scrollTop}}function getActions(){return window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"}}function getSupportsPassive(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("test",null,e)}catch(t){}return t}function getSupportsTouchActionNone(){return window.CSS&&CSS.supports&&CSS.supports("touch-action","none")}function subRangeRatio(t,e){return 100/(e-t)}function fromPercentage(t,e,r){return 100*e/(t[r+1]-t[r])}function toPercentage(t,e){return fromPercentage(t,t[0]<0?e+Math.abs(t[0]):e-t[0],0)}function isPercentage(t,e){return e*(t[1]-t[0])/100+t[0]}function getJ(t,e){for(var r=1;t>=e[r];)r+=1;return r}function toStepping(t,e,r){if(r>=t.slice(-1)[0])return 100;var n=getJ(r,t),i=t[n-1],s=t[n],t=e[n-1],n=e[n];return t+toPercentage([i,s],r)/subRangeRatio(t,n)}function fromStepping(t,e,r){if(100<=r)return t.slice(-1)[0];var n=getJ(r,e),i=t[n-1],s=t[n],t=e[n-1];return isPercentage([i,s],(r-t)*subRangeRatio(t,e[n]))}function getStep(t,e,r,n){if(100===n)return n;var i=getJ(n,t),s=t[i-1],o=t[i];return r?(o-s)/2<n-s?o:s:e[i-1]?t[i-1]+closest(n-t[i-1],e[i-1]):n}!function(t){t.Range="range",t.Steps="steps",t.Positions="positions",t.Count="count",t.Values="values"}(PipsMode=PipsMode||{}),function(t){t[t.None=-1]="None",t[t.NoValue=0]="NoValue",t[t.LargeValue=1]="LargeValue",t[t.SmallValue=2]="SmallValue"}(PipsType=PipsType||{});var Spectrum=function(){function t(e,t,r){var n;this.xPct=[],this.xVal=[],this.xSteps=[],this.xNumSteps=[],this.xHighestCompleteStep=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.snap=t;var i=[];for(Object.keys(e).forEach(function(t){i.push([asArray(e[t]),t])}),i.sort(function(t,e){return t[0][0]-e[0][0]}),n=0;n<i.length;n++)this.handleEntryPoint(i[n][1],i[n][0]);for(this.xNumSteps=this.xSteps.slice(0),n=0;n<this.xNumSteps.length;n++)this.handleStepPoint(n,this.xNumSteps[n])}return t.prototype.getDistance=function(t){for(var e=[],r=0;r<this.xNumSteps.length-1;r++)e[r]=fromPercentage(this.xVal,t,r);return e},t.prototype.getAbsoluteDistance=function(t,e,r){var n=0;if(t<this.xPct[this.xPct.length-1])for(;t>this.xPct[n+1];)n++;else t===this.xPct[this.xPct.length-1]&&(n=this.xPct.length-2);r||t!==this.xPct[n+1]||n++;for(var i,s=1,o=(e=null===e?[]:e)[n],a=0,l=0,u=0,c=r?(t-this.xPct[n])/(this.xPct[n+1]-this.xPct[n]):(this.xPct[n+1]-t)/(this.xPct[n+1]-this.xPct[n]);0<o;)i=this.xPct[n+1+u]-this.xPct[n+u],100<e[n+u]*s+100-100*c?(a=i*c,s=(o-100*c)/e[n+u],c=1):(a=e[n+u]*i/100*s,s=0),r?(l-=a,1<=this.xPct.length+u&&u--):(l+=a,1<=this.xPct.length-u&&u++),o=e[n+u]*s;return t+l},t.prototype.toStepping=function(t){return t=toStepping(this.xVal,this.xPct,t)},t.prototype.fromStepping=function(t){return fromStepping(this.xVal,this.xPct,t)},t.prototype.getStep=function(t){return t=getStep(this.xPct,this.xSteps,this.snap,t)},t.prototype.getDefaultStep=function(t,e,r){var n=getJ(t,this.xPct);return(100===t||e&&t===this.xPct[n-1])&&(n=Math.max(n-1,1)),(this.xVal[n]-this.xVal[n-1])/r},t.prototype.getNearbySteps=function(t){t=getJ(t,this.xPct);return{stepBefore:{startValue:this.xVal[t-2],step:this.xNumSteps[t-2],highestStep:this.xHighestCompleteStep[t-2]},thisStep:{startValue:this.xVal[t-1],step:this.xNumSteps[t-1],highestStep:this.xHighestCompleteStep[t-1]},stepAfter:{startValue:this.xVal[t],step:this.xNumSteps[t],highestStep:this.xHighestCompleteStep[t]}}},t.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(countDecimals);return Math.max.apply(null,t)},t.prototype.hasNoSize=function(){return this.xVal[0]===this.xVal[this.xVal.length-1]},t.prototype.convert=function(t){return this.getStep(this.toStepping(t))},t.prototype.handleEntryPoint=function(t,e){t="min"===t?0:"max"===t?100:parseFloat(t);if(!isNumeric(t)||!isNumeric(e[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");this.xPct.push(t),this.xVal.push(e[0]);e=Number(e[1]);t?this.xSteps.push(!isNaN(e)&&e):isNaN(e)||(this.xSteps[0]=e),this.xHighestCompleteStep.push(0)},t.prototype.handleStepPoint=function(t,e){e&&(this.xVal[t]!==this.xVal[t+1]?(this.xSteps[t]=fromPercentage([this.xVal[t],this.xVal[t+1]],e,0)/subRangeRatio(this.xPct[t],this.xPct[t+1]),e=(this.xVal[t+1]-this.xVal[t])/this.xNumSteps[t],e=Math.ceil(Number(e.toFixed(3))-1),e=this.xVal[t]+this.xNumSteps[t]*e,this.xHighestCompleteStep[t]=e):this.xSteps[t]=this.xHighestCompleteStep[t]=this.xVal[t])},t}(),defaultFormatter={to:function(t){return void 0===t?"":t.toFixed(2)},from:Number},cssClasses={target:"target",base:"base",origin:"origin",handle:"handle",handleLower:"handle-lower",handleUpper:"handle-upper",touchArea:"touch-area",horizontal:"horizontal",vertical:"vertical",background:"background",connect:"connect",connects:"connects",ltr:"ltr",rtl:"rtl",textDirectionLtr:"txt-dir-ltr",textDirectionRtl:"txt-dir-rtl",draggable:"draggable",drag:"state-drag",tap:"state-tap",active:"active",tooltip:"tooltip",pips:"pips",pipsHorizontal:"pips-horizontal",pipsVertical:"pips-vertical",marker:"marker",markerHorizontal:"marker-horizontal",markerVertical:"marker-vertical",markerNormal:"marker-normal",markerLarge:"marker-large",markerSub:"marker-sub",value:"value",valueHorizontal:"value-horizontal",valueVertical:"value-vertical",valueNormal:"value-normal",valueLarge:"value-large",valueSub:"value-sub"},INTERNAL_EVENT_NS={tooltips:".__tooltips",aria:".__aria"};function testStep(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=e}function testKeyboardPageMultiplier(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'keyboardPageMultiplier' is not numeric.");t.keyboardPageMultiplier=e}function testKeyboardMultiplier(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'keyboardMultiplier' is not numeric.");t.keyboardMultiplier=e}function testKeyboardDefaultStep(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'keyboardDefaultStep' is not numeric.");t.keyboardDefaultStep=e}function testRange(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");t.spectrum=new Spectrum(e,t.snap||!1,t.singleStep)}function testStart(t,e){if(e=asArray(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function testSnap(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.");t.snap=e}function testAnimate(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.");t.animate=e}function testAnimationDuration(t,e){if("number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.");t.animationDuration=e}function testConnect(t,e){var r,n=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(r=1;r<t.handles;r++)n.push(e);n.push(!1)}else{if(!Array.isArray(e)||!e.length||e.length!==t.handles+1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");n=e}t.connect=n}function testOrientation(t,e){switch(e){case"horizontal":t.ort=0;break;case"vertical":t.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function testMargin(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'margin' option must be numeric.");0!==e&&(t.margin=t.spectrum.getDistance(e))}function testLimit(t,e){if(!isNumeric(e))throw new Error("noUiSlider: 'limit' option must be numeric.");if(t.limit=t.spectrum.getDistance(e),!t.limit||t.handles<2)throw new Error("noUiSlider: 'limit' option is only supported on linear.svg sliders with 2 or more handles.")}function testPadding(t,e){var r;if(!isNumeric(e)&&!Array.isArray(e))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(Array.isArray(e)&&2!==e.length&&!isNumeric(e[0])&&!isNumeric(e[1]))throw new Error("noUiSlider: 'padding' option must be numeric or array of exactly 2 numbers.");if(0!==e){for(Array.isArray(e)||(e=[e,e]),t.padding=[t.spectrum.getDistance(e[0]),t.spectrum.getDistance(e[1])],r=0;r<t.spectrum.xNumSteps.length-1;r++)if(t.padding[0][r]<0||t.padding[1][r]<0)throw new Error("noUiSlider: 'padding' option must be a positive number(s).");var n=e[0]+e[1],e=t.spectrum.xVal[0];if(1<n/(t.spectrum.xVal[t.spectrum.xVal.length-1]-e))throw new Error("noUiSlider: 'padding' option must not exceed 100% of the range.")}}function testDirection(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function testBehaviour(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var r=0<=e.indexOf("tap"),n=0<=e.indexOf("drag"),i=0<=e.indexOf("fixed"),s=0<=e.indexOf("snap"),o=0<=e.indexOf("hover"),a=0<=e.indexOf("unconstrained"),e=0<=e.indexOf("drag-all");if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");testMargin(t,t.start[1]-t.start[0])}if(a&&(t.margin||t.limit))throw new Error("noUiSlider: 'unconstrained' behaviour cannot be used with margin or limit");t.events={tap:r||s,drag:n,dragAll:e,fixed:i,snap:s,hover:o,unconstrained:a}}function testTooltips(t,e){if(!1!==e)if(!0===e||isValidPartialFormatter(e)){t.tooltips=[];for(var r=0;r<t.handles;r++)t.tooltips.push(e)}else{if((e=asArray(e)).length!==t.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");e.forEach(function(t){if("boolean"!=typeof t&&!isValidPartialFormatter(t))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")}),t.tooltips=e}}function testHandleAttributes(t,e){if(e.length!==t.handles)throw new Error("noUiSlider: must pass a attributes for all handles.");t.handleAttributes=e}function testAriaFormat(t,e){if(!isValidPartialFormatter(e))throw new Error("noUiSlider: 'ariaFormat' requires 'to' method.");t.ariaFormat=e}function testFormat(t,e){if(!isValidFormatter(e))throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.");t.format=e}function testKeyboardSupport(t,e){if("boolean"!=typeof e)throw new Error("noUiSlider: 'keyboardSupport' option must be a boolean.");t.keyboardSupport=e}function testDocumentElement(t,e){t.documentElement=e}function testCssPrefix(t,e){if("string"!=typeof e&&!1!==e)throw new Error("noUiSlider: 'cssPrefix' must be a string or `false`.");t.cssPrefix=e}function testCssClasses(e,r){if("object"!=typeof r)throw new Error("noUiSlider: 'cssClasses' must be an object.");"string"==typeof e.cssPrefix?(e.cssClasses={},Object.keys(r).forEach(function(t){e.cssClasses[t]=e.cssPrefix+r[t]})):e.cssClasses=r}function testOptions(e){var r={margin:null,limit:null,padding:null,animate:!0,animationDuration:300,ariaFormat:defaultFormatter,format:defaultFormatter},n={step:{r:!1,t:testStep},keyboardPageMultiplier:{r:!1,t:testKeyboardPageMultiplier},keyboardMultiplier:{r:!1,t:testKeyboardMultiplier},keyboardDefaultStep:{r:!1,t:testKeyboardDefaultStep},start:{r:!0,t:testStart},connect:{r:!0,t:testConnect},direction:{r:!0,t:testDirection},snap:{r:!1,t:testSnap},animate:{r:!1,t:testAnimate},animationDuration:{r:!1,t:testAnimationDuration},range:{r:!0,t:testRange},orientation:{r:!1,t:testOrientation},margin:{r:!1,t:testMargin},limit:{r:!1,t:testLimit},padding:{r:!1,t:testPadding},behaviour:{r:!0,t:testBehaviour},ariaFormat:{r:!1,t:testAriaFormat},format:{r:!1,t:testFormat},tooltips:{r:!1,t:testTooltips},keyboardSupport:{r:!0,t:testKeyboardSupport},documentElement:{r:!1,t:testDocumentElement},cssPrefix:{r:!0,t:testCssPrefix},cssClasses:{r:!0,t:testCssClasses},handleAttributes:{r:!1,t:testHandleAttributes}},i={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal",keyboardSupport:!0,cssPrefix:"noUi-",cssClasses:cssClasses,keyboardPageMultiplier:5,keyboardMultiplier:1,keyboardDefaultStep:10};e.format&&!e.ariaFormat&&(e.ariaFormat=e.format),Object.keys(n).forEach(function(t){if(isSet(e[t])||void 0!==i[t])n[t].t(r,(isSet(e[t])?e:i)[t]);else if(n[t].r)throw new Error("noUiSlider: '"+t+"' is required.")}),r.pips=e.pips;var t=document.createElement("div"),s=void 0!==t.style.msTransform,t=void 0!==t.style.transform;r.transformRule=t?"transform":s?"msTransform":"webkitTransform";return r.style=[["left","top"],["right","bottom"]][r.dir][r.ort],r}function scope(t,d,s){var r,a,l,n,i,u,c=getActions(),p=getSupportsTouchActionNone()&&getSupportsPassive(),f=t,b=d.spectrum,h=[],m=[],g=[],o=0,v={},S=t.ownerDocument,x=d.documentElement||S.documentElement,y=S.body,E="rtl"===S.dir||1===d.ort?0:100;function N(t,e){var r=S.createElement("div");return e&&addClass(r,e),t.appendChild(r),r}function P(t,e){var r,t=N(t,d.cssClasses.origin),n=N(t,d.cssClasses.handle);return N(n,d.cssClasses.touchArea),n.setAttribute("data-handle",String(e)),d.keyboardSupport&&(n.setAttribute("tabindex","0"),n.addEventListener("keydown",function(t){return function(t,e){if(C()||V(e))return!1;var r=["Left","Right"],n=["Down","Up"],i=["PageDown","PageUp"],s=["Home","End"];d.dir&&!d.ort?r.reverse():d.ort&&!d.dir&&(n.reverse(),i.reverse());var o=t.key.replace("Arrow",""),a=o===i[0],l=o===i[1],i=o===n[0]||o===r[0]||a,n=o===n[1]||o===r[1]||l,r=o===s[0],s=o===s[1];if(!(i||n||r||s))return!0;if(t.preventDefault(),n||i){var u=i?0:1,u=nt(e)[u];if(null===u)return!1;!1===u&&(u=b.getDefaultStep(m[e],i,d.keyboardDefaultStep)),u*=l||a?d.keyboardPageMultiplier:d.keyboardMultiplier,u=Math.max(u,1e-7),u*=i?-1:1,u=h[e]+u}else u=s?d.spectrum.xVal[d.spectrum.xVal.length-1]:d.spectrum.xVal[0];return Q(e,b.toStepping(u),!0,!0),J("slide",e),J("update",e),J("change",e),J("set",e),!1}(t,e)})),void 0!==d.handleAttributes&&(r=d.handleAttributes[e],Object.keys(r).forEach(function(t){n.setAttribute(t,r[t])})),n.setAttribute("role","slider"),n.setAttribute("aria-orientation",d.ort?"vertical":"horizontal"),0===e?addClass(n,d.cssClasses.handleLower):e===d.handles-1&&addClass(n,d.cssClasses.handleUpper),t}function w(t,e){return!!e&&N(t,d.cssClasses.connect)}function e(t,e){return!(!d.tooltips||!d.tooltips[e])&&N(t.firstChild,d.cssClasses.tooltip)}function C(){return f.hasAttribute("disabled")}function V(t){return a[t].hasAttribute("disabled")}function A(){i&&(q("update"+INTERNAL_EVENT_NS.tooltips),i.forEach(function(t){t&&removeElement(t)}),i=null)}function k(){A(),i=a.map(e),K("update"+INTERNAL_EVENT_NS.tooltips,function(t,e,r){i&&d.tooltips&&!1!==i[e]&&(t=t[e],!0!==d.tooltips[e]&&(t=d.tooltips[e].to(r[e])),i[e].innerHTML=t)})}function M(t,e){return t.map(function(t){return b.fromStepping(e?b.getStep(t):t)})}function D(f){var h=function(t){if(t.mode===PipsMode.Range||t.mode===PipsMode.Steps)return b.xVal;if(t.mode!==PipsMode.Count)return t.mode===PipsMode.Positions?M(t.values,t.stepped):t.mode===PipsMode.Values?t.stepped?t.values.map(function(t){return b.fromStepping(b.getStep(b.toStepping(t)))}):t.values:[];if(t.values<2)throw new Error("noUiSlider: 'values' (>= 2) required for mode 'count'.");for(var e=t.values-1,r=100/e,n=[];e--;)n[e]=e*r;return n.push(100),M(n,t.stepped)}(f),m={},t=b.xVal[0],e=b.xVal[b.xVal.length-1],g=!1,v=!1,S=0;return(h=unique(h.slice().sort(function(t,e){return t-e})))[0]!==t&&(h.unshift(t),g=!0),h[h.length-1]!==e&&(h.push(e),v=!0),h.forEach(function(t,e){var r,n,i,s,o,a,l,u,t=t,c=h[e+1],p=f.mode===PipsMode.Steps,d=(d=p?b.xNumSteps[e]:d)||c-t;for(void 0===c&&(c=t),d=Math.max(d,1e-7),r=t;r<=c;r=Number((r+d).toFixed(7))){for(a=(s=(i=b.toStepping(r))-S)/(f.density||1),u=s/(l=Math.round(a)),n=1;n<=l;n+=1)m[(o=S+n*u).toFixed(5)]=[b.fromStepping(o),0];a=-1<h.indexOf(r)?PipsType.LargeValue:p?PipsType.SmallValue:PipsType.NoValue,!e&&g&&r!==c&&(a=0),r===c&&v||(m[i.toFixed(5)]=[r,a]),S=i}}),m}function T(i,s,o){var t,a=S.createElement("div"),n=((t={})[PipsType.None]="",t[PipsType.NoValue]=d.cssClasses.valueNormal,t[PipsType.LargeValue]=d.cssClasses.valueLarge,t[PipsType.SmallValue]=d.cssClasses.valueSub,t),l=((t={})[PipsType.None]="",t[PipsType.NoValue]=d.cssClasses.markerNormal,t[PipsType.LargeValue]=d.cssClasses.markerLarge,t[PipsType.SmallValue]=d.cssClasses.markerSub,t),u=[d.cssClasses.valueHorizontal,d.cssClasses.valueVertical],c=[d.cssClasses.markerHorizontal,d.cssClasses.markerVertical];function p(t,e){var r=e===d.cssClasses.value;return e+" "+(r?u:c)[d.ort]+" "+(r?n:l)[t]}return addClass(a,d.cssClasses.pips),addClass(a,0===d.ort?d.cssClasses.pipsHorizontal:d.cssClasses.pipsVertical),Object.keys(i).forEach(function(t){var e,r,n;r=i[e=t][0],n=i[t][1],(n=s?s(r,n):n)!==PipsType.None&&((t=N(a,!1)).className=p(n,d.cssClasses.marker),t.style[d.style]=e+"%",n>PipsType.NoValue&&((t=N(a,!1)).className=p(n,d.cssClasses.value),t.setAttribute("data-value",String(r)),t.style[d.style]=e+"%",t.innerHTML=String(o.to(r))))}),a}function U(){n&&(removeElement(n),n=null)}function L(t){U();var e=D(t),r=t.filter,t=t.format||{to:function(t){return String(Math.round(t))}};return n=f.appendChild(T(e,r,t))}function O(){var t=r.getBoundingClientRect(),e="offset"+["Width","Height"][d.ort];return 0===d.ort?t.width||r[e]:t.height||r[e]}function F(e,r,n,i){function s(t){return!!(t=function(e,t,r){var n=0===e.type.indexOf("touch"),i=0===e.type.indexOf("mouse"),s=0===e.type.indexOf("pointer"),o=0,a=0;0===e.type.indexOf("MSPointer")&&(s=!0);if("mousedown"===e.type&&!e.buttons&&!e.touches)return!1;if(n){var l=function(t){t=t.target;return t===r||r.contains(t)||e.composed&&e.composedPath().shift()===r};if("touchstart"===e.type){n=Array.prototype.filter.call(e.touches,l);if(1<n.length)return!1;o=n[0].pageX,a=n[0].pageY}else{l=Array.prototype.find.call(e.changedTouches,l);if(!l)return!1;o=l.pageX,a=l.pageY}}t=t||getPageOffset(S),(i||s)&&(o=e.clientX+t.x,a=e.clientY+t.y);return e.pageOffset=t,e.points=[o,a],e.cursor=i||s,e}(t,i.pageOffset,i.target||r))&&(!(C()&&!i.doNotReject)&&(!(hasClass(f,d.cssClasses.tap)&&!i.doNotReject)&&(!(e===c.start&&void 0!==t.buttons&&1<t.buttons)&&((!i.hover||!t.buttons)&&(p||t.preventDefault(),t.calcPoint=t.points[d.ort],void n(t,i))))))}var o=[];return e.split(" ").forEach(function(t){r.addEventListener(t,s,!!p&&{passive:!0}),o.push([t,s])}),o}function R(t){t=limit(t=100*(t-offset(r,d.ort))/O());return d.dir?100-t:t}function _(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&H(t,e)}function z(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return H(t,e);t=(d.dir?-1:1)*(t.calcPoint-e.startCalcPoint);W(0<t,100*t/e.baseSize,e.locations,e.handleNumbers,e.connect)}function H(t,e){e.handle&&(removeClass(e.handle,d.cssClasses.active),--o),e.listeners.forEach(function(t){x.removeEventListener(t[0],t[1])}),0===o&&(removeClass(f,d.cssClasses.drag),G(),t.cursor&&(y.style.cursor="",y.removeEventListener("selectstart",preventDefault))),e.handleNumbers.forEach(function(t){J("change",t),J("set",t),J("end",t)})}function j(t,e){var r,n,i,s;e.handleNumbers.some(V)||(1===e.handleNumbers.length&&(s=a[e.handleNumbers[0]].children[0],o+=1,addClass(s,d.cssClasses.active)),t.stopPropagation(),n=F(c.move,x,z,{target:t.target,handle:s,connect:e.connect,listeners:r=[],startCalcPoint:t.calcPoint,baseSize:O(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:m.slice()}),i=F(c.end,x,H,{target:t.target,handle:s,listeners:r,doNotReject:!0,handleNumbers:e.handleNumbers}),s=F("mouseout",x,_,{target:t.target,handle:s,listeners:r,doNotReject:!0,handleNumbers:e.handleNumbers}),r.push.apply(r,n.concat(i,s)),t.cursor&&(y.style.cursor=getComputedStyle(t.target).cursor,1<a.length&&addClass(f,d.cssClasses.drag),y.addEventListener("selectstart",preventDefault,!1)),e.handleNumbers.forEach(function(t){J("start",t)}))}function I(t){t.stopPropagation();var i,s,o,e=R(t.calcPoint),r=(i=e,o=!(s=100),a.forEach(function(t,e){var r,n;V(e)||(r=m[e],((n=Math.abs(r-i))<s||n<=s&&r<i||100===n&&100===s)&&(o=e,s=n))}),o);!1!==r&&(d.events.snap||addClassFor(f,d.cssClasses.tap,d.animationDuration),Q(r,e,!0,!0),G(),J("slide",r,!0),J("update",r,!0),d.events.snap?j(t,{handleNumbers:[r]}):(J("change",r,!0),J("set",r,!0)))}function B(t){var t=R(t.calcPoint),t=b.getStep(t),e=b.fromStepping(t);Object.keys(v).forEach(function(t){"hover"===t.split(".")[0]&&v[t].forEach(function(t){t.call(it,e)})})}function K(t,e){v[t]=v[t]||[],v[t].push(e),"update"===t.split(".")[0]&&a.forEach(function(t,e){J("update",e)})}function q(t){var n=t&&t.split(".")[0],i=n?t.substring(n.length):t;Object.keys(v).forEach(function(t){var e=t.split(".")[0],r=t.substring(e.length);n&&n!==e||i&&i!==r||((e=r)!==INTERNAL_EVENT_NS.aria&&e!==INTERNAL_EVENT_NS.tooltips||i===r)&&delete v[t]})}function J(r,n,i){Object.keys(v).forEach(function(t){var e=t.split(".")[0];r===e&&v[t].forEach(function(t){t.call(it,h.map(d.format.to),n,h.slice(),i||!1,m.slice(),it)})})}function X(t,e,r,n,i,s){var o;return 1<a.length&&!d.events.unconstrained&&(n&&0<e&&(o=b.getAbsoluteDistance(t[e-1],d.margin,!1),r=Math.max(r,o)),i&&e<a.length-1&&(o=b.getAbsoluteDistance(t[e+1],d.margin,!0),r=Math.min(r,o))),1<a.length&&d.limit&&(n&&0<e&&(o=b.getAbsoluteDistance(t[e-1],d.limit,!1),r=Math.min(r,o)),i&&e<a.length-1&&(o=b.getAbsoluteDistance(t[e+1],d.limit,!0),r=Math.max(r,o))),d.padding&&(0===e&&(o=b.getAbsoluteDistance(0,d.padding[0],!1),r=Math.max(r,o)),e===a.length-1&&(o=b.getAbsoluteDistance(100,d.padding[1],!0),r=Math.min(r,o))),!((r=limit(r=b.getStep(r)))===t[e]&&!s)&&r}function Y(t,e){var r=d.ort;return(r?e:t)+", "+(r?t:e)}function W(t,r,n,e,i){var s=n.slice(),o=e[0],a=[!t,t],l=[t,!t];e=e.slice(),t&&e.reverse(),1<e.length?e.forEach(function(t,e){e=X(s,t,s[t]+r,a[e],l[e],!1);!1===e?r=0:(r=e-s[t],s[t]=e)}):a=l=[!0];var u=!1;e.forEach(function(t,e){u=Q(t,n[t]+r,a[e],l[e])||u}),u&&(e.forEach(function(t){J("update",t),J("slide",t)}),null!=i&&J("drag",o))}function $(t,e){return d.dir?100-t-e:t}function G(){g.forEach(function(t){var e=50<m[t]?-1:1,e=3+(a.length+e*t);a[t].style.zIndex=String(e)})}function Q(t,e,r,n,i){return!1!==(e=i?e:X(m,t,e,r,n,!1))&&(e=e,m[t=t]=e,h[t]=b.fromStepping(e),e="translate("+Y($(e,0)-E+"%","0")+")",a[t].style[d.transformRule]=e,Z(t),Z(t+1),!0)}function Z(t){var e,r;l[t]&&(r=100,e="translate("+Y($(e=(e=0)!==t?m[t-1]:e,r=(r=t!==l.length-1?m[t]:r)-e)+"%","0")+")",r="scale("+Y(r/100,"1")+")",l[t].style[d.transformRule]=e+" "+r)}function tt(t,e){return null===t||!1===t||void 0===t?m[e]:("number"==typeof t&&(t=String(t)),!1===(t=!1!==(t=d.format.from(t))?b.toStepping(t):t)||isNaN(t)?m[e]:t)}function et(t,e,r){var n=asArray(t),t=void 0===m[0];e=void 0===e||e,d.animate&&!t&&addClassFor(f,d.cssClasses.tap,d.animationDuration),g.forEach(function(t){Q(t,tt(n[t],t),!0,!1,r)});var i,s=1===g.length?0:1;for(t&&b.hasNoSize()&&(r=!0,m[0]=0,1<g.length&&(i=100/(g.length-1),g.forEach(function(t){m[t]=t*i})));s<g.length;++s)g.forEach(function(t){Q(t,m[t],!0,!0,r)});G(),g.forEach(function(t){J("update",t),null!==n[t]&&e&&J("set",t)})}function rt(t){if(t=void 0===t?!1:t)return 1===h.length?h[0]:h.slice(0);t=h.map(d.format.to);return 1===t.length?t[0]:t}function nt(t){var e=m[t],r=b.getNearbySteps(e),n=h[t],i=r.thisStep.step,t=null;if(d.snap)return[n-r.stepBefore.startValue||null,r.stepAfter.startValue-n||null];!1!==i&&n+i>r.stepAfter.startValue&&(i=r.stepAfter.startValue-n),t=n>r.thisStep.startValue?r.thisStep.step:!1!==r.stepBefore.step&&n-r.stepBefore.highestStep,100===e?i=null:0===e&&(t=null);e=b.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(e))),[t=null!==t&&!1!==t?Number(t.toFixed(e)):t,i]}addClass(t=f,d.cssClasses.target),0===d.dir?addClass(t,d.cssClasses.ltr):addClass(t,d.cssClasses.rtl),0===d.ort?addClass(t,d.cssClasses.horizontal):addClass(t,d.cssClasses.vertical),addClass(t,"rtl"===getComputedStyle(t).direction?d.cssClasses.textDirectionRtl:d.cssClasses.textDirectionLtr),r=N(t,d.cssClasses.base),function(t,e){var r=N(e,d.cssClasses.connects);a=[],(l=[]).push(w(r,t[0]));for(var n=0;n<d.handles;n++)a.push(P(e,n)),g[n]=n,l.push(w(r,t[n+1]))}(d.connect,r),(u=d.events).fixed||a.forEach(function(t,e){F(c.start,t.children[0],j,{handleNumbers:[e]})}),u.tap&&F(c.start,r,I,{}),u.hover&&F(c.move,r,B,{hover:!0}),u.drag&&l.forEach(function(e,t){var r,n,i,s,o;!1!==e&&0!==t&&t!==l.length-1&&(r=a[t-1],n=a[t],i=[e],s=[r,n],o=[t-1,t],addClass(e,d.cssClasses.draggable),u.fixed&&(i.push(r.children[0]),i.push(n.children[0])),u.dragAll&&(s=a,o=g),i.forEach(function(t){F(c.start,t,j,{handles:s,handleNumbers:o,connect:e})}))}),et(d.start),d.pips&&L(d.pips),d.tooltips&&k(),q("update"+INTERNAL_EVENT_NS.aria),K("update"+INTERNAL_EVENT_NS.aria,function(t,e,s,r,o){g.forEach(function(t){var e=a[t],r=X(m,t,0,!0,!0,!0),n=X(m,t,100,!0,!0,!0),i=o[t],t=String(d.ariaFormat.to(s[t])),r=b.fromStepping(r).toFixed(1),n=b.fromStepping(n).toFixed(1),i=b.fromStepping(i).toFixed(1);e.children[0].setAttribute("aria-valuemin",r),e.children[0].setAttribute("aria-valuemax",n),e.children[0].setAttribute("aria-valuenow",i),e.children[0].setAttribute("aria-valuetext",t)})});var it={destroy:function(){for(q(INTERNAL_EVENT_NS.aria),q(INTERNAL_EVENT_NS.tooltips),Object.keys(d.cssClasses).forEach(function(t){removeClass(f,d.cssClasses[t])});f.firstChild;)f.removeChild(f.firstChild);delete f.noUiSlider},steps:function(){return g.map(nt)},on:K,off:q,get:rt,set:et,setHandle:function(t,e,r,n){if(!(0<=(t=Number(t))&&t<g.length))throw new Error("noUiSlider: invalid handle number, got: "+t);Q(t,tt(e,t),!0,!0,n),J("update",t),r&&J("set",t)},reset:function(t){et(d.start,t)},__moveHandles:function(t,e,r){W(t,e,m,r)},options:s,updateOptions:function(e,t){var r=rt(),n=["margin","limit","padding","range","animate","snap","step","format","pips","tooltips"];n.forEach(function(t){void 0!==e[t]&&(s[t]=e[t])});var i=testOptions(s);n.forEach(function(t){void 0!==e[t]&&(d[t]=i[t])}),b=i.spectrum,d.margin=i.margin,d.limit=i.limit,d.padding=i.padding,d.pips?L(d.pips):U(),(d.tooltips?k:A)(),m=[],et(isSet(e.start)?e.start:r,t)},target:f,removePips:U,removeTooltips:A,getPositions:function(){return m.slice()},getTooltips:function(){return i},getOrigins:function(){return a},pips:L};return it}function initialize(t,e){if(!t||!t.nodeName)throw new Error("noUiSlider: create requires a single element, got: "+t);if(t.noUiSlider)throw new Error("noUiSlider: Slider was already initialized.");e=scope(t,testOptions(e),e);return t.noUiSlider=e}export default{__spectrum:Spectrum,cssClasses:cssClasses,create:initialize};export{PipsMode,PipsType,initialize as create,cssClasses};
|
|
@@ -527,7 +527,7 @@ function testStep(parsed, entry) {
|
|
|
527
527
|
throw new Error("noUiSlider: 'step' is not numeric.");
|
|
528
528
|
}
|
|
529
529
|
// The step option can still be used to set stepping
|
|
530
|
-
// for linear sliders. Overwritten if set in 'range'.
|
|
530
|
+
// for linear.svg sliders. Overwritten if set in 'range'.
|
|
531
531
|
parsed.singleStep = entry;
|
|
532
532
|
}
|
|
533
533
|
function testKeyboardPageMultiplier(parsed, entry) {
|
|
@@ -648,7 +648,7 @@ function testLimit(parsed, entry) {
|
|
|
648
648
|
}
|
|
649
649
|
parsed.limit = parsed.spectrum.getDistance(entry);
|
|
650
650
|
if (!parsed.limit || parsed.handles < 2) {
|
|
651
|
-
throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.");
|
|
651
|
+
throw new Error("noUiSlider: 'limit' option is only supported on linear.svg sliders with 2 or more handles.");
|
|
652
652
|
}
|
|
653
653
|
}
|
|
654
654
|
function testPadding(parsed, entry) {
|
|
@@ -1748,17 +1748,17 @@ function scope(target, options, originalOptions) {
|
|
|
1748
1748
|
scope_Events[targetEvent].forEach(function (callback) {
|
|
1749
1749
|
callback.call(
|
|
1750
1750
|
// Use the slider public API as the scope ('this')
|
|
1751
|
-
scope_Self,
|
|
1751
|
+
scope_Self,
|
|
1752
1752
|
// Return values as array, so arg_1[arg_2] is always valid.
|
|
1753
|
-
scope_Values.map(options.format.to),
|
|
1753
|
+
scope_Values.map(options.format.to),
|
|
1754
1754
|
// Handle index, 0 or 1
|
|
1755
|
-
handleNumber,
|
|
1755
|
+
handleNumber,
|
|
1756
1756
|
// Un-formatted slider values
|
|
1757
|
-
scope_Values.slice(),
|
|
1757
|
+
scope_Values.slice(),
|
|
1758
1758
|
// Event is fired by tap, true or false
|
|
1759
|
-
tap || false,
|
|
1759
|
+
tap || false,
|
|
1760
1760
|
// Left offset of the handle, in relation to the slider
|
|
1761
|
-
scope_Locations.slice(),
|
|
1761
|
+
scope_Locations.slice(),
|
|
1762
1762
|
// add the slider public API to an accessible parameter when this is unavailable
|
|
1763
1763
|
scope_Self);
|
|
1764
1764
|
});
|
|
@@ -902,7 +902,7 @@ function testStep(parsed: ParsedOptions, entry: unknown): void {
|
|
|
902
902
|
}
|
|
903
903
|
|
|
904
904
|
// The step option can still be used to set stepping
|
|
905
|
-
// for linear sliders. Overwritten if set in 'range'.
|
|
905
|
+
// for linear.svg sliders. Overwritten if set in 'range'.
|
|
906
906
|
parsed.singleStep = entry;
|
|
907
907
|
}
|
|
908
908
|
|
|
@@ -1053,7 +1053,7 @@ function testLimit(parsed: ParsedOptions, entry: unknown): void {
|
|
|
1053
1053
|
parsed.limit = parsed.spectrum.getDistance(entry);
|
|
1054
1054
|
|
|
1055
1055
|
if (!parsed.limit || parsed.handles < 2) {
|
|
1056
|
-
throw new Error("noUiSlider: 'limit' option is only supported on linear sliders with 2 or more handles.");
|
|
1056
|
+
throw new Error("noUiSlider: 'limit' option is only supported on linear.svg sliders with 2 or more handles.");
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
1059
|
|
|
@@ -577,23 +577,24 @@ cursor: pointer;
|
|
|
577
577
|
</div>
|
|
578
578
|
<div class="dropdown-menu position-absolute"
|
|
579
579
|
style="top:50px; right: 0;">
|
|
580
|
-
${
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
580
|
+
${[
|
|
581
|
+
...(() => {
|
|
582
|
+
const view = member_auth.filter((dd) => {
|
|
583
|
+
return dd.config.member_id !== POSSetting.config.who;
|
|
584
|
+
}).map((dd) => {
|
|
585
|
+
const memberDD = dd;
|
|
586
|
+
return `
|
|
586
587
|
<a class="dropdown-item cursor_pointer d-flex flex-column" onclick="${gvc.event(() => {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
588
|
+
gvc.glitter.innerDialog((gvc) => {
|
|
589
|
+
const c_vm = {
|
|
590
|
+
text: '',
|
|
591
|
+
id: gvc.glitter.getUUID()
|
|
592
|
+
};
|
|
593
|
+
return gvc.bindView(() => {
|
|
594
|
+
return {
|
|
595
|
+
bind: c_vm.id,
|
|
596
|
+
view: () => {
|
|
597
|
+
return `<div style="flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 42px; display: inline-flex">
|
|
597
598
|
<div style="align-self: stretch; height: 100px; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 18px; display: flex">
|
|
598
599
|
<div style="align-self: stretch; justify-content: center; align-items: flex-start; gap: 16px; display: inline-flex">
|
|
599
600
|
<div style="text-align: center"><span style="color: #FFB400; font-size: 42px; font-family: Lilita One; font-weight: 400; word-wrap: break-word">SHOPNE</span><span style="color: #FFB400; font-size: 42px; font-family: Lilita One; font-weight: 400; letter-spacing: 2.52px; word-wrap: break-word">X</span></div>
|
|
@@ -603,123 +604,123 @@ cursor: pointer;
|
|
|
603
604
|
</div>
|
|
604
605
|
<div style="align-self: stretch; justify-content: center; align-items: center; gap: 20px; display: inline-flex">
|
|
605
606
|
${(() => {
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
607
|
+
let view = [];
|
|
608
|
+
for (let a = 0; a < 6; a++) {
|
|
609
|
+
if (c_vm.text.length > a) {
|
|
610
|
+
view.push(`<div style="width: 18px; height: 18px; position: relative; background: #FFB400; border-radius: 30px"></div>`);
|
|
611
|
+
}
|
|
612
|
+
else {
|
|
613
|
+
view.push(` <div style="width: 18px; height: 18px; position: relative; background: #B0B0B0; border-radius: 30px"></div>`);
|
|
614
|
+
}
|
|
613
615
|
}
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
})()}
|
|
616
|
+
return view.join('');
|
|
617
|
+
})()}
|
|
617
618
|
</div>
|
|
618
619
|
<div style="background: white; flex-direction: column; justify-content: flex-start; align-items: center; gap: 32px; display: flex">
|
|
619
620
|
<div style="align-self: stretch; border-radius: 10px; flex-direction: column; justify-content: flex-start; align-items: center; display: flex;border: 1px solid #DDD;">
|
|
620
621
|
${[[1, 2, 3], [4, 5, 6], [7, 8, 9], ['取消', 0, '<i class="fa-regular fa-delete-left"></i>']].map((dd) => {
|
|
621
|
-
|
|
622
|
+
return ` <div style="justify-content: flex-start; align-items: center; display: inline-flex">
|
|
622
623
|
${dd.map((dd) => {
|
|
623
|
-
|
|
624
|
+
return `<div style="height:56px;width:95px;flex-direction: column; justify-content: center; align-items: center; gap: 10px; display: inline-flex">
|
|
624
625
|
<div style="align-self: stretch; text-align: center; color: #393939; font-size: 20px; font-weight: 700; line-height: 28px; word-wrap: break-word" onclick="${gvc.event(() => {
|
|
625
|
-
|
|
626
|
-
gvc.closeDialog();
|
|
627
|
-
return;
|
|
628
|
-
}
|
|
629
|
-
else if (`${dd}`.includes(`fa-regular`)) {
|
|
630
|
-
c_vm.text = c_vm.text.substring(0, c_vm.text.length - 1);
|
|
631
|
-
gvc.notifyDataChange(c_vm.id);
|
|
632
|
-
return;
|
|
633
|
-
}
|
|
634
|
-
c_vm.text += dd;
|
|
635
|
-
const dialog = new ShareDialog(gvc.glitter);
|
|
636
|
-
if (c_vm.text.length === 6) {
|
|
637
|
-
if (memberDD.config.pin === c_vm.text) {
|
|
638
|
-
POSSetting.config.who = memberDD.config.member_id;
|
|
626
|
+
if (dd === '取消') {
|
|
639
627
|
gvc.closeDialog();
|
|
640
|
-
|
|
628
|
+
return;
|
|
641
629
|
}
|
|
642
|
-
else {
|
|
643
|
-
|
|
644
|
-
c_vm.
|
|
630
|
+
else if (`${dd}`.includes(`fa-regular`)) {
|
|
631
|
+
c_vm.text = c_vm.text.substring(0, c_vm.text.length - 1);
|
|
632
|
+
gvc.notifyDataChange(c_vm.id);
|
|
633
|
+
return;
|
|
645
634
|
}
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
635
|
+
c_vm.text += dd;
|
|
636
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
637
|
+
if (c_vm.text.length === 6) {
|
|
638
|
+
if (memberDD.config.pin === c_vm.text) {
|
|
639
|
+
POSSetting.config.who = memberDD.config.member_id;
|
|
640
|
+
gvc.closeDialog();
|
|
641
|
+
refreshUserBar();
|
|
642
|
+
}
|
|
643
|
+
else {
|
|
644
|
+
dialog.errorMessage({ text: '輸入錯誤' });
|
|
645
|
+
c_vm.text = '';
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
gvc.notifyDataChange(c_vm.id);
|
|
649
|
+
})}">${dd}</div>
|
|
649
650
|
</div>`;
|
|
650
|
-
|
|
651
|
+
}).join('<div class="" style="border-right: 1px #DDDDDD solid;height:56px;"></div>')}
|
|
651
652
|
</div>`;
|
|
652
|
-
|
|
653
|
+
}).join('<div class="" style="border-top: 1px #DDDDDD solid;height:1px; width: 100%;"></div>')}
|
|
653
654
|
|
|
654
655
|
</div>
|
|
655
656
|
</div>
|
|
656
657
|
</div>`;
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
658
|
+
},
|
|
659
|
+
divCreate: {
|
|
660
|
+
class: ``,
|
|
661
|
+
style: `width: 338px; padding-left: 20px; padding-right: 20px; padding-top: 25px; padding-bottom: 25px; background: white; box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.15); border-radius: 20px; overflow: hidden; justify-content: center; align-items: center; gap: 10px; display: inline-flex`
|
|
662
|
+
}
|
|
663
|
+
};
|
|
664
|
+
});
|
|
665
|
+
}, '');
|
|
666
|
+
})}">
|
|
666
667
|
${dd.config.title} / ${dd.config.name} / ${dd.config.member_id}
|
|
667
668
|
</a>
|
|
668
669
|
`;
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
670
|
+
});
|
|
671
|
+
if (POSSetting.config.who !== 'manager') {
|
|
672
|
+
view.push(html `<a
|
|
672
673
|
class="dropdown-item cursor_pointer d-flex flex-column ${POSSetting.config.who === 'manager' ? `d-none` : ``}"
|
|
673
674
|
onclick="${gvc.event(() => {
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
675
|
+
gvc.glitter.innerDialog((gvc) => {
|
|
676
|
+
return POSSetting.loginManager(gvc, 'switch', () => {
|
|
677
|
+
refreshUserBar();
|
|
678
|
+
gvc.closeDialog();
|
|
679
|
+
});
|
|
680
|
+
}, '');
|
|
681
|
+
})}">
|
|
681
682
|
切換至管理員
|
|
682
683
|
</a>`);
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
html `
|
|
684
|
+
}
|
|
685
|
+
return view;
|
|
686
|
+
})(),
|
|
687
|
+
...[
|
|
688
|
+
...((PayConfig.deviceType === 'pos') ? [
|
|
689
|
+
html `
|
|
690
690
|
<a class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
691
691
|
style="gap:10px;"
|
|
692
692
|
onclick="${gvc.event(() => {
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
693
|
+
ConnectionMode.main(gvc);
|
|
694
|
+
})}"><i class="fa-solid fa-plug d-flex align-items-center justify-content-center" style="width:20px;" ></i>連線模式</a>`,
|
|
695
|
+
] : []),
|
|
696
|
+
...((ConnectionMode.on_connected_device) ? [
|
|
697
|
+
`<a class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
698
698
|
style="gap:10px;"
|
|
699
699
|
onclick="${gvc.event(() => {
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
700
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
701
|
+
dialog.checkYesOrNot({
|
|
702
|
+
text: '是否斷開與 IMIN 裝置的連線?',
|
|
703
|
+
callback: (response) => {
|
|
704
|
+
if (response) {
|
|
705
|
+
dialog.infoMessage({ text: '已斷開連線' });
|
|
706
|
+
ConnectionMode.last_connect_id = '';
|
|
707
|
+
ConnectionMode.on_connected_device = '';
|
|
708
|
+
ConnectionMode.socket.close();
|
|
709
|
+
}
|
|
709
710
|
}
|
|
710
|
-
}
|
|
711
|
-
});
|
|
712
|
-
|
|
713
|
-
]
|
|
714
|
-
|
|
715
|
-
return html `<a
|
|
711
|
+
});
|
|
712
|
+
})}"><i class="fa-solid fa-power-off d-flex align-items-center justify-content-center" style="width:20px;"></i>斷開裝置連線</a>`
|
|
713
|
+
] : [])
|
|
714
|
+
].concat(PayConfig.deviceType === 'pos' ? [] : ConnectionMode.device_list.map((dd) => {
|
|
715
|
+
return html `<a
|
|
716
716
|
class="dropdown-item cursor_pointer d-flex align-items-center"
|
|
717
717
|
style="gap:10px;"
|
|
718
718
|
onclick="${gvc.event(() => {
|
|
719
|
-
|
|
720
|
-
|
|
719
|
+
ConnectionMode.connect(dd);
|
|
720
|
+
})}"><i
|
|
721
721
|
class="fa-solid fa-plug d-flex align-items-center justify-content-center" style="width:20px;"></i>連線至『 ${dd} 』</a>`;
|
|
722
|
-
|
|
722
|
+
}))
|
|
723
|
+
].join('<div class="dropdown-divider"></div>')}
|
|
723
724
|
${(POSSetting.config.who === 'manager') ? html `
|
|
724
725
|
<div class="dropdown-divider"></div>
|
|
725
726
|
<a class="dropdown-item cursor_pointer d-flex align-items-center"
|