1"use strict";(self.webpackChunkshell=self.webpackChunkshell||[]).push([["9889"],{97325(e,t,r){r.r(t),r.d(t,{CognitoAuthProvider:()=>m,useCognitoAuthContext:()=>p,CognitoAuthContext:()=>f});var n,o,i=r(31085),c=r(67464),u=r.n(c),a={isTCAccepted:!1,isAuthenticated:!1,initialized:!1,isLoading:!0},l=function(){throw Error("You forgot to wrap your component in <AuthContextProvider>.")},s=(n=function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},a),o=o={cognitoSignin:l,logout:l,login:l},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n),f=(0,c.createContext)(s),p=function(){return u().useContext(f)},y=r(37087);function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function O(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e}var g=function(e,t){switch(t.type){case"LOGIN_STARTED":return O(b({},e),{isLoading:!0});case"INITIALISED":return O(b({},e),{initialized:!0,isAuthenticated:!!t.user,user:t.user,isLoading:!1,error:void 0});case"LOGOUT":return O(b({},e),{isAuthenticated:!1,user:void 0});case"ERROR":return O(b({},e),{isLoading:!1,error:t.error});case"UPDATE":if(JSON.stringify(e.user)===JSON.stringify(t.user)&&e.isLoading===t.isLoading&&e.error===t.error&&e.isAuthenticated===t.isAuthenticated&&e.isTCAccepted===t.isTCAccepted&&e.initialized===t.initialized)return e;return b({},e,(0,y.omit)(t,["type"]));default:return e}};function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function d(e,t,r,n,o,i,c){try{var u=e[i](c),a=u.value}catch(e){r(e);return}u.done?t(a):Promise.resolve(a).then(n,o)}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),n.forEach(function(t){var n;n=r[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function j(e){return function(e){if(Array.isArray(e))return h(e)}(e)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||w(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h(e,t)}}var m=function(e){var t,r=e.authState$,n=e.getAuthenticatedUser,o=e.getInitialState,l=e.login,s=e.logout,p=e.cognitoSignin,y=e.children,b=function(e){if(Array.isArray(e))return e}(t=(0,c.useReducer)(g,o()||a))||function(e){var t,r,n=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o=[],i=!0,c=!1;try{for(n=n.call(e);!(i=(t=n.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){c=!0,r=e}finally{try{i||null==n.return||n.return()}finally{if(c)throw r}}return o}}
1(t)||w(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),O=b[0],h=b[1];u().useEffect(function(){var e=r.subscribe(function(e){h(v({type:"UPDATE"},e))});return function(){return e.unsubscribe()}},[]),(0,c.useEffect)(function(){var e;(e=function(){return function(e,t){var r,n,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},c=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(c,"next",{value:a(0)}),u(c,"throw",{value:a(1)}),u(c,"return",{value:a(2)}),"function"==typeof Symbol&&u(c,Symbol.iterator,{value:function(){return this}}),c;function a(u){return function(a){var l=[u,a];if(r)throw TypeError("Generator is already executing.");for(;c&&(c=0,l[0]&&(i=0)),i;)try{if(r=1,n&&(o=2&l[0]?n.return:l[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,l[1])).done)return o;switch(n=0,o&&(l=[2&l[0],o.value]),l[0]){case 0:case 1:o=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,n=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===l[0]||2===l[0])){i=0;continue}if(3===l[0]&&(!o||l[1]>o[0]&&l[1]<o[3])){i.label=l[1];break}if(6===l[0]&&i.label<o[1]){i.label=o[1],o=l;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(l);break}o[2]&&i.ops.pop(),i.trys.pop();continue}l=t.call(e,i)}catch(e){l=[6,e],n=0}finally{r=o=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}}(this,function(e){try{if(n)n().then(function(e){return h({type:"INITIALISED",user:e})});else throw Error("Application bootstrapped without authentication functions")}catch(e){h({type:"ERROR",error:e})}return[2]})},function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function c(e){d(i,n,o,c,u,"next",e)}function u(e){d(i,n,o,c,u,"throw",e)}c(void 0)})})()},[n]);var m=(0,c.useCallback)(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];h({type:"LOGOUT"}),s.apply(void 0,j(t))},[s]),P=(0,c.useCallback)(function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return h({type:"LOGIN_STARTED"}),l.apply(void 0,j(t))},[l]),S=(0,c.useMemo)(function(){var e,t;return e=v({},O),t=t={cognitoSignin:p,login:P,logout:m},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t.push.apply(t,r)}return t})(Object(t)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}),e},[O,p,P,m]);return!O.initialized||O.isLoading?null:(0,i.jsx)(f.Provider,{value:S,children:y})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.