tocco-legacy-bundle 3.13.56 → 3.13.57
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/changelog.md +6 -0
- package/dist/{chunk-544.52f2af19bac40112b33f.js → chunk-235.15d1b33ac74058a63a58.js} +3 -13
- package/dist/chunk-601.1f58f59256c51e182cba.js +1 -0
- package/dist/{chunk-88.b0f86643ff5cf7312ea9.js → chunk-88.9fd9d31950d14b2980e5.js} +1 -1
- package/dist/{chunk-430.748dee3af6e5d0ea39ab.js → chunk-893.329480c7f2be7f2ee38f.js} +1 -1
- package/dist/{chunk-actions.a0353e1e36dc0a9b5eee.js → chunk-actions.fea1dc20abec28435ac9.js} +1 -1
- package/dist/docs-browser.js +19 -41
- package/dist/entity-browser.js +17 -39
- package/dist/input-edit.js +7 -7
- package/dist/login.js +7 -7
- package/dist/merge.js +6 -6
- package/dist/password-update.js +7 -7
- package/dist/resource-scheduler.js +6 -6
- package/dist/sso-login.js +6 -6
- package/dist/two-factor-connector.js +7 -7
- package/package.json +1 -1
- package/dist/chunk-601.6992c7bd78788e40a7c7.js +0 -1
package/changelog.md
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
(this.webpackChunktocco_legacy_bundle=this.webpackChunktocco_legacy_bundle||[]).push([[544],{30454:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],o(r),o(n))}function i(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=n.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var o=i(r[0]);o!==r[0]&&(t[r[0]]=o)}r=n.exec(e)}t["%C2"]="�";for(var a=Object.keys(t),s=0;s<a.length;s++){var c=a[s];e=e.replace(new RegExp(c,"g"),t[c])}return e}(e)}}},73055:e=>{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),o=Array.isArray(t),i=0;i<n.length;i++){var a=n[i],s=e[a];(o?-1!==t.indexOf(a):t(a,s,e))&&(r[a]=s)}return r}},61074:e=>{e.exports=function(e){return e.split("")}},27185:(e,t,r)=>{var n=r(38859),o=r(15325),i=r(29905),a=r(34932),s=r(27301),c=r(19219),l=Math.min;e.exports=function(e,t,r){for(var u=r?i:o,d=e[0].length,h=e.length,f=h,p=Array(h),g=1/0,m=[];f--;){var v=e[f];f&&t&&(v=a(v,s(t))),g=l(v.length,g),p[f]=!r&&(t||d>=120&&v.length>=120)?new n(f&&v):void 0}v=e[0];var y=-1,w=p[0];e:for(;++y<d&&m.length<g;){var E=v[y],b=t?t(E):E;if(E=r||0!==E?E:0,!(w?c(w,b):u(m,b,r))){for(f=h;--f;){var R=p[f];if(!(R?c(R,b):u(e[f],b,r)))continue e}w&&w.push(b),m.push(E)}}return m}},80741:(e,t,r)=>{var n=r(83693);e.exports=function(e){return n(e)?e:[]}},28754:(e,t,r)=>{var n=r(25160);e.exports=function(e,t,r){var o=e.length;return r=void 0===r?o:r,!t&&r>=o?e:n(e,t,r)}},12507:(e,t,r)=>{var n=r(28754),o=r(49698),i=r(63912),a=r(13222);e.exports=function(e){return function(t){t=a(t);var r=o(t)?i(t):void 0,s=r?r[0]:t.charAt(0),c=r?n(r,1).join(""):t.slice(1);return s[e]()+c}}},62006:(e,t,r)=>{var n=r(15389),o=r(64894),i=r(95950);e.exports=function(e){return function(t,r,a){var s=Object(t);if(!o(t)){var c=n(r,3);t=i(t),r=function(e){return c(s[e],e,s)}}var l=e(t,r,a);return l>-1?s[c?t[l]:l]:void 0}}},49698:e=>{e.exports=function(){return!1}},63912:(e,t,r)=>{var n=r(61074),o=r(49698),i=r(42054);e.exports=function(e){return o(e)?i(e):n(e)}},42054:e=>{e.exports=function(e){return e.split("")}},14792:(e,t,r)=>{var n=r(13222),o=r(55808);e.exports=function(e){return o(n(e).toLowerCase())}},7309:(e,t,r)=>{var n=r(62006)(r(24713));e.exports=n},24713:(e,t,r)=>{var n=r(2523),o=r(15389),i=r(61489),a=Math.max;e.exports=function(e,t,r){var s=null==e?0:e.length;if(!s)return-1;var c=null==r?0:i(r);return c<0&&(c=a(s+c,0)),n(e,o(t,3),c)}},5287:(e,t,r)=>{var n=r(34932),o=r(27185),i=r(69302),a=r(80741),s=i((function(e){var t=n(e,a);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=s},99786:(e,t,r)=>{var n=r(83120),o=r(15389),i=r(69302),a=r(55765),s=r(83693),c=r(68090),l=i((function(e){var t=c(e);return s(t)&&(t=void 0),a(n(e,1,s,!0),o(t,2))}));e.exports=l},55808:(e,t,r)=>{var n=r(12507)("toUpperCase");e.exports=n},86663:(e,t,r)=>{"use strict";const n=r(24280),o=r(30454),i=r(528),a=r(73055),s=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function u(e,t){return t.decode?o(e):e}function d(e){return Array.isArray(e)?e.sort():"object"==typeof e?d(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function h(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function f(e){const t=(e=h(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function p(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function g(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"colon-list-separator":return(e,r,n)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const o="string"==typeof r&&r.includes(e.arrayFormatSeparator),i="string"==typeof r&&!o&&u(r,e).includes(e.arrayFormatSeparator);r=i?u(r,e):r;const a=o||i?r.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===r?r:u(r,e);n[t]=a};case"bracket-separator":return(t,r,n)=>{const o=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!o)return void(n[t]=r?u(r,e):r);const i=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],i):n[t]=i};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const o of e.split("&")){if(""===o)continue;let[e,a]=i(t.decode?o.replace(/\+/g," "):o,"=");a=void 0===a?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?a:u(a,t),r(u(e,t),a,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=p(r[e],t);else n[e]=p(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=d(r):e[t]=r,e}),Object.create(null))}t.extract=f,t.parse=g,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const o=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[",o,"]"].join("")]:[...r,[l(t,e),"[",l(o,e),"]=",l(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[]"].join("")]:[...r,[l(t,e),"[]=",l(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),":list="].join("")]:[...r,[l(t,e),":list=",l(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?n:(o=null===o?"":o,0===n.length?[[l(r,e),t,l(o,e)].join("")]:[[n,l(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,l(t,e)]:[...r,[l(t,e),"=",l(n,e)].join("")]}}(t),o={};for(const t of Object.keys(e))r(t)||(o[t]=e[t]);const i=Object.keys(o);return!1!==t.sort&&i.sort(t.sort),i.map((r=>{const o=e[r];return void 0===o?"":null===o?l(r,t):Array.isArray(o)?0===o.length&&"bracket-separator"===t.arrayFormat?l(r,t)+"[]":o.reduce(n(r),[]).join("&"):l(r,t)+"="+l(o,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=i(e,"#");return Object.assign({url:r.split("?")[0]||"",query:g(f(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[s]:!0},r);const n=h(e.url).split("?")[0]||"",o=t.extract(e.url),i=t.parse(o,{sort:!1}),a=Object.assign(i,e.query);let c=t.stringify(a,r);c&&(c=`?${c}`);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r[s]?l(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${c}${u}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[s]:!1},n);const{url:o,query:i,fragmentIdentifier:c}=t.parseUrl(e,n);return t.stringifyUrl({url:o,query:a(i,r),fragmentIdentifier:c},n)},t.exclude=(e,r,n)=>{const o=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,o,n)}},39335:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(4883),o=r(12238),i=r.n(o),a=r(4146),s=r.n(a);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}var l={},u=0;function d(e,t){return t=t||{},function(r){var o=r.displayName||r.name||"Component",a=function(o){var i,a;function s(e,t){var r;return(r=o.call(this,e,t)||this).state={},r.__scriptURL="",r}a=o,(i=s).prototype=Object.create(a.prototype),i.prototype.constructor=i,i.__proto__=a;var c=s.prototype;return c.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+u++),this.__scriptLoaderID},c.setupScriptURL=function(){return this.__scriptURL="function"==typeof e?e():e,this.__scriptURL},c.asyncScriptLoaderHandleLoad=function(e){var t=this;this.setState(e,(function(){return t.props.asyncScriptOnLoad&&t.props.asyncScriptOnLoad(t.state)}))},c.asyncScriptLoaderTriggerOnScriptLoaded=function(){var e=l[this.__scriptURL];if(!e||!e.loaded)throw new Error("Script is not loaded.");for(var r in e.observers)e.observers[r](e);delete window[t.callbackName]},c.componentDidMount=function(){var e=this,r=this.setupScriptURL(),n=this.asyncScriptLoaderGetScriptLoaderID(),o=t,i=o.globalName,a=o.callbackName,s=o.scriptId;if(i&&void 0!==window[i]&&(l[r]={loaded:!0,observers:{}}),l[r]){var c=l[r];return c&&(c.loaded||c.errored)?void this.asyncScriptLoaderHandleLoad(c):void(c.observers[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)})}var u={};u[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)},l[r]={loaded:!1,observers:u};var d=document.createElement("script");for(var h in d.src=r,d.async=!0,t.attributes)d.setAttribute(h,t.attributes[h]);s&&(d.id=s);var f=function(e){if(l[r]){var t=l[r].observers;for(var n in t)e(t[n])&&delete t[n]}};a&&"undefined"!=typeof window&&(window[a]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),d.onload=function(){var e=l[r];e&&(e.loaded=!0,f((function(t){return!a&&(t(e),!0)})))},d.onerror=function(){var e=l[r];e&&(e.errored=!0,f((function(t){return t(e),!0})))},document.body.appendChild(d)},c.componentWillUnmount=function(){var e=this.__scriptURL;if(!0===t.removeOnUnmount)for(var r=document.getElementsByTagName("script"),n=0;n<r.length;n+=1)r[n].src.indexOf(e)>-1&&r[n].parentNode&&r[n].parentNode.removeChild(r[n]);var o=l[e];o&&(delete o.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===t.removeOnUnmount&&delete l[e])},c.render=function(){var e=t.globalName,o=this.props,i=(o.asyncScriptOnLoad,o.forwardedRef),a=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(o,["asyncScriptOnLoad","forwardedRef"]);return e&&"undefined"!=typeof window&&(a[e]=void 0!==window[e]?window[e]:void 0),a.ref=i,(0,n.createElement)(r,a)},s}(n.Component),d=(0,n.forwardRef)((function(e,t){return(0,n.createElement)(a,c({},e,{forwardedRef:t}))}));return d.displayName="AsyncScriptLoader("+o+")",d.propTypes={asyncScriptOnLoad:i().func},s()(d,r)}}},29336:(e,t,r)=>{"use strict";var n=r(33567);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){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}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},12238:(e,t,r)=>{e.exports=r(29336)()},33567:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},99651:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(98931);r(32845);const o=101==r.j?n.A:null},98931:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(32845),o=r(39335),i="onloadcallback";function a(){return"undefined"!=typeof window&&window.recaptchaOptions||{}}const s=(0,o.A)((function(){var e=a(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+i+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+i+"&render=explicit"}),{callbackName:i,globalName:"grecaptcha",attributes:a().nonce?{nonce:a().nonce}:{}})(n.A)},32845:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(4883),o=r(49385),i=r.n(o),a=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}var u=function(e){var t,r;function o(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(c(t)),t.handleErrored=t.handleErrored.bind(c(t)),t.handleChange=t.handleChange.bind(c(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(c(t)),t}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,l(t,r);var i=o.prototype;return i.getCaptchaFunction=function(e){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[e]:this.props.grecaptcha[e]:null},i.getValue=function(){var e=this.getCaptchaFunction("getResponse");return e&&void 0!==this._widgetId?e(this._widgetId):null},i.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},i.execute=function(){var e=this.getCaptchaFunction("execute");if(e&&void 0!==this._widgetId)return e(this._widgetId);this._executeRequested=!0},i.executeAsync=function(){var e=this;return new Promise((function(t,r){e.executionResolve=t,e.executionReject=r,e.execute()}))},i.reset=function(){var e=this.getCaptchaFunction("reset");e&&void 0!==this._widgetId&&e(this._widgetId)},i.forceReset=function(){var e=this.getCaptchaFunction("reset");e&&e()},i.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},i.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},i.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},i.explicitRender=function(){var e=this.getCaptchaFunction("render");if(e&&void 0===this._widgetId){var t=document.createElement("div");this._widgetId=e(t,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(t)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())},i.componentDidMount=function(){this.explicitRender()},i.componentDidUpdate=function(){this.explicitRender()},i.handleRecaptchaRef=function(e){this.captcha=e},i.render=function(){var e=this.props,t=(e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,e.isolated,function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,a));return n.createElement("div",s({},t,{ref:this.handleRecaptchaRef}))},o}(n.Component);u.displayName="ReCAPTCHA",u.propTypes={sitekey:i().string.isRequired,onChange:i().func,grecaptcha:i().object,theme:i().oneOf(["dark","light"]),type:i().oneOf(["image","audio"]),tabindex:i().number,onExpired:i().func,onErrored:i().func,size:i().oneOf(["compact","normal","invisible"]),stoken:i().string,hl:i().string,badge:i().oneOf(["bottomright","bottomleft","inline"]),isolated:i().bool},u.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"}},22501:(e,t,r)=>{"use strict";var n=r(1846);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,a){if(a!==n){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}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},49385:(e,t,r)=>{e.exports=r(22501)()},1846:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},84976:(e,t,r)=>{"use strict";r.d(t,{Ge:()=>d,N_:()=>S,OA:()=>x,ok:()=>L,pg:()=>E});var n=r(4883),o=r(81845);if(101==r.j)var i=r(47767);if(101==r.j)var a=r(45588);
|
|
2
|
-
/**
|
|
3
|
-
* React Router DOM v6.30.0
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Remix Software Inc.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
9
|
-
*
|
|
10
|
-
* @license MIT
|
|
11
|
-
*/function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}function c(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}function l(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map((e=>[r,e])):[[r,n]])}),[]))}new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);const u=101==r.j?["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"]:null;try{window.__reactRouterVersion="6"}catch(e){}function d(e,t){return(0,a.aE)({basename:null==t?void 0:t.basename,future:s({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:(0,a.TM)({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||h(),routes:e,mapRouteProperties:i.wE,dataStrategy:null==t?void 0:t.dataStrategy,patchRoutesOnNavigation:null==t?void 0:t.patchRoutesOnNavigation,window:null==t?void 0:t.window}).initialize()}function h(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=s({},t,{errors:f(t.errors)})),t}function f(e){if(!e)return null;let t=Object.entries(e),r={};for(let[e,n]of t)if(n&&"RouteErrorResponse"===n.__type)r[e]=new a.VV(n.status,n.statusText,n.data,!0===n.internal);else if(n&&"Error"===n.__type){if(n.__subType){let t=window[n.__subType];if("function"==typeof t)try{let o=new t(n.message);o.stack="",r[e]=o}catch(e){}}if(null==r[e]){let t=new Error(n.message);t.stack="",r[e]=t}}else r[e]=n;return r}const p=n.createContext({isTransitioning:!1});const g=n.createContext(new Map);const m=n.startTransition,v=o.flushSync;n.useId;function y(e){v?v(e):e()}class w{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function E(e){let{fallbackElement:t,router:r,future:o}=e,[a,s]=n.useState(r.state),[c,l]=n.useState(),[u,d]=n.useState({isTransitioning:!1}),[h,f]=n.useState(),[v,E]=n.useState(),[R,C]=n.useState(),S=n.useRef(new Map),{v7_startTransition:x}=o||{},O=n.useCallback((e=>{x?function(e){m?m(e):e()}(e):e()}),[x]),_=n.useCallback(((e,t)=>{let{deletedFetchers:n,flushSync:o,viewTransitionOpts:i}=t;e.fetchers.forEach(((e,t)=>{void 0!==e.data&&S.current.set(t,e.data)})),n.forEach((e=>S.current.delete(e)));let a=null==r.window||null==r.window.document||"function"!=typeof r.window.document.startViewTransition;if(i&&!a){if(o){y((()=>{v&&(h&&h.resolve(),v.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:i.currentLocation,nextLocation:i.nextLocation})}));let t=r.window.document.startViewTransition((()=>{y((()=>s(e)))}));return t.finished.finally((()=>{y((()=>{f(void 0),E(void 0),l(void 0),d({isTransitioning:!1})}))})),void y((()=>E(t)))}v?(h&&h.resolve(),v.skipTransition(),C({state:e,currentLocation:i.currentLocation,nextLocation:i.nextLocation})):(l(e),d({isTransitioning:!0,flushSync:!1,currentLocation:i.currentLocation,nextLocation:i.nextLocation}))}else o?y((()=>s(e))):O((()=>s(e)))}),[r.window,v,h,S,O]);n.useLayoutEffect((()=>r.subscribe(_)),[r,_]),n.useEffect((()=>{u.isTransitioning&&!u.flushSync&&f(new w)}),[u]),n.useEffect((()=>{if(h&&c&&r.window){let e=c,t=h.promise,n=r.window.document.startViewTransition((async()=>{O((()=>s(e))),await t}));n.finished.finally((()=>{f(void 0),E(void 0),l(void 0),d({isTransitioning:!1})})),E(n)}}),[O,c,h,r.window]),n.useEffect((()=>{h&&c&&a.location.key===c.location.key&&h.resolve()}),[h,v,a.location,c]),n.useEffect((()=>{!u.isTransitioning&&R&&(l(R.state),d({isTransitioning:!0,flushSync:!1,currentLocation:R.currentLocation,nextLocation:R.nextLocation}),C(void 0))}),[u.isTransitioning,R]),n.useEffect((()=>{}),[]);let M=n.useMemo((()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})})),[r]),A=r.basename||"/",L=n.useMemo((()=>({router:r,navigator:M,static:!1,basename:A})),[r,M,A]),I=n.useMemo((()=>({v7_relativeSplatPath:r.future.v7_relativeSplatPath})),[r.future.v7_relativeSplatPath]);return n.useEffect((()=>(0,i.V8)(o,r.future)),[o,r.future]),n.createElement(n.Fragment,null,n.createElement(i.sp.Provider,{value:L},n.createElement(i.Rq.Provider,{value:a},n.createElement(g.Provider,{value:S.current},n.createElement(p.Provider,{value:u},n.createElement(i.Ix,{basename:A,location:a.location,navigationType:a.historyAction,navigator:M,future:I},a.initialized||r.future.v7_partialHydration?n.createElement(b,{routes:r.routes,future:r.future,state:a}):t))))),null)}const b=101==r.j?n.memo((function(e){let{routes:t,future:r,state:n}=e;return(0,i.ph)(t,void 0,n,r)})):null;const R="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,C=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,S=101==r.j?n.forwardRef((function(e,t){let r,{onClick:o,relative:l,reloadDocument:d,replace:h,state:f,target:p,to:g,preventScrollReset:m,viewTransition:v}=e,y=c(e,u),{basename:w}=n.useContext(i.jb),E=!1;if("string"==typeof g&&C.test(g)&&(r=g,R))try{let e=new URL(window.location.href),t=g.startsWith("//")?new URL(e.protocol+g):new URL(g),r=(0,a.pb)(t.pathname,w);t.origin===e.origin&&null!=r?g=r+t.search+t.hash:E=!0}catch(e){}let b=(0,i.$P)(g,{relative:l}),S=function(e,t){let{target:r,replace:o,state:s,preventScrollReset:c,relative:l,viewTransition:u}=void 0===t?{}:t,d=(0,i.Zp)(),h=(0,i.zy)(),f=(0,i.x$)(e,{relative:l});return n.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,r)){t.preventDefault();let r=void 0!==o?o:(0,a.AO)(h)===(0,a.AO)(f);d(e,{replace:r,state:s,preventScrollReset:c,relative:l,viewTransition:u})}}),[h,d,f,o,s,r,e,c,l,u])}(g,{replace:h,state:f,target:p,preventScrollReset:m,relative:l,viewTransition:v});return n.createElement("a",s({},y,{href:r||b,onClick:E||d?o:function(e){o&&o(e),e.defaultPrevented||S(e)},ref:t,target:p}))})):null;function x(e){let{getKey:t,storageKey:r}=e;return function(e){let{getKey:t,storageKey:r}=void 0===e?{}:e,{router:o}=M(O.UseScrollRestoration),{restoreScrollPosition:c,preventScrollReset:l}=A(_.UseScrollRestoration),{basename:u}=n.useContext(i.jb),d=(0,i.zy)(),h=(0,i.FE)(),f=(0,i.cq)();n.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(e,t){let{capture:r}=t||{};n.useEffect((()=>{let t=null!=r?{capture:r}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}}),[e,r])}(n.useCallback((()=>{if("idle"===f.state){let e=(t?t(d,h):null)||d.key;k[e]=window.scrollY}try{sessionStorage.setItem(r||I,JSON.stringify(k))}catch(e){}window.history.scrollRestoration="auto"}),[r,t,f.state,d,h])),"undefined"!=typeof document&&(n.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(r||I);e&&(k=JSON.parse(e))}catch(e){}}),[r]),n.useLayoutEffect((()=>{let e=t&&"/"!==u?(e,r)=>t(s({},e,{pathname:(0,a.pb)(e.pathname,u)||e.pathname}),r):t,r=null==o?void 0:o.enableScrollRestoration(k,(()=>window.scrollY),e);return()=>r&&r()}),[o,u,t]),n.useLayoutEffect((()=>{if(!1!==c)if("number"!=typeof c){if(d.hash){let e=document.getElementById(decodeURIComponent(d.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==l&&window.scrollTo(0,0)}else window.scrollTo(0,c)}),[d,c,l]))}({getKey:t,storageKey:r}),null}var O,_;function M(e){let t=n.useContext(i.sp);return t||(0,a.Oi)(!1),t}function A(e){let t=n.useContext(i.Rq);return t||(0,a.Oi)(!1),t}function L(e){let t=n.useRef(l(e)),r=n.useRef(!1),o=(0,i.zy)(),a=n.useMemo((()=>function(e,t){let r=l(e);return t&&t.forEach(((e,n)=>{r.has(n)||t.getAll(n).forEach((e=>{r.append(n,e)}))})),r}(o.search,r.current?null:t.current)),[o.search]),s=(0,i.Zp)(),c=n.useCallback(((e,t)=>{const n=l("function"==typeof e?e(a):e);r.current=!0,s("?"+n,t)}),[s,a]);return[a,c]}(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(O||(O={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(_||(_={}));const I="react-router-scroll-positions";let k={}},6414:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(25406);const o=(i=n.A,a=i.getIn,function(e,t){return function(r){var n=t||function(e){return a(e,"form")};return!!a(n(r),e+".submitting")}});var i,a},528:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},24280:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},18987:(e,t,r)=>{"use strict";
|
|
1
|
+
(this.webpackChunktocco_legacy_bundle=this.webpackChunktocco_legacy_bundle||[]).push([[235],{30454:e=>{"use strict";var t="%[a-f0-9]{2}",r=new RegExp("("+t+")|([^%]+?)","gi"),n=new RegExp("("+t+")+","gi");function o(e,t){try{return[decodeURIComponent(e.join(""))]}catch(e){}if(1===e.length)return e;t=t||1;var r=e.slice(0,t),n=e.slice(t);return Array.prototype.concat.call([],o(r),o(n))}function i(e){try{return decodeURIComponent(e)}catch(i){for(var t=e.match(r)||[],n=1;n<t.length;n++)t=(e=o(t,n).join("")).match(r)||[];return e}}e.exports=function(e){if("string"!=typeof e)throw new TypeError("Expected `encodedURI` to be of type `string`, got `"+typeof e+"`");try{return e=e.replace(/\+/g," "),decodeURIComponent(e)}catch(t){return function(e){for(var t={"%FE%FF":"��","%FF%FE":"��"},r=n.exec(e);r;){try{t[r[0]]=decodeURIComponent(r[0])}catch(e){var o=i(r[0]);o!==r[0]&&(t[r[0]]=o)}r=n.exec(e)}t["%C2"]="�";for(var s=Object.keys(t),a=0;a<s.length;a++){var c=s[a];e=e.replace(new RegExp(c,"g"),t[c])}return e}(e)}}},73055:e=>{"use strict";e.exports=function(e,t){for(var r={},n=Object.keys(e),o=Array.isArray(t),i=0;i<n.length;i++){var s=n[i],a=e[s];(o?-1!==t.indexOf(s):t(s,a,e))&&(r[s]=a)}return r}},61074:e=>{e.exports=function(e){return e.split("")}},27185:(e,t,r)=>{var n=r(38859),o=r(15325),i=r(29905),s=r(34932),a=r(27301),c=r(19219),l=Math.min;e.exports=function(e,t,r){for(var u=r?i:o,d=e[0].length,h=e.length,p=h,f=Array(h),g=1/0,m=[];p--;){var y=e[p];p&&t&&(y=s(y,a(t))),g=l(y.length,g),f[p]=!r&&(t||d>=120&&y.length>=120)?new n(p&&y):void 0}y=e[0];var v=-1,E=f[0];e:for(;++v<d&&m.length<g;){var b=y[v],w=t?t(b):b;if(b=r||0!==b?b:0,!(E?c(E,w):u(m,w,r))){for(p=h;--p;){var C=f[p];if(!(C?c(C,w):u(e[p],w,r)))continue e}E&&E.push(w),m.push(b)}}return m}},80741:(e,t,r)=>{var n=r(83693);e.exports=function(e){return n(e)?e:[]}},28754:(e,t,r)=>{var n=r(25160);e.exports=function(e,t,r){var o=e.length;return r=void 0===r?o:r,!t&&r>=o?e:n(e,t,r)}},12507:(e,t,r)=>{var n=r(28754),o=r(49698),i=r(63912),s=r(13222);e.exports=function(e){return function(t){t=s(t);var r=o(t)?i(t):void 0,a=r?r[0]:t.charAt(0),c=r?n(r,1).join(""):t.slice(1);return a[e]()+c}}},62006:(e,t,r)=>{var n=r(15389),o=r(64894),i=r(95950);e.exports=function(e){return function(t,r,s){var a=Object(t);if(!o(t)){var c=n(r,3);t=i(t),r=function(e){return c(a[e],e,a)}}var l=e(t,r,s);return l>-1?a[c?t[l]:l]:void 0}}},49698:e=>{e.exports=function(){return!1}},63912:(e,t,r)=>{var n=r(61074),o=r(49698),i=r(42054);e.exports=function(e){return o(e)?i(e):n(e)}},42054:e=>{e.exports=function(e){return e.split("")}},14792:(e,t,r)=>{var n=r(13222),o=r(55808);e.exports=function(e){return o(n(e).toLowerCase())}},7309:(e,t,r)=>{var n=r(62006)(r(24713));e.exports=n},24713:(e,t,r)=>{var n=r(2523),o=r(15389),i=r(61489),s=Math.max;e.exports=function(e,t,r){var a=null==e?0:e.length;if(!a)return-1;var c=null==r?0:i(r);return c<0&&(c=s(a+c,0)),n(e,o(t,3),c)}},5287:(e,t,r)=>{var n=r(34932),o=r(27185),i=r(69302),s=r(80741),a=i((function(e){var t=n(e,s);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=a},99786:(e,t,r)=>{var n=r(83120),o=r(15389),i=r(69302),s=r(55765),a=r(83693),c=r(68090),l=i((function(e){var t=c(e);return a(t)&&(t=void 0),s(n(e,1,a,!0),o(t,2))}));e.exports=l},55808:(e,t,r)=>{var n=r(12507)("toUpperCase");e.exports=n},86663:(e,t,r)=>{"use strict";const n=r(24280),o=r(30454),i=r(528),s=r(73055),a=Symbol("encodeFragmentIdentifier");function c(e){if("string"!=typeof e||1!==e.length)throw new TypeError("arrayFormatSeparator must be single character string")}function l(e,t){return t.encode?t.strict?n(e):encodeURIComponent(e):e}function u(e,t){return t.decode?o(e):e}function d(e){return Array.isArray(e)?e.sort():"object"==typeof e?d(Object.keys(e)).sort(((e,t)=>Number(e)-Number(t))).map((t=>e[t])):e}function h(e){const t=e.indexOf("#");return-1!==t&&(e=e.slice(0,t)),e}function p(e){const t=(e=h(e)).indexOf("?");return-1===t?"":e.slice(t+1)}function f(e,t){return t.parseNumbers&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?e=Number(e):!t.parseBooleans||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(e="true"===e.toLowerCase()),e}function g(e,t){c((t=Object.assign({decode:!0,sort:!0,arrayFormat:"none",arrayFormatSeparator:",",parseNumbers:!1,parseBooleans:!1},t)).arrayFormatSeparator);const r=function(e){let t;switch(e.arrayFormat){case"index":return(e,r,n)=>{t=/\[(\d*)\]$/.exec(e),e=e.replace(/\[\d*\]$/,""),t?(void 0===n[e]&&(n[e]={}),n[e][t[1]]=r):n[e]=r};case"bracket":return(e,r,n)=>{t=/(\[\])$/.exec(e),e=e.replace(/\[\]$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"colon-list-separator":return(e,r,n)=>{t=/(:list)$/.exec(e),e=e.replace(/:list$/,""),t?void 0!==n[e]?n[e]=[].concat(n[e],r):n[e]=[r]:n[e]=r};case"comma":case"separator":return(t,r,n)=>{const o="string"==typeof r&&r.includes(e.arrayFormatSeparator),i="string"==typeof r&&!o&&u(r,e).includes(e.arrayFormatSeparator);r=i?u(r,e):r;const s=o||i?r.split(e.arrayFormatSeparator).map((t=>u(t,e))):null===r?r:u(r,e);n[t]=s};case"bracket-separator":return(t,r,n)=>{const o=/(\[\])$/.test(t);if(t=t.replace(/\[\]$/,""),!o)return void(n[t]=r?u(r,e):r);const i=null===r?[]:r.split(e.arrayFormatSeparator).map((t=>u(t,e)));void 0!==n[t]?n[t]=[].concat(n[t],i):n[t]=i};default:return(e,t,r)=>{void 0!==r[e]?r[e]=[].concat(r[e],t):r[e]=t}}}(t),n=Object.create(null);if("string"!=typeof e)return n;if(!(e=e.trim().replace(/^[?#&]/,"")))return n;for(const o of e.split("&")){if(""===o)continue;let[e,s]=i(t.decode?o.replace(/\+/g," "):o,"=");s=void 0===s?null:["comma","separator","bracket-separator"].includes(t.arrayFormat)?s:u(s,t),r(u(e,t),s,n)}for(const e of Object.keys(n)){const r=n[e];if("object"==typeof r&&null!==r)for(const e of Object.keys(r))r[e]=f(r[e],t);else n[e]=f(r,t)}return!1===t.sort?n:(!0===t.sort?Object.keys(n).sort():Object.keys(n).sort(t.sort)).reduce(((e,t)=>{const r=n[t];return Boolean(r)&&"object"==typeof r&&!Array.isArray(r)?e[t]=d(r):e[t]=r,e}),Object.create(null))}t.extract=p,t.parse=g,t.stringify=(e,t)=>{if(!e)return"";c((t=Object.assign({encode:!0,strict:!0,arrayFormat:"none",arrayFormatSeparator:","},t)).arrayFormatSeparator);const r=r=>t.skipNull&&null==e[r]||t.skipEmptyString&&""===e[r],n=function(e){switch(e.arrayFormat){case"index":return t=>(r,n)=>{const o=r.length;return void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[",o,"]"].join("")]:[...r,[l(t,e),"[",l(o,e),"]=",l(n,e)].join("")]};case"bracket":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),"[]"].join("")]:[...r,[l(t,e),"[]=",l(n,e)].join("")];case"colon-list-separator":return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,[l(t,e),":list="].join("")]:[...r,[l(t,e),":list=",l(n,e)].join("")];case"comma":case"separator":case"bracket-separator":{const t="bracket-separator"===e.arrayFormat?"[]=":"=";return r=>(n,o)=>void 0===o||e.skipNull&&null===o||e.skipEmptyString&&""===o?n:(o=null===o?"":o,0===n.length?[[l(r,e),t,l(o,e)].join("")]:[[n,l(o,e)].join(e.arrayFormatSeparator)])}default:return t=>(r,n)=>void 0===n||e.skipNull&&null===n||e.skipEmptyString&&""===n?r:null===n?[...r,l(t,e)]:[...r,[l(t,e),"=",l(n,e)].join("")]}}(t),o={};for(const t of Object.keys(e))r(t)||(o[t]=e[t]);const i=Object.keys(o);return!1!==t.sort&&i.sort(t.sort),i.map((r=>{const o=e[r];return void 0===o?"":null===o?l(r,t):Array.isArray(o)?0===o.length&&"bracket-separator"===t.arrayFormat?l(r,t)+"[]":o.reduce(n(r),[]).join("&"):l(r,t)+"="+l(o,t)})).filter((e=>e.length>0)).join("&")},t.parseUrl=(e,t)=>{t=Object.assign({decode:!0},t);const[r,n]=i(e,"#");return Object.assign({url:r.split("?")[0]||"",query:g(p(e),t)},t&&t.parseFragmentIdentifier&&n?{fragmentIdentifier:u(n,t)}:{})},t.stringifyUrl=(e,r)=>{r=Object.assign({encode:!0,strict:!0,[a]:!0},r);const n=h(e.url).split("?")[0]||"",o=t.extract(e.url),i=t.parse(o,{sort:!1}),s=Object.assign(i,e.query);let c=t.stringify(s,r);c&&(c=`?${c}`);let u=function(e){let t="";const r=e.indexOf("#");return-1!==r&&(t=e.slice(r)),t}(e.url);return e.fragmentIdentifier&&(u=`#${r[a]?l(e.fragmentIdentifier,r):e.fragmentIdentifier}`),`${n}${c}${u}`},t.pick=(e,r,n)=>{n=Object.assign({parseFragmentIdentifier:!0,[a]:!1},n);const{url:o,query:i,fragmentIdentifier:c}=t.parseUrl(e,n);return t.stringifyUrl({url:o,query:s(i,r),fragmentIdentifier:c},n)},t.exclude=(e,r,n)=>{const o=Array.isArray(r)?e=>!r.includes(e):(e,t)=>!r(e,t);return t.pick(e,o,n)}},39335:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(4883),o=r(12238),i=r.n(o),s=r(4146),a=r.n(s);function c(){return c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},c.apply(this,arguments)}var l={},u=0;function d(e,t){return t=t||{},function(r){var o=r.displayName||r.name||"Component",s=function(o){var i,s;function a(e,t){var r;return(r=o.call(this,e,t)||this).state={},r.__scriptURL="",r}s=o,(i=a).prototype=Object.create(s.prototype),i.prototype.constructor=i,i.__proto__=s;var c=a.prototype;return c.asyncScriptLoaderGetScriptLoaderID=function(){return this.__scriptLoaderID||(this.__scriptLoaderID="async-script-loader-"+u++),this.__scriptLoaderID},c.setupScriptURL=function(){return this.__scriptURL="function"==typeof e?e():e,this.__scriptURL},c.asyncScriptLoaderHandleLoad=function(e){var t=this;this.setState(e,(function(){return t.props.asyncScriptOnLoad&&t.props.asyncScriptOnLoad(t.state)}))},c.asyncScriptLoaderTriggerOnScriptLoaded=function(){var e=l[this.__scriptURL];if(!e||!e.loaded)throw new Error("Script is not loaded.");for(var r in e.observers)e.observers[r](e);delete window[t.callbackName]},c.componentDidMount=function(){var e=this,r=this.setupScriptURL(),n=this.asyncScriptLoaderGetScriptLoaderID(),o=t,i=o.globalName,s=o.callbackName,a=o.scriptId;if(i&&void 0!==window[i]&&(l[r]={loaded:!0,observers:{}}),l[r]){var c=l[r];return c&&(c.loaded||c.errored)?void this.asyncScriptLoaderHandleLoad(c):void(c.observers[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)})}var u={};u[n]=function(t){return e.asyncScriptLoaderHandleLoad(t)},l[r]={loaded:!1,observers:u};var d=document.createElement("script");for(var h in d.src=r,d.async=!0,t.attributes)d.setAttribute(h,t.attributes[h]);a&&(d.id=a);var p=function(e){if(l[r]){var t=l[r].observers;for(var n in t)e(t[n])&&delete t[n]}};s&&"undefined"!=typeof window&&(window[s]=function(){return e.asyncScriptLoaderTriggerOnScriptLoaded()}),d.onload=function(){var e=l[r];e&&(e.loaded=!0,p((function(t){return!s&&(t(e),!0)})))},d.onerror=function(){var e=l[r];e&&(e.errored=!0,p((function(t){return t(e),!0})))},document.body.appendChild(d)},c.componentWillUnmount=function(){var e=this.__scriptURL;if(!0===t.removeOnUnmount)for(var r=document.getElementsByTagName("script"),n=0;n<r.length;n+=1)r[n].src.indexOf(e)>-1&&r[n].parentNode&&r[n].parentNode.removeChild(r[n]);var o=l[e];o&&(delete o.observers[this.asyncScriptLoaderGetScriptLoaderID()],!0===t.removeOnUnmount&&delete l[e])},c.render=function(){var e=t.globalName,o=this.props,i=(o.asyncScriptOnLoad,o.forwardedRef),s=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(o,["asyncScriptOnLoad","forwardedRef"]);return e&&"undefined"!=typeof window&&(s[e]=void 0!==window[e]?window[e]:void 0),s.ref=i,(0,n.createElement)(r,s)},a}(n.Component),d=(0,n.forwardRef)((function(e,t){return(0,n.createElement)(s,c({},e,{forwardedRef:t}))}));return d.displayName="AsyncScriptLoader("+o+")",d.propTypes={asyncScriptOnLoad:i().func},a()(d,r)}}},29336:(e,t,r)=>{"use strict";var n=r(33567);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,s){if(s!==n){var a=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 a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},12238:(e,t,r)=>{e.exports=r(29336)()},33567:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},99651:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(98931);r(32845);const o=101==r.j?n.A:null},98931:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(32845),o=r(39335),i="onloadcallback";function s(){return"undefined"!=typeof window&&window.recaptchaOptions||{}}const a=(0,o.A)((function(){var e=s(),t=e.useRecaptchaNet?"recaptcha.net":"www.google.com";return e.enterprise?"https://"+t+"/recaptcha/enterprise.js?onload="+i+"&render=explicit":"https://"+t+"/recaptcha/api.js?onload="+i+"&render=explicit"}),{callbackName:i,globalName:"grecaptcha",attributes:s().nonce?{nonce:s().nonce}:{}})(n.A)},32845:(e,t,r)=>{"use strict";r.d(t,{A:()=>u});var n=r(4883),o=r(49385),i=r.n(o),s=["sitekey","onChange","theme","type","tabindex","onExpired","onErrored","size","stoken","grecaptcha","badge","hl","isolated"];function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}function c(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function l(e,t){return l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},l(e,t)}var u=function(e){var t,r;function o(){var t;return(t=e.call(this)||this).handleExpired=t.handleExpired.bind(c(t)),t.handleErrored=t.handleErrored.bind(c(t)),t.handleChange=t.handleChange.bind(c(t)),t.handleRecaptchaRef=t.handleRecaptchaRef.bind(c(t)),t}r=e,(t=o).prototype=Object.create(r.prototype),t.prototype.constructor=t,l(t,r);var i=o.prototype;return i.getCaptchaFunction=function(e){return this.props.grecaptcha?this.props.grecaptcha.enterprise?this.props.grecaptcha.enterprise[e]:this.props.grecaptcha[e]:null},i.getValue=function(){var e=this.getCaptchaFunction("getResponse");return e&&void 0!==this._widgetId?e(this._widgetId):null},i.getWidgetId=function(){return this.props.grecaptcha&&void 0!==this._widgetId?this._widgetId:null},i.execute=function(){var e=this.getCaptchaFunction("execute");if(e&&void 0!==this._widgetId)return e(this._widgetId);this._executeRequested=!0},i.executeAsync=function(){var e=this;return new Promise((function(t,r){e.executionResolve=t,e.executionReject=r,e.execute()}))},i.reset=function(){var e=this.getCaptchaFunction("reset");e&&void 0!==this._widgetId&&e(this._widgetId)},i.forceReset=function(){var e=this.getCaptchaFunction("reset");e&&e()},i.handleExpired=function(){this.props.onExpired?this.props.onExpired():this.handleChange(null)},i.handleErrored=function(){this.props.onErrored&&this.props.onErrored(),this.executionReject&&(this.executionReject(),delete this.executionResolve,delete this.executionReject)},i.handleChange=function(e){this.props.onChange&&this.props.onChange(e),this.executionResolve&&(this.executionResolve(e),delete this.executionReject,delete this.executionResolve)},i.explicitRender=function(){var e=this.getCaptchaFunction("render");if(e&&void 0===this._widgetId){var t=document.createElement("div");this._widgetId=e(t,{sitekey:this.props.sitekey,callback:this.handleChange,theme:this.props.theme,type:this.props.type,tabindex:this.props.tabindex,"expired-callback":this.handleExpired,"error-callback":this.handleErrored,size:this.props.size,stoken:this.props.stoken,hl:this.props.hl,badge:this.props.badge,isolated:this.props.isolated}),this.captcha.appendChild(t)}this._executeRequested&&this.props.grecaptcha&&void 0!==this._widgetId&&(this._executeRequested=!1,this.execute())},i.componentDidMount=function(){this.explicitRender()},i.componentDidUpdate=function(){this.explicitRender()},i.handleRecaptchaRef=function(e){this.captcha=e},i.render=function(){var e=this.props,t=(e.sitekey,e.onChange,e.theme,e.type,e.tabindex,e.onExpired,e.onErrored,e.size,e.stoken,e.grecaptcha,e.badge,e.hl,e.isolated,function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)>=0||(o[r]=e[r]);return o}(e,s));return n.createElement("div",a({},t,{ref:this.handleRecaptchaRef}))},o}(n.Component);u.displayName="ReCAPTCHA",u.propTypes={sitekey:i().string.isRequired,onChange:i().func,grecaptcha:i().object,theme:i().oneOf(["dark","light"]),type:i().oneOf(["image","audio"]),tabindex:i().number,onExpired:i().func,onErrored:i().func,size:i().oneOf(["compact","normal","invisible"]),stoken:i().string,hl:i().string,badge:i().oneOf(["bottomright","bottomleft","inline"]),isolated:i().bool},u.defaultProps={onChange:function(){},theme:"light",type:"image",tabindex:0,size:"normal",badge:"bottomright"}},22501:(e,t,r)=>{"use strict";var n=r(1846);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,r,o,i,s){if(s!==n){var a=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 a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return r.PropTypes=r,r}},49385:(e,t,r)=>{e.exports=r(22501)()},1846:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6414:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(25406);const o=(i=n.A,s=i.getIn,function(e,t){return function(r){var n=t||function(e){return s(e,"form")};return!!s(n(r),e+".submitting")}});var i,s},528:e=>{"use strict";e.exports=(e,t)=>{if("string"!=typeof e||"string"!=typeof t)throw new TypeError("Expected the arguments to be of type `string`");if(""===t)return[e];const r=e.indexOf(t);return-1===r?[e]:[e.slice(0,r),e.slice(r+t.length)]}},24280:e=>{"use strict";e.exports=e=>encodeURIComponent(e).replace(/[!'()*]/g,(e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`))},18987:(e,t,r)=>{"use strict";
|
|
12
2
|
/*! js-cookie v3.0.5 | MIT */
|
|
13
|
-
function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}r.d(t,{A:()=>o});var o=function e(t,r){function o(e,o,i){if("undefined"!=typeof document){"number"==typeof(i=n({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var a="";for(var s in i)i[s]&&(a+="; "+s,!0!==i[s]&&(a+="="+i[s].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+a}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var i=r[o].split("="),a=i.slice(1).join("=");try{var s=decodeURIComponent(i[0]);if(n[s]=t.read(a,s),e===s)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){o(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})},36459:(e,t,r)=>{"use strict";r.d(t,{h:()=>_});var n,o=r(4883),i=Object.defineProperty,a=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,l=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&l(e,r,t[r]);if(a)for(var r of a(t))c.call(t,r)&&l(e,r,t[r]);return e},d=(e,t)=>{var r={};for(var n in e)s.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&a)for(var n of a(e))t.indexOf(n)<0&&c.call(e,n)&&(r[n]=e[n]);return r};(e=>{const t=class t{constructor(e,r,n,i){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let a=[];for(let e=0;e<this.size;e++)a.push(!1);for(let e=0;e<this.size;e++)this.modules.push(a.slice()),this.isFunction.push(a.slice());this.drawFunctionPatterns();const s=this.addEccAndInterleave(n);if(this.drawCodewords(s),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(i=t,e=r),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(r,n){const o=e.QrSegment.makeSegments(r);return t.encodeSegments(o,n)}static encodeBinary(r,n){const o=e.QrSegment.makeBytes(r);return t.encodeSegments([o],n)}static encodeSegments(e,n,i=1,s=40,c=-1,l=!0){if(!(t.MIN_VERSION<=i&&i<=s&&s<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let u,d;for(u=i;;u++){const r=8*t.getNumDataCodewords(u,n),o=a.getTotalBits(e,u);if(o<=r){d=o;break}if(u>=s)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,e)&&(n=e);let h=[];for(const t of e){r(t.mode.modeBits,4,h),r(t.numChars,t.mode.numCharCountBits(u),h);for(const e of t.getData())h.push(e)}o(h.length==d);const f=8*t.getNumDataCodewords(u,n);o(h.length<=f),r(0,Math.min(4,f-h.length),h),r(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let e=236;h.length<f;e^=253)r(e,8,h);let p=[];for(;8*p.length<h.length;)p.push(0);return h.forEach(((e,t)=>p[t>>>3]|=e<<7-(7&t))),new t(u,n,p,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)0==r&&0==n||0==r&&n==t-1||r==t-1&&0==n||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let e=0;e<10;e++)r=r<<1^1335*(r>>>9);const i=21522^(t<<10|r);o(i>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,n(i,e));this.setFunctionModule(8,7,n(i,6)),this.setFunctionModule(8,8,n(i,7)),this.setFunctionModule(7,8,n(i,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,n(i,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,n(i,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,n(i,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const r=n(t,e),o=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(o,i,r),this.setFunctionModule(i,o,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const o=Math.max(Math.abs(n),Math.abs(r)),i=e+n,a=t+r;0<=i&&i<this.size&&0<=a&&a<this.size&&this.setFunctionModule(i,a,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],a=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],s=Math.floor(t.getNumRawDataModules(r)/8),c=i-s%i,l=Math.floor(s/i);let u=[];const d=t.reedSolomonComputeDivisor(a);for(let r=0,n=0;r<i;r++){let o=e.slice(n,n+l-a+(r<c?0:1));n+=o.length;const i=t.reedSolomonComputeRemainder(o,d);r<c&&o.push(0),u.push(o.concat(i))}let h=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,r)=>{(e!=l-a||r>=c)&&h.push(t[e])}));return o(h.length==s),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){const a=t-i,s=0==(t+1&2)?this.size-1-o:o;!this.isFunction[s][a]&&r<8*e.length&&(this.modules[s][a]=n(e[r>>>3],7-(7&r)),r++)}}o(r==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let n=!1,o=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[r][a]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[r][a],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,i)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let n=!1,o=0,i=[0,0,0,0,0,0,0];for(let a=0;a<this.size;a++)this.modules[a][r]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[a][r],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,i)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let n=0;n<this.size-1;n++){const o=this.modules[r][n];o==this.modules[r][n+1]&&o==this.modules[r+1][n]&&o==this.modules[r+1][n+1]&&(e+=t.PENALTY_N2)}let r=0;for(const e of this.modules)r=e.reduce(((e,t)=>e+(t?1:0)),r);const n=this.size*this.size,i=Math.ceil(Math.abs(20*r-10*n)/n)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return o(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let o=0;o<e;o++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map((e=>0));for(const o of e){const e=o^n.shift();n.push(0),r.forEach(((r,o)=>n[o]^=t.reedSolomonMultiply(r,e)))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(t>>>n&1)*e;return o(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];function r(e,t,r){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function n(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}e.QrCode=t;const i=class e{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let n=[];for(const e of t)r(e,8,n);return new e(e.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!e.isNumeric(t))throw new RangeError("String contains non-numeric characters");let n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);r(parseInt(t.substring(e,e+o),10),3*o+1,n),e+=o}return new e(e.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let n,o=[];for(n=0;n+2<=t.length;n+=2){let i=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n));i+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n+1)),r(i,11,o)}return n<t.length&&r(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n)),6,o),new e(e.Mode.ALPHANUMERIC,t.length,o)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)r(t,8,n);else if(t<16384)r(2,2,n),r(t,14,n);else{if(!(t<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,n),r(t,21,n)}return new e(e.Mode.ECI,0,n)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substring(r+1,r+3),16)),r+=2);return t}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let a=i;e.QrSegment=i})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2);e.Ecc=t})(t=e.QrCode||(e.QrCode={}))})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]);e.Mode=t})(t=e.QrSegment||(e.QrSegment={}))})(n||(n={}));var h=n,f={L:h.QrCode.Ecc.LOW,M:h.QrCode.Ecc.MEDIUM,Q:h.QrCode.Ecc.QUARTILE,H:h.QrCode.Ecc.HIGH},p=128,g="L",m="#FFFFFF",v="#000000",y=!1,w=1,E=4,b=0,R=.1;
|
|
3
|
+
function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}r.d(t,{A:()=>o});var o=function e(t,r){function o(e,o,i){if("undefined"!=typeof document){"number"==typeof(i=n({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+s}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var i=r[o].split("="),s=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(n[a]=t.read(s,a),e===a)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){o(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})},36459:(e,t,r)=>{"use strict";r.d(t,{h:()=>M});var n,o=r(4883),i=Object.defineProperty,s=Object.getOwnPropertySymbols,a=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,l=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))a.call(t,r)&&l(e,r,t[r]);if(s)for(var r of s(t))c.call(t,r)&&l(e,r,t[r]);return e},d=(e,t)=>{var r={};for(var n in e)a.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&s)for(var n of s(e))t.indexOf(n)<0&&c.call(e,n)&&(r[n]=e[n]);return r};(e=>{const t=class t{constructor(e,r,n,i){if(this.version=e,this.errorCorrectionLevel=r,this.modules=[],this.isFunction=[],e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version value out of range");if(i<-1||i>7)throw new RangeError("Mask value out of range");this.size=4*e+17;let s=[];for(let e=0;e<this.size;e++)s.push(!1);for(let e=0;e<this.size;e++)this.modules.push(s.slice()),this.isFunction.push(s.slice());this.drawFunctionPatterns();const a=this.addEccAndInterleave(n);if(this.drawCodewords(a),-1==i){let e=1e9;for(let t=0;t<8;t++){this.applyMask(t),this.drawFormatBits(t);const r=this.getPenaltyScore();r<e&&(i=t,e=r),this.applyMask(t)}}o(0<=i&&i<=7),this.mask=i,this.applyMask(i),this.drawFormatBits(i),this.isFunction=[]}static encodeText(r,n){const o=e.QrSegment.makeSegments(r);return t.encodeSegments(o,n)}static encodeBinary(r,n){const o=e.QrSegment.makeBytes(r);return t.encodeSegments([o],n)}static encodeSegments(e,n,i=1,a=40,c=-1,l=!0){if(!(t.MIN_VERSION<=i&&i<=a&&a<=t.MAX_VERSION)||c<-1||c>7)throw new RangeError("Invalid value");let u,d;for(u=i;;u++){const r=8*t.getNumDataCodewords(u,n),o=s.getTotalBits(e,u);if(o<=r){d=o;break}if(u>=a)throw new RangeError("Data too long")}for(const e of[t.Ecc.MEDIUM,t.Ecc.QUARTILE,t.Ecc.HIGH])l&&d<=8*t.getNumDataCodewords(u,e)&&(n=e);let h=[];for(const t of e){r(t.mode.modeBits,4,h),r(t.numChars,t.mode.numCharCountBits(u),h);for(const e of t.getData())h.push(e)}o(h.length==d);const p=8*t.getNumDataCodewords(u,n);o(h.length<=p),r(0,Math.min(4,p-h.length),h),r(0,(8-h.length%8)%8,h),o(h.length%8==0);for(let e=236;h.length<p;e^=253)r(e,8,h);let f=[];for(;8*f.length<h.length;)f.push(0);return h.forEach(((e,t)=>f[t>>>3]|=e<<7-(7&t))),new t(u,n,f,c)}getModule(e,t){return 0<=e&&e<this.size&&0<=t&&t<this.size&&this.modules[t][e]}getModules(){return this.modules}drawFunctionPatterns(){for(let e=0;e<this.size;e++)this.setFunctionModule(6,e,e%2==0),this.setFunctionModule(e,6,e%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const e=this.getAlignmentPatternPositions(),t=e.length;for(let r=0;r<t;r++)for(let n=0;n<t;n++)0==r&&0==n||0==r&&n==t-1||r==t-1&&0==n||this.drawAlignmentPattern(e[r],e[n]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(e){const t=this.errorCorrectionLevel.formatBits<<3|e;let r=t;for(let e=0;e<10;e++)r=r<<1^1335*(r>>>9);const i=21522^(t<<10|r);o(i>>>15==0);for(let e=0;e<=5;e++)this.setFunctionModule(8,e,n(i,e));this.setFunctionModule(8,7,n(i,6)),this.setFunctionModule(8,8,n(i,7)),this.setFunctionModule(7,8,n(i,8));for(let e=9;e<15;e++)this.setFunctionModule(14-e,8,n(i,e));for(let e=0;e<8;e++)this.setFunctionModule(this.size-1-e,8,n(i,e));for(let e=8;e<15;e++)this.setFunctionModule(8,this.size-15+e,n(i,e));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let e=this.version;for(let t=0;t<12;t++)e=e<<1^7973*(e>>>11);const t=this.version<<12|e;o(t>>>18==0);for(let e=0;e<18;e++){const r=n(t,e),o=this.size-11+e%3,i=Math.floor(e/3);this.setFunctionModule(o,i,r),this.setFunctionModule(i,o,r)}}drawFinderPattern(e,t){for(let r=-4;r<=4;r++)for(let n=-4;n<=4;n++){const o=Math.max(Math.abs(n),Math.abs(r)),i=e+n,s=t+r;0<=i&&i<this.size&&0<=s&&s<this.size&&this.setFunctionModule(i,s,2!=o&&4!=o)}}drawAlignmentPattern(e,t){for(let r=-2;r<=2;r++)for(let n=-2;n<=2;n++)this.setFunctionModule(e+n,t+r,1!=Math.max(Math.abs(n),Math.abs(r)))}setFunctionModule(e,t,r){this.modules[t][e]=r,this.isFunction[t][e]=!0}addEccAndInterleave(e){const r=this.version,n=this.errorCorrectionLevel;if(e.length!=t.getNumDataCodewords(r,n))throw new RangeError("Invalid argument");const i=t.NUM_ERROR_CORRECTION_BLOCKS[n.ordinal][r],s=t.ECC_CODEWORDS_PER_BLOCK[n.ordinal][r],a=Math.floor(t.getNumRawDataModules(r)/8),c=i-a%i,l=Math.floor(a/i);let u=[];const d=t.reedSolomonComputeDivisor(s);for(let r=0,n=0;r<i;r++){let o=e.slice(n,n+l-s+(r<c?0:1));n+=o.length;const i=t.reedSolomonComputeRemainder(o,d);r<c&&o.push(0),u.push(o.concat(i))}let h=[];for(let e=0;e<u[0].length;e++)u.forEach(((t,r)=>{(e!=l-s||r>=c)&&h.push(t[e])}));return o(h.length==a),h}drawCodewords(e){if(e.length!=Math.floor(t.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let r=0;for(let t=this.size-1;t>=1;t-=2){6==t&&(t=5);for(let o=0;o<this.size;o++)for(let i=0;i<2;i++){const s=t-i,a=0==(t+1&2)?this.size-1-o:o;!this.isFunction[a][s]&&r<8*e.length&&(this.modules[a][s]=n(e[r>>>3],7-(7&r)),r++)}}o(r==8*e.length)}applyMask(e){if(e<0||e>7)throw new RangeError("Mask value out of range");for(let t=0;t<this.size;t++)for(let r=0;r<this.size;r++){let n;switch(e){case 0:n=(r+t)%2==0;break;case 1:n=t%2==0;break;case 2:n=r%3==0;break;case 3:n=(r+t)%3==0;break;case 4:n=(Math.floor(r/3)+Math.floor(t/2))%2==0;break;case 5:n=r*t%2+r*t%3==0;break;case 6:n=(r*t%2+r*t%3)%2==0;break;case 7:n=((r+t)%2+r*t%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[t][r]&&n&&(this.modules[t][r]=!this.modules[t][r])}}getPenaltyScore(){let e=0;for(let r=0;r<this.size;r++){let n=!1,o=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[r][s]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[r][s],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,i)*t.PENALTY_N3}for(let r=0;r<this.size;r++){let n=!1,o=0,i=[0,0,0,0,0,0,0];for(let s=0;s<this.size;s++)this.modules[s][r]==n?(o++,5==o?e+=t.PENALTY_N1:o>5&&e++):(this.finderPenaltyAddHistory(o,i),n||(e+=this.finderPenaltyCountPatterns(i)*t.PENALTY_N3),n=this.modules[s][r],o=1);e+=this.finderPenaltyTerminateAndCount(n,o,i)*t.PENALTY_N3}for(let r=0;r<this.size-1;r++)for(let n=0;n<this.size-1;n++){const o=this.modules[r][n];o==this.modules[r][n+1]&&o==this.modules[r+1][n]&&o==this.modules[r+1][n+1]&&(e+=t.PENALTY_N2)}let r=0;for(const e of this.modules)r=e.reduce(((e,t)=>e+(t?1:0)),r);const n=this.size*this.size,i=Math.ceil(Math.abs(20*r-10*n)/n)-1;return o(0<=i&&i<=9),e+=i*t.PENALTY_N4,o(0<=e&&e<=2568888),e}getAlignmentPatternPositions(){if(1==this.version)return[];{const e=Math.floor(this.version/7)+2,t=32==this.version?26:2*Math.ceil((4*this.version+4)/(2*e-2));let r=[6];for(let n=this.size-7;r.length<e;n-=t)r.splice(1,0,n);return r}}static getNumRawDataModules(e){if(e<t.MIN_VERSION||e>t.MAX_VERSION)throw new RangeError("Version number out of range");let r=(16*e+128)*e+64;if(e>=2){const t=Math.floor(e/7)+2;r-=(25*t-10)*t-55,e>=7&&(r-=36)}return o(208<=r&&r<=29648),r}static getNumDataCodewords(e,r){return Math.floor(t.getNumRawDataModules(e)/8)-t.ECC_CODEWORDS_PER_BLOCK[r.ordinal][e]*t.NUM_ERROR_CORRECTION_BLOCKS[r.ordinal][e]}static reedSolomonComputeDivisor(e){if(e<1||e>255)throw new RangeError("Degree out of range");let r=[];for(let t=0;t<e-1;t++)r.push(0);r.push(1);let n=1;for(let o=0;o<e;o++){for(let e=0;e<r.length;e++)r[e]=t.reedSolomonMultiply(r[e],n),e+1<r.length&&(r[e]^=r[e+1]);n=t.reedSolomonMultiply(n,2)}return r}static reedSolomonComputeRemainder(e,r){let n=r.map((e=>0));for(const o of e){const e=o^n.shift();n.push(0),r.forEach(((r,o)=>n[o]^=t.reedSolomonMultiply(r,e)))}return n}static reedSolomonMultiply(e,t){if(e>>>8!=0||t>>>8!=0)throw new RangeError("Byte out of range");let r=0;for(let n=7;n>=0;n--)r=r<<1^285*(r>>>7),r^=(t>>>n&1)*e;return o(r>>>8==0),r}finderPenaltyCountPatterns(e){const t=e[1];o(t<=3*this.size);const r=t>0&&e[2]==t&&e[3]==3*t&&e[4]==t&&e[5]==t;return(r&&e[0]>=4*t&&e[6]>=t?1:0)+(r&&e[6]>=4*t&&e[0]>=t?1:0)}finderPenaltyTerminateAndCount(e,t,r){return e&&(this.finderPenaltyAddHistory(t,r),t=0),t+=this.size,this.finderPenaltyAddHistory(t,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(e,t){0==t[0]&&(e+=this.size),t.pop(),t.unshift(e)}};t.MIN_VERSION=1,t.MAX_VERSION=40,t.PENALTY_N1=3,t.PENALTY_N2=3,t.PENALTY_N3=40,t.PENALTY_N4=10,t.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],t.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];function r(e,t,r){if(t<0||t>31||e>>>t!=0)throw new RangeError("Value out of range");for(let n=t-1;n>=0;n--)r.push(e>>>n&1)}function n(e,t){return 0!=(e>>>t&1)}function o(e){if(!e)throw new Error("Assertion error")}e.QrCode=t;const i=class e{constructor(e,t,r){if(this.mode=e,this.numChars=t,this.bitData=r,t<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}static makeBytes(t){let n=[];for(const e of t)r(e,8,n);return new e(e.Mode.BYTE,t.length,n)}static makeNumeric(t){if(!e.isNumeric(t))throw new RangeError("String contains non-numeric characters");let n=[];for(let e=0;e<t.length;){const o=Math.min(t.length-e,3);r(parseInt(t.substring(e,e+o),10),3*o+1,n),e+=o}return new e(e.Mode.NUMERIC,t.length,n)}static makeAlphanumeric(t){if(!e.isAlphanumeric(t))throw new RangeError("String contains unencodable characters in alphanumeric mode");let n,o=[];for(n=0;n+2<=t.length;n+=2){let i=45*e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n));i+=e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n+1)),r(i,11,o)}return n<t.length&&r(e.ALPHANUMERIC_CHARSET.indexOf(t.charAt(n)),6,o),new e(e.Mode.ALPHANUMERIC,t.length,o)}static makeSegments(t){return""==t?[]:e.isNumeric(t)?[e.makeNumeric(t)]:e.isAlphanumeric(t)?[e.makeAlphanumeric(t)]:[e.makeBytes(e.toUtf8ByteArray(t))]}static makeEci(t){let n=[];if(t<0)throw new RangeError("ECI assignment value out of range");if(t<128)r(t,8,n);else if(t<16384)r(2,2,n),r(t,14,n);else{if(!(t<1e6))throw new RangeError("ECI assignment value out of range");r(6,3,n),r(t,21,n)}return new e(e.Mode.ECI,0,n)}static isNumeric(t){return e.NUMERIC_REGEX.test(t)}static isAlphanumeric(t){return e.ALPHANUMERIC_REGEX.test(t)}getData(){return this.bitData.slice()}static getTotalBits(e,t){let r=0;for(const n of e){const e=n.mode.numCharCountBits(t);if(n.numChars>=1<<e)return 1/0;r+=4+e+n.bitData.length}return r}static toUtf8ByteArray(e){e=encodeURI(e);let t=[];for(let r=0;r<e.length;r++)"%"!=e.charAt(r)?t.push(e.charCodeAt(r)):(t.push(parseInt(e.substring(r+1,r+3),16)),r+=2);return t}};i.NUMERIC_REGEX=/^[0-9]*$/,i.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,i.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let s=i;e.QrSegment=i})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.ordinal=e,this.formatBits=t}};t.LOW=new t(0,1),t.MEDIUM=new t(1,0),t.QUARTILE=new t(2,3),t.HIGH=new t(3,2);e.Ecc=t})(t=e.QrCode||(e.QrCode={}))})(n||(n={})),(e=>{let t;(e=>{const t=class{constructor(e,t){this.modeBits=e,this.numBitsCharCount=t}numCharCountBits(e){return this.numBitsCharCount[Math.floor((e+7)/17)]}};t.NUMERIC=new t(1,[10,12,14]),t.ALPHANUMERIC=new t(2,[9,11,13]),t.BYTE=new t(4,[8,16,16]),t.KANJI=new t(8,[8,10,12]),t.ECI=new t(7,[0,0,0]);e.Mode=t})(t=e.QrSegment||(e.QrSegment={}))})(n||(n={}));var h=n,p={L:h.QrCode.Ecc.LOW,M:h.QrCode.Ecc.MEDIUM,Q:h.QrCode.Ecc.QUARTILE,H:h.QrCode.Ecc.HIGH},f=128,g="L",m="#FFFFFF",y="#000000",v=!1,E=1,b=4,w=0,C=.1;
|
|
14
4
|
/**
|
|
15
5
|
* @license qrcode.react
|
|
16
6
|
* Copyright (c) Paul O'Shannessy
|
|
17
7
|
* SPDX-License-Identifier: ISC
|
|
18
|
-
*/function
|
|
8
|
+
*/function R(e,t=0){const r=[];return e.forEach((function(e,n){let o=null;e.forEach((function(i,s){if(!i&&null!==o)return r.push(`M${o+t} ${n+t}h${s-o}v1H${o+t}z`),void(o=null);if(s!==e.length-1)i&&null===o&&(o=s);else{if(!i)return;null===o?r.push(`M${s+t},${n+t} h1v1H${s+t}z`):r.push(`M${o+t},${n+t} h${s+1-o}v1H${o+t}z`)}}))})),r.join("")}function O(e,t){return e.slice().map(((e,r)=>r<t.y||r>=t.y+t.h?e:e.map(((e,r)=>(r<t.x||r>=t.x+t.w)&&e))))}function x({value:e,level:t,minVersion:r,includeMargin:n,marginSize:i,imageSettings:s,size:a,boostLevel:c}){let l=o.useMemo((()=>{const n=(Array.isArray(e)?e:[e]).reduce(((e,t)=>(e.push(...h.QrSegment.makeSegments(t)),e)),[]);return h.QrCode.encodeSegments(n,p[t],r,void 0,void 0,c)}),[e,t,r,c]);const{cells:u,margin:d,numCells:f,calculatedImageSettings:g}=o.useMemo((()=>{let e=l.getModules();const t=function(e,t){return null!=t?Math.max(Math.floor(t),0):e?b:w}(n,i),r=e.length+2*t,o=function(e,t,r,n){if(null==n)return null;const o=e.length+2*r,i=Math.floor(t*C),s=o/t,a=(n.width||i)*s,c=(n.height||i)*s,l=null==n.x?e.length/2-a/2:n.x*s,u=null==n.y?e.length/2-c/2:n.y*s,d=null==n.opacity?1:n.opacity;let h=null;if(n.excavate){let e=Math.floor(l),t=Math.floor(u);h={x:e,y:t,w:Math.ceil(a+l-e),h:Math.ceil(c+u-t)}}return{x:l,y:u,h:c,w:a,excavation:h,opacity:d,crossOrigin:n.crossOrigin}}(e,a,t,s);return{cells:e,margin:t,numCells:r,calculatedImageSettings:o}}),[l,a,s,n,i]);return{qrcode:l,margin:d,cells:u,numCells:f,calculatedImageSettings:g}}var S=function(){try{(new Path2D).addPath(new Path2D)}catch(e){return!1}return!0}();o.forwardRef((function(e,t){const r=e,{value:n,size:i=f,level:s=g,bgColor:a=m,fgColor:c=y,includeMargin:l=v,minVersion:h=E,boostLevel:p,marginSize:b,imageSettings:w}=r,C=d(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:M}=C,I=d(C,["style"]),A=null==w?void 0:w.src,_=o.useRef(null),N=o.useRef(null),k=o.useCallback((e=>{_.current=e,"function"==typeof t?t(e):t&&(t.current=e)}),[t]),[L,P]=o.useState(!1),{margin:F,cells:j,numCells:T,calculatedImageSettings:U}=x({value:n,level:s,minVersion:h,boostLevel:p,includeMargin:l,marginSize:b,imageSettings:w,size:i});o.useEffect((()=>{if(null!=_.current){const e=_.current,t=e.getContext("2d");if(!t)return;let r=j;const n=N.current,o=null!=U&&null!==n&&n.complete&&0!==n.naturalHeight&&0!==n.naturalWidth;o&&null!=U.excavation&&(r=O(j,U.excavation));const s=window.devicePixelRatio||1;e.height=e.width=i*s;const l=i/T*s;t.scale(l,l),t.fillStyle=a,t.fillRect(0,0,T,T),t.fillStyle=c,S?t.fill(new Path2D(R(r,F))):j.forEach((function(e,r){e.forEach((function(e,n){e&&t.fillRect(n+F,r+F,1,1)}))})),U&&(t.globalAlpha=U.opacity),o&&t.drawImage(n,U.x+F,U.y+F,U.w,U.h)}})),o.useEffect((()=>{P(!1)}),[A]);const z=u({height:i,width:i},M);let D=null;return null!=A&&(D=o.createElement("img",{src:A,key:A,style:{display:"none"},onLoad:()=>{P(!0)},ref:N,crossOrigin:null==U?void 0:U.crossOrigin})),o.createElement(o.Fragment,null,o.createElement("canvas",u({style:z,height:i,width:i,ref:k,role:"img"},I)),D)})).displayName="QRCodeCanvas";var M=o.forwardRef((function(e,t){const r=e,{value:n,size:i=f,level:s=g,bgColor:a=m,fgColor:c=y,includeMargin:l=v,minVersion:h=E,boostLevel:p,title:b,marginSize:w,imageSettings:C}=r,S=d(r,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:M,cells:I,numCells:A,calculatedImageSettings:_}=x({value:n,level:s,minVersion:h,boostLevel:p,includeMargin:l,marginSize:w,imageSettings:C,size:i});let N=I,k=null;null!=C&&null!=_&&(null!=_.excavation&&(N=O(I,_.excavation)),k=o.createElement("image",{href:C.src,height:_.h,width:_.w,x:_.x+M,y:_.y+M,preserveAspectRatio:"none",opacity:_.opacity,crossOrigin:_.crossOrigin}));const L=R(N,M);return o.createElement("svg",u({height:i,width:i,viewBox:`0 0 ${A} ${A}`,ref:t,role:"img"},S),!!b&&o.createElement("title",null,b),o.createElement("path",{fill:a,d:`M0,0 h${A}v${A}H0z`,shapeRendering:"crispEdges"}),o.createElement("path",{fill:c,d:L,shapeRendering:"crispEdges"}),k)}));M.displayName="QRCodeSVG"}}]);
|