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

chx-utils

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chx-utils - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

dist/eventBus.d.ts

4

dist/chx-utils.esm.js

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

import{ref as t,onBeforeUpdate as e,computed as n,unref as r}from"vue";import*as o from"ramda";import i from"dayjs";import u,{storeFilter as c}from"cx-store";
import{ref as t,onBeforeUpdate as e,computed as n,unref as r,onUnmounted as o}from"vue";import*as i from"ramda";import u from"dayjs";import c,{storeFilter as a}from"cx-store";
/*! *****************************************************************************

@@ -15,2 +15,2 @@ Copyright (c) Microsoft Corporation.

PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */function a(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,c)}a((r=r.apply(t,e||[])).next())}))}function s(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function f(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function l(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var h=Object.prototype.toString;function p(t,e){return h.call(t)==="[object "+e+"]"}function d(t){return null==t||"string"==typeof t&&""===t.trim()||"object"==typeof t&&0===Object.keys(t).length}function v(t){return/^(https?|tel|mailto)/.test(t)}var y=function(t){return void 0!==t},_=function(t){return!y(t)},m=function(t){return null!==t&&p(t,"Object")};function b(t){return p(t,"Date")}function g(t){return null===t}function w(t){return _(t)&&g(t)}function O(t){return p(t,"Number")}function E(t){return p(t,"Promise")&&m(t)&&x(t.then)&&x(t.catch)}function N(t){return p(t,"String")}var x=function(t){return"function"==typeof t};function D(t){return p(t,"Boolean")}function A(t){return p(t,"RegExp")}function j(t){return t&&Array.isArray(t)}var M=function(t){return"undefined"!=typeof window&&p(t,"Window")},T=function(t){return m(t)&&!!t.tagName},S="undefined"==typeof window,R="undefined"!=typeof window;function P(t){return t&&["IMAGE","IMG"].includes(t.tagName)}var L=function(t){return null!==t&&"textarea"===t.tagName.toLowerCase()},k=function(){return!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)},z=function(t){return/(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(t)};function F(t){return!!t&&Reflect.get(t,"nodeType")===Node.ELEMENT_NODE}function I(t){return F(t)&&"INPUT"===t.tagName}function C(t){return"[object Object]"===Object.prototype.toString.call(t)}function B(t){return"object"==typeof t&&!!t&&Reflect.has(t,"message")}function W(t){return Reflect.has(t,"id")&&Reflect.has(t,"name")}function G(t,e){if(-1===e.indexOf("."))return!1;var n=e.match(t);return!(!Array.isArray(n)||n[0]!==e)}var Y=function(){return Ft.of(o.identity)},q=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];console.warn.apply(console,l(["[Functor warn]:"],f(t)))},H=o.tap(console.log),V=function(t,e){return function(){return t.apply(void 0,l([],f(e)))}},$=o.curry((function(t,e){return e.map(t)})),U=o.curryN(2,(function(t,e){return e.unsafePerformIO(t)})),Q=function(t){return document.querySelector(t)},Z=function(t,e){return function(){return t.apply(void 0,l([],f(e.map((function(t){return t()})))))}},J=function(t){return t.getWithDefault()},K=o.curryN(3,(function(t,e,n){switch(n.constructor){case Ct:return t(n.__value);case Bt:return e(n.__value)}})),X=o.curryN(2,(function(t,e){return e.push.apply(e,l([],f(t))),e})),tt=o.curryN(2,(function(t,e){return e.splice(0),e.push.apply(e,l([],f(t))),e})),et=function(t){return t.splice(0),t},nt=o.curryN(3,Reflect.set),rt=o.curryN(2,Reflect.get),ot=o.curryN(2,Reflect.deleteProperty),it=o.curryN(2,(function(t,e){return e.splice(t,1),e})),ut=function(t){return o.forEach(ot(t),o.keys(t)),t},ct=o.curryN(2,(function(t,e){return Object.assign(e,t),e})),at=o.curryN(2,(function(t,e){return Object.assign(ut(e),t),e})),st=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return"development"===process.env.NODE_ENV?zt.of(t.apply(void 0,l([],f(e)))):zt.none()}},ft=function(t){return function(e){return t.apply(void 0,l([],f(e)))}},lt=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t(e)}},ht=function(t){return!!t},pt=function(t){return!t},dt=function(t){return o.tap(o.when(o.compose(o.is(Function),o.prop(t)),o.compose(o.call,o.converge(o.bind,[o.prop(t),o.identity]))))},vt=dt("preventDefault"),yt=dt("stopPropagation"),_t=o.propEq("state",200),mt=o.curryN(2,setTimeout),bt=function(t){return function(e){return setTimeout((function(){return t(e)}),0)}},gt=function(){return new Promise(o.nAry(1,setTimeout))},wt=function(t){return clearTimeout(t),clearInterval(t),t},Ot=function(t){return function(){return Promise.resolve(t)}},Et=function(t){return document.body.appendChild(t),t},Nt=function(t){return document.createElement(t)},xt=function(t){return t.innerHTML="",t},Dt=o.curryN(2,(function(t,e){return e.innerText=t,e})),At=o.curryN(2,(function(t,e){var n;return(n=e.classList).add.apply(n,l([],f(t))),e})),jt=function(t){return o.when(ht,(function(e){return e.style.display=t}))},Mt=jt("none"),Tt=jt("block"),St=o.curryN(2,(function(t,e){return e.appendChild(t),e})),Rt=o.curryN(3,(function(t,e,n){return n.addEventListener(t,e),n})),Pt=o.curryN(3,(function(t,e,n){return n.removeEventListener(t,e),n})),Lt=function(t){return t.className="",t},kt=function(){function t(t){this.__value=t}return t.of=function(e){return null==e&&q("Provided Identify value must not be empty"),new t(e)},t.prototype.map=function(e){return t.of(e(this.__value))},t.prototype.ap=function(t){return o.is(Function,this.__value)?t.map(this.__value):this},t}(),zt=function(){function t(t){this.__value=t}return t.of=function(e){return null==e?t.none():new t(e)},t.none=function(){return new t(null)},t.run=function(e){return function n(r){var o=e.next(r);return o.done?t.of(o.value):o.value.chain(n)}()},t.prototype.map=function(e){return null==this.__value?t.none():t.of(e(this.__value))},t.prototype.isNegative=function(){return null==this.__value},t.prototype.join=function(){return this.isNegative()?t.none():this.__value},t.prototype.chain=function(t){return this.map(t).join()},t.prototype.getWithDefault=function(t){return this.isNegative()?t:this.__value},t.prototype.ap=function(t){return o.is(Function,this.__value)?t.map(this.__value):this},t}(),Ft=function(){function t(t){this.__value=t}return t.of=function(e){return new t(e)},t.prototype.map=function(e){return new t(o.compose(e,this.__value))},t.prototype.join=function(){return this.unsafePerformIO()},t.prototype.chain=function(t){return this.map(t).join()},t.prototype.unsafePerformIO=function(t){return this.__value(t)},t.prototype.ap=function(e){var n=this.unsafePerformIO(e.unsafePerformIO());return o.is(Function,n)?t.of(n):t.of((function(){return n}))},t}(),It=function(){function t(t,e){void 0===e&&(e=function(){}),this.fork=t,this.cleanup=e}return t.of=function(e){return new t((function(t,n){return n(e)}))},t.prototype.map=function(e){var n=this.fork;return new t((function(t,r){return n(t,o.compose(r,e))}),this.cleanup)},t}(),Ct=function(){function t(t){this.__value=t}return t.of=function(e){return null==e&&q("Provided value must not be empty"),new t(e)},t.prototype.map=function(t){return this},t.prototype.ap=function(t){return this},t}(),Bt=function(){function t(t){this.__value=t}return t.of=function(e){return null==e&&q("Provided Right value must not be empty"),new t(e)},t.prototype.map=function(e){return t.of(e(this.__value))},t.prototype.ap=function(t){return o.is(Function,this.__value)?t.map(this.__value):this},t}(),Wt=function(t,e){this.left=t,this.right=e},Gt=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];t.call(e,o[1],o[0])}},e}()}(),Yt="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,qt="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Ht="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(qt):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var Vt=["top","right","bottom","left","width","height","size","weight"],$t="undefined"!=typeof MutationObserver,Ut=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,o=0;function i(){n&&(n=!1,t()),r&&c()}function u(){Ht(i)}function c(){var t=Date.now();if(n){if(t-o<2)return;r=!0}else n=!0,r=!1,setTimeout(u,e);o=t}return c}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){Yt&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),$t?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){Yt&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;Vt.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Qt=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},Zt=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||qt},Jt=re(0,0,0,0);function Kt(t){return parseFloat(t)||0}function Xt(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+Kt(t["border-"+n+"-width"])}),0)}function te(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Jt;var r=Zt(t).getComputedStyle(t),o=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=t["padding-"+o];e[o]=Kt(i)}return e}(r),i=o.left+o.right,u=o.top+o.bottom,c=Kt(r.width),a=Kt(r.height);if("border-box"===r.boxSizing&&(Math.round(c+i)!==e&&(c-=Xt(r,"left","right")+i),Math.round(a+u)!==n&&(a-=Xt(r,"top","bottom")+u)),!function(t){return t===Zt(t).document.documentElement}(t)){var s=Math.round(c+i)-e,f=Math.round(a+u)-n;1!==Math.abs(s)&&(c-=s),1!==Math.abs(f)&&(a-=f)}return re(o.left,o.top,c,a)}var ee="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Zt(t).SVGGraphicsElement}:function(t){return t instanceof Zt(t).SVGElement&&"function"==typeof t.getBBox};function ne(t){return Yt?ee(t)?function(t){var e=t.getBBox();return re(0,0,e.width,e.height)}(t):te(t):Jt}function re(t,e,n,r){return{x:t,y:e,width:n,height:r}}var oe=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=re(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=ne(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),ie=function(t,e){var n,r,o,i,u,c,a,s=(r=(n=e).x,o=n.y,i=n.width,u=n.height,c="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(c.prototype),Qt(a,{x:r,y:o,width:i,height:u,top:o,right:r+i,bottom:u+o,left:r}),a);Qt(this,{target:t,contentRect:s})},ue=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new Gt,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Zt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new oe(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Zt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new ie(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),ce="undefined"!=typeof WeakMap?new WeakMap:new Gt,ae=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Ut.getInstance(),r=new ue(e,n,this);ce.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){ae.prototype[t]=function(){var e;return(e=ce.get(this))[t].apply(e,arguments)}}));var se=void 0!==qt.ResizeObserver?qt.ResizeObserver:ae,fe="undefined"==typeof window,le=function(t){var e,n;try{for(var r=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),o=r.next();!o.done;o=r.next()){var i=o.value.target.__resizeListeners__||[];i.length&&i.forEach((function(t){t()}))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},he=function(t,e){!fe&&t&&(t.__resizeListeners__||(t.__resizeListeners__=[],t.__ro__=new se(le),t.__ro__.observe(t)),t.__resizeListeners__.push(e))},pe=function(t,e){t&&t.__resizeListeners__&&(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),t.__resizeListeners__.length||t.__ro__.disconnect())};function de(){var t=new Date,e=t.getFullYear(),n=t.getMonth();return[new Date(e,n,1),new Date(e,n,t.getDate())]}function ve(t,e){return void 0===e&&(e="YYYY-MM-DD"),t?Array.isArray(t)?t.map((function(t){return i(t).format(e)})):[i(t).format(e)]:[]}function ye(t,e){"number"==typeof e&&10===e.toString().length&&(e*=1e3),"yesterday"===t&&(e=Number(new Date)-864e5);var n=e?new Date(e):new Date,r=new Date(n.getFullYear(),n.getMonth()),o=new Date(n.getTime());switch(o.setHours(0,0,0,0),t){case"date":return n;case"month":return r;case"today":case"yesterday":return[o,n];default:return[r,n]}}var _e=["fullYear","month","date","hours","minutes","seconds"];function me(t,e,n){var r;void 0===t&&(t=1),void 0===e&&(e="date"),void 0===n&&(n=!1);var o=new Date,i=new Date,u=Re(e);i=new Date(null===(r=i["set"+u])||void 0===r?void 0:r.call(i,o["get"+u]()-t));var c=new Date;if(n){var a=_e.findIndex((function(t){return t===e})),s=Re(_e[a+1]);i["set"+s]&&(i=new Date(i["set"+s](1)),t&&(c=new Date(c["set"+s](0))))}return[i,c]}function be(t){return{shortcuts:[{text:"最近一天",value:me(1)},{text:"最近一周",value:me(7)},{text:"最近一个月",value:me(1,"month")},{text:"最近三个月",value:me(3,"month")},{text:"上一个月",value:me(1,"month",!0)},{text:"本月",value:me(0,"month",!0)},{text:"全部",onClick:function(t){return t.emit("pick",null)}}],disabledDate:function(e){if(t)return t(e);var n=new Date,r=n.getFullYear(),o=n.getMonth(),i=n.getDate()+1;return e.getTime()>Number(new Date(r,o,i))-1e3},dateShortcuts:[{text:"今天",value:me(0)[0]},{text:"昨天",value:me(1)[0]},{text:"一周前",value:me(7)[0]}]}}function ge(e){var n=t(e);return[function(t){return t?n:r(n)},function(t){return n.value=t}]}function we(){return ge(null)[0]}function Oe(){var t=new Set;return e((function(){return t.clear()})),[t,function(e){return e&&t.add(e)}]}function Ee(){var t=[];return e((function(){t=[]})),[t,function(e){t.push(e)}]}function Ne(t){return"object"==typeof t&&Reflect.has(t||{},"set")}function xe(t){var e=(Ne(t),n(t)),r=function(t){return t?e:e.value};return Ne(t)?[r,function(t){return e.value=t}]:r}function De(t){var e={};return Object.entries(t).forEach((function(t){var n=f(t,2),r=n[0],o=n[1];return e[r]=o(!0)})),e}function Ae(t,e,r){return void 0===r&&(r=[]),r.length?r.reduce((function(r,o){var i=n({get:function(){return t[o]},set:function(t){return e("update:"+o,t)}});return r.push(i),r}),[]):[]}var je=new u("session");je.use(c);var Me=je,Te=new u("local");Te.use(c);var Se=Te,Re=function(t){return t[0].toUpperCase()+t.slice(1)},Pe=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return t.slice(0,e).concat(Le(n)).concat(t.slice(e,1/0))},Le=function(t){if(!Array.isArray(t))return[t];if(0===t.length)return t;for(var e,n=[],r=[t];e=r.shift();)Array.isArray(e)?r.push.apply(r,l([],f(e))):n.push(e);return n},ke=function(t){var e=document.createRange();e.selectNodeContents(t);var n=window.getSelection();return null==n||n.removeAllRanges(),null==n||n.addRange(e),document.execCommand("copy"),t};function ze(t,e){return m(t)?Object.keys(t).reduce((function(n,r){return e.includes(r)||Reflect.set(n,r,t[r]),n}),{}):t}function Fe(t,e,n){void 0===e&&(e="name"),void 0===n&&(n="id");var r=[];return Object.entries(t).forEach((function(t){var i,u=f(t,2),c=u[0],a=u[1];o.is(Number,a)&&r.push(((i={})[e]=c,i[n]=a,i))})),r}function Ie(t,e,n){var r,o,i,u;void 0===e&&(e=100);var c=0;function a(){c=!1===(null==n?void 0:n.leading)?0:Date.now(),r=null,u=t.apply(o,i),r||(o=i=null)}return n||(n={}),function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];var l=Date.now();c||!1!==(null==n?void 0:n.leading)||(c=l);var h=e-(l-c);return o=this,i=s,h<=0||h>e?(r&&(clearTimeout(r),r=null),c=l,u=t.apply(o,s),r||(o=i=null)):r||!1===(null==n?void 0:n.trailing)||(r=setTimeout(a,h)),u}}function Ce(e,n){var r=t(!1);return n&&(n.value=!1),[function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return a(this,void 0,void 0,(function(){var o,i;return s(this,(function(u){switch(u.label){case 0:if(r.value)return[2,Promise.reject("loading...")];r.value=!0,n&&(n.value=!0),o=null,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,e.apply(void 0,l([],f(t)))];case 2:return o=u.sent(),[3,4];case 3:return i=u.sent(),o=Promise.reject(i),[3,4];case 4:return n&&(n.value=!1),r.value=!1,[2,o]}}))}))},r]}var Be=function(t,e){if(t===e)return!0;if("function"==typeof t&&"function"==typeof e)return t.toString()===e.toString();if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(e)||"object"!=typeof t)return!1;var n=Object.getOwnPropertyNames(t),r=Object.getOwnPropertyNames(e);return n.length===r.length&&n.every((function(n){return Be(t[n],e[n])}))};function We(t,e,r){return void 0===r&&(r=[]),r.length?r.reduce((function(r,o){var i=n({get:function(){return t[o]},set:function(t){return e("update:"+o,t)}});return r.push(i),r}),[]):[]}function Ge(t){var e=t.val,n=t.min,r=t.max,o=t.maxLen,i=t.decimal;if(""===(e=(e+"").trim()))return"";n>=0&&(e=e.replace(/-/g,""));[[/[^\-\d.]/g,""],[/\.{2,}/g,"."],[/-{2,}/g,"-"],[/(?!(\B-))-/g,""],[/^\./g,"0."],[/(\d+\.\d+)\./,"$1"]].forEach((function(t){return e=e.replace(t[0],t[1])}));var u=e.split(".");i=parseInt(i+"")||0,u.length>1&&u[1]&&i&&u[1].length>i&&(u[1]=u[1].slice(0,i));var c="";return o=parseInt(o+"")||0,/^-/.test(u[0])&&(u[0]=u[0].replace(/-/g,""),c="-",o++),o&&u[0].length>o&&(u[0]=u[0].slice(0,o)),u[0]&&(u[0]=Number(u[0].toString())),c&&(u[0]=c+u[0]),e=u.join("."),i||"-"===e||(e=Number(e)),r=parseFloat(r),n=parseFloat(n),!isNaN(n)&&parseFloat(e)<n&&(e=n),!isNaN(r)&&parseFloat(e)>r&&(e=r),e}export{Wt as Either,Ft as IO,kt as Identify,Ct as Left,zt as Maybe,Bt as Right,It as Task,he as addResizeListener,Ge as amount,St as appendChild,Et as appendToBody,Pe as arrInsert,gt as awaitTimeout,Z as calledBy,Lt as clearClassList,xt as clearInnerHTML,wt as clearTimer,ke as copyInnerText,Nt as createTag,Rt as curryAddListener,Pt as curryRemoveListener,mt as curryTimeout,Ot as defaultPromise,K as either,Fe as enum2Options,pt as falsy,Le as flatten,q as functorWarn,me as getDateRange,de as getDefaultDateRange,Y as getDoNothingIO,J as getMaybeValue,De as getRefs,Re as headUppercase,Mt as hideEle,ye as initDate,p as is,v as isAbsolutePath,C as isAnyObject,j as isArray,D as isBoolean,R as isClient,b as isDate,Be as isDeepObjectEqual,y as isDef,T as isElement,d as isEmpty,B as isErrorLike,x as isFunction,F as isHTMLElement,I as isHTMLInputElement,P as isImageDom,k as isMobile,W as isNameWithId,g as isNull,w as isNullAndUnDef,O as isNumber,m as isObject,E as isPromise,A as isRegExp,G as isSame,S as isServer,N as isString,L as isTextarea,_ as isUnDef,z as isUrl,M as isWindow,Ce as loadingDecorator,Se as localStore,$ as map,bt as nextTimeout,ze as omit,ve as parseTimeParams,vt as preventDefault,dt as propCall,We as propDecorator,Q as queryDom,pe as removeResizeListener,Me as sessionStore,At as setClassByArr,jt as setDisplay,Dt as setInnerText,Tt as showEle,ft as splat,_t as stateEq200,yt as stopPropagation,Ie as throttle,H as trace,ht as truthy,ct as unsafeAssign,et as unsafeClearArray,at as unsafeClearAssign,ut as unsafeClearObj,tt as unsafeClearPush,ot as unsafeDeleteProperty,rt as unsafeGet,U as unsafePerformIO,X as unsafePush,it as unsafeRemoveItem,nt as unsafeSet,st as unsafeWhenDevCall,lt as unsplat,xe as useComputed,be as usePickerOptions,we as useRef,Oe as useRefs,Ee as useRefsArray,ge as useState,Ae as useSync,V as withParams};
***************************************************************************** */function s(t,e,n,r){return new(n||(n=Promise))((function(o,i){function u(t){try{a(r.next(t))}catch(t){i(t)}}function c(t){try{a(r.throw(t))}catch(t){i(t)}}function a(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(u,c)}a((r=r.apply(t,e||[])).next())}))}function f(t,e){var n,r,o,i,u={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function c(i){return function(c){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return u.label++,{value:i[1],done:!1};case 5:u.label++,r=i[1],i=[0];continue;case 7:i=u.ops.pop(),u.trys.pop();continue;default:if(!(o=u.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){u=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){u.label=i[1];break}if(6===i[0]&&u.label<o[1]){u.label=o[1],o=i;break}if(o&&u.label<o[2]){u.label=o[2],u.ops.push(i);break}o[2]&&u.ops.pop(),u.trys.pop();continue}i=e.call(t,u)}catch(t){i=[6,t],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,c])}}}function l(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)u.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return u}function h(t,e,n){if(n||2===arguments.length)for(var r,o=0,i=e.length;o<i;o++)!r&&o in e||(r||(r=Array.prototype.slice.call(e,0,o)),r[o]=e[o]);return t.concat(r||Array.prototype.slice.call(e))}var p=Object.prototype.toString;function v(t,e){return p.call(t)==="[object "+e+"]"}function d(t){return null==t||"string"==typeof t&&""===t.trim()||"object"==typeof t&&0===Object.keys(t).length}function y(t){return/^(https?|tel|mailto)/.test(t)}var _=function(t){return void 0!==t},m=function(t){return!_(t)},g=function(t){return null!==t&&v(t,"Object")};function b(t){return v(t,"Date")}function w(t){return null===t}function O(t){return m(t)&&w(t)}function E(t){return v(t,"Number")}function D(t){return v(t,"Promise")&&g(t)&&x(t.then)&&x(t.catch)}function N(t){return v(t,"String")}var x=function(t){return"function"==typeof t};function A(t){return v(t,"Boolean")}function M(t){return v(t,"RegExp")}function j(t){return t&&Array.isArray(t)}var S=function(t){return"undefined"!=typeof window&&v(t,"Window")},T=function(t){return g(t)&&!!t.tagName},R="undefined"==typeof window,P="undefined"!=typeof window;function L(t){return t&&["IMAGE","IMG"].includes(t.tagName)}var k=function(t){return null!==t&&"textarea"===t.tagName.toLowerCase()},z=function(){return!!navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i)},F=function(t){return/(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/.test(t)};function I(t){return!!t&&Reflect.get(t,"nodeType")===Node.ELEMENT_NODE}function C(t){return I(t)&&"INPUT"===t.tagName}function B(t){return"[object Object]"===Object.prototype.toString.call(t)}function W(t){return"object"==typeof t&&!!t&&Reflect.has(t,"message")}function G(t){return Reflect.has(t,"id")&&Reflect.has(t,"name")}function Y(t,e){if(-1===e.indexOf("."))return!1;var n=e.match(t);return!(!Array.isArray(n)||n[0]!==e)}var q=function(){return It.of(i.identity)},H=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];console.warn.apply(console,h(["[Functor warn]:"],l(t)))},V=i.tap(console.log),$=function(t,e){return function(){return t.apply(void 0,h([],l(e)))}},U=i.curry((function(t,e){return e.map(t)})),Q=i.curryN(2,(function(t,e){return e.unsafePerformIO(t)})),Z=function(t){return document.querySelector(t)},J=function(t,e){return function(){return t.apply(void 0,h([],l(e.map((function(t){return t()})))))}},K=function(t){return t.getWithDefault()},X=i.curryN(3,(function(t,e,n){switch(n.constructor){case Bt:return t(n.__value);case Wt:return e(n.__value)}})),tt=i.curryN(2,(function(t,e){return e.push.apply(e,h([],l(t))),e})),et=i.curryN(2,(function(t,e){return e.splice(0),e.push.apply(e,h([],l(t))),e})),nt=function(t){return t.splice(0),t},rt=i.curryN(3,Reflect.set),ot=i.curryN(2,Reflect.get),it=i.curryN(2,Reflect.deleteProperty),ut=i.curryN(2,(function(t,e){return e.splice(t,1),e})),ct=function(t){return i.forEach(it(t),i.keys(t)),t},at=i.curryN(2,(function(t,e){return Object.assign(e,t),e})),st=i.curryN(2,(function(t,e){return Object.assign(ct(e),t),e})),ft=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return"development"===process.env.NODE_ENV?Ft.of(t.apply(void 0,h([],l(e)))):Ft.none()}},lt=function(t){return function(e){return t.apply(void 0,h([],l(e)))}},ht=function(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t(e)}},pt=function(t){return!!t},vt=function(t){return!t},dt=function(t){return i.tap(i.when(i.compose(i.is(Function),i.prop(t)),i.compose(i.call,i.converge(i.bind,[i.prop(t),i.identity]))))},yt=dt("preventDefault"),_t=dt("stopPropagation"),mt=i.propEq("state",200),gt=i.curryN(2,setTimeout),bt=function(t){return function(e){return setTimeout((function(){return t(e)}),0)}},wt=function(){return new Promise(i.nAry(1,setTimeout))},Ot=function(t){return clearTimeout(t),clearInterval(t),t},Et=function(t){return function(){return Promise.resolve(t)}},Dt=function(t){return document.body.appendChild(t),t},Nt=function(t){return document.createElement(t)},xt=function(t){return t.innerHTML="",t},At=i.curryN(2,(function(t,e){return e.innerText=t,e})),Mt=i.curryN(2,(function(t,e){var n;return(n=e.classList).add.apply(n,h([],l(t))),e})),jt=function(t){return i.when(pt,(function(e){return e.style.display=t}))},St=jt("none"),Tt=jt("block"),Rt=i.curryN(2,(function(t,e){return e.appendChild(t),e})),Pt=i.curryN(3,(function(t,e,n){return n.addEventListener(t,e),n})),Lt=i.curryN(3,(function(t,e,n){return n.removeEventListener(t,e),n})),kt=function(t){return t.className="",t},zt=function(){function t(t){this.__value=t}return t.of=function(e){return null==e&&H("Provided Identify value must not be empty"),new t(e)},t.prototype.map=function(e){return t.of(e(this.__value))},t.prototype.ap=function(t){return i.is(Function,this.__value)?t.map(this.__value):this},t}(),Ft=function(){function t(t){this.__value=t}return t.of=function(e){return null==e?t.none():new t(e)},t.none=function(){return new t(null)},t.run=function(e){return function n(r){var o=e.next(r);return o.done?t.of(o.value):o.value.chain(n)}()},t.prototype.map=function(e){return null==this.__value?t.none():t.of(e(this.__value))},t.prototype.isNegative=function(){return null==this.__value},t.prototype.join=function(){return this.isNegative()?t.none():this.__value},t.prototype.chain=function(t){return this.map(t).join()},t.prototype.getWithDefault=function(t){return this.isNegative()?t:this.__value},t.prototype.ap=function(t){return i.is(Function,this.__value)?t.map(this.__value):this},t}(),It=function(){function t(t){this.__value=t}return t.of=function(e){return new t(e)},t.prototype.map=function(e){return new t(i.compose(e,this.__value))},t.prototype.join=function(){return this.unsafePerformIO()},t.prototype.chain=function(t){return this.map(t).join()},t.prototype.unsafePerformIO=function(t){return this.__value(t)},t.prototype.ap=function(e){var n=this.unsafePerformIO(e.unsafePerformIO());return i.is(Function,n)?t.of(n):t.of((function(){return n}))},t}(),Ct=function(){function t(t,e){void 0===e&&(e=function(){}),this.fork=t,this.cleanup=e}return t.of=function(e){return new t((function(t,n){return n(e)}))},t.prototype.map=function(e){var n=this.fork;return new t((function(t,r){return n(t,i.compose(r,e))}),this.cleanup)},t}(),Bt=function(){function t(t){this.__value=t}return t.of=function(e){return null==e&&H("Provided value must not be empty"),new t(e)},t.prototype.map=function(t){return this},t.prototype.ap=function(t){return this},t}(),Wt=function(){function t(t){this.__value=t}return t.of=function(e){return null==e&&H("Provided Right value must not be empty"),new t(e)},t.prototype.map=function(e){return t.of(e(this.__value))},t.prototype.ap=function(t){return i.is(Function,this.__value)?t.map(this.__value):this},t}(),Gt=function(t,e){this.left=t,this.right=e},Yt=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some((function(t,r){return t[0]===e&&(n=r,!0)})),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];t.call(e,o[1],o[0])}},e}()}(),qt="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Ht="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Vt="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Ht):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)};var $t=["top","right","bottom","left","width","height","size","weight"],Ut="undefined"!=typeof MutationObserver,Qt=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,o=0;function i(){n&&(n=!1,t()),r&&c()}function u(){Vt(i)}function c(){var t=Date.now();if(n){if(t-o<2)return;r=!0}else n=!0,r=!1,setTimeout(u,e);o=t}return c}(this.refresh.bind(this),20)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter((function(t){return t.gatherActive(),t.hasActive()}));return t.forEach((function(t){return t.broadcastActive()})),t.length>0},t.prototype.connect_=function(){qt&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Ut?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},t.prototype.disconnect_=function(){qt&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;$t.some((function(t){return!!~n.indexOf(t)}))&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),Zt=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var o=r[n];Object.defineProperty(t,o,{value:e[o],enumerable:!1,writable:!1,configurable:!0})}return t},Jt=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Ht},Kt=oe(0,0,0,0);function Xt(t){return parseFloat(t)||0}function te(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce((function(e,n){return e+Xt(t["border-"+n+"-width"])}),0)}function ee(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Kt;var r=Jt(t).getComputedStyle(t),o=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=t["padding-"+o];e[o]=Xt(i)}return e}(r),i=o.left+o.right,u=o.top+o.bottom,c=Xt(r.width),a=Xt(r.height);if("border-box"===r.boxSizing&&(Math.round(c+i)!==e&&(c-=te(r,"left","right")+i),Math.round(a+u)!==n&&(a-=te(r,"top","bottom")+u)),!function(t){return t===Jt(t).document.documentElement}(t)){var s=Math.round(c+i)-e,f=Math.round(a+u)-n;1!==Math.abs(s)&&(c-=s),1!==Math.abs(f)&&(a-=f)}return oe(o.left,o.top,c,a)}var ne="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Jt(t).SVGGraphicsElement}:function(t){return t instanceof Jt(t).SVGElement&&"function"==typeof t.getBBox};function re(t){return qt?ne(t)?function(t){var e=t.getBBox();return oe(0,0,e.width,e.height)}(t):ee(t):Kt}function oe(t,e,n,r){return{x:t,y:e,width:n,height:r}}var ie=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=oe(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=re(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),ue=function(t,e){var n,r,o,i,u,c,a,s=(r=(n=e).x,o=n.y,i=n.width,u=n.height,c="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,a=Object.create(c.prototype),Zt(a,{x:r,y:o,width:i,height:u,top:o,right:r+i,bottom:u+o,left:r}),a);Zt(this,{target:t,contentRect:s})},ce=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new Yt,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Jt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new ie(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof Jt(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new ue(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),ae="undefined"!=typeof WeakMap?new WeakMap:new Yt,se=function t(e){if(!(this instanceof t))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=Qt.getInstance(),r=new ce(e,n,this);ae.set(this,r)};["observe","unobserve","disconnect"].forEach((function(t){se.prototype[t]=function(){var e;return(e=ae.get(this))[t].apply(e,arguments)}}));var fe=void 0!==Ht.ResizeObserver?Ht.ResizeObserver:se,le="undefined"==typeof window,he=function(t){var e,n;try{for(var r=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}(t),o=r.next();!o.done;o=r.next()){var i=o.value.target.__resizeListeners__||[];i.length&&i.forEach((function(t){t()}))}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},pe=function(t,e){!le&&t&&(t.__resizeListeners__||(t.__resizeListeners__=[],t.__ro__=new fe(he),t.__ro__.observe(t)),t.__resizeListeners__.push(e))},ve=function(t,e){t&&t.__resizeListeners__&&(t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(e),1),t.__resizeListeners__.length||t.__ro__.disconnect())};function de(){var t=new Date,e=t.getFullYear(),n=t.getMonth();return[new Date(e,n,1),new Date(e,n,t.getDate())]}function ye(t,e){return void 0===e&&(e="YYYY-MM-DD"),t?Array.isArray(t)?t.map((function(t){return u(t).format(e)})):[u(t).format(e)]:[]}function _e(t,e){"number"==typeof e&&10===e.toString().length&&(e*=1e3),"yesterday"===t&&(e=Number(new Date)-864e5);var n=e?new Date(e):new Date,r=new Date(n.getFullYear(),n.getMonth()),o=new Date(n.getTime());switch(o.setHours(0,0,0,0),t){case"date":return n;case"month":return r;case"today":case"yesterday":return[o,n];default:return[r,n]}}var me=["fullYear","month","date","hours","minutes","seconds"];function ge(t,e,n){var r;void 0===t&&(t=1),void 0===e&&(e="date"),void 0===n&&(n=!1);var o=new Date,i=new Date,u=We(e);i=new Date(null===(r=i["set"+u])||void 0===r?void 0:r.call(i,o["get"+u]()-t));var c=new Date;if(n){var a=me.findIndex((function(t){return t===e})),s=We(me[a+1]);i["set"+s]&&(i=new Date(i["set"+s](1)),t&&(c=new Date(c["set"+s](0))))}return[i,c]}function be(t){return{shortcuts:[{text:"最近一天",value:ge(1)},{text:"最近一周",value:ge(7)},{text:"最近一个月",value:ge(1,"month")},{text:"最近三个月",value:ge(3,"month")},{text:"上一个月",value:ge(1,"month",!0)},{text:"本月",value:ge(0,"month",!0)},{text:"全部",onClick:function(t){return t.emit("pick",null)}}],disabledDate:function(e){if(t)return t(e);var n=new Date,r=n.getFullYear(),o=n.getMonth(),i=n.getDate()+1;return e.getTime()>Number(new Date(r,o,i))-1e3},dateShortcuts:[{text:"今天",value:ge(0)[0]},{text:"昨天",value:ge(1)[0]},{text:"一周前",value:ge(7)[0]}]}}function we(e){var n=t(e);return[function(t){return t?n:r(n)},function(t){return n.value=t}]}function Oe(){return we(null)[0]}function Ee(){var t=new Set;return e((function(){return t.clear()})),[t,function(e){return e&&t.add(e)}]}function De(){var t=[];return e((function(){t=[]})),[t,function(e){t.push(e)}]}function Ne(t){return"object"==typeof t&&Reflect.has(t||{},"set")}function xe(t){var e=(Ne(t),n(t)),r=function(t){return t?e:e.value};return Ne(t)?[r,function(t){return e.value=t}]:r}function Ae(t){var e={};return Object.entries(t).forEach((function(t){var n=l(t,2),r=n[0],o=n[1];return e[r]=o(!0)})),e}function Me(t,e,r){return void 0===r&&(r=[]),r.length?r.reduce((function(r,o){var i=n({get:function(){return t[o]},set:function(t){return e("update:"+o,t)}});return r.push(i),r}),[]):[]}var je=new c("session");je.use(a);var Se=je,Te=new c("local");Te.use(a);var Re=Te,Pe=function(){function t(){this.events=new Map}return t.prototype.on=function(t,e){if("function"!=typeof e)return this;var n=this.events.get(t)||new Set;return n.add(e),this.events.set(t,n),this},t.prototype.off=function(t,e){if(e){var n=this.events.get(t);n&&n.delete(e)}else this.events.delete(t);return this},t.prototype.emit=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.trigger.apply(this,h([t],l(e)))},t.prototype.once=function(t,e){var n=this;if("function"==typeof e){var r=function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];e.apply(void 0,h([],l(o))),n.off(t,r)};this.on(t,r)}return this},t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=this.events.get(t);return r&&r.forEach((function(t){return t.apply(void 0,h([],l(e)))})),this},t}();function Le(){return new Pe}var ke=Le(),ze=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var r=function(t){return t.apply(void 0,h([],l(e)))};ke.on(t,r),o((function(){ke.off(t,r)}))},Fe=function(t){var e;return ke.emit(t,(function(t){e=t})),null==e&&console.warn("events: get events value",t,"before regist"),e},Ie=function(){function t(){this.eventDep={}}return t.prototype.on=function(t,e){var n;this.eventDep[t]?null===(n=this.eventDep[t])||void 0===n||n.push(e):this.eventDep[t]=[e]},t.prototype.emit=function(t){for(var e,n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];this.eventDep[t]&&(null===(e=this.eventDep[t])||void 0===e||e.forEach((function(t){return t.apply(void 0,h([],l(n)))})))},t.prototype.off=function(t){this.eventDep[t]=null},t.prototype.clear=function(){this.eventDep={}},t}();function Ce(){return new Ie}var Be=Ce(),We=function(t){return t[0].toUpperCase()+t.slice(1)},Ge=function(t,e){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return t.slice(0,e).concat(Ye(n)).concat(t.slice(e,1/0))},Ye=function(t){if(!Array.isArray(t))return[t];if(0===t.length)return t;for(var e,n=[],r=[t];e=r.shift();)Array.isArray(e)?r.push.apply(r,h([],l(e))):n.push(e);return n},qe=function(t){var e=document.createRange();e.selectNodeContents(t);var n=window.getSelection();return null==n||n.removeAllRanges(),null==n||n.addRange(e),document.execCommand("copy"),t};function He(t,e){return g(t)?Object.keys(t).reduce((function(n,r){return e.includes(r)||Reflect.set(n,r,t[r]),n}),{}):t}function Ve(t,e,n){void 0===e&&(e="name"),void 0===n&&(n="id");var r=[];return Object.entries(t).forEach((function(t){var o,u=l(t,2),c=u[0],a=u[1];i.is(Number,a)&&r.push(((o={})[e]=c,o[n]=a,o))})),r}function $e(t,e,n){var r,o,i,u;void 0===e&&(e=100);var c=0;function a(){c=!1===(null==n?void 0:n.leading)?0:Date.now(),r=null,u=t.apply(o,i),r||(o=i=null)}return n||(n={}),function(){for(var s=[],f=0;f<arguments.length;f++)s[f]=arguments[f];var l=Date.now();c||!1!==(null==n?void 0:n.leading)||(c=l);var h=e-(l-c);return o=this,i=s,h<=0||h>e?(r&&(clearTimeout(r),r=null),c=l,u=t.apply(o,s),r||(o=i=null)):r||!1===(null==n?void 0:n.trailing)||(r=setTimeout(a,h)),u}}function Ue(e,n){var r=t(!1);return n&&(n.value=!1),[function(){for(var t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];return s(this,void 0,void 0,(function(){var o,i;return f(this,(function(u){switch(u.label){case 0:if(r.value)return[2,Promise.reject("loading...")];r.value=!0,n&&(n.value=!0),o=null,u.label=1;case 1:return u.trys.push([1,3,,4]),[4,e.apply(void 0,h([],l(t)))];case 2:return o=u.sent(),[3,4];case 3:return i=u.sent(),o=Promise.reject(i),[3,4];case 4:return n&&(n.value=!1),r.value=!1,[2,o]}}))}))},r]}var Qe=function(t,e){if(t===e)return!0;if("function"==typeof t&&"function"==typeof e)return t.toString()===e.toString();if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(e)||"object"!=typeof t)return!1;var n=Object.getOwnPropertyNames(t),r=Object.getOwnPropertyNames(e);return n.length===r.length&&n.every((function(n){return Qe(t[n],e[n])}))};function Ze(t,e,r){return void 0===r&&(r=[]),r.length?r.reduce((function(r,o){var i=n({get:function(){return t[o]},set:function(t){return e("update:"+o,t)}});return r.push(i),r}),[]):[]}function Je(t){var e=t.val,n=t.min,r=t.max,o=t.maxLen,i=t.decimal;if(""===(e=(e+"").trim()))return"";n>=0&&(e=e.replace(/-/g,""));[[/[^\-\d.]/g,""],[/\.{2,}/g,"."],[/-{2,}/g,"-"],[/(?!(\B-))-/g,""],[/^\./g,"0."],[/(\d+\.\d+)\./,"$1"]].forEach((function(t){return e=e.replace(t[0],t[1])}));var u=e.split(".");i=parseInt(i+"")||0,u.length>1&&u[1]&&i&&u[1].length>i&&(u[1]=u[1].slice(0,i));var c="";return o=parseInt(o+"")||0,/^-/.test(u[0])&&(u[0]=u[0].replace(/-/g,""),c="-",o++),o&&u[0].length>o&&(u[0]=u[0].slice(0,o)),u[0]&&(u[0]=Number(u[0].toString())),c&&(u[0]=c+u[0]),e=u.join("."),i||"-"===e||(e=Number(e)),r=parseFloat(r),n=parseFloat(n),!isNaN(n)&&parseFloat(e)<n&&(e=n),!isNaN(r)&&parseFloat(e)>r&&(e=r),e}export{ke as $events,Gt as Either,Ce as EventBusCreator,Le as EventsCreator,It as IO,zt as Identify,Bt as Left,Ft as Maybe,Wt as Right,Ct as Task,pe as addResizeListener,Je as amount,Rt as appendChild,Dt as appendToBody,Ge as arrInsert,wt as awaitTimeout,J as calledBy,kt as clearClassList,xt as clearInnerHTML,Ot as clearTimer,qe as copyInnerText,Nt as createTag,Pt as curryAddListener,Lt as curryRemoveListener,gt as curryTimeout,Et as defaultPromise,X as either,Ve as enum2Options,Be as eventBus,vt as falsy,Ye as flatten,H as functorWarn,ge as getDateRange,de as getDefaultDateRange,q as getDoNothingIO,K as getMaybeValue,Ae as getRefs,Fe as getSafeEventsValue,We as headUppercase,St as hideEle,_e as initDate,v as is,y as isAbsolutePath,B as isAnyObject,j as isArray,A as isBoolean,P as isClient,b as isDate,Qe as isDeepObjectEqual,_ as isDef,T as isElement,d as isEmpty,W as isErrorLike,x as isFunction,I as isHTMLElement,C as isHTMLInputElement,L as isImageDom,z as isMobile,G as isNameWithId,w as isNull,O as isNullAndUnDef,E as isNumber,g as isObject,D as isPromise,M as isRegExp,Y as isSame,R as isServer,N as isString,k as isTextarea,m as isUnDef,F as isUrl,S as isWindow,Ue as loadingDecorator,Re as localStore,U as map,bt as nextTimeout,He as omit,ye as parseTimeParams,yt as preventDefault,dt as propCall,Ze as propDecorator,Z as queryDom,ve as removeResizeListener,ze as safeRegisterEvents,Se as sessionStore,Mt as setClassByArr,jt as setDisplay,At as setInnerText,Tt as showEle,lt as splat,mt as stateEq200,_t as stopPropagation,$e as throttle,V as trace,pt as truthy,at as unsafeAssign,nt as unsafeClearArray,st as unsafeClearAssign,ct as unsafeClearObj,et as unsafeClearPush,it as unsafeDeleteProperty,ot as unsafeGet,Q as unsafePerformIO,tt as unsafePush,ut as unsafeRemoveItem,rt as unsafeSet,ft as unsafeWhenDevCall,ht as unsplat,xe as useComputed,be as usePickerOptions,Oe as useRef,Ee as useRefs,De as useRefsArray,we as useState,Me as useSync,$ as withParams};

@@ -9,2 +9,4 @@ import { Ref, WritableComputedRef } from 'vue';

export * from './store';
export * from './events';
export * from './eventBus';
export declare const headUppercase: (s: string) => string;

@@ -11,0 +13,0 @@ export declare const arrInsert: <T = any>(target: T[], position: number, ...args: (T | T[])[]) => T[];

{
"name": "chx-utils",
"version": "1.0.7",
"version": "1.0.8",
"description": "",

@@ -5,0 +5,0 @@ "author": "xiexuan",

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc