a11y-panel 1.0.0
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/README.md +114 -0
- package/dist/a11y-panel.es.js +2618 -0
- package/dist/a11y-panel.umd.cjs +333 -0
- package/dist/components/AccessibilityWidget.d.ts +18 -0
- package/dist/components/ConfigComponents/ColorsSelect.d.ts +7 -0
- package/dist/components/ConfigComponents/Counter.d.ts +9 -0
- package/dist/components/ConfigComponents/FontButtons.d.ts +1 -0
- package/dist/components/ConfigComponents/FontColor.d.ts +1 -0
- package/dist/components/ConfigComponents/FontSize.d.ts +1 -0
- package/dist/components/ConfigComponents/HideImages.d.ts +1 -0
- package/dist/components/ConfigComponents/HighContrast.d.ts +1 -0
- package/dist/components/ConfigComponents/HighlightLinks.d.ts +1 -0
- package/dist/components/ConfigComponents/HighlightTitles.d.ts +1 -0
- package/dist/components/ConfigComponents/LetterSpacing.d.ts +1 -0
- package/dist/components/ConfigComponents/LineHeight.d.ts +1 -0
- package/dist/components/ConfigComponents/LowContrast.d.ts +1 -0
- package/dist/components/ConfigComponents/Monochrome.d.ts +1 -0
- package/dist/components/ConfigComponents/SettingsBox.d.ts +8 -0
- package/dist/components/ConfigComponents/TextCase.d.ts +2 -0
- package/dist/components/ConfigComponents/TitleBackgroundColor.d.ts +1 -0
- package/dist/components/ConfigComponents/TitleColor.d.ts +1 -0
- package/dist/components/ConfigComponents/Toggle.d.ts +6 -0
- package/dist/components/Context/Store.d.ts +14 -0
- package/dist/components/Context/initialState.d.ts +21 -0
- package/dist/components/Context/reducer.d.ts +66 -0
- package/dist/components/Footer.d.ts +1 -0
- package/dist/components/Header.d.ts +1 -0
- package/dist/components/StyleSettings.d.ts +1 -0
- package/dist/components/TextContent/SectionTitle.d.ts +5 -0
- package/dist/components/TextContent/SubSectionTitle.d.ts +5 -0
- package/dist/components/Widget.d.ts +11 -0
- package/dist/components/assets/AccessibilityIcon.d.ts +3 -0
- package/dist/components/assets/BoldIcon.d.ts +2 -0
- package/dist/components/assets/CloseIcon.d.ts +4 -0
- package/dist/components/assets/ItalicIcon.d.ts +2 -0
- package/dist/components/assets/MinusIcon.d.ts +2 -0
- package/dist/components/assets/PlusIcon.d.ts +4 -0
- package/dist/components/assets/TextAlignCenterIcon.d.ts +2 -0
- package/dist/components/assets/TextAlignLeftIcon.d.ts +2 -0
- package/dist/components/assets/TextAlignRightIcon.d.ts +2 -0
- package/dist/components/helpers/createStyles.d.ts +4 -0
- package/dist/components/variables/initialStyleSettings.d.ts +13 -0
- package/dist/favicon.ico +0 -0
- package/dist/index.d.ts +4 -0
- package/dist/logo192.png +0 -0
- package/dist/logo512.png +0 -0
- package/dist/manifest.json +25 -0
- package/dist/robots.txt +3 -0
- package/dist/style.css +1 -0
- package/package.json +62 -0
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
(function(re,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("react"),require("styled-components")):typeof define=="function"&&define.amd?define(["exports","react","styled-components"],G):(re=typeof globalThis<"u"?globalThis:re||self,G(re.A11yPanel={},re.React,re.styled))})(this,function(re,G,V){"use strict";function ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var de={exports:{}},ie={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/var Oe;function Ve(){if(Oe)return ie;Oe=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function c(T,w,h){var O=null;if(h!==void 0&&(O=""+h),w.key!==void 0&&(O=""+w.key),"key"in w){h={};for(var v in w)v!=="key"&&(h[v]=w[v])}else h=w;return w=h.ref,{$$typeof:e,type:T,key:O,ref:w!==void 0?w:null,props:h}}return ie.Fragment=r,ie.jsx=c,ie.jsxs=c,ie}var ae={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react-jsx-runtime.development.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
+
*
|
|
15
|
+
* This source code is licensed under the MIT license found in the
|
|
16
|
+
* LICENSE file in the root directory of this source tree.
|
|
17
|
+
*/var $e;function Xe(){return $e||($e=1,process.env.NODE_ENV!=="production"&&function(){function e(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===N?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case b:return"Fragment";case z:return"Profiler";case R:return"StrictMode";case u:return"Suspense";case p:return"SuspenseList";case P:return"Activity"}if(typeof t=="object")switch(typeof t.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),t.$$typeof){case n:return"Portal";case U:return t.displayName||"Context";case D:return(t._context.displayName||"Context")+".Consumer";case m:var f=t.render;return t=t.displayName,t||(t=f.displayName||f.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case x:return f=t.displayName||null,f!==null?f:e(t.type)||"Memo";case s:f=t._payload,t=t._init;try{return e(t(f))}catch{}}return null}function r(t){return""+t}function c(t){try{r(t);var f=!1}catch{f=!0}if(f){f=console;var C=f.error,E=typeof Symbol=="function"&&Symbol.toStringTag&&t[Symbol.toStringTag]||t.constructor.name||"Object";return C.call(f,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",E),r(t)}}function T(t){if(t===b)return"<>";if(typeof t=="object"&&t!==null&&t.$$typeof===s)return"<...>";try{var f=e(t);return f?"<"+f+">":"<...>"}catch{return"<...>"}}function w(){var t=L.A;return t===null?null:t.getOwner()}function h(){return Error("react-stack-top-frame")}function O(t){if(j.call(t,"key")){var f=Object.getOwnPropertyDescriptor(t,"key").get;if(f&&f.isReactWarning)return!1}return t.key!==void 0}function v(t,f){function C(){q||(q=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",f))}C.isReactWarning=!0,Object.defineProperty(t,"key",{get:C,configurable:!0})}function y(){var t=e(this.type);return K[t]||(K[t]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),t=this.props.ref,t!==void 0?t:null}function a(t,f,C,E,I,M){var $=C.ref;return t={$$typeof:l,type:t,key:f,props:C,_owner:E},($!==void 0?$:null)!==null?Object.defineProperty(t,"ref",{enumerable:!1,get:y}):Object.defineProperty(t,"ref",{enumerable:!1,value:null}),t._store={},Object.defineProperty(t._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(t,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(t,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:I}),Object.defineProperty(t,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:M}),Object.freeze&&(Object.freeze(t.props),Object.freeze(t)),t}function d(t,f,C,E,I,M){var $=f.children;if($!==void 0)if(E)if(B($)){for(E=0;E<$.length;E++)_($[E]);Object.freeze&&Object.freeze($)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else _($);if(j.call(f,"key")){$=e(t);var A=Object.keys(f).filter(function(H){return H!=="key"});E=0<A.length?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}",i[$+E]||(A=0<A.length?"{"+A.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
|
+
let props = %s;
|
|
19
|
+
<%s {...props} />
|
|
20
|
+
React keys must be passed directly to JSX without using spread:
|
|
21
|
+
let props = %s;
|
|
22
|
+
<%s key={someKey} {...props} />`,E,$,A,$),i[$+E]=!0)}if($=null,C!==void 0&&(c(C),$=""+C),O(f)&&(c(f.key),$=""+f.key),"key"in f){C={};for(var W in f)W!=="key"&&(C[W]=f[W])}else C=f;return $&&v(C,typeof t=="function"?t.displayName||t.name||"Unknown":t),a(t,$,C,w(),I,M)}function _(t){k(t)?t._store&&(t._store.validated=1):typeof t=="object"&&t!==null&&t.$$typeof===s&&(t._payload.status==="fulfilled"?k(t._payload.value)&&t._payload.value._store&&(t._payload.value._store.validated=1):t._store&&(t._store.validated=1))}function k(t){return typeof t=="object"&&t!==null&&t.$$typeof===l}var g=G,l=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),U=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),s=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),N=Symbol.for("react.client.reference"),L=g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=Object.prototype.hasOwnProperty,B=Array.isArray,X=console.createTask?console.createTask:function(){return null};g={react_stack_bottom_frame:function(t){return t()}};var q,K={},J=g.react_stack_bottom_frame.bind(g,h)(),Z=X(T(h)),i={};ae.Fragment=b,ae.jsx=function(t,f,C){var E=1e4>L.recentlyCreatedOwnerStacks++;return d(t,f,C,!1,E?Error("react-stack-top-frame"):J,E?X(T(t)):Z)},ae.jsxs=function(t,f,C){var E=1e4>L.recentlyCreatedOwnerStacks++;return d(t,f,C,!0,E?Error("react-stack-top-frame"):J,E?X(T(t)):Z)}}()),ae}process.env.NODE_ENV==="production"?de.exports=Ve():de.exports=Xe();var o=de.exports;function qe(e){return o.jsxs("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"2em",width:"2em",xmlns:"http://www.w3.org/2000/svg",...e,children:[o.jsx("path",{d:"M256 112a56 56 0 1156-56 56.06 56.06 0 01-56 56z"}),o.jsx("path",{d:"M432 112.8l-.45.12-.42.13c-1 .28-2 .58-3 .89-18.61 5.46-108.93 30.92-172.56 30.92-59.13 0-141.28-22-167.56-29.47a73.79 73.79 0 00-8-2.58c-19-5-32 14.3-32 31.94 0 17.47 15.7 25.79 31.55 31.76v.28l95.22 29.74c9.73 3.73 12.33 7.54 13.6 10.84 4.13 10.59.83 31.56-.34 38.88l-5.8 45-32.19 176.19q-.15.72-.27 1.47l-.23 1.27c-2.32 16.15 9.54 31.82 32 31.82 19.6 0 28.25-13.53 32-31.94s28-157.57 42-157.57 42.84 157.57 42.84 157.57c3.75 18.41 12.4 31.94 32 31.94 22.52 0 34.38-15.74 32-31.94a57.17 57.17 0 00-.76-4.06L329 301.27l-5.79-45c-4.19-26.21-.82-34.87.32-36.9a1.09 1.09 0 00.08-.15c1.08-2 6-6.48 17.48-10.79l89.28-31.21a16.9 16.9 0 001.62-.52c16-6 32-14.3 32-31.93S451 107.81 432 112.8z"})]})}const Ke=e=>o.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 16 16",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:o.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8 8.707l3.646 3.647.708-.707L8.707 8l3.647-3.646-.707-.708L8 7.293 4.354 3.646l-.707.708L7.293 8l-3.646 3.646.707.708L8 8.707z"})});function Je(){return o.jsx(Ze,{children:o.jsx("h3",{children:"Accessibility Settings"})})}const Ze=V.div`
|
|
23
|
+
background-color: ${({theme:e})=>e.primary};
|
|
24
|
+
h3 {
|
|
25
|
+
color: ${({theme:e})=>e.text};
|
|
26
|
+
padding: 20px 30px;
|
|
27
|
+
margin: 0rem;
|
|
28
|
+
text-align: center;
|
|
29
|
+
}
|
|
30
|
+
`;var fe={exports:{}},ce={},Re;function Qe(){if(Re)return ce;Re=1,Object.defineProperty(ce,"__esModule",{value:!0});var e=G;function r(){return r=Object.assign||function(v){for(var y=1;y<arguments.length;y++){var a=arguments[y];for(var d in a)Object.prototype.hasOwnProperty.call(a,d)&&(v[d]=a[d])}return v},r.apply(this,arguments)}var c=e.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},e.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),T=e.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},e.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function w(v){if(v.length===7)return v;for(var y="#",a=1;a<4;a+=1)y+=v[a]+v[a];return y}function h(v,y,a,d,_){return function(k,g,l,n,b){var R=(k-l)/(g-l);if(R===0)return n;if(R===1)return b;for(var z="#",D=1;D<6;D+=2){var U=parseInt(n.substr(D,2),16),m=parseInt(b.substr(D,2),16),u=Math.round((1-R)*U+R*m).toString(16);u.length===1&&(u="0"+u),z+=u}return z}(v,y,a,w(d),w(_))}var O=function(v){function y(a){v.call(this,a);var d=a.height,_=a.width,k=a.checked;this.t=a.handleDiameter||d-2,this.i=Math.max(_-d,_-(d+this.t)/2),this.o=Math.max(0,(d-this.t)/2),this.state={h:k?this.i:this.o},this.l=0,this.u=0,this.p=this.p.bind(this),this.v=this.v.bind(this),this.g=this.g.bind(this),this.k=this.k.bind(this),this.M=this.M.bind(this),this.m=this.m.bind(this),this.T=this.T.bind(this),this.$=this.$.bind(this),this.C=this.C.bind(this),this.D=this.D.bind(this),this.O=this.O.bind(this),this.S=this.S.bind(this)}return v&&(y.__proto__=v),(y.prototype=Object.create(v&&v.prototype)).constructor=y,y.prototype.componentDidMount=function(){this.W=!0},y.prototype.componentDidUpdate=function(a){a.checked!==this.props.checked&&this.setState({h:this.props.checked?this.i:this.o})},y.prototype.componentWillUnmount=function(){this.W=!1},y.prototype.I=function(a){this.H.focus(),this.setState({R:a,j:!0,B:Date.now()})},y.prototype.L=function(a){var d=this.state,_=d.R,k=d.h,g=(this.props.checked?this.i:this.o)+a-_;d.N||a===_||this.setState({N:!0});var l=Math.min(this.i,Math.max(this.o,g));l!==k&&this.setState({h:l})},y.prototype.U=function(a){var d=this.state,_=d.h,k=d.N,g=d.B,l=this.props.checked,n=(this.i+this.o)/2;this.setState({h:this.props.checked?this.i:this.o});var b=Date.now()-g;(!k||b<250||l&&_<=n||!l&&_>=n)&&this.A(a),this.W&&this.setState({N:!1,j:!1}),this.l=Date.now()},y.prototype.p=function(a){a.preventDefault(),typeof a.button=="number"&&a.button!==0||(this.I(a.clientX),window.addEventListener("mousemove",this.v),window.addEventListener("mouseup",this.g))},y.prototype.v=function(a){a.preventDefault(),this.L(a.clientX)},y.prototype.g=function(a){this.U(a),window.removeEventListener("mousemove",this.v),window.removeEventListener("mouseup",this.g)},y.prototype.k=function(a){this.X=null,this.I(a.touches[0].clientX)},y.prototype.M=function(a){this.L(a.touches[0].clientX)},y.prototype.m=function(a){a.preventDefault(),this.U(a)},y.prototype.$=function(a){Date.now()-this.l>50&&(this.A(a),Date.now()-this.u>50&&this.W&&this.setState({j:!1}))},y.prototype.C=function(){this.u=Date.now()},y.prototype.D=function(){this.setState({j:!0})},y.prototype.O=function(){this.setState({j:!1})},y.prototype.S=function(a){this.H=a},y.prototype.T=function(a){a.preventDefault(),this.H.focus(),this.A(a),this.W&&this.setState({j:!1})},y.prototype.A=function(a){var d=this.props;(0,d.onChange)(!d.checked,a,d.id)},y.prototype.render=function(){var a=this.props,d=a.checked,_=a.disabled,k=a.className,g=a.offColor,l=a.onColor,n=a.offHandleColor,b=a.onHandleColor,R=a.checkedIcon,z=a.uncheckedIcon,D=a.checkedHandleIcon,U=a.uncheckedHandleIcon,m=a.boxShadow,u=a.activeBoxShadow,p=a.height,x=a.width,s=a.borderRadius,P=function(f,C){var E={};for(var I in f)Object.prototype.hasOwnProperty.call(f,I)&&C.indexOf(I)===-1&&(E[I]=f[I]);return E}(a,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),N=this.state,L=N.h,j=N.N,B=N.j,X={position:"relative",display:"inline-block",textAlign:"left",opacity:_?.5:1,direction:"ltr",borderRadius:p/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},q={height:p,width:x,margin:Math.max(0,(this.t-p)/2),position:"relative",background:h(L,this.i,this.o,g,l),borderRadius:typeof s=="number"?s:p/2,cursor:_?"default":"pointer",WebkitTransition:j?null:"background 0.25s",MozTransition:j?null:"background 0.25s",transition:j?null:"background 0.25s"},K={height:p,width:Math.min(1.5*p,x-(this.t+p)/2+1),position:"relative",opacity:(L-this.o)/(this.i-this.o),pointerEvents:"none",WebkitTransition:j?null:"opacity 0.25s",MozTransition:j?null:"opacity 0.25s",transition:j?null:"opacity 0.25s"},J={height:p,width:Math.min(1.5*p,x-(this.t+p)/2+1),position:"absolute",opacity:1-(L-this.o)/(this.i-this.o),right:0,top:0,pointerEvents:"none",WebkitTransition:j?null:"opacity 0.25s",MozTransition:j?null:"opacity 0.25s",transition:j?null:"opacity 0.25s"},Z={height:this.t,width:this.t,background:h(L,this.i,this.o,n,b),display:"inline-block",cursor:_?"default":"pointer",borderRadius:typeof s=="number"?s-1:"50%",position:"absolute",transform:"translateX("+L+"px)",top:Math.max(0,(p-this.t)/2),outline:0,boxShadow:B?u:m,border:0,WebkitTransition:j?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:j?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:j?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},i={height:this.t,width:this.t,opacity:Math.max(2*(1-(L-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:j?null:"opacity 0.25s",MozTransition:j?null:"opacity 0.25s",transition:j?null:"opacity 0.25s"},t={height:this.t,width:this.t,opacity:Math.max(2*((L-this.o)/(this.i-this.o)-.5),0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:j?null:"opacity 0.25s",MozTransition:j?null:"opacity 0.25s",transition:j?null:"opacity 0.25s"};return e.createElement("div",{className:k,style:X},e.createElement("div",{className:"react-switch-bg",style:q,onClick:_?null:this.T,onMouseDown:function(f){return f.preventDefault()}},R&&e.createElement("div",{style:K},R),z&&e.createElement("div",{style:J},z)),e.createElement("div",{className:"react-switch-handle",style:Z,onClick:function(f){return f.preventDefault()},onMouseDown:_?null:this.p,onTouchStart:_?null:this.k,onTouchMove:_?null:this.M,onTouchEnd:_?null:this.m,onTouchCancel:_?null:this.O},U&&e.createElement("div",{style:i},U),D&&e.createElement("div",{style:t},D)),e.createElement("input",r({},{type:"checkbox",role:"switch","aria-checked":d,checked:d,disabled:_,style:{border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1}},P,{ref:this.S,onFocus:this.D,onBlur:this.O,onKeyUp:this.C,onChange:this.$})))},y}(e.Component);return O.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:c,checkedIcon:T,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56},ce.default=O,ce}var pe={},le={exports:{}},ue={exports:{}},Y={};/** @license React v16.13.1
|
|
31
|
+
* react-is.production.min.js
|
|
32
|
+
*
|
|
33
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
34
|
+
*
|
|
35
|
+
* This source code is licensed under the MIT license found in the
|
|
36
|
+
* LICENSE file in the root directory of this source tree.
|
|
37
|
+
*/var je;function et(){if(je)return Y;je=1;var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,c=e?Symbol.for("react.portal"):60106,T=e?Symbol.for("react.fragment"):60107,w=e?Symbol.for("react.strict_mode"):60108,h=e?Symbol.for("react.profiler"):60114,O=e?Symbol.for("react.provider"):60109,v=e?Symbol.for("react.context"):60110,y=e?Symbol.for("react.async_mode"):60111,a=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,_=e?Symbol.for("react.suspense"):60113,k=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,l=e?Symbol.for("react.lazy"):60116,n=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function D(m){if(typeof m=="object"&&m!==null){var u=m.$$typeof;switch(u){case r:switch(m=m.type,m){case y:case a:case T:case h:case w:case _:return m;default:switch(m=m&&m.$$typeof,m){case v:case d:case l:case g:case O:return m;default:return u}}case c:return u}}}function U(m){return D(m)===a}return Y.AsyncMode=y,Y.ConcurrentMode=a,Y.ContextConsumer=v,Y.ContextProvider=O,Y.Element=r,Y.ForwardRef=d,Y.Fragment=T,Y.Lazy=l,Y.Memo=g,Y.Portal=c,Y.Profiler=h,Y.StrictMode=w,Y.Suspense=_,Y.isAsyncMode=function(m){return U(m)||D(m)===y},Y.isConcurrentMode=U,Y.isContextConsumer=function(m){return D(m)===v},Y.isContextProvider=function(m){return D(m)===O},Y.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===r},Y.isForwardRef=function(m){return D(m)===d},Y.isFragment=function(m){return D(m)===T},Y.isLazy=function(m){return D(m)===l},Y.isMemo=function(m){return D(m)===g},Y.isPortal=function(m){return D(m)===c},Y.isProfiler=function(m){return D(m)===h},Y.isStrictMode=function(m){return D(m)===w},Y.isSuspense=function(m){return D(m)===_},Y.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===T||m===a||m===h||m===w||m===_||m===k||typeof m=="object"&&m!==null&&(m.$$typeof===l||m.$$typeof===g||m.$$typeof===O||m.$$typeof===v||m.$$typeof===d||m.$$typeof===b||m.$$typeof===R||m.$$typeof===z||m.$$typeof===n)},Y.typeOf=D,Y}var F={};/** @license React v16.13.1
|
|
38
|
+
* react-is.development.js
|
|
39
|
+
*
|
|
40
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
41
|
+
*
|
|
42
|
+
* This source code is licensed under the MIT license found in the
|
|
43
|
+
* LICENSE file in the root directory of this source tree.
|
|
44
|
+
*/var Pe;function tt(){return Pe||(Pe=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,r=e?Symbol.for("react.element"):60103,c=e?Symbol.for("react.portal"):60106,T=e?Symbol.for("react.fragment"):60107,w=e?Symbol.for("react.strict_mode"):60108,h=e?Symbol.for("react.profiler"):60114,O=e?Symbol.for("react.provider"):60109,v=e?Symbol.for("react.context"):60110,y=e?Symbol.for("react.async_mode"):60111,a=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,_=e?Symbol.for("react.suspense"):60113,k=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,l=e?Symbol.for("react.lazy"):60116,n=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,R=e?Symbol.for("react.responder"):60118,z=e?Symbol.for("react.scope"):60119;function D(S){return typeof S=="string"||typeof S=="function"||S===T||S===a||S===h||S===w||S===_||S===k||typeof S=="object"&&S!==null&&(S.$$typeof===l||S.$$typeof===g||S.$$typeof===O||S.$$typeof===v||S.$$typeof===d||S.$$typeof===b||S.$$typeof===R||S.$$typeof===z||S.$$typeof===n)}function U(S){if(typeof S=="object"&&S!==null){var ne=S.$$typeof;switch(ne){case r:var he=S.type;switch(he){case y:case a:case T:case h:case w:case _:return he;default:var Fe=he&&he.$$typeof;switch(Fe){case v:case d:case l:case g:case O:return Fe;default:return ne}}case c:return ne}}}var m=y,u=a,p=v,x=O,s=r,P=d,N=T,L=l,j=g,B=c,X=h,q=w,K=_,J=!1;function Z(S){return J||(J=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),i(S)||U(S)===y}function i(S){return U(S)===a}function t(S){return U(S)===v}function f(S){return U(S)===O}function C(S){return typeof S=="object"&&S!==null&&S.$$typeof===r}function E(S){return U(S)===d}function I(S){return U(S)===T}function M(S){return U(S)===l}function $(S){return U(S)===g}function A(S){return U(S)===c}function W(S){return U(S)===h}function H(S){return U(S)===w}function ee(S){return U(S)===_}F.AsyncMode=m,F.ConcurrentMode=u,F.ContextConsumer=p,F.ContextProvider=x,F.Element=s,F.ForwardRef=P,F.Fragment=N,F.Lazy=L,F.Memo=j,F.Portal=B,F.Profiler=X,F.StrictMode=q,F.Suspense=K,F.isAsyncMode=Z,F.isConcurrentMode=i,F.isContextConsumer=t,F.isContextProvider=f,F.isElement=C,F.isForwardRef=E,F.isFragment=I,F.isLazy=M,F.isMemo=$,F.isPortal=A,F.isProfiler=W,F.isStrictMode=H,F.isSuspense=ee,F.isValidElementType=D,F.typeOf=U}()),F}var Ie;function Me(){return Ie||(Ie=1,process.env.NODE_ENV==="production"?ue.exports=et():ue.exports=tt()),ue.exports}/*
|
|
45
|
+
object-assign
|
|
46
|
+
(c) Sindre Sorhus
|
|
47
|
+
@license MIT
|
|
48
|
+
*/var ve,De;function nt(){if(De)return ve;De=1;var e=Object.getOwnPropertySymbols,r=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable;function T(h){if(h==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(h)}function w(){try{if(!Object.assign)return!1;var h=new String("abc");if(h[5]="de",Object.getOwnPropertyNames(h)[0]==="5")return!1;for(var O={},v=0;v<10;v++)O["_"+String.fromCharCode(v)]=v;var y=Object.getOwnPropertyNames(O).map(function(d){return O[d]});if(y.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(d){a[d]=d}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return ve=w()?Object.assign:function(h,O){for(var v,y=T(h),a,d=1;d<arguments.length;d++){v=Object(arguments[d]);for(var _ in v)r.call(v,_)&&(y[_]=v[_]);if(e){a=e(v);for(var k=0;k<a.length;k++)c.call(v,a[k])&&(y[a[k]]=v[a[k]])}}return y},ve}var me,Ae;function ge(){if(Ae)return me;Ae=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return me=e,me}var ye,Ne;function He(){return Ne||(Ne=1,ye=Function.call.bind(Object.prototype.hasOwnProperty)),ye}var be,Le;function rt(){if(Le)return be;Le=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var r=ge(),c={},T=He();e=function(h){var O="Warning: "+h;typeof console<"u"&&console.error(O);try{throw new Error(O)}catch{}}}function w(h,O,v,y,a){if(process.env.NODE_ENV!=="production"){for(var d in h)if(T(h,d)){var _;try{if(typeof h[d]!="function"){var k=Error((y||"React class")+": "+v+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof h[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw k.name="Invariant Violation",k}_=h[d](O,d,y,v,null,r)}catch(l){_=l}if(_&&!(_ instanceof Error)&&e((y||"React class")+": type specification of "+v+" `"+d+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof _+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),_ instanceof Error&&!(_.message in c)){c[_.message]=!0;var g=a?a():"";e("Failed "+v+" type: "+_.message+(g??""))}}}}return w.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(c={})},be=w,be}var xe,We;function ot(){if(We)return xe;We=1;var e=Me(),r=nt(),c=ge(),T=He(),w=rt(),h=function(){};process.env.NODE_ENV!=="production"&&(h=function(v){var y="Warning: "+v;typeof console<"u"&&console.error(y);try{throw new Error(y)}catch{}});function O(){return null}return xe=function(v,y){var a=typeof Symbol=="function"&&Symbol.iterator,d="@@iterator";function _(i){var t=i&&(a&&i[a]||i[d]);if(typeof t=="function")return t}var k="<<anonymous>>",g={array:R("array"),bigint:R("bigint"),bool:R("boolean"),func:R("function"),number:R("number"),object:R("object"),string:R("string"),symbol:R("symbol"),any:z(),arrayOf:D,element:U(),elementType:m(),instanceOf:u,node:P(),objectOf:x,oneOf:p,oneOfType:s,shape:L,exact:j};function l(i,t){return i===t?i!==0||1/i===1/t:i!==i&&t!==t}function n(i,t){this.message=i,this.data=t&&typeof t=="object"?t:{},this.stack=""}n.prototype=Error.prototype;function b(i){if(process.env.NODE_ENV!=="production")var t={},f=0;function C(I,M,$,A,W,H,ee){if(A=A||k,H=H||$,ee!==c){if(y){var S=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw S.name="Invariant Violation",S}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ne=A+":"+$;!t[ne]&&f<3&&(h("You are manually calling a React.PropTypes validation function for the `"+H+"` prop on `"+A+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),t[ne]=!0,f++)}}return M[$]==null?I?M[$]===null?new n("The "+W+" `"+H+"` is marked as required "+("in `"+A+"`, but its value is `null`.")):new n("The "+W+" `"+H+"` is marked as required in "+("`"+A+"`, but its value is `undefined`.")):null:i(M,$,A,W,H)}var E=C.bind(null,!1);return E.isRequired=C.bind(null,!0),E}function R(i){function t(f,C,E,I,M,$){var A=f[C],W=q(A);if(W!==i){var H=K(A);return new n("Invalid "+I+" `"+M+"` of type "+("`"+H+"` supplied to `"+E+"`, expected ")+("`"+i+"`."),{expectedType:i})}return null}return b(t)}function z(){return b(O)}function D(i){function t(f,C,E,I,M){if(typeof i!="function")return new n("Property `"+M+"` of component `"+E+"` has invalid PropType notation inside arrayOf.");var $=f[C];if(!Array.isArray($)){var A=q($);return new n("Invalid "+I+" `"+M+"` of type "+("`"+A+"` supplied to `"+E+"`, expected an array."))}for(var W=0;W<$.length;W++){var H=i($,W,E,I,M+"["+W+"]",c);if(H instanceof Error)return H}return null}return b(t)}function U(){function i(t,f,C,E,I){var M=t[f];if(!v(M)){var $=q(M);return new n("Invalid "+E+" `"+I+"` of type "+("`"+$+"` supplied to `"+C+"`, expected a single ReactElement."))}return null}return b(i)}function m(){function i(t,f,C,E,I){var M=t[f];if(!e.isValidElementType(M)){var $=q(M);return new n("Invalid "+E+" `"+I+"` of type "+("`"+$+"` supplied to `"+C+"`, expected a single ReactElement type."))}return null}return b(i)}function u(i){function t(f,C,E,I,M){if(!(f[C]instanceof i)){var $=i.name||k,A=Z(f[C]);return new n("Invalid "+I+" `"+M+"` of type "+("`"+A+"` supplied to `"+E+"`, expected ")+("instance of `"+$+"`."))}return null}return b(t)}function p(i){if(!Array.isArray(i))return process.env.NODE_ENV!=="production"&&(arguments.length>1?h("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):h("Invalid argument supplied to oneOf, expected an array.")),O;function t(f,C,E,I,M){for(var $=f[C],A=0;A<i.length;A++)if(l($,i[A]))return null;var W=JSON.stringify(i,function(ee,S){var ne=K(S);return ne==="symbol"?String(S):S});return new n("Invalid "+I+" `"+M+"` of value `"+String($)+"` "+("supplied to `"+E+"`, expected one of "+W+"."))}return b(t)}function x(i){function t(f,C,E,I,M){if(typeof i!="function")return new n("Property `"+M+"` of component `"+E+"` has invalid PropType notation inside objectOf.");var $=f[C],A=q($);if(A!=="object")return new n("Invalid "+I+" `"+M+"` of type "+("`"+A+"` supplied to `"+E+"`, expected an object."));for(var W in $)if(T($,W)){var H=i($,W,E,I,M+"."+W,c);if(H instanceof Error)return H}return null}return b(t)}function s(i){if(!Array.isArray(i))return process.env.NODE_ENV!=="production"&&h("Invalid argument supplied to oneOfType, expected an instance of array."),O;for(var t=0;t<i.length;t++){var f=i[t];if(typeof f!="function")return h("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+J(f)+" at index "+t+"."),O}function C(E,I,M,$,A){for(var W=[],H=0;H<i.length;H++){var ee=i[H],S=ee(E,I,M,$,A,c);if(S==null)return null;S.data&&T(S.data,"expectedType")&&W.push(S.data.expectedType)}var ne=W.length>0?", expected one of type ["+W.join(", ")+"]":"";return new n("Invalid "+$+" `"+A+"` supplied to "+("`"+M+"`"+ne+"."))}return b(C)}function P(){function i(t,f,C,E,I){return B(t[f])?null:new n("Invalid "+E+" `"+I+"` supplied to "+("`"+C+"`, expected a ReactNode."))}return b(i)}function N(i,t,f,C,E){return new n((i||"React class")+": "+t+" type `"+f+"."+C+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+E+"`.")}function L(i){function t(f,C,E,I,M){var $=f[C],A=q($);if(A!=="object")return new n("Invalid "+I+" `"+M+"` of type `"+A+"` "+("supplied to `"+E+"`, expected `object`."));for(var W in i){var H=i[W];if(typeof H!="function")return N(E,I,M,W,K(H));var ee=H($,W,E,I,M+"."+W,c);if(ee)return ee}return null}return b(t)}function j(i){function t(f,C,E,I,M){var $=f[C],A=q($);if(A!=="object")return new n("Invalid "+I+" `"+M+"` of type `"+A+"` "+("supplied to `"+E+"`, expected `object`."));var W=r({},f[C],i);for(var H in W){var ee=i[H];if(T(i,H)&&typeof ee!="function")return N(E,I,M,H,K(ee));if(!ee)return new n("Invalid "+I+" `"+M+"` key `"+H+"` supplied to `"+E+"`.\nBad object: "+JSON.stringify(f[C],null," ")+`
|
|
49
|
+
Valid keys: `+JSON.stringify(Object.keys(i),null," "));var S=ee($,H,E,I,M+"."+H,c);if(S)return S}return null}return b(t)}function B(i){switch(typeof i){case"number":case"string":case"undefined":return!0;case"boolean":return!i;case"object":if(Array.isArray(i))return i.every(B);if(i===null||v(i))return!0;var t=_(i);if(t){var f=t.call(i),C;if(t!==i.entries){for(;!(C=f.next()).done;)if(!B(C.value))return!1}else for(;!(C=f.next()).done;){var E=C.value;if(E&&!B(E[1]))return!1}}else return!1;return!0;default:return!1}}function X(i,t){return i==="symbol"?!0:t?t["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&t instanceof Symbol:!1}function q(i){var t=typeof i;return Array.isArray(i)?"array":i instanceof RegExp?"object":X(t,i)?"symbol":t}function K(i){if(typeof i>"u"||i===null)return""+i;var t=q(i);if(t==="object"){if(i instanceof Date)return"date";if(i instanceof RegExp)return"regexp"}return t}function J(i){var t=K(i);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function Z(i){return!i.constructor||!i.constructor.name?k:i.constructor.name}return g.checkPropTypes=w,g.resetWarningCache=w.resetWarningCache,g.PropTypes=g,g},xe}var we,ze;function it(){if(ze)return we;ze=1;var e=ge();function r(){}function c(){}return c.resetWarningCache=r,we=function(){function T(O,v,y,a,d,_){if(_!==e){var k=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw k.name="Invariant Violation",k}}T.isRequired=T;function w(){return T}var h={array:T,bigint:T,bool:T,func:T,number:T,object:T,string:T,symbol:T,any:T,arrayOf:w,element:T,elementType:T,instanceOf:w,node:T,objectOf:w,oneOf:w,oneOfType:w,shape:w,exact:w,checkPropTypes:c,resetWarningCache:r};return h.PropTypes=h,h},we}var Ue;function at(){if(Ue)return le.exports;if(Ue=1,process.env.NODE_ENV!=="production"){var e=Me(),r=!0;le.exports=ot()(e.isElement,r)}else le.exports=it()();return le.exports}var Be;function st(){return Be||(Be=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});var r=G,c=at();function T(){return T=Object.assign||function(k){for(var g=1;g<arguments.length;g++){var l=arguments[g];for(var n in l)Object.prototype.hasOwnProperty.call(l,n)&&(k[n]=l[n])}return k},T.apply(this,arguments)}var w=r.createElement("svg",{viewBox:"-2 -5 14 20",height:"100%",width:"100%",style:{position:"absolute",top:0}},r.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"})),h=r.createElement("svg",{height:"100%",width:"100%",viewBox:"-2 -5 17 21",style:{position:"absolute",top:0}},r.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}));function O(k,g,l,n,b){var R=(k-l)/(g-l);if(R===0)return n;if(R===1)return b;for(var z="#",D=1;D<6;D+=2){var U=parseInt(n.substr(D,2),16),m=parseInt(b.substr(D,2),16),u=Math.round((1-R)*U+R*m),p=u.toString(16);p.length===1&&(p="0"+p),z+=p}return z}function v(k){if(k.length===7)return k;for(var g="#",l=1;l<4;l+=1)g+=k[l]+k[l];return g}function y(k,g,l,n,b){var R=v(n),z=v(b);return O(k,g,l,R,z)}var a=function(k,g,l){var n=k[g];return typeof n!="string"||n[0]!=="#"||n.length!==4&&n.length!==7?new Error("Invalid prop '"+g+"' supplied to '"+l+"'. '"+g+"' has to be either a 3-digit or 6-digit hex-color string. Valid examples: '#abc', '#123456'"):null};function d(k,g){var l={};for(var n in k)Object.prototype.hasOwnProperty.call(k,n)&&g.indexOf(n)===-1&&(l[n]=k[n]);return l}var _=function(k){function g(l){k.call(this,l);var n=l.height,b=l.width,R=l.handleDiameter,z=l.checked;this.$handleDiameter=R||n-2,this.$checkedPos=Math.max(b-n,b-(n+this.$handleDiameter)/2),this.$uncheckedPos=Math.max(0,(n-this.$handleDiameter)/2),this.state={$pos:z?this.$checkedPos:this.$uncheckedPos},this.$lastDragAt=0,this.$lastKeyUpAt=0,this.$onMouseDown=this.$onMouseDown.bind(this),this.$onMouseMove=this.$onMouseMove.bind(this),this.$onMouseUp=this.$onMouseUp.bind(this),this.$onTouchStart=this.$onTouchStart.bind(this),this.$onTouchMove=this.$onTouchMove.bind(this),this.$onTouchEnd=this.$onTouchEnd.bind(this),this.$onClick=this.$onClick.bind(this),this.$onInputChange=this.$onInputChange.bind(this),this.$onKeyUp=this.$onKeyUp.bind(this),this.$setHasOutline=this.$setHasOutline.bind(this),this.$unsetHasOutline=this.$unsetHasOutline.bind(this),this.$getInputRef=this.$getInputRef.bind(this)}return k&&(g.__proto__=k),g.prototype=Object.create(k&&k.prototype),g.prototype.constructor=g,g.prototype.componentDidMount=function(){this.$isMounted=!0},g.prototype.componentDidUpdate=function(n){if(n.checked!==this.props.checked){var b=this.props.checked?this.$checkedPos:this.$uncheckedPos;this.setState({$pos:b})}},g.prototype.componentWillUnmount=function(){this.$isMounted=!1},g.prototype.$onDragStart=function(n){this.$inputRef.focus(),this.setState({$startX:n,$hasOutline:!0,$dragStartingTime:Date.now()})},g.prototype.$onDrag=function(n){var b=this.state,R=b.$startX,z=b.$isDragging,D=b.$pos,U=this.props,m=U.checked,u=m?this.$checkedPos:this.$uncheckedPos,p=u+n-R;!z&&n!==R&&this.setState({$isDragging:!0});var x=Math.min(this.$checkedPos,Math.max(this.$uncheckedPos,p));x!==D&&this.setState({$pos:x})},g.prototype.$onDragStop=function(n){var b=this.state,R=b.$pos,z=b.$isDragging,D=b.$dragStartingTime,U=this.props,m=U.checked,u=(this.$checkedPos+this.$uncheckedPos)/2,p=this.props.checked?this.$checkedPos:this.$uncheckedPos;this.setState({$pos:p});var x=Date.now()-D,s=!z||x<250,P=m&&R<=u||!m&&R>=u;(s||P)&&this.$onChange(n),this.$isMounted&&this.setState({$isDragging:!1,$hasOutline:!1}),this.$lastDragAt=Date.now()},g.prototype.$onMouseDown=function(n){n.preventDefault(),!(typeof n.button=="number"&&n.button!==0)&&(this.$onDragStart(n.clientX),window.addEventListener("mousemove",this.$onMouseMove),window.addEventListener("mouseup",this.$onMouseUp))},g.prototype.$onMouseMove=function(n){n.preventDefault(),this.$onDrag(n.clientX)},g.prototype.$onMouseUp=function(n){this.$onDragStop(n),window.removeEventListener("mousemove",this.$onMouseMove),window.removeEventListener("mouseup",this.$onMouseUp)},g.prototype.$onTouchStart=function(n){this.$checkedStateFromDragging=null,this.$onDragStart(n.touches[0].clientX)},g.prototype.$onTouchMove=function(n){this.$onDrag(n.touches[0].clientX)},g.prototype.$onTouchEnd=function(n){n.preventDefault(),this.$onDragStop(n)},g.prototype.$onInputChange=function(n){Date.now()-this.$lastDragAt>50&&(this.$onChange(n),Date.now()-this.$lastKeyUpAt>50&&this.$isMounted&&this.setState({$hasOutline:!1}))},g.prototype.$onKeyUp=function(){this.$lastKeyUpAt=Date.now()},g.prototype.$setHasOutline=function(){this.setState({$hasOutline:!0})},g.prototype.$unsetHasOutline=function(){this.setState({$hasOutline:!1})},g.prototype.$getInputRef=function(n){this.$inputRef=n},g.prototype.$onClick=function(n){n.preventDefault(),this.$inputRef.focus(),this.$onChange(n),this.$isMounted&&this.setState({$hasOutline:!1})},g.prototype.$onChange=function(n){var b=this.props,R=b.checked,z=b.onChange,D=b.id;z(!R,n,D)},g.prototype.render=function(){var n=this.props,b=n.checked,R=n.disabled,z=n.className,D=n.offColor,U=n.onColor,m=n.offHandleColor,u=n.onHandleColor,p=n.checkedIcon,x=n.uncheckedIcon,s=n.checkedHandleIcon,P=n.uncheckedHandleIcon,N=n.boxShadow,L=n.activeBoxShadow,j=n.height,B=n.width,X=n.borderRadius;n.handleDiameter;var q=d(n,["checked","disabled","className","offColor","onColor","offHandleColor","onHandleColor","checkedIcon","uncheckedIcon","checkedHandleIcon","uncheckedHandleIcon","boxShadow","activeBoxShadow","height","width","borderRadius","handleDiameter"]),K=q,J=this.state,Z=J.$pos,i=J.$isDragging,t=J.$hasOutline,f={position:"relative",display:"inline-block",textAlign:"left",opacity:R?.5:1,direction:"ltr",borderRadius:j/2,WebkitTransition:"opacity 0.25s",MozTransition:"opacity 0.25s",transition:"opacity 0.25s",touchAction:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"},C={height:j,width:B,margin:Math.max(0,(this.$handleDiameter-j)/2),position:"relative",background:y(Z,this.$checkedPos,this.$uncheckedPos,D,U),borderRadius:typeof X=="number"?X:j/2,cursor:R?"default":"pointer",WebkitTransition:i?null:"background 0.25s",MozTransition:i?null:"background 0.25s",transition:i?null:"background 0.25s"},E={height:j,width:Math.min(j*1.5,B-(this.$handleDiameter+j)/2+1),position:"relative",opacity:(Z-this.$uncheckedPos)/(this.$checkedPos-this.$uncheckedPos),pointerEvents:"none",WebkitTransition:i?null:"opacity 0.25s",MozTransition:i?null:"opacity 0.25s",transition:i?null:"opacity 0.25s"},I={height:j,width:Math.min(j*1.5,B-(this.$handleDiameter+j)/2+1),position:"absolute",opacity:1-(Z-this.$uncheckedPos)/(this.$checkedPos-this.$uncheckedPos),right:0,top:0,pointerEvents:"none",WebkitTransition:i?null:"opacity 0.25s",MozTransition:i?null:"opacity 0.25s",transition:i?null:"opacity 0.25s"},M={height:this.$handleDiameter,width:this.$handleDiameter,background:y(Z,this.$checkedPos,this.$uncheckedPos,m,u),display:"inline-block",cursor:R?"default":"pointer",borderRadius:typeof X=="number"?X-1:"50%",position:"absolute",transform:"translateX("+Z+"px)",top:Math.max(0,(j-this.$handleDiameter)/2),outline:0,boxShadow:t?L:N,border:0,WebkitTransition:i?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",MozTransition:i?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s",transition:i?null:"background-color 0.25s, transform 0.25s, box-shadow 0.15s"},$={height:this.$handleDiameter,width:this.$handleDiameter,opacity:Math.max((1-(Z-this.$uncheckedPos)/(this.$checkedPos-this.$uncheckedPos)-.5)*2,0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:i?null:"opacity 0.25s",MozTransition:i?null:"opacity 0.25s",transition:i?null:"opacity 0.25s"},A={height:this.$handleDiameter,width:this.$handleDiameter,opacity:Math.max(((Z-this.$uncheckedPos)/(this.$checkedPos-this.$uncheckedPos)-.5)*2,0),position:"absolute",left:0,top:0,pointerEvents:"none",WebkitTransition:i?null:"opacity 0.25s",MozTransition:i?null:"opacity 0.25s",transition:i?null:"opacity 0.25s"},W={border:0,clip:"rect(0 0 0 0)",height:1,margin:-1,overflow:"hidden",padding:0,position:"absolute",width:1};return r.createElement("div",{className:z,style:f},r.createElement("div",{className:"react-switch-bg",style:C,onClick:R?null:this.$onClick,onMouseDown:function(H){return H.preventDefault()}},p&&r.createElement("div",{style:E},p),x&&r.createElement("div",{style:I},x)),r.createElement("div",{className:"react-switch-handle",style:M,onClick:function(H){return H.preventDefault()},onMouseDown:R?null:this.$onMouseDown,onTouchStart:R?null:this.$onTouchStart,onTouchMove:R?null:this.$onTouchMove,onTouchEnd:R?null:this.$onTouchEnd,onTouchCancel:R?null:this.$unsetHasOutline},P&&r.createElement("div",{style:$},P),s&&r.createElement("div",{style:A},s)),r.createElement("input",T({},{type:"checkbox",role:"switch","aria-checked":b,checked:b,disabled:R,style:W},K,{ref:this.$getInputRef,onFocus:this.$setHasOutline,onBlur:this.$unsetHasOutline,onKeyUp:this.$onKeyUp,onChange:this.$onInputChange})))},g}(r.Component);_.propTypes={checked:c.bool.isRequired,onChange:c.func.isRequired,disabled:c.bool,offColor:a,onColor:a,offHandleColor:a,onHandleColor:a,handleDiameter:c.number,uncheckedIcon:c.oneOfType([c.bool,c.element]),checkedIcon:c.oneOfType([c.bool,c.element]),boxShadow:c.string,borderRadius:c.number,activeBoxShadow:c.string,uncheckedHandleIcon:c.element,checkedHandleIcon:c.element,height:c.number,width:c.number,id:c.string,className:c.string},_.defaultProps={disabled:!1,offColor:"#888",onColor:"#080",offHandleColor:"#fff",onHandleColor:"#fff",uncheckedIcon:w,checkedIcon:h,boxShadow:null,activeBoxShadow:"0 0 2px 3px #3bf",height:28,width:56},e.default=_}(pe)),pe}process.env.NODE_ENV==="production"?fe.exports=Qe():fe.exports=st();var ct=fe.exports;const lt=ke(ct);function oe({onChange:e,checked:r,...c}){return o.jsx(lt,{onChange:e,checked:r,height:25,width:45,...c})}const Te={widgetOpen:!1,fontColor:!1,fontSizeAdjustment:0,lineHeight:0,letterSpacing:0,textBold:!1,textCase:"initial",textAlignment:"initial",textItalic:!1,titleColor:!1,titleBackgroundColor:null,highlightTitles:!1,highlightLinks:!1,hideImages:!1,monochrome:!1,highContrast:!1,lowContrast:!1},ut=(e,r)=>{switch(r.type){case"OPEN_WIDGET":return{...e,widgetOpen:!0};case"CLOSE_WIDGET":return{...e,widgetOpen:!1};case"SET_FONT_COLOR":return{...e,fontColor:r.data};case"ADD_FONT_SIZE":return{...e,fontSizeAdjustment:e.fontSizeAdjustment+10};case"MINUS_FONT_SIZE":return{...e,fontSizeAdjustment:e.fontSizeAdjustment-10};case"ADD_LINE_HEIGHT":return{...e,lineHeight:e.lineHeight+5};case"MINUS_LINE_HEIGHT":return{...e,lineHeight:e.lineHeight-5};case"ADD_LETTER_SPACING":return{...e,letterSpacing:e.letterSpacing+10};case"MINUS_LETTER_SPACING":return{...e,letterSpacing:e.letterSpacing-10};case"TOGGLE_BOLD":return{...e,textBold:!e.textBold};case"TOGGLE_ITALIC":return{...e,textItalic:!e.textItalic};case"SET_TEXT_CASE":return{...e,textCase:r.data};case"SET_TEXT_ALIGNMENT":return{...e,textAlignment:r.data};case"SET_TITLE_COLOR":return{...e,titleColor:r.data};case"SET_TITLE_BACKGROUND_COLOR":return{...e,titleBackgroundColor:r.data};case"SET_HIGHLIGHT_TITLES":return{...e,highlightTitles:!0};case"UNSET_HIGHLIGHT_TITLES":return{...e,highlightTitles:!1};case"SET_HIGHLIGHT_LINKS":return{...e,highlightLinks:!0};case"UNSET_HIGHLIGHT_LINKS":return{...e,highlightLinks:!1};case"HIDE_IMAGES":return{...e,hideImages:!0};case"UNHIDE_IMAGES":return{...e,hideImages:!1};case"SET_MONOCHROME":return{...e,monochrome:!0};case"UNSET_MONOCHROME":return{...e,monochrome:!1};case"SET_HIGH_CONTRAST":return{...e,lowContrast:!1,highContrast:!0};case"UNSET_HIGH_CONTRAST":return{...e,highContrast:!1};case"SET_LOW_CONTRAST":return{...e,highContrast:!1,lowContrast:!0};case"UNSET_LOW_CONTRAST":return{...e,lowContrast:!1};case"RESET_SETTINGS":return{...Te,widgetOpen:!0};default:return console.error("Error - No Action Could Be Found"),e}},ht=e=>{const{widgetOpen:r,fontColor:c,fontSizeAdjustment:T,lineHeight:w,titleColor:h,textItalic:O,letterSpacing:v,textBold:y,textCase:a,titleBackgroundColor:d,highlightTitles:_,highlightLinks:k,hideImages:g,textAlignment:l,monochrome:n,highContrast:b,lowContrast:R}=e;return`
|
|
50
|
+
html {
|
|
51
|
+
${n?"filter:grayscale(1) !important;":""}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
*{
|
|
55
|
+
${c?`color:${c} !important;`:""}
|
|
56
|
+
${l!=="initial"?`text-align:${l} !important;`:""}
|
|
57
|
+
|
|
58
|
+
${y?"font-weight:bold !important;":""}
|
|
59
|
+
|
|
60
|
+
${a!=="initial"?`text-transform:${a} !important;`:""}
|
|
61
|
+
${O?"font-style:italic !important;":""}
|
|
62
|
+
|
|
63
|
+
}
|
|
64
|
+
img {
|
|
65
|
+
${g?"display:none !important;":""}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
a {
|
|
69
|
+
${k?"border:solid 2px black !important; background-color:white; color:white ":""}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
h1,h2,h3,h4,h5,h6 {
|
|
73
|
+
${_?`border:solid 2px black !important; background-color: ${d||"white"} !important; color:${c||"black"} !important;`:""}
|
|
74
|
+
|
|
75
|
+
${h?`color:${h} !important;`:""}
|
|
76
|
+
|
|
77
|
+
${d?`background-color:${d} !important;`:""}
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
${T?`zoom:${1+T/101} !important;`:""}
|
|
81
|
+
|
|
82
|
+
${w?`line-height:${1.25+w/101} !important;`:""}
|
|
83
|
+
|
|
84
|
+
${v?`letter-spacing:${v/10}px !important;`:""}
|
|
85
|
+
${b?"filter: contrast(2) !important;":""}
|
|
86
|
+
${R?"filter: contrast(0.5) !important;":""}
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
p, button, li, ol {
|
|
91
|
+
${T?`zoom:${1+T/101} !important;`:""}
|
|
92
|
+
|
|
93
|
+
${w?`line-height:${1+w/101} !important;`:""}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
${v?`letter-spacing:${v/10}px !important;`:""}
|
|
97
|
+
${b?"filter: contrast(2) !important;":""}
|
|
98
|
+
${R?"filter: contrast(0.5) !important;":""}
|
|
99
|
+
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
`},Q=G.createContext({globalState:Te,dispatch:()=>{}}),{Provider:dt}=Q,ft=({children:e})=>{const[r,c]=G.useReducer(ut,Te);return G.useEffect(()=>{typeof document<"u"&&(document.getElementById("react-accessibility-styles")||document.head.insertAdjacentHTML("beforeend",'<style id="react-accessibility-styles"></style>'))},[]),G.useEffect(()=>{if(typeof document<"u"){const T=document.getElementById("react-accessibility-styles");T&&(T.innerHTML=ht(r))}},[r]),o.jsx(dt,{value:{globalState:r,dispatch:c},children:e})};function pt({children:e}){return o.jsx(vt,{children:e})}const vt=V.h5`
|
|
104
|
+
width: fit-content;
|
|
105
|
+
text-transform: uppercase;
|
|
106
|
+
font-weight: bold;
|
|
107
|
+
font-size: 10px;
|
|
108
|
+
color: black;
|
|
109
|
+
margin: 0px 5px 8px;
|
|
110
|
+
box-sizing: border-box;
|
|
111
|
+
`;function te({title:e,children:r}){return o.jsxs(mt,{children:[o.jsx(pt,{children:e}),r]})}const mt=V.div`
|
|
112
|
+
display: flex;
|
|
113
|
+
flex-direction: column;
|
|
114
|
+
margin-bottom: 16px;
|
|
115
|
+
background-color: ${({theme:e})=>e.primary};
|
|
116
|
+
padding: 10px;
|
|
117
|
+
border-radius: 10px;
|
|
118
|
+
margin: 0rem 0.5rem 0.5rem 0rem;
|
|
119
|
+
flex-grow: 1;
|
|
120
|
+
`;function gt(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Hide Images",children:o.jsx(oe,{onChange:()=>r({type:e.hideImages?"UNHIDE_IMAGES":"HIDE_IMAGES"}),checked:e.hideImages})})}function Se({value:e,onChange:r,colors:c}){const T=V.useTheme(),h=c||["red","blue","green","yellow","brown","grey","black","white"],O=()=>o.jsx(o.Fragment,{children:h.map(v=>{const y=e===v?{borderColor:T.primary}:{};return o.jsx(bt,{style:{backgroundColor:v,...y},onClick:()=>r(v)})})});return o.jsx(yt,{children:O()})}const yt=V.div`
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: row;
|
|
123
|
+
flex-wrap: wrap;
|
|
124
|
+
`,bt=V.div`
|
|
125
|
+
border-radius: 100px;
|
|
126
|
+
width: 20px;
|
|
127
|
+
height: 20px;
|
|
128
|
+
position: relative;
|
|
129
|
+
margin: 6px;
|
|
130
|
+
border: 1px solid white;
|
|
131
|
+
box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.5);
|
|
132
|
+
|
|
133
|
+
::before {
|
|
134
|
+
content: '';
|
|
135
|
+
position: absolute;
|
|
136
|
+
left: 50%;
|
|
137
|
+
top: 50%;
|
|
138
|
+
transform: translate(-50%, -50%);
|
|
139
|
+
border: solid 2px;
|
|
140
|
+
border-color: inherit;
|
|
141
|
+
height: 23px;
|
|
142
|
+
width: 23px;
|
|
143
|
+
border-radius: 100px;
|
|
144
|
+
}
|
|
145
|
+
:hover {
|
|
146
|
+
opacity: 0.7;
|
|
147
|
+
}
|
|
148
|
+
`;function xt(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Font Colors",children:o.jsx(Se,{value:e.fontColor,onChange:c=>r({type:"SET_FONT_COLOR",data:c})})})}function Ee({children:e}){return o.jsx(wt,{children:e})}const wt=V.h4`
|
|
149
|
+
width: 100%;
|
|
150
|
+
border-bottom: 1px solid lightgrey;
|
|
151
|
+
padding: 5px;
|
|
152
|
+
text-transform: uppercase;
|
|
153
|
+
font-weight: bold;
|
|
154
|
+
font-size: 13px;
|
|
155
|
+
color: black;
|
|
156
|
+
margin: 0px 0px 16px;
|
|
157
|
+
`,Tt=()=>o.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 1024 1024",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"})}),St=e=>o.jsxs("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 1024 1024",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",...e,children:[o.jsx("defs",{}),o.jsx("path",{d:"M474 152m8 0l60 0q8 0 8 8l0 704q0 8-8 8l-60 0q-8 0-8-8l0-704q0-8 8-8Z"}),o.jsx("path",{d:"M168 474m8 0l672 0q8 0 8 8l0 60q0 8-8 8l-672 0q-8 0-8-8l0-60q0-8 8-8Z"})]});function Ce({onMinusChange:e,onAddChange:r,value:c,minValue:T,maxValue:w}){const h={opacity:"0.5",color:"red"};return o.jsxs(Et,{children:[o.jsx(Ct,{onClick:e,style:c>=T?{}:h,children:o.jsx(Tt,{})}),o.jsxs(kt,{children:[c,"%"]}),o.jsx(_t,{style:c<=w?{}:h,onClick:r,children:o.jsx(St,{})})]})}const Et=V.div`
|
|
158
|
+
border-radius: 50px;
|
|
159
|
+
background: grey;
|
|
160
|
+
display: flex;
|
|
161
|
+
width: fit-content;
|
|
162
|
+
align-items: center;
|
|
163
|
+
justify-content: center;
|
|
164
|
+
padding: 0px 8px;
|
|
165
|
+
`,Ct=V.div`
|
|
166
|
+
:hover {
|
|
167
|
+
color: ${({theme:e})=>e.primary};
|
|
168
|
+
}
|
|
169
|
+
`,_t=V.div`
|
|
170
|
+
:hover {
|
|
171
|
+
color: ${({theme:e})=>e.primary};
|
|
172
|
+
}
|
|
173
|
+
`,kt=V.div`
|
|
174
|
+
padding: 0.5rem;
|
|
175
|
+
background-color: ${({theme:e})=>e.primary};
|
|
176
|
+
border-radius: 100px;
|
|
177
|
+
box-shadow: 2px 2px 6px black;
|
|
178
|
+
margin: 0rem 0.5rem;
|
|
179
|
+
display: flex;
|
|
180
|
+
justify-content: center;
|
|
181
|
+
align-items: center;
|
|
182
|
+
color: ${({theme:e})=>e.text};
|
|
183
|
+
font-size: 12px;
|
|
184
|
+
width: 25px;
|
|
185
|
+
`;function Ot(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Font Size",children:o.jsx(Ce,{onMinusChange:e.fontSizeAdjustment>=-100?()=>r({type:"MINUS_FONT_SIZE"}):()=>{},onAddChange:e.fontSizeAdjustment<=100?()=>r({type:"ADD_FONT_SIZE"}):()=>{},value:e.fontSizeAdjustment,minValue:-100,maxValue:100})})}function $t(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Line Height",children:o.jsx(Ce,{onMinusChange:e.lineHeight>=-100?()=>r({type:"MINUS_LINE_HEIGHT"}):()=>{},onAddChange:e.lineHeight<=100?()=>r({type:"ADD_LINE_HEIGHT"}):()=>{},value:e.lineHeight,minValue:-100,maxValue:100})})}function Rt(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Letter Spacing",children:o.jsx(Ce,{onMinusChange:e.letterSpacing>-100?()=>r({type:"MINUS_LETTER_SPACING"}):()=>{},onAddChange:e.letterSpacing<100?()=>r({type:"ADD_LETTER_SPACING"}):()=>{},value:e.letterSpacing,minValue:-100,maxValue:100})})}function jt(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Highlight Links",children:o.jsx(oe,{onChange:()=>r({type:e.highlightLinks?"UNSET_HIGHLIGHT_LINKS":"SET_HIGHLIGHT_LINKS"}),checked:e.highlightLinks})})}function Pt(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Title Background Color",children:o.jsx(Se,{value:e.titleBackgroundColor,onChange:c=>r({type:"SET_TITLE_BACKGROUND_COLOR",data:c})})})}function It(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Monochrome / Black and White",children:o.jsx(oe,{onChange:()=>r({type:e.monochrome?"UNSET_MONOCHROME":"SET_MONOCHROME"}),checked:e.monochrome})})}V.div`
|
|
186
|
+
display: flex;
|
|
187
|
+
justify-content: space-between;
|
|
188
|
+
align-items: center;
|
|
189
|
+
padding: 0.5rem 1rem;
|
|
190
|
+
h5 {
|
|
191
|
+
margin-right: 0.5rem;
|
|
192
|
+
color: lightgrey;
|
|
193
|
+
font-size: 0.7rem;
|
|
194
|
+
}
|
|
195
|
+
`;function Mt(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Highlight Titles",children:o.jsx(oe,{onChange:()=>r({type:e.highlightTitles?"UNSET_HIGHLIGHT_TITLES":"SET_HIGHLIGHT_TITLES"}),checked:e.highlightTitles})})}var Ge={},Ye={exports:{}};/*!
|
|
196
|
+
Copyright (c) 2018 Jed Watson.
|
|
197
|
+
Licensed under the MIT License (MIT), see
|
|
198
|
+
http://jedwatson.github.io/classnames
|
|
199
|
+
*/(function(e){(function(){var r={}.hasOwnProperty;function c(){for(var h="",O=0;O<arguments.length;O++){var v=arguments[O];v&&(h=w(h,T(v)))}return h}function T(h){if(typeof h=="string"||typeof h=="number")return h;if(typeof h!="object")return"";if(Array.isArray(h))return c.apply(null,h);if(h.toString!==Object.prototype.toString&&!h.toString.toString().includes("[native code]"))return h.toString();var O="";for(var v in h)r.call(h,v)&&h[v]&&(O=w(O,v));return O}function w(h,O){return O?h?h+" "+O:h+O:h}e.exports?(c.default=c,e.exports=c):window.classNames=c})()})(Ye);var Dt=Ye.exports;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=h(G),c=T(Dt);function T(u){return u&&u.__esModule?u:{default:u}}function w(){if(typeof WeakMap!="function")return null;var u=new WeakMap;return w=function(){return u},u}function h(u){if(u&&u.__esModule)return u;if(u===null||O(u)!=="object"&&typeof u!="function")return{default:u};var p=w();if(p&&p.has(u))return p.get(u);var x={},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var P in u)if(Object.prototype.hasOwnProperty.call(u,P)){var N=s?Object.getOwnPropertyDescriptor(u,P):null;N&&(N.get||N.set)?Object.defineProperty(x,P,N):x[P]=u[P]}return x.default=u,p&&p.set(u,x),x}function O(u){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?O=function(x){return typeof x}:O=function(x){return x&&typeof Symbol=="function"&&x.constructor===Symbol&&x!==Symbol.prototype?"symbol":typeof x},O(u)}function v(){return v=Object.assign||function(u){for(var p=1;p<arguments.length;p++){var x=arguments[p];for(var s in x)Object.prototype.hasOwnProperty.call(x,s)&&(u[s]=x[s])}return u},v.apply(this,arguments)}function y(u,p){var x=Object.keys(u);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(u);p&&(s=s.filter(function(P){return Object.getOwnPropertyDescriptor(u,P).enumerable})),x.push.apply(x,s)}return x}function a(u){for(var p=1;p<arguments.length;p++){var x=arguments[p]!=null?arguments[p]:{};p%2?y(x,!0).forEach(function(s){d(u,s,x[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(x)):y(x).forEach(function(s){Object.defineProperty(u,s,Object.getOwnPropertyDescriptor(x,s))})}return u}function d(u,p,x){return p in u?Object.defineProperty(u,p,{value:x,enumerable:!0,configurable:!0,writable:!0}):u[p]=x,u}function _(u,p){if(!(u instanceof p))throw new TypeError("Cannot call a class as a function")}function k(u,p){for(var x=0;x<p.length;x++){var s=p[x];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(u,s.key,s)}}function g(u,p,x){return p&&k(u.prototype,p),u}function l(u,p){return p&&(O(p)==="object"||typeof p=="function")?p:b(u)}function n(u){return n=Object.setPrototypeOf?Object.getPrototypeOf:function(x){return x.__proto__||Object.getPrototypeOf(x)},n(u)}function b(u){if(u===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return u}function R(u,p){if(typeof p!="function"&&p!==null)throw new TypeError("Super expression must either be null or a function");u.prototype=Object.create(p&&p.prototype,{constructor:{value:u,writable:!0,configurable:!0}}),p&&z(u,p)}function z(u,p){return z=Object.setPrototypeOf||function(s,P){return s.__proto__=P,s},z(u,p)}var D="Select...",U=function(u){R(p,u);function p(x){var s;return _(this,p),s=l(this,n(p).call(this,x)),s.state={selected:s.parseValue(x.value,x.options)||{label:typeof x.placeholder>"u"?D:x.placeholder,value:""},isOpen:!1},s.dropdownRef=(0,r.createRef)(),s.mounted=!0,s.handleDocumentClick=s.handleDocumentClick.bind(b(s)),s.fireChangeEvent=s.fireChangeEvent.bind(b(s)),s}return g(p,[{key:"componentDidUpdate",value:function(s){if(this.props.value!==s.value)if(this.props.value){var P=this.parseValue(this.props.value,this.props.options);P!==this.state.selected&&this.setState({selected:P})}else this.setState({selected:{label:typeof this.props.placeholder>"u"?D:this.props.placeholder,value:""}})}},{key:"componentDidMount",value:function(){document.addEventListener("click",this.handleDocumentClick,!1),document.addEventListener("touchend",this.handleDocumentClick,!1)}},{key:"componentWillUnmount",value:function(){this.mounted=!1,document.removeEventListener("click",this.handleDocumentClick,!1),document.removeEventListener("touchend",this.handleDocumentClick,!1)}},{key:"handleMouseDown",value:function(s){this.props.onFocus&&typeof this.props.onFocus=="function"&&this.props.onFocus(this.state.isOpen),!(s.type==="mousedown"&&s.button!==0)&&(s.stopPropagation(),s.preventDefault(),this.props.disabled||this.setState({isOpen:!this.state.isOpen}))}},{key:"parseValue",value:function(s,P){var N;if(typeof s=="string")for(var L=0,j=P.length;L<j;L++)if(P[L].type==="group"){var B=P[L].items.filter(function(X){return X.value===s});B.length&&(N=B[0])}else typeof P[L].value<"u"&&P[L].value===s&&(N=P[L]);return N||s}},{key:"setValue",value:function(s,P){var N={selected:{value:s,label:P},isOpen:!1};this.fireChangeEvent(N),this.setState(N)}},{key:"fireChangeEvent",value:function(s){s.selected!==this.state.selected&&this.props.onChange&&this.props.onChange(s.selected)}},{key:"renderOption",value:function(s){var P,N=s.value;typeof N>"u"&&(N=s.label||s);var L=s.label||s.value||s,j=N===this.state.selected.value||N===this.state.selected,B=(P={},d(P,"".concat(this.props.baseClassName,"-option"),!0),d(P,s.className,!!s.className),d(P,"is-selected",j),P),X=(0,c.default)(B),q=Object.keys(s.data||{}).reduce(function(K,J){return a({},K,d({},"data-".concat(J),s.data[J]))},{});return r.default.createElement("div",v({key:N,className:X,onMouseDown:this.setValue.bind(this,N,L),onClick:this.setValue.bind(this,N,L),role:"option","aria-selected":j?"true":"false"},q),L)}},{key:"buildMenu",value:function(){var s=this,P=this.props,N=P.options,L=P.baseClassName,j=N.map(function(B){if(B.type==="group"){var X=r.default.createElement("div",{className:"".concat(L,"-title")},B.name),q=B.items.map(function(K){return s.renderOption(K)});return r.default.createElement("div",{className:"".concat(L,"-group"),key:B.name,role:"listbox",tabIndex:"-1"},X,q)}else return s.renderOption(B)});return j.length?j:r.default.createElement("div",{className:"".concat(L,"-noresults")},"No options found")}},{key:"handleDocumentClick",value:function(s){this.mounted&&(this.dropdownRef.current.contains(s.target)||this.state.isOpen&&this.setState({isOpen:!1}))}},{key:"isValueSelected",value:function(){return typeof this.state.selected=="string"||this.state.selected.value!==""}},{key:"render",value:function(){var s,P,N,L,j,B=this.props,X=B.baseClassName,q=B.controlClassName,K=B.placeholderClassName,J=B.menuClassName,Z=B.arrowClassName,i=B.arrowClosed,t=B.arrowOpen,f=B.className,C=this.props.disabled?"Dropdown-disabled":"",E=typeof this.state.selected=="string"?this.state.selected:this.state.selected.label,I=(0,c.default)((s={},d(s,"".concat(X,"-root"),!0),d(s,f,!!f),d(s,"is-open",this.state.isOpen),s)),M=(0,c.default)((P={},d(P,"".concat(X,"-control"),!0),d(P,q,!!q),d(P,C,!!C),P)),$=(0,c.default)((N={},d(N,"".concat(X,"-placeholder"),!0),d(N,K,!!K),d(N,"is-selected",this.isValueSelected()),N)),A=(0,c.default)((L={},d(L,"".concat(X,"-menu"),!0),d(L,J,!!J),L)),W=(0,c.default)((j={},d(j,"".concat(X,"-arrow"),!0),d(j,Z,!!Z),j)),H=r.default.createElement("div",{className:$},E),ee=this.state.isOpen?r.default.createElement("div",{className:A,"aria-expanded":"true"},this.buildMenu()):null;return r.default.createElement("div",{ref:this.dropdownRef,className:I},r.default.createElement("div",{className:M,onMouseDown:this.handleMouseDown.bind(this),onTouchEnd:this.handleMouseDown.bind(this),"aria-haspopup":"listbox"},H,r.default.createElement("div",{className:"".concat(X,"-arrow-wrapper")},t&&i?this.state.isOpen?t:i:r.default.createElement("span",{className:W}))),ee)}}]),p}(r.Component);U.defaultProps={baseClassName:"Dropdown"};var m=U;e.default=m})(Ge);const At=ke(Ge);function Nt(){const{globalState:e,dispatch:r}=G.useContext(Q),c=["uppercase","lowercase","capitalize","initial"];return o.jsx(te,{title:"Text Case",children:o.jsx(Ht,{children:o.jsx(At,{options:c,onChange:T=>r({type:"SET_TEXT_CASE",data:T.value}),value:e.textCase,placeholder:"Select an option"})})})}const Ht=V.div`
|
|
200
|
+
.Dropdown-control {
|
|
201
|
+
background-color: transparent;
|
|
202
|
+
border-color: ${({theme:e})=>e.primary};
|
|
203
|
+
color: ${({theme:e})=>e.text};
|
|
204
|
+
width: fit-content;
|
|
205
|
+
font-size: 14px;
|
|
206
|
+
|
|
207
|
+
.Dropdown-placeholder {
|
|
208
|
+
text-transform: capitalize !important;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
.Dropdown-option {
|
|
212
|
+
text-transform: capitalize !important;
|
|
213
|
+
}
|
|
214
|
+
`;function Lt(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Title Colors",children:o.jsx(Se,{value:e.titleColor,onChange:c=>r({type:"SET_TITLE_COLOR",data:c})})})}const Wt=()=>o.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 1024 1024",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M697.8 481.4c33.6-35 54.2-82.3 54.2-134.3v-10.2C752 229.3 663.9 142 555.3 142H259.4c-15.1 0-27.4 12.3-27.4 27.4v679.1c0 16.3 13.2 29.5 29.5 29.5h318.7c117 0 211.8-94.2 211.8-210.5v-11c0-73-37.4-137.3-94.2-175.1zM328 238h224.7c57.1 0 103.3 44.4 103.3 99.3v9.5c0 54.8-46.3 99.3-103.3 99.3H328V238zm366.6 429.4c0 62.9-51.7 113.9-115.5 113.9H328V542.7h251.1c63.8 0 115.5 51 115.5 113.9v10.8z"})}),zt=()=>o.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 1024 1024",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M120 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm0 424h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm784 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),Ut=()=>o.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 1024 1024",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M264 230h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm496 424c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H264c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496zm144 140H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),Bt=()=>o.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 1024 1024",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M904 158H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 424H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 212H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0-424H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8z"})}),Gt=()=>o.jsx("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 1024 1024",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg",children:o.jsx("path",{d:"M798 160H366c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h181.2l-156 544H229c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h432c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8H474.4l156-544H798c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"})});function Yt(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Font Styles",children:o.jsxs(Ft,{children:[o.jsx(se,{$active:e.textBold,onClick:()=>r({type:"TOGGLE_BOLD"}),children:o.jsx(Wt,{})}),o.jsx(se,{$active:e.textItalic,onClick:()=>r({type:"TOGGLE_ITALIC"}),children:o.jsx(Gt,{})}),o.jsx(se,{$active:e.textAlignment==="left",onClick:()=>r({type:"SET_TEXT_ALIGNMENT",data:"left"}),children:o.jsx(zt,{})}),o.jsx(se,{$active:e.textAlignment==="center",onClick:()=>r({type:"SET_TEXT_ALIGNMENT",data:"center"}),children:o.jsx(Ut,{})}),o.jsx(se,{$active:e.textAlignment==="right",onClick:()=>r({type:"SET_TEXT_ALIGNMENT",data:"right"}),children:o.jsx(Bt,{})})]})})}const se=V.button`
|
|
215
|
+
background: none;
|
|
216
|
+
box-shadow: none;
|
|
217
|
+
border: none;
|
|
218
|
+
color: white;
|
|
219
|
+
font-size: 22px;
|
|
220
|
+
background-color: ${e=>e.$active?"grey":"transparent"};
|
|
221
|
+
display: flex;
|
|
222
|
+
justify-content: center;
|
|
223
|
+
align-items: center;
|
|
224
|
+
margin: 0.25rem 0.25rem 0.25rem;
|
|
225
|
+
`,Ft=V.div`
|
|
226
|
+
display: flex;
|
|
227
|
+
flex-wrap: wrap;
|
|
228
|
+
`;function Vt(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"High Contrast",children:o.jsx(oe,{onChange:()=>r({type:e.highContrast?"UNSET_HIGH_CONTRAST":"SET_HIGH_CONTRAST"}),checked:e.highContrast})})}V.div`
|
|
229
|
+
display: flex;
|
|
230
|
+
justify-content: space-between;
|
|
231
|
+
align-items: center;
|
|
232
|
+
padding: 0.5rem 1rem;
|
|
233
|
+
h5 {
|
|
234
|
+
margin-right: 0.5rem;
|
|
235
|
+
color: lightgrey;
|
|
236
|
+
font-size: 0.7rem;
|
|
237
|
+
}
|
|
238
|
+
`;function Xt(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(te,{title:"Low Contrast",children:o.jsx(oe,{onChange:()=>r({type:e.lowContrast?"UNSET_LOW_CONTRAST":"SET_LOW_CONTRAST"}),checked:e.lowContrast})})}V.div`
|
|
239
|
+
display: flex;
|
|
240
|
+
justify-content: space-between;
|
|
241
|
+
align-items: center;
|
|
242
|
+
padding: 0.5rem 1rem;
|
|
243
|
+
h5 {
|
|
244
|
+
margin-right: 0.5rem;
|
|
245
|
+
color: lightgrey;
|
|
246
|
+
font-size: 0.7rem;
|
|
247
|
+
}
|
|
248
|
+
`;function qt(){return o.jsxs(Kt,{children:[o.jsx(Ee,{children:"General Text Styles"}),o.jsx(xt,{}),o.jsxs(_e,{children:[o.jsx(Ot,{}),o.jsx($t,{}),o.jsx(Rt,{}),o.jsx(Nt,{}),o.jsx(Yt,{})]}),o.jsx(Ee,{children:"Title Styles"}),o.jsxs(_e,{children:[o.jsx(Lt,{}),o.jsx(Pt,{}),o.jsx(Mt,{})]}),o.jsx(Ee,{children:"Extra Setting"}),o.jsxs(_e,{children:[o.jsx(jt,{}),o.jsx(gt,{}),o.jsx(It,{}),o.jsx(Vt,{}),o.jsx(Xt,{})]})]})}const Kt=V.div`
|
|
249
|
+
display: flex;
|
|
250
|
+
flex-direction: column;
|
|
251
|
+
padding: 5px 20px 60px;
|
|
252
|
+
`,_e=V.div`
|
|
253
|
+
display: flex;
|
|
254
|
+
flex-wrap: wrap;
|
|
255
|
+
`;function Jt(){const{globalState:e,dispatch:r}=G.useContext(Q);return o.jsx(Zt,{children:o.jsx(Qt,{onClick:()=>r({type:"RESET_SETTINGS"}),children:"Reset Settings"})})}const Zt=V.div`
|
|
256
|
+
position: absolute;
|
|
257
|
+
bottom: 0px;
|
|
258
|
+
left: 0px;
|
|
259
|
+
width: 100%;
|
|
260
|
+
background-color: ${({theme:e})=>e.primary};
|
|
261
|
+
padding: 0.25rem;
|
|
262
|
+
box-sizing: border-box;
|
|
263
|
+
`,Qt=V.button`
|
|
264
|
+
border-radius: 50px;
|
|
265
|
+
background-color: ${({theme:e})=>e.widgetBackground};
|
|
266
|
+
color: ${({theme:e})=>e.text};
|
|
267
|
+
border: none;
|
|
268
|
+
padding: 0.5rem 0.75rem;
|
|
269
|
+
font-size: 13px;
|
|
270
|
+
`;function en({initialPosition:e,customIcon:r}){const{globalState:c,dispatch:T}=G.useContext(Q),[w,h]=G.useState(e||null),[O,v]=G.useState(!1),y=G.useRef({startX:0,startY:0,initialX:0,initialY:0,dragged:!1}),a=l=>{const n=l.currentTarget,b=n.getBoundingClientRect(),R=w?w.x:b.left,z=w?w.y:b.top;y.current={startX:l.clientX,startY:l.clientY,initialX:R,initialY:z,dragged:!1},n.setPointerCapture(l.pointerId),v(!0)},d=l=>{if(!O)return;const n=l.clientX-y.current.startX,b=l.clientY-y.current.startY;(Math.abs(n)>3||Math.abs(b)>3)&&(y.current.dragged=!0);const R=Math.min(Math.max(0,y.current.initialX+n),window.innerWidth-65),z=Math.min(Math.max(0,y.current.initialY+b),window.innerHeight-65);h({x:R,y:z})},_=l=>{v(!1),l.target.releasePointerCapture(l.pointerId)},k=()=>{if(!w)return{};const{innerWidth:l,innerHeight:n}=window,b={position:"fixed"};return w.x<l/2?(b.left=`${Math.max(10,w.x)}px`,b.right="auto"):(b.right=`${Math.max(10,l-w.x-65)}px`,b.left="auto"),w.y<n/2?(b.top=`${w.y+75}px`,b.bottom="auto"):(b.bottom=`${n-w.y+10}px`,b.top="auto"),b},g=w?{left:w.x,top:w.y,bottom:"auto",right:"auto",touchAction:"none"}:{touchAction:"none"};return o.jsx(tn,{children:o.jsxs(nn,{children:[o.jsx(rn,{style:g,onPointerDown:a,onPointerMove:d,onPointerUp:_,onClick:()=>{y.current.dragged||T({type:"OPEN_WIDGET"})},children:r||o.jsx(qe,{})}),c.widgetOpen&&o.jsxs(on,{style:k(),children:[o.jsx(an,{onClick:()=>T({type:"CLOSE_WIDGET"})}),o.jsx(Je,{}),o.jsx(sn,{children:o.jsx(qt,{})}),o.jsx(Jt,{})]})]})})}const tn=V.div`
|
|
271
|
+
font-family: 'Roboto', sans-serif;
|
|
272
|
+
`,nn=V.div`
|
|
273
|
+
font-family: 'Roboto', sans-serif;
|
|
274
|
+
`,rn=V.div`
|
|
275
|
+
position: fixed;
|
|
276
|
+
bottom: 10px;
|
|
277
|
+
right: 10px;
|
|
278
|
+
background-color: ${({theme:e})=>e.primary};
|
|
279
|
+
color: ${({theme:e})=>e.iconColor||e.text};
|
|
280
|
+
padding: 10px;
|
|
281
|
+
border-radius: 500px;
|
|
282
|
+
border: solid 2px ${({theme:e})=>e.iconColor||e.text};
|
|
283
|
+
z-index: 9998;
|
|
284
|
+
cursor: grab;
|
|
285
|
+
&:active {
|
|
286
|
+
cursor: grabbing;
|
|
287
|
+
}
|
|
288
|
+
img {
|
|
289
|
+
max-width: 60px;
|
|
290
|
+
}
|
|
291
|
+
`,on=V.div`
|
|
292
|
+
position: fixed;
|
|
293
|
+
bottom: 10px;
|
|
294
|
+
right: 10px;
|
|
295
|
+
width: calc(100% - 25px);
|
|
296
|
+
max-height: 450px;
|
|
297
|
+
max-width: 380px;
|
|
298
|
+
min-height: 300px;
|
|
299
|
+
min-width: 280px;
|
|
300
|
+
z-index: 9999;
|
|
301
|
+
overflow: hidden;
|
|
302
|
+
border-radius: 10px;
|
|
303
|
+
`,an=V(Ke)`
|
|
304
|
+
position: absolute;
|
|
305
|
+
top: 0.25rem;
|
|
306
|
+
right: 0.25rem;
|
|
307
|
+
background-color: ${({theme:e})=>e.background};
|
|
308
|
+
color: ${({theme:e})=>e.primary};
|
|
309
|
+
border-radius: 100px;
|
|
310
|
+
height: 30px;
|
|
311
|
+
width: 30px;
|
|
312
|
+
/* transform: translate(-50%, -50%); */
|
|
313
|
+
`,sn=V.div`
|
|
314
|
+
background-color: ${({theme:e})=>e.widgetBackground};
|
|
315
|
+
width: 100%;
|
|
316
|
+
height: 420px;
|
|
317
|
+
overflow-y: scroll;
|
|
318
|
+
overflow-x: hidden;
|
|
319
|
+
color: ${({theme:e})=>e.text};
|
|
320
|
+
::-webkit-scrollbar {
|
|
321
|
+
width: 10px;
|
|
322
|
+
}
|
|
323
|
+
::-webkit-scrollbar-track {
|
|
324
|
+
background: #2b2a2a;
|
|
325
|
+
border-radius: 0px 10px 10px 0px;
|
|
326
|
+
}
|
|
327
|
+
::-webkit-scrollbar-thumb {
|
|
328
|
+
background: #888;
|
|
329
|
+
}
|
|
330
|
+
::-webkit-scrollbar-thumb:hover {
|
|
331
|
+
background: #555;
|
|
332
|
+
}
|
|
333
|
+
`,cn={primary:"#0e5eb1",background:"#ffffff",widgetBackground:"#202020",text:"#ffffff",iconColor:"white"};function ln({theme:e,initialPosition:r,customIcon:c}={}){const T={...cn,...e};return o.jsx(ft,{children:o.jsx(V.ThemeProvider,{theme:T,children:o.jsx(en,{initialPosition:r,customIcon:c})})})}re.AccessibilityWidget=ln,Object.defineProperty(re,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export interface WidgetTheme {
|
|
4
|
+
primary?: string;
|
|
5
|
+
background?: string;
|
|
6
|
+
widgetBackground?: string;
|
|
7
|
+
text?: string;
|
|
8
|
+
iconColor?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface AccessibilityWidgetProps {
|
|
11
|
+
theme?: WidgetTheme;
|
|
12
|
+
initialPosition?: {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
};
|
|
16
|
+
customIcon?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export default function AccessibilityWidget({ theme, initialPosition, customIcon }?: AccessibilityWidgetProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface CounterProps {
|
|
2
|
+
onMinusChange: () => void;
|
|
3
|
+
onAddChange: () => void;
|
|
4
|
+
value: number;
|
|
5
|
+
minValue: number;
|
|
6
|
+
maxValue: number;
|
|
7
|
+
}
|
|
8
|
+
export default function Counter({ onMinusChange, onAddChange, value, minValue, maxValue, }: CounterProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FontColor(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FontColor(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FontSize(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function HideImages(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function HighContrast(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function HighlightLinks(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function HighlightLinks(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function LetterSpacing(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function LineHeight(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function LowContrast(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function HideImages(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function TitleBackgroundColor(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function FontColor(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React, ReactNode, Dispatch } from 'react';
|
|
2
|
+
import { Action } from './reducer';
|
|
3
|
+
import { GlobalState } from './initialState';
|
|
4
|
+
|
|
5
|
+
interface ContextProps {
|
|
6
|
+
globalState: GlobalState;
|
|
7
|
+
dispatch: Dispatch<Action>;
|
|
8
|
+
}
|
|
9
|
+
declare const store: React.Context<ContextProps>;
|
|
10
|
+
interface ContextProviderProps {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
declare const ContextProvider: ({ children }: ContextProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { store, ContextProvider };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface GlobalState {
|
|
2
|
+
widgetOpen: boolean;
|
|
3
|
+
fontColor: string | false;
|
|
4
|
+
fontSizeAdjustment: number;
|
|
5
|
+
lineHeight: number;
|
|
6
|
+
letterSpacing: number;
|
|
7
|
+
textBold: boolean;
|
|
8
|
+
textCase: 'initial' | 'uppercase' | 'lowercase' | 'capitalize';
|
|
9
|
+
textAlignment: 'initial' | 'left' | 'right' | 'center' | 'justify';
|
|
10
|
+
textItalic: boolean;
|
|
11
|
+
titleColor: string | false;
|
|
12
|
+
titleBackgroundColor: string | null;
|
|
13
|
+
highlightTitles: boolean;
|
|
14
|
+
highlightLinks: boolean;
|
|
15
|
+
hideImages: boolean;
|
|
16
|
+
monochrome: boolean;
|
|
17
|
+
highContrast: boolean;
|
|
18
|
+
lowContrast: boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const initialState: GlobalState;
|
|
21
|
+
export default initialState;
|