@forgerock/login-widget 1.0.0-beta.9 → 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/index.js CHANGED
@@ -702,6 +702,10 @@ function closeComponent(args, shouldCloseDialog) {
702
702
  };
703
703
  });
704
704
  }
705
+ /**
706
+ * @function componentApi - this is a widget external API
707
+ * @returns {object} - the public component API
708
+ */
705
709
  const componentApi = () => {
706
710
  const { update } = componentStore;
707
711
  // Create derived store to minimize what's exposed to the dev
@@ -715,9 +719,19 @@ const componentApi = () => {
715
719
  });
716
720
  });
717
721
  return {
722
+ /**
723
+ * Close a modal
724
+ * @param {object} args - object containing the reason for closing component
725
+ * @returns {void}
726
+ */
718
727
  close: (args) => {
719
728
  closeComponent(args, true);
720
729
  },
730
+ /**
731
+ * Open a modal
732
+ * @param: void
733
+ * @returns: void
734
+ */
721
735
  open: () => {
722
736
  update((state) => {
723
737
  if (state.type === 'inline') {
@@ -739,6 +753,10 @@ const componentApi = () => {
739
753
  };
740
754
  });
741
755
  },
756
+ /**
757
+ * Subscribe to modal events
758
+ * returns the latest value from the event
759
+ */
742
760
  subscribe,
743
761
  };
744
762
  };
@@ -10873,6 +10891,11 @@ var HttpClient = /** @class */ (function (_super) {
10873
10891
  }(event_1.default));
10874
10892
  var _default$2 = httpClient.default = HttpClient;
10875
10893
 
10894
+ /**
10895
+ * @function logErrorAndThrow - Logs an error message and throws an error.
10896
+ * @param {string} type - The type of error. This will be used to determine what error message to log.
10897
+ * @throws {Error} - An error with a message that depends on the value of `type`.
10898
+ */
10876
10899
  function logErrorAndThrow(type) {
10877
10900
  if (type === 'missingStores') {
10878
10901
  const errorMessage = 'Error: missing configuration.';
@@ -14921,6 +14944,11 @@ const configSchema = z
14921
14944
  })
14922
14945
  .strict();
14923
14946
  configSchema.partial();
14947
+ /**
14948
+ * @function - Sets the configuration for the SDK
14949
+ * @param {object} config - The configuration object
14950
+ * @returns {void}
14951
+ */
14924
14952
  function configure (config) {
14925
14953
  configSchema.parse(config);
14926
14954
  Config.set(config);
@@ -14968,6 +14996,12 @@ const fallbackJourneyConfig = Object.keys(defaultJourneys).map((key) => ({
14968
14996
  key,
14969
14997
  }));
14970
14998
  const configuredJourneysStore = writable(fallbackJourneyConfig);
14999
+ /**
15000
+ * @function initialize - Initialize the configured journeys store
15001
+ * @param {object} customJourneys - An object of custom journeys to merge with the default
15002
+ * @returns {object} - The configured journeys store
15003
+ * @example initialize({ login: { journey: 'Login', match: ['?journey=Login'] } })
15004
+ */
14971
15005
  function initialize$6(customJourneys) {
14972
15006
  if (customJourneys) {
14973
15007
  // Provide developer feedback if customized
@@ -16726,6 +16760,8 @@ var backToDefault = "Back to Sign In";
16726
16760
  var backToLogin = "Back to Sign In";
16727
16761
  var dontHaveAnAccount = "No account? <a href='?journey=Registration'>Register here!</a>";
16728
16762
  var closeModal = "Close";
16763
+ var charactersCannotRepeatMoreThan = "Character cannot repeat more than {max} times";
16764
+ var charactersCannotRepeatMoreThanCaseInsensitive = "Character cannot repeat more than {max} times (case insensitive)";
16729
16765
  var chooseDifferentUsername = "Please choose a different username.";
16730
16766
  var confirmPassword = "Confirm password";
16731
16767
  var constraintViolationForPassword = "Password does not meet the requirements.";
@@ -16758,6 +16794,9 @@ var nextButton = "Next";
16758
16794
  var notToExceedMaximumCharacterLength = "No more than {max} characters";
16759
16795
  var noLessThanMinimumCharacterLength = "At least {min} character(s)";
16760
16796
  var passwordCallback = "Password";
16797
+ var passwordCannotContainCommonPasswords = "Password cannot contain common passwords";
16798
+ var passwordCannotContainCommonPasswordsOrBeReversible = "Password cannot contain common passwords or reversible text";
16799
+ var passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan = "Password cannot contain common passwords or reversible text less than {min} characters";
16761
16800
  var passwordRequirements = "Password requirements:";
16762
16801
  var pleaseCheckValue = "Please check this value";
16763
16802
  var pleaseConfirm = "Please confirm";
@@ -16771,7 +16810,11 @@ var registerSuccess = "Registration successful!";
16771
16810
  var requiredField = "Value is required";
16772
16811
  var securityAnswer = "Security answer";
16773
16812
  var securityQuestions = "Security question(s)";
16774
- var securityQuestionsPrompt = "Provide custom security question(s) and answer(s):";
16813
+ var securityQuestionsPrompt = "Provide security question(s) and answer(s):";
16814
+ var shouldContainANumber = "Should contain a number";
16815
+ var shouldContainAnUppercase = "Should contain an uppercase letter";
16816
+ var shouldContainALowercase = "Should contain a lowercase letter";
16817
+ var shouldContainASymbol = "Should contain a symbol";
16775
16818
  var showPassword = "Show password";
16776
16819
  var sn = "Last name";
16777
16820
  var submitButton = "Submit";
@@ -16782,6 +16825,7 @@ var tryAgain = "Please try again";
16782
16825
  var twoFactorAuthentication = "Two factor authentication";
16783
16826
  var useValidEmail = "Please use a valid email address.";
16784
16827
  var unrecoverableError = "There was an error in the form submission.";
16828
+ var unknownLoginError = "Unknown login failure has occurred.";
16785
16829
  var unknownNetworkError = "Unknown network request failure has occurred.";
16786
16830
  var userName = "Username";
16787
16831
  var usernameRequirements = "Username requirements:";
@@ -16795,6 +16839,8 @@ var fallback = {
16795
16839
  backToLogin: backToLogin,
16796
16840
  dontHaveAnAccount: dontHaveAnAccount,
16797
16841
  closeModal: closeModal,
16842
+ charactersCannotRepeatMoreThan: charactersCannotRepeatMoreThan,
16843
+ charactersCannotRepeatMoreThanCaseInsensitive: charactersCannotRepeatMoreThanCaseInsensitive,
16798
16844
  chooseDifferentUsername: chooseDifferentUsername,
16799
16845
  confirmPassword: confirmPassword,
16800
16846
  constraintViolationForPassword: constraintViolationForPassword,
@@ -16827,6 +16873,9 @@ var fallback = {
16827
16873
  notToExceedMaximumCharacterLength: notToExceedMaximumCharacterLength,
16828
16874
  noLessThanMinimumCharacterLength: noLessThanMinimumCharacterLength,
16829
16875
  passwordCallback: passwordCallback,
16876
+ passwordCannotContainCommonPasswords: passwordCannotContainCommonPasswords,
16877
+ passwordCannotContainCommonPasswordsOrBeReversible: passwordCannotContainCommonPasswordsOrBeReversible,
16878
+ passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan: passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan,
16830
16879
  passwordRequirements: passwordRequirements,
16831
16880
  pleaseCheckValue: pleaseCheckValue,
16832
16881
  pleaseConfirm: pleaseConfirm,
@@ -16841,6 +16890,10 @@ var fallback = {
16841
16890
  securityAnswer: securityAnswer,
16842
16891
  securityQuestions: securityQuestions,
16843
16892
  securityQuestionsPrompt: securityQuestionsPrompt,
16893
+ shouldContainANumber: shouldContainANumber,
16894
+ shouldContainAnUppercase: shouldContainAnUppercase,
16895
+ shouldContainALowercase: shouldContainALowercase,
16896
+ shouldContainASymbol: shouldContainASymbol,
16844
16897
  showPassword: showPassword,
16845
16898
  sn: sn,
16846
16899
  submitButton: submitButton,
@@ -16851,6 +16904,7 @@ var fallback = {
16851
16904
  twoFactorAuthentication: twoFactorAuthentication,
16852
16905
  useValidEmail: useValidEmail,
16853
16906
  unrecoverableError: unrecoverableError,
16907
+ unknownLoginError: unknownLoginError,
16854
16908
  unknownNetworkError: unknownNetworkError,
16855
16909
  userName: userName,
16856
16910
  usernameRequirements: usernameRequirements,
@@ -16867,6 +16921,8 @@ const stringsSchema = z
16867
16921
  backToLogin: z.string(),
16868
16922
  dontHaveAnAccount: z.string(),
16869
16923
  closeModal: z.string(),
16924
+ charactersCannotRepeatMoreThan: z.string(),
16925
+ charactersCannotRepeatMoreThanCaseInsensitive: z.string(),
16870
16926
  chooseDifferentUsername: z.string(),
16871
16927
  confirmPassword: z.string(),
16872
16928
  constraintViolationForPassword: z.string(),
@@ -16899,6 +16955,9 @@ const stringsSchema = z
16899
16955
  notToExceedMaximumCharacterLength: z.string(),
16900
16956
  noLessThanMinimumCharacterLength: z.string(),
16901
16957
  passwordCallback: z.string(),
16958
+ passwordCannotContainCommonPasswords: z.string(),
16959
+ passwordCannotContainCommonPasswordsOrBeReversible: z.string(),
16960
+ passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan: z.string(),
16902
16961
  passwordRequirements: z.string(),
16903
16962
  pleaseCheckValue: z.string(),
16904
16963
  pleaseConfirm: z.string(),
@@ -16913,6 +16972,10 @@ const stringsSchema = z
16913
16972
  securityAnswer: z.string(),
16914
16973
  securityQuestions: z.string(),
16915
16974
  securityQuestionsPrompt: z.string(),
16975
+ shouldContainANumber: z.string(),
16976
+ shouldContainAnUppercase: z.string(),
16977
+ shouldContainALowercase: z.string(),
16978
+ shouldContainASymbol: z.string(),
16916
16979
  showPassword: z.string(),
16917
16980
  sn: z.string(),
16918
16981
  submitButton: z.string(),
@@ -16923,6 +16986,7 @@ const stringsSchema = z
16923
16986
  twoFactorAuthentication: z.string(),
16924
16987
  useValidEmail: z.string(),
16925
16988
  unrecoverableError: z.string(),
16989
+ unknownLoginError: z.string(),
16926
16990
  unknownNetworkError: z.string(),
16927
16991
  userName: z.string(),
16928
16992
  usernameRequirements: z.string(),
@@ -16936,6 +17000,12 @@ stringsSchema.partial();
16936
17000
  // Ensure fallback follows schema
16937
17001
  stringsSchema.parse(fallback);
16938
17002
  const stringsStore = writable(null);
17003
+ /**
17004
+ * @function initialize - Initialize the locale store
17005
+ * @param {object} userLocale - An object of custom locale strings to merge with the default
17006
+ * @returns {object} - The locale store
17007
+ * @example initialize({ loginHeader: 'Welcome to the login page' });
17008
+ */
16939
17009
  function initialize$5(userLocale) {
16940
17010
  if (userLocale) {
16941
17011
  /**
@@ -16955,6 +17025,14 @@ function initialize$5(userLocale) {
16955
17025
  * Demo: https://regex101.com/r/Mw9vTB/1
16956
17026
  */
16957
17027
  const valueSchema = z.record(z.string().regex(/^[^<>]*$/)).optional();
17028
+ /**
17029
+ * @function interpolate - Get a translation string
17030
+ * Interpolate a string that contains variables
17031
+ *
17032
+ * @param {string} key - The key to lookup in the translation strings
17033
+ * @param {object} values - An object of values to interpolate into the string
17034
+ * @param {string} externalText - A string to use if no translation is found
17035
+ */
16958
17036
  function interpolate(key, values, externalText) {
16959
17037
  // Let's throw some errors if we're trying to use keys/locales that don't exist.
16960
17038
  // We could improve this by using Typescript and/or fallback values.
@@ -17026,6 +17104,31 @@ function interpolate(key, values, externalText) {
17026
17104
  });
17027
17105
  return messageClean;
17028
17106
  }
17107
+ /**
17108
+ * @function textToKey - Takes a human readable string and returns a key from it.
17109
+ * This key is used to look up the string in the translation files.
17110
+ *
17111
+ * If the item is a number, it will be converted to a string and then
17112
+ * processed as if it were a string.
17113
+ *
17114
+ * If the item is a string that contains word characters (`\w`) mixed with
17115
+ * non-word characters (`\W`), the non-word characters will be removed and
17116
+ * the resulting string will be converted to camelCase.
17117
+ *
17118
+ * @param {string} text - The text that will be converted to a key.
17119
+ * @returns {string} A key that is unique to the given text.
17120
+ *
17121
+ * Examples:
17122
+ * textToKey('hello world') => 'helloWorld'
17123
+ * textToKey('HELLO WORLD') => 'helloWorld'
17124
+ * textToKey('HELLO WORLD!!!') => 'helloWorld'
17125
+ * textToKey('HELLO WORLD!!!') => 'helloWorld'
17126
+ * textToKey('helloWorld') => 'helloWorld'
17127
+ * textToKey('helloWorld123') => 'helloWorld123'
17128
+ * textToKey('hello_world') => 'helloWorld'
17129
+ * textToKey('hello-world') => 'helloWorld'
17130
+ * textToKey('hello.world') => 'helloWorld'
17131
+ */
17029
17132
  function textToKey(text) {
17030
17133
  if (typeof text !== 'string' && typeof text !== 'number') {
17031
17134
  throw new Error('Parameter for textToKey function needs to be of type string or number');
@@ -17167,7 +17270,9 @@ const userInputCallbacks = [
17167
17270
  CallbackType$1.ValidatedCreatePasswordCallback,
17168
17271
  CallbackType$1.ValidatedCreateUsernameCallback,
17169
17272
  ];
17170
- // This eventually will be overridable by user of framework
17273
+ /**
17274
+ * @function forceUserInputOptionalityCallbacks - Determines if a callback should be forced to be optional
17275
+ */
17171
17276
  const forceUserInputOptionalityCallbacks = {
17172
17277
  SelectIdPCallback: (callback) => {
17173
17278
  const selectIdpCb = callback;
@@ -17176,6 +17281,11 @@ const forceUserInputOptionalityCallbacks = {
17176
17281
  .find((provider) => provider.provider === 'localAuthentication');
17177
17282
  },
17178
17283
  };
17284
+ /**
17285
+ * @function isCbReadyByDefault - Determines if a callback is ready to be submitted by default
17286
+ * @param {object} callback - Generic FRCallback from JavaScript SDK
17287
+ * @returns {boolean}
17288
+ */
17179
17289
  function isCbReadyByDefault(callback) {
17180
17290
  if (callback.getType() === CallbackType$1.ConfirmationCallback) {
17181
17291
  const cb = callback;
@@ -17185,6 +17295,11 @@ function isCbReadyByDefault(callback) {
17185
17295
  }
17186
17296
  return false;
17187
17297
  }
17298
+ /**
17299
+ * @function canForceUserInputOptionality
17300
+ * @param {object} callback - generic FRCallback from JavaScript SDK
17301
+ * @returns
17302
+ */
17188
17303
  function canForceUserInputOptionality(callback) {
17189
17304
  // See if a callback function exists within this collection
17190
17305
  const fn = forceUserInputOptionalityCallbacks[callback.getType()];
@@ -17212,9 +17327,9 @@ function isStepSelfSubmittable(callbacks, userInputOptional) {
17212
17327
  return !unsubmittableCallbacks.length;
17213
17328
  }
17214
17329
  /**
17215
- *
17330
+ * @function requiresUserInput - Determines if a callback requires user input
17216
17331
  * @param {object} callback - Generic callback provided by JavaScript SDK
17217
- * @returns
17332
+ * @returns {boolean}
17218
17333
  */
17219
17334
  function requiresUserInput(callback) {
17220
17335
  if (callback.getType() === CallbackType$1.SelectIdPCallback) {
@@ -17230,6 +17345,22 @@ function requiresUserInput(callback) {
17230
17345
  }
17231
17346
  // Notice this function can take a user provided argument function to
17232
17347
  // override behavior (this doesn't have to be well defined)
17348
+ /**
17349
+ * @function isUserInputOptional - Determines if user input is optional
17350
+ * Notice this function can take a user provided argument function to
17351
+ * override behavior (this doesn't have to be well defined)
17352
+ * @param {array} callbackMetadataArray - array of callback metadata
17353
+ * @param {number} numOfUserInputCbs - number of user input requiring callbacks
17354
+ * @param {function} fn - optional function to override default behavior
17355
+ * @returns {boolean} - true if user input is optional
17356
+ * @example isUserInputOptional(callbackMetadataArray, numOfUserInputCbs, (prev, curr) => {
17357
+ * if (curr.derived.canForceUserInputOptionality && numOfUserInputCbs > 0) {
17358
+ * prev = true;
17359
+ * }
17360
+ * return prev;
17361
+ * })
17362
+ * @example isUserInputOptional(callbackMetadataArray, numOfUserInputCbs);
17363
+ */
17233
17364
  function isUserInputOptional(callbackMetadataArray, numOfUserInputCbs, fn) {
17234
17365
  // default reducer function to check if both overriding callback exists
17235
17366
  // along with user input required callbacks
@@ -17246,7 +17377,7 @@ function isUserInputOptional(callbackMetadataArray, numOfUserInputCbs, fn) {
17246
17377
  /**
17247
17378
  * @function buildCallbackMetadata - Constructs an array of callback metadata that matches to original callback array
17248
17379
  * @param {object} step - The modified Widget step object
17249
- * @param checkValidation - function that checks if current callback is the first invalid callback
17380
+ * @param {function} checkValidation - function that checks if current callback is the first invalid callback
17250
17381
  * @returns {array}
17251
17382
  */
17252
17383
  function buildCallbackMetadata(step, checkValidation, stageJson) {
@@ -17325,6 +17456,11 @@ function buildStepMetadata(callbackMetadataArray, stageJson, stageName) {
17325
17456
  };
17326
17457
  }
17327
17458
 
17459
+ /**
17460
+ * @function initializeJourney - Initializes the journey stack for tracking journey switches
17461
+ * @param {object} initOptions - The initial options to set
17462
+ * @returns {object} - The journey stack store with stack methods
17463
+ */
17328
17464
  function initializeStack(initOptions) {
17329
17465
  const initialValue = initOptions ? [initOptions] : [];
17330
17466
  const { update, set, subscribe } = writable(initialValue);
@@ -17388,6 +17524,11 @@ const journeyStore = writable({
17388
17524
  successful: false,
17389
17525
  response: null,
17390
17526
  });
17527
+ /**
17528
+ * @function initialize - Initializes the journey store
17529
+ * @param {object} initOptions - The initial options to set
17530
+ * @returns {object} - The journey store
17531
+ */
17391
17532
  function initialize$4(initOptions) {
17392
17533
  const stack = initializeStack();
17393
17534
  let stepNumber = 0;
@@ -17507,7 +17648,7 @@ function initialize$4(initOptions) {
17507
17648
  *
17508
17649
  * Grab failure message, which may contain encoded HTML
17509
17650
  */
17510
- const failureMessageStr = htmlDecode(nextStep.payload.message || '');
17651
+ const failureMessageStr = htmlDecode(nextStep.payload.message || 'Unknown login error');
17511
17652
  let restartedStep = null;
17512
17653
  try {
17513
17654
  /**
@@ -17590,8 +17731,7 @@ function initialize$4(initOptions) {
17590
17731
  error: {
17591
17732
  code: nextStep.getCode(),
17592
17733
  message: failureMessageStr,
17593
- // TODO: Should we remove the callbacks for PII info?
17594
- step: prevStep?.payload,
17734
+ stage: prevStep?.payload?.stage,
17595
17735
  troubleshoot: null,
17596
17736
  },
17597
17737
  loading: false,
@@ -17621,8 +17761,7 @@ function initialize$4(initOptions) {
17621
17761
  error: {
17622
17762
  code: nextStep.getCode(),
17623
17763
  message: failureMessageStr,
17624
- // TODO: Should we remove the callbacks for PII info?
17625
- step: prevStep?.payload,
17764
+ stage: prevStep?.payload?.stage,
17626
17765
  troubleshoot: null,
17627
17766
  },
17628
17767
  loading: false,
@@ -17694,6 +17833,12 @@ const linksSchema = z
17694
17833
  .strict();
17695
17834
  linksSchema.partial();
17696
17835
  const linksStore = writable();
17836
+ /**
17837
+ * @function initialize - Initialize the links store
17838
+ * @param {object} customLinks - An object of custom links to merge with the default
17839
+ * @returns {object} - The links store
17840
+ * @example initialize({ termsAndConditions: 'https://example.com/terms' });
17841
+ */
17697
17842
  function initialize$3(customLinks) {
17698
17843
  // If customLinks is provided, provide feedback for object
17699
17844
  if (customLinks) {
@@ -17716,7 +17861,19 @@ const oauthStore = writable({
17716
17861
  successful: false,
17717
17862
  response: null,
17718
17863
  });
17864
+ /**
17865
+ * @function initialize - Initializes the OAuth store with a get function and a reset function
17866
+ * @param {object} initOptions - The options to pass to the TokenManager.getTokens function
17867
+ * @returns {object} - The OAuth store
17868
+ * @example initialize({ query: { prompt: 'none' } });
17869
+ */
17719
17870
  function initialize$2(initOptions) {
17871
+ /**
17872
+ * Get tokens from the server
17873
+ * new tokens are available in the subscribe method
17874
+ * @params: getOptions?: GetTokensOptions
17875
+ * @returns: Promise<void>
17876
+ */
17720
17877
  async function get(getOptions) {
17721
17878
  /**
17722
17879
  * Create an options object with getOptions overriding anything from initOptions
@@ -17784,7 +17941,18 @@ const userStore = writable({
17784
17941
  successful: false,
17785
17942
  response: null,
17786
17943
  });
17944
+ /**
17945
+ * @function initialize - Initializes the user store with a get function and a reset function
17946
+ * @param {object} initOptions - The options to pass to the UserManager.getCurrentUser function
17947
+ * @returns {object} - The user store
17948
+ */
17787
17949
  function initialize$1(initOptions) {
17950
+ /**
17951
+ * Get user info from the server
17952
+ * New state is returned in your `userEvents.subscribe` callback function
17953
+ * @params: getOptions?: ConfigOptions
17954
+ * @returns: Promise<void>
17955
+ */
17788
17956
  async function get(getOptions) {
17789
17957
  /**
17790
17958
  * Create an options object with getOptions overriding anything from initOptions
@@ -17871,11 +18039,17 @@ styleSchema.partial();
17871
18039
  const fallbackStyles = {
17872
18040
  checksAndRadios: 'animated',
17873
18041
  labels: 'floating',
17874
- logo: {},
17875
- sections: {},
17876
- stage: {},
18042
+ logo: undefined,
18043
+ sections: undefined,
18044
+ stage: undefined,
17877
18045
  };
17878
18046
  const styleStore = writable(fallbackStyles);
18047
+ /**
18048
+ * @function initialize - Initialize the style store
18049
+ * @param {object} customStyle - An object of custom styles to merge with the default
18050
+ * @returns {object} - The style store
18051
+ * @example initialize({ checksAndRadios: 'standard' });
18052
+ */
17879
18053
  function initialize(customStyle) {
17880
18054
  if (customStyle) {
17881
18055
  styleSchema.parse(customStyle);
@@ -17887,6 +18061,17 @@ function initialize(customStyle) {
17887
18061
  return styleStore;
17888
18062
  }
17889
18063
 
18064
+ /**
18065
+ * @function widgetApiFactory - Creates the widget API
18066
+ * @param {object} componentApi - The component API
18067
+ * @returns {object} - The widget API
18068
+ * @property {object} componentApi - The component API for either inline or modal
18069
+ * @property {object} configuration - Sets the configuration for the widget
18070
+ * @property {function} getStores - Returns the stores: journeyStore, oauthStore, userStore
18071
+ * @property {object} journey - the journey API
18072
+ * @property {function} request - The HttpClient.request function from the SDK
18073
+ * @property {object} user - the user API
18074
+ */
17890
18075
  function widgetApiFactory(componentApi) {
17891
18076
  let journeyStore;
17892
18077
  let oauthStore;
@@ -17935,6 +18120,10 @@ function widgetApiFactory(componentApi) {
17935
18120
  initialize$3(options?.links);
17936
18121
  initialize(options?.style);
17937
18122
  return {
18123
+ /** Set the Login Widget's Configuration
18124
+ * @param {WidgetConfigOptions} options - The configuration options for the Login Widget
18125
+ * @returns {void}
18126
+ **/
17938
18127
  set(setOptions) {
17939
18128
  if (setOptions?.forgerock) {
17940
18129
  configure({
@@ -18056,6 +18245,11 @@ function widgetApiFactory(componentApi) {
18056
18245
  return { change, start, subscribe };
18057
18246
  };
18058
18247
  const user = {
18248
+ /**
18249
+ * User Info
18250
+ * @param: void
18251
+ * @returns: UserStore
18252
+ */
18059
18253
  info() {
18060
18254
  if (!journeyStore || !oauthStore || !userStore) {
18061
18255
  logErrorAndThrow('missingStores');
@@ -18078,6 +18272,12 @@ function widgetApiFactory(componentApi) {
18078
18272
  }
18079
18273
  return { get: wrappedGet, subscribe };
18080
18274
  },
18275
+ /**
18276
+ * Logout a user from an AM Session
18277
+ * @async
18278
+ * @param: void
18279
+ * @returns: Promise<void>
18280
+ **/
18081
18281
  async logout() {
18082
18282
  if (!journeyStore || !oauthStore || !userStore) {
18083
18283
  logErrorAndThrow('missingStores');
@@ -18106,6 +18306,11 @@ function widgetApiFactory(componentApi) {
18106
18306
  // Return undefined as there's no response information to share
18107
18307
  return;
18108
18308
  },
18309
+ /**
18310
+ * Returns the widget's Tokens object
18311
+ * @param void;
18312
+ * @returns OAuthStore
18313
+ */
18109
18314
  tokens() {
18110
18315
  if (!journeyStore || !oauthStore || !userStore) {
18111
18316
  logErrorAndThrow('missingStores');
@@ -18134,7 +18339,7 @@ function widgetApiFactory(componentApi) {
18134
18339
  configuration,
18135
18340
  getStores,
18136
18341
  journey,
18137
- request: _default$2.request,
18342
+ request: _default$2.request.bind(_default$2),
18138
18343
  user,
18139
18344
  };
18140
18345
  }
@@ -18524,7 +18729,7 @@ function create_else_block$9(ctx) {
18524
18729
  attr(button, "aria-controls", /*dialogId*/ ctx[1]);
18525
18730
 
18526
18731
  attr(div, "class", div_class_value = `tw_pt-10 md:tw_pt-10 tw_text-right ${(/*$styleStore*/ ctx[5]?.logo)
18527
- ? 'tw_h-32 md:tw_h-36 tw_pb-6'
18732
+ ? 'tw_h-32 md:tw_h-36 tw_pb-6'
18528
18733
  : ''}`);
18529
18734
  },
18530
18735
  m(target, anchor) {
@@ -18567,7 +18772,7 @@ function create_else_block$9(ctx) {
18567
18772
  }
18568
18773
 
18569
18774
  if (!current || dirty & /*$styleStore*/ 32 && div_class_value !== (div_class_value = `tw_pt-10 md:tw_pt-10 tw_text-right ${(/*$styleStore*/ ctx[5]?.logo)
18570
- ? 'tw_h-32 md:tw_h-36 tw_pb-6'
18775
+ ? 'tw_h-32 md:tw_h-36 tw_pb-6'
18571
18776
  : ''}`)) {
18572
18777
  attr(div, "class", div_class_value);
18573
18778
  }
@@ -20588,6 +20793,11 @@ function matchJourneyAndDecideAction(href, journeys, stack) {
20588
20793
  /** *********************************************
20589
20794
  * NEW "NORMALIZED" METHODS
20590
20795
  */
20796
+ /**
20797
+ * @function getInputTypeFromPolicies - Determines the type of input to use based on the policies object
20798
+ * @param {object} policies - The policies object from the callback
20799
+ * @returns {string} - The type of input to use
20800
+ */
20591
20801
  function getInputTypeFromPolicies(policies) {
20592
20802
  const value = policies?.value;
20593
20803
  if (typeof value !== 'object') {
@@ -20605,13 +20815,47 @@ function getInputTypeFromPolicies(policies) {
20605
20815
  }
20606
20816
  return 'text';
20607
20817
  }
20818
+ /**
20819
+ * @function getValidationFailureParams - Gets the validation failure params from the failed policy object
20820
+ * @param {object} failedPolicy - The failed policy object from the callback
20821
+ * @returns {array} - An array of objects containing the length, message, and rule
20822
+ */
20608
20823
  function getValidationFailureParams(failedPolicy) {
20609
- if (failedPolicy?.policyRequirement === 'CHARACTER_SET') {
20610
- const params = failedPolicy?.params;
20824
+ if (failedPolicy?.policyRequirement === 'DICTIONARY') {
20825
+ const params = failedPolicy.params;
20826
+ const min = params?.['min-substring-length'] || 0;
20827
+ const arr = [];
20828
+ if (params?.['check-substrings'] && params?.['test-reversed-password']) {
20829
+ arr.push({
20830
+ length: min,
20831
+ message: interpolate('passwordCannotContainCommonPasswordsOrBeReversibleStringsLessThan', {
20832
+ min: String(min),
20833
+ }),
20834
+ rule: 'reversibleSubstrings',
20835
+ });
20836
+ }
20837
+ else if (params?.['test-reversed-password']) {
20838
+ arr.push({
20839
+ length: null,
20840
+ message: interpolate('passwordCannotContainCommonPasswordsOrBeReversible'),
20841
+ rule: 'reversibleSubstrings',
20842
+ });
20843
+ }
20844
+ else {
20845
+ arr.push({
20846
+ length: null,
20847
+ message: interpolate('passwordCannotContainCommonPasswords'),
20848
+ rule: 'reversibleSubstrings',
20849
+ });
20850
+ }
20851
+ return arr;
20852
+ }
20853
+ else if (failedPolicy?.policyRequirement === 'CHARACTER_SET') {
20854
+ const params = failedPolicy.params;
20611
20855
  return params?.['character-sets'].map(convertCharacterSetToRuleObj);
20612
20856
  }
20613
20857
  else if (failedPolicy?.policyRequirement === 'LENGTH_BASED') {
20614
- const params = failedPolicy?.params;
20858
+ const params = failedPolicy.params;
20615
20859
  const min = params?.['min-password-length'] || 0;
20616
20860
  const max = params?.['max-password-length'] || null;
20617
20861
  const arr = [];
@@ -20631,6 +20875,26 @@ function getValidationFailureParams(failedPolicy) {
20631
20875
  }
20632
20876
  return arr;
20633
20877
  }
20878
+ else if (failedPolicy?.policyRequirement === 'REPEATED_CHARACTERS') {
20879
+ const params = failedPolicy.params;
20880
+ const max = params['max-consecutive-length'] || 0;
20881
+ const arr = [];
20882
+ if (!params['case-sensitive-validation']) {
20883
+ arr.push({
20884
+ length: max,
20885
+ message: interpolate('charactersCannotRepeatMoreThanCaseInsensitive', { max: String(max) }),
20886
+ rule: 'repeatedCharactersCaseInsensitive',
20887
+ });
20888
+ }
20889
+ else {
20890
+ arr.push({
20891
+ length: max,
20892
+ message: interpolate('charactersCannotRepeatMoreThan', { max: String(max) }),
20893
+ rule: 'repeatedCharacters',
20894
+ });
20895
+ }
20896
+ return arr;
20897
+ }
20634
20898
  else if (failedPolicy?.policyRequirement === 'VALID_USERNAME') {
20635
20899
  return [
20636
20900
  {
@@ -20659,6 +20923,11 @@ function getValidationFailureParams(failedPolicy) {
20659
20923
  ];
20660
20924
  }
20661
20925
  }
20926
+ /**
20927
+ * @function getValidationMessageString - Gets the validation message string from the policy object
20928
+ * @param {object} policy - The policy object from the callback
20929
+ * @returns {string} - The validation message string
20930
+ */
20662
20931
  function getValidationMessageString(policy) {
20663
20932
  switch (policy?.policyId) {
20664
20933
  case 'at-least-X-capitals': {
@@ -20742,6 +21011,12 @@ function getValidationMessageString(policy) {
20742
21011
  return '';
20743
21012
  }
20744
21013
  }
21014
+ /**
21015
+ * @function getValidationFailures - Gets the validation failures from the callback object
21016
+ * @param {object} callback - The callback object from the server
21017
+ * @param {string} label - The label of the field
21018
+ * @returns {array} - An array of failed policies
21019
+ */
20745
21020
  function getValidationFailures(callback, label) {
20746
21021
  const failedPolicies = callback.getFailedPolicies && callback.getFailedPolicies();
20747
21022
  const parsedPolicies = parseFailedPolicies(failedPolicies, label);
@@ -20753,6 +21028,11 @@ function getValidationFailures(callback, label) {
20753
21028
  };
20754
21029
  });
20755
21030
  }
21031
+ /**
21032
+ * @function getValidationPolicies - Gets the validation policies from the callback object
21033
+ * @param {object} policies - The policies object from the callback
21034
+ * @returns {array} - An array of policies
21035
+ */
20756
21036
  function getValidationPolicies(policies) {
20757
21037
  if (typeof policies !== 'object' && !policies) {
20758
21038
  return [];
@@ -20771,6 +21051,11 @@ function getValidationPolicies(policies) {
20771
21051
  })
20772
21052
  .filter((policy) => !!policy.message);
20773
21053
  }
21054
+ /**
21055
+ * @function isInputRequired - Checks if the input is required
21056
+ * @param {object} callback - The callback object from the server
21057
+ * @returns {boolean} - Whether the input is required
21058
+ */
20774
21059
  function isInputRequired(callback) {
20775
21060
  const policies = callback.getPolicies && callback.getPolicies();
20776
21061
  let isRequired = false;
@@ -20782,46 +21067,93 @@ function isInputRequired(callback) {
20782
21067
  }
20783
21068
  return isRequired;
20784
21069
  }
21070
+ /**
21071
+ * @function convertCharacterSetToRuleObj - Converts a character set to a rule object
21072
+ * @param {string} set - The character set to convert
21073
+ * @returns {object} - The rule object
21074
+ */
20785
21075
  function convertCharacterSetToRuleObj(set) {
20786
21076
  const arr = set.split(':');
20787
21077
  const num = arr[0];
20788
21078
  const type = arr[1];
20789
21079
  if (type === '0123456789') {
20790
- return {
20791
- length: Number(num),
20792
- message: interpolate('minimumNumberOfNumbers', { num: String(num) }),
20793
- rule: 'numbers',
20794
- };
21080
+ if (num === '0') {
21081
+ return {
21082
+ length: null,
21083
+ message: interpolate('shouldContainANumber'),
21084
+ rule: 'numbers',
21085
+ };
21086
+ }
21087
+ else {
21088
+ return {
21089
+ length: Number(num),
21090
+ message: interpolate('minimumNumberOfNumbers', { num: String(num) }),
21091
+ rule: 'numbers',
21092
+ };
21093
+ }
20795
21094
  }
20796
21095
  else if (type === 'ABCDEFGHIJKLMNOPQRSTUVWXYZ') {
20797
- return {
20798
- length: Number(num),
20799
- message: interpolate('minimumNumberOfUppercase', { num: String(num) }),
20800
- rule: 'uppercase',
20801
- };
21096
+ if (num === '0') {
21097
+ return {
21098
+ length: null,
21099
+ message: interpolate('shouldContainAnUppercase'),
21100
+ rule: 'uppercase',
21101
+ };
21102
+ }
21103
+ else {
21104
+ return {
21105
+ length: Number(num),
21106
+ message: interpolate('minimumNumberOfUppercase', { num: String(num) }),
21107
+ rule: 'uppercase',
21108
+ };
21109
+ }
20802
21110
  }
20803
21111
  else if (type === 'abcdefghijklmnopqrstuvwxyz') {
20804
- return {
20805
- length: Number(num),
20806
- message: interpolate('minimumNumberOfLowercase', { num: String(num) }),
20807
- rule: 'lowercase',
20808
- };
21112
+ if (num === '0') {
21113
+ return {
21114
+ length: null,
21115
+ message: interpolate('shouldContainALowercase'),
21116
+ rule: 'lowercase',
21117
+ };
21118
+ }
21119
+ else {
21120
+ return {
21121
+ length: Number(num),
21122
+ message: interpolate('minimumNumberOfLowercase', { num: String(num) }),
21123
+ rule: 'lowercase',
21124
+ };
21125
+ }
20809
21126
  }
20810
21127
  else if (type.includes('@') || type.includes('!') || type.includes('*') || type.includes('#')) {
20811
- return {
20812
- length: Number(num),
20813
- message: interpolate('minimumNumberOfSymbols', { num: String(num) }),
20814
- rule: 'symbols',
20815
- };
21128
+ if (num === '0') {
21129
+ return {
21130
+ length: null,
21131
+ message: interpolate('shouldContainASymbol'),
21132
+ rule: 'symbols',
21133
+ };
21134
+ }
21135
+ else {
21136
+ return {
21137
+ length: Number(num),
21138
+ message: interpolate('minimumNumberOfSymbols', { num: String(num) }),
21139
+ rule: 'symbols',
21140
+ };
21141
+ }
20816
21142
  }
20817
21143
  else {
20818
21144
  return {
20819
- length: Number(num),
21145
+ length: null,
20820
21146
  message: interpolate('pleaseCheckValue'),
20821
21147
  rule: 'unknown',
20822
21148
  };
20823
21149
  }
20824
21150
  }
21151
+ /**
21152
+ * @function parseFailedPolicies - Parses the failed policies from the callback object
21153
+ * @param {array} policies - The policies array from the callback
21154
+ * @param {string} label - The label of the field
21155
+ * @returns {array} - An array of failed policies
21156
+ */
20825
21157
  function parseFailedPolicies(policies, label) {
20826
21158
  return policies.map((policy) => {
20827
21159
  if (typeof policy === 'string') {
@@ -20837,8 +21169,10 @@ function parseFailedPolicies(policies, label) {
20837
21169
  }
20838
21170
  });
20839
21171
  }
20840
- /** *********************************************
20841
- * OLD METHODS
21172
+ /**
21173
+ * @function getAttributeValidationFailureText - Gets the validation failure text from the callback object
21174
+ * @param {object} callback - The callback object from the server
21175
+ * @returns {string} - The validation failure text
20842
21176
  */
20843
21177
  function getAttributeValidationFailureText(callback) {
20844
21178
  // TODO: Mature this utility for better parsing and display
@@ -21837,13 +22171,6 @@ function instance$I($$self, $$props, $$invalidate) {
21837
22171
  let validationFailure;
21838
22172
 
21839
22173
  function setValue(event) {
21840
- /** ***********************************************************************
21841
- * SDK INTEGRATION POINT
21842
- * Summary: SDK callback methods for setting values
21843
- * ------------------------------------------------------------------------
21844
- * Details: Each callback is wrapped by the SDK to provide helper methods
21845
- * for writing values to the callbacks received from AM
21846
- *********************************************************************** */
21847
22174
  callback.setInputValue(event.target.checked);
21848
22175
  }
21849
22176
 
@@ -22783,7 +23110,7 @@ function get_each_context$7(ctx, list, i) {
22783
23110
  return child_ctx;
22784
23111
  }
22785
23112
 
22786
- // (40:0) {#if labelOrder === 'first'}
23113
+ // (39:0) {#if labelOrder === 'first'}
22787
23114
  function create_if_block_1$a(ctx) {
22788
23115
  let label_1;
22789
23116
  let current;
@@ -22831,7 +23158,7 @@ function create_if_block_1$a(ctx) {
22831
23158
  };
22832
23159
  }
22833
23160
 
22834
- // (41:2) <Label {key} classes={`${labelClasses}`}>
23161
+ // (40:2) <Label {key} classes={`${labelClasses}`}>
22835
23162
  function create_default_slot_1$b(ctx) {
22836
23163
  let t;
22837
23164
 
@@ -22851,7 +23178,7 @@ function create_default_slot_1$b(ctx) {
22851
23178
  };
22852
23179
  }
22853
23180
 
22854
- // (55:2) {#each options as option}
23181
+ // (54:2) {#each options as option}
22855
23182
  function create_each_block$7(ctx) {
22856
23183
  let option;
22857
23184
  let t0_value = /*option*/ ctx[15].text + "";
@@ -22892,7 +23219,7 @@ function create_each_block$7(ctx) {
22892
23219
  };
22893
23220
  }
22894
23221
 
22895
- // (62:0) {#if labelOrder === 'last'}
23222
+ // (61:0) {#if labelOrder === 'last'}
22896
23223
  function create_if_block$g(ctx) {
22897
23224
  let label_1;
22898
23225
  let current;
@@ -22945,7 +23272,7 @@ function create_if_block$g(ctx) {
22945
23272
  };
22946
23273
  }
22947
23274
 
22948
- // (63:2) <Label {key} classes={`${shouldDisplayOption ? labelClasses : 'tw_sr-only'}`}>
23275
+ // (62:2) <Label {key} classes={`${shouldDisplayOption ? labelClasses : 'tw_sr-only'}`}>
22949
23276
  function create_default_slot$i(ctx) {
22950
23277
  let t;
22951
23278
 
@@ -23184,8 +23511,6 @@ function instance$E($$self, $$props, $$invalidate) {
23184
23511
  // Check if text is same as label
23185
23512
  $$invalidate(10, shouldDisplayOption = !(label === selectedOption?.text));
23186
23513
 
23187
- console.log(shouldDisplayOption);
23188
-
23189
23514
  // Continue with calling onChange parameter
23190
23515
  onChange(event);
23191
23516
  }
@@ -23612,7 +23937,7 @@ function create_else_block$6(ctx) {
23612
23937
  };
23613
23938
  }
23614
23939
 
23615
- // (66:0) {#if callbackMetadata?.platform?.displayType === 'radio'}
23940
+ // (52:0) {#if callbackMetadata?.platform?.displayType === 'radio'}
23616
23941
  function create_if_block$f(ctx) {
23617
23942
  let radio;
23618
23943
  let current;
@@ -23767,13 +24092,6 @@ function instance$B($$self, $$props, $$invalidate) {
23767
24092
  * @param {Object} event
23768
24093
  */
23769
24094
  function setValue(event) {
23770
- /** ***********************************************************************
23771
- * SDK INTEGRATION POINT
23772
- * Summary: SDK callback methods for setting values
23773
- * ------------------------------------------------------------------------
23774
- * Details: Each callback is wrapped by the SDK to provide helper methods
23775
- * for writing values to the callbacks received from AM
23776
- *********************************************************************** */
23777
24095
  callback.setChoiceIndex(Number(event.target.value));
23778
24096
  }
23779
24097
 
@@ -23786,13 +24104,6 @@ function instance$B($$self, $$props, $$invalidate) {
23786
24104
  $$self.$$.update = () => {
23787
24105
  if ($$self.$$.dirty & /*callback, callbackMetadata, prompt*/ 2051) {
23788
24106
  {
23789
- /** *************************************************************************
23790
- * SDK INTEGRATION POINT
23791
- * Summary: SDK callback methods for getting values
23792
- * --------------------------------------------------------------------------
23793
- * Details: Each callback is wrapped by the SDK to provide helper methods
23794
- * for accessing values from the callbacks received from AM
23795
- ************************************************************************* */
23796
24107
  $$invalidate(2, choiceOptions = callback.getChoices()?.map((text, idx) => ({
23797
24108
  /**
23798
24109
  * Since locale content keys for the choice component are built off of the
@@ -23957,7 +24268,7 @@ function get_each_context$6(ctx, list, i) {
23957
24268
  return child_ctx;
23958
24269
  }
23959
24270
 
23960
- // (95:0) {#if stepMetadata?.platform?.stageName !== 'OneTimePassword'}
24271
+ // (81:0) {#if stepMetadata?.platform?.stageName !== 'OneTimePassword'}
23961
24272
  function create_if_block$e(ctx) {
23962
24273
  let current_block_type_index;
23963
24274
  let if_block;
@@ -24027,7 +24338,7 @@ function create_if_block$e(ctx) {
24027
24338
  };
24028
24339
  }
24029
24340
 
24030
- // (117:2) {:else}
24341
+ // (103:2) {:else}
24031
24342
  function create_else_block_1(ctx) {
24032
24343
  let grid;
24033
24344
  let current;
@@ -24073,7 +24384,7 @@ function create_else_block_1(ctx) {
24073
24384
  };
24074
24385
  }
24075
24386
 
24076
- // (96:2) {#if !stepMetadata?.derived.isStepSelfSubmittable}
24387
+ // (82:2) {#if !stepMetadata?.derived.isStepSelfSubmittable}
24077
24388
  function create_if_block_1$9(ctx) {
24078
24389
  let current_block_type_index;
24079
24390
  let if_block;
@@ -24143,7 +24454,7 @@ function create_if_block_1$9(ctx) {
24143
24454
  };
24144
24455
  }
24145
24456
 
24146
- // (120:8) <Button style={options.length > 1 && defaultChoice === Number(opt.value) ? 'primary' : buttonStyle} type="button" width="auto" onClick={() => setBtnValue(Number(opt.value))} >
24457
+ // (106:8) <Button style={options.length > 1 && defaultChoice === Number(opt.value) ? 'primary' : buttonStyle} type="button" width="auto" onClick={() => setBtnValue(Number(opt.value))} >
24147
24458
  function create_default_slot_2$5(ctx) {
24148
24459
  let t0_value = /*opt*/ ctx[15].text + "";
24149
24460
  let t0;
@@ -24168,7 +24479,7 @@ function create_default_slot_2$5(ctx) {
24168
24479
  };
24169
24480
  }
24170
24481
 
24171
- // (119:6) {#each options as opt}
24482
+ // (105:6) {#each options as opt}
24172
24483
  function create_each_block$6(ctx) {
24173
24484
  let button;
24174
24485
  let current;
@@ -24229,7 +24540,7 @@ function create_each_block$6(ctx) {
24229
24540
  };
24230
24541
  }
24231
24542
 
24232
- // (118:4) <Grid num={options.length}>
24543
+ // (104:4) <Grid num={options.length}>
24233
24544
  function create_default_slot_1$a(ctx) {
24234
24545
  let each_1_anchor;
24235
24546
  let current;
@@ -24313,7 +24624,7 @@ function create_default_slot_1$a(ctx) {
24313
24624
  };
24314
24625
  }
24315
24626
 
24316
- // (106:4) {:else}
24627
+ // (92:4) {:else}
24317
24628
  function create_else_block$5(ctx) {
24318
24629
  let checkbox;
24319
24630
  let current;
@@ -24364,7 +24675,7 @@ function create_else_block$5(ctx) {
24364
24675
  };
24365
24676
  }
24366
24677
 
24367
- // (97:4) {#if options.length > 1}
24678
+ // (83:4) {#if options.length > 1}
24368
24679
  function create_if_block_2$8(ctx) {
24369
24680
  let select;
24370
24681
  let current;
@@ -24411,7 +24722,7 @@ function create_if_block_2$8(ctx) {
24411
24722
  };
24412
24723
  }
24413
24724
 
24414
- // (107:6) <Checkbox isFirstInvalidInput={callbackMetadata?.derived.isFirstInvalidInput || false} isInvalid={false} key={inputName} onChange={setCheckboxValue} value={false} >
24725
+ // (93:6) <Checkbox isFirstInvalidInput={callbackMetadata?.derived.isFirstInvalidInput || false} isInvalid={false} key={inputName} onChange={setCheckboxValue} value={false} >
24415
24726
  function create_default_slot$h(ctx) {
24416
24727
  let t_value = /*options*/ ctx[3][0].text + "";
24417
24728
  let t;
@@ -24523,13 +24834,6 @@ function instance$z($$self, $$props, $$invalidate) {
24523
24834
  * @param {Object} event
24524
24835
  */
24525
24836
  function setOptionValue(event) {
24526
- /** ***********************************************************************
24527
- * SDK INTEGRATION POINT
24528
- * Summary: SDK callback methods for setting values
24529
- * ------------------------------------------------------------------------
24530
- * Details: Each callback is wrapped by the SDK to provide helper methods
24531
- * for writing values to the callbacks received from AM
24532
- *********************************************************************** */
24533
24837
  callback.setOptionIndex(Number(event.target.value));
24534
24838
  }
24535
24839
 
@@ -24538,13 +24842,6 @@ function instance$z($$self, $$props, $$invalidate) {
24538
24842
  * @param {Object} event
24539
24843
  */
24540
24844
  function setCheckboxValue(event) {
24541
- /** ***********************************************************************
24542
- * SDK INTEGRATION POINT
24543
- * Summary: SDK callback methods for setting values
24544
- * ------------------------------------------------------------------------
24545
- * Details: Each callback is wrapped by the SDK to provide helper methods
24546
- * for writing values to the callbacks received from AM
24547
- *********************************************************************** */
24548
24845
  const value = event.target.checked;
24549
24846
 
24550
24847
  if (value) {
@@ -24909,7 +25206,7 @@ function create_if_block_5$1(ctx) {
24909
25206
  }
24910
25207
 
24911
25208
  // (65:0) {#if type === 'number'}
24912
- function create_if_block_4$1(ctx) {
25209
+ function create_if_block_4$2(ctx) {
24913
25210
  let input;
24914
25211
  let input_aria_describedby_value;
24915
25212
  let input_class_value;
@@ -24989,7 +25286,7 @@ function create_if_block_4$1(ctx) {
24989
25286
  }
24990
25287
 
24991
25288
  // (81:0) {#if type === 'password'}
24992
- function create_if_block_3$3(ctx) {
25289
+ function create_if_block_3$6(ctx) {
24993
25290
  let input;
24994
25291
  let input_aria_describedby_value;
24995
25292
  let input_class_value;
@@ -25309,8 +25606,8 @@ function create_fragment$x(ctx) {
25309
25606
  let if_block0 = /*labelOrder*/ ctx[6] === 'first' && create_if_block_7$1(ctx);
25310
25607
  let if_block1 = /*type*/ ctx[11] === 'date' && create_if_block_6$1(ctx);
25311
25608
  let if_block2 = /*type*/ ctx[11] === 'email' && create_if_block_5$1(ctx);
25312
- let if_block3 = /*type*/ ctx[11] === 'number' && create_if_block_4$1(ctx);
25313
- let if_block4 = /*type*/ ctx[11] === 'password' && create_if_block_3$3(ctx);
25609
+ let if_block3 = /*type*/ ctx[11] === 'number' && create_if_block_4$2(ctx);
25610
+ let if_block4 = /*type*/ ctx[11] === 'password' && create_if_block_3$6(ctx);
25314
25611
  let if_block5 = /*type*/ ctx[11] === 'phone' && create_if_block_2$7(ctx);
25315
25612
  let if_block6 = /*type*/ ctx[11] === 'text' && create_if_block_1$8(ctx);
25316
25613
  let if_block7 = /*labelOrder*/ ctx[6] === 'last' && create_if_block$d(ctx);
@@ -25407,7 +25704,7 @@ function create_fragment$x(ctx) {
25407
25704
  if (if_block3) {
25408
25705
  if_block3.p(ctx, dirty);
25409
25706
  } else {
25410
- if_block3 = create_if_block_4$1(ctx);
25707
+ if_block3 = create_if_block_4$2(ctx);
25411
25708
  if_block3.c();
25412
25709
  if_block3.m(t3.parentNode, t3);
25413
25710
  }
@@ -25420,7 +25717,7 @@ function create_fragment$x(ctx) {
25420
25717
  if (if_block4) {
25421
25718
  if_block4.p(ctx, dirty);
25422
25719
  } else {
25423
- if_block4 = create_if_block_3$3(ctx);
25720
+ if_block4 = create_if_block_3$6(ctx);
25424
25721
  if_block4.c();
25425
25722
  if_block4.m(t4.parentNode, t4);
25426
25723
  }
@@ -26556,15 +26853,7 @@ function instance$t($$self, $$props, $$invalidate) {
26556
26853
  ? Stacked_label$1
26557
26854
  : Floating_label$1;
26558
26855
 
26559
- /** *************************************************************************
26560
- * SDK INTEGRATION POINT
26561
- * Summary: SDK callback methods for getting values
26562
- * --------------------------------------------------------------------------
26563
- * Details: Each callback is wrapped by the SDK to provide helper methods
26564
- * for accessing values from the callbacks received from AM
26565
- ************************************************************************* */
26566
26856
  let customQuestionIndex = null;
26567
-
26568
26857
  let displayCustomQuestionInput = false;
26569
26858
  let inputArr;
26570
26859
  let inputName;
@@ -26592,13 +26881,6 @@ function instance$t($$self, $$props, $$invalidate) {
26592
26881
  * @param {Object} event
26593
26882
  */
26594
26883
  function setAnswer(event) {
26595
- /** ***********************************************************************
26596
- * SDK INTEGRATION POINT
26597
- * Summary: SDK callback methods for setting values
26598
- * ------------------------------------------------------------------------
26599
- * Details: Each callback is wrapped by the SDK to provide helper methods
26600
- * for writing values to the callbacks received from AM
26601
- *********************************************************************** */
26602
26884
  callback.setAnswer(event.target.value);
26603
26885
  }
26604
26886
 
@@ -26615,14 +26897,6 @@ function instance$t($$self, $$props, $$invalidate) {
26615
26897
  callback.setAnswer('');
26616
26898
  } else {
26617
26899
  $$invalidate(3, displayCustomQuestionInput = false);
26618
-
26619
- /** ***********************************************************************
26620
- * SDK INTEGRATION POINT
26621
- * Summary: SDK callback methods for setting values
26622
- * ------------------------------------------------------------------------
26623
- * Details: Each callback is wrapped by the SDK to provide helper methods
26624
- * for writing values to the callbacks received from AM
26625
- *********************************************************************** */
26626
26900
  callback.setQuestion(selectValue);
26627
26901
  }
26628
26902
  }
@@ -26633,14 +26907,6 @@ function instance$t($$self, $$props, $$invalidate) {
26633
26907
  */
26634
26908
  function setQuestion(event) {
26635
26909
  const inputValue = event.target.value;
26636
-
26637
- /** ***********************************************************************
26638
- * SDK INTEGRATION POINT
26639
- * Summary: SDK callback methods for setting values
26640
- * ------------------------------------------------------------------------
26641
- * Details: Each callback is wrapped by the SDK to provide helper methods
26642
- * for writing values to the callbacks received from AM
26643
- *********************************************************************** */
26644
26910
  callback.setQuestion(inputValue);
26645
26911
  }
26646
26912
 
@@ -27131,8 +27397,8 @@ class Eye_icon extends SvelteComponent {
27131
27397
 
27132
27398
  function create_default_slot_1$8(ctx) {
27133
27399
  let current;
27134
- const default_slot_template = /*#slots*/ ctx[12].default;
27135
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[13], null);
27400
+ const default_slot_template = /*#slots*/ ctx[15].default;
27401
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[16], null);
27136
27402
 
27137
27403
  return {
27138
27404
  c() {
@@ -27147,15 +27413,15 @@ function create_default_slot_1$8(ctx) {
27147
27413
  },
27148
27414
  p(ctx, dirty) {
27149
27415
  if (default_slot) {
27150
- if (default_slot.p && (!current || dirty & /*$$scope*/ 8192)) {
27416
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 65536)) {
27151
27417
  update_slot_base(
27152
27418
  default_slot,
27153
27419
  default_slot_template,
27154
27420
  ctx,
27155
- /*$$scope*/ ctx[13],
27421
+ /*$$scope*/ ctx[16],
27156
27422
  !current
27157
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[13])
27158
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[13], dirty, null),
27423
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[16])
27424
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[16], dirty, null),
27159
27425
  null
27160
27426
  );
27161
27427
  }
@@ -27176,7 +27442,7 @@ function create_default_slot_1$8(ctx) {
27176
27442
  };
27177
27443
  }
27178
27444
 
27179
- // (47:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible} >
27445
+ // (69:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
27180
27446
  function create_default_slot$f(ctx) {
27181
27447
  let t;
27182
27448
  let current;
@@ -27206,7 +27472,7 @@ function create_default_slot$f(ctx) {
27206
27472
  };
27207
27473
  }
27208
27474
 
27209
- // (41:2)
27475
+ // (63:2)
27210
27476
  function create_input_button_slot$1(ctx) {
27211
27477
  let button;
27212
27478
  let eyeicon;
@@ -27237,7 +27503,7 @@ function create_input_button_slot$1(ctx) {
27237
27503
  current = true;
27238
27504
 
27239
27505
  if (!mounted) {
27240
- dispose = listen(button, "click", /*toggleVisibility*/ ctx[10]);
27506
+ dispose = listen(button, "click", /*toggleVisibility*/ ctx[11]);
27241
27507
  mounted = true;
27242
27508
  }
27243
27509
  },
@@ -27245,7 +27511,7 @@ function create_input_button_slot$1(ctx) {
27245
27511
  const eyeicon_changes = {};
27246
27512
  if (dirty & /*isVisible*/ 64) eyeicon_changes.visible = /*isVisible*/ ctx[6];
27247
27513
 
27248
- if (dirty & /*$$scope*/ 8192) {
27514
+ if (dirty & /*$$scope*/ 65536) {
27249
27515
  eyeicon_changes.$$scope = { dirty, ctx };
27250
27516
  }
27251
27517
 
@@ -27273,23 +27539,21 @@ function create_fragment$q(ctx) {
27273
27539
  let input;
27274
27540
  let current;
27275
27541
 
27276
- input = new /*Input*/ ctx[8]({
27542
+ input = new /*Input*/ ctx[9]({
27277
27543
  props: {
27278
27544
  forceValidityFailure: /*forceValidityFailure*/ ctx[0],
27279
27545
  isFirstInvalidInput: false,
27280
27546
  hasRightIcon: true,
27281
- key: `${/*key*/ ctx[1]}-confirm`,
27547
+ key: `${/*key*/ ctx[3]}-confirm`,
27282
27548
  label: interpolate('confirmPassword', null, 'Confirm Password'),
27283
- message: /*isInvalid*/ ctx[3]
27284
- ? interpolate('passwordConfirmationError', null, 'Passwords do not match')
27285
- : undefined,
27286
- onChange: /*onChange*/ ctx[2],
27287
- isInvalid: /*isInvalid*/ ctx[3],
27288
- isRequired: /*isRequired*/ ctx[4],
27289
- showMessage: /*showMessage*/ ctx[5],
27549
+ message: /*message*/ ctx[8],
27550
+ onChange: /*onChangeWrapper*/ ctx[10],
27551
+ isInvalid: /*passwordsDoNotMatch*/ ctx[1],
27552
+ isRequired: /*isRequired*/ ctx[2],
27553
+ showMessage: /*showMessage*/ ctx[4],
27290
27554
  type: /*type*/ ctx[7],
27291
- value: typeof /*value*/ ctx[9] === 'string'
27292
- ? /*value*/ ctx[9]
27555
+ value: typeof /*value*/ ctx[5] === 'string'
27556
+ ? /*value*/ ctx[5]
27293
27557
  : '',
27294
27558
  $$slots: {
27295
27559
  "input-button": [create_input_button_slot$1],
@@ -27310,19 +27574,18 @@ function create_fragment$q(ctx) {
27310
27574
  p(ctx, [dirty]) {
27311
27575
  const input_changes = {};
27312
27576
  if (dirty & /*forceValidityFailure*/ 1) input_changes.forceValidityFailure = /*forceValidityFailure*/ ctx[0];
27313
- if (dirty & /*key*/ 2) input_changes.key = `${/*key*/ ctx[1]}-confirm`;
27314
-
27315
- if (dirty & /*isInvalid*/ 8) input_changes.message = /*isInvalid*/ ctx[3]
27316
- ? interpolate('passwordConfirmationError', null, 'Passwords do not match')
27317
- : undefined;
27318
-
27319
- if (dirty & /*onChange*/ 4) input_changes.onChange = /*onChange*/ ctx[2];
27320
- if (dirty & /*isInvalid*/ 8) input_changes.isInvalid = /*isInvalid*/ ctx[3];
27321
- if (dirty & /*isRequired*/ 16) input_changes.isRequired = /*isRequired*/ ctx[4];
27322
- if (dirty & /*showMessage*/ 32) input_changes.showMessage = /*showMessage*/ ctx[5];
27577
+ if (dirty & /*key*/ 8) input_changes.key = `${/*key*/ ctx[3]}-confirm`;
27578
+ if (dirty & /*message*/ 256) input_changes.message = /*message*/ ctx[8];
27579
+ if (dirty & /*passwordsDoNotMatch*/ 2) input_changes.isInvalid = /*passwordsDoNotMatch*/ ctx[1];
27580
+ if (dirty & /*isRequired*/ 4) input_changes.isRequired = /*isRequired*/ ctx[2];
27581
+ if (dirty & /*showMessage*/ 16) input_changes.showMessage = /*showMessage*/ ctx[4];
27323
27582
  if (dirty & /*type*/ 128) input_changes.type = /*type*/ ctx[7];
27324
27583
 
27325
- if (dirty & /*$$scope, isVisible*/ 8256) {
27584
+ if (dirty & /*value*/ 32) input_changes.value = typeof /*value*/ ctx[5] === 'string'
27585
+ ? /*value*/ ctx[5]
27586
+ : '';
27587
+
27588
+ if (dirty & /*$$scope, isVisible*/ 65600) {
27326
27589
  input_changes.$$scope = { dirty, ctx };
27327
27590
  }
27328
27591
 
@@ -27346,16 +27609,25 @@ function create_fragment$q(ctx) {
27346
27609
  function instance$q($$self, $$props, $$invalidate) {
27347
27610
  let { $$slots: slots = {}, $$scope } = $$props;
27348
27611
  let { forceValidityFailure = false } = $$props;
27612
+ let { passwordsDoNotMatch = false } = $$props;
27613
+ let { isRequired = false } = $$props;
27349
27614
  let { key } = $$props;
27350
27615
  let { onChange } = $$props;
27351
- let { isInvalid = false } = $$props;
27352
- let { isRequired = true } = $$props;
27616
+ let { resetValue } = $$props;
27353
27617
  let { style = {} } = $$props;
27354
27618
  const Input = style.labels === 'stacked' ? Stacked_label : Floating_label;
27355
27619
  let { showMessage = undefined } = $$props;
27356
27620
  let isVisible = false;
27357
27621
  let type = 'password';
27358
27622
  let value;
27623
+ let message = '';
27624
+
27625
+ function onChangeWrapper(event) {
27626
+ $$invalidate(5, value = event.target?.value);
27627
+
27628
+ // TODO: revisit this logic to avoid unnecessary ternary
27629
+ onChange(typeof value === 'string' ? value : undefined);
27630
+ }
27359
27631
 
27360
27632
  /**
27361
27633
  * @function toggleVisibility - toggles the password from masked to plaintext
@@ -27367,27 +27639,50 @@ function instance$q($$self, $$props, $$invalidate) {
27367
27639
 
27368
27640
  $$self.$$set = $$props => {
27369
27641
  if ('forceValidityFailure' in $$props) $$invalidate(0, forceValidityFailure = $$props.forceValidityFailure);
27370
- if ('key' in $$props) $$invalidate(1, key = $$props.key);
27371
- if ('onChange' in $$props) $$invalidate(2, onChange = $$props.onChange);
27372
- if ('isInvalid' in $$props) $$invalidate(3, isInvalid = $$props.isInvalid);
27373
- if ('isRequired' in $$props) $$invalidate(4, isRequired = $$props.isRequired);
27374
- if ('style' in $$props) $$invalidate(11, style = $$props.style);
27375
- if ('showMessage' in $$props) $$invalidate(5, showMessage = $$props.showMessage);
27376
- if ('$$scope' in $$props) $$invalidate(13, $$scope = $$props.$$scope);
27642
+ if ('passwordsDoNotMatch' in $$props) $$invalidate(1, passwordsDoNotMatch = $$props.passwordsDoNotMatch);
27643
+ if ('isRequired' in $$props) $$invalidate(2, isRequired = $$props.isRequired);
27644
+ if ('key' in $$props) $$invalidate(3, key = $$props.key);
27645
+ if ('onChange' in $$props) $$invalidate(12, onChange = $$props.onChange);
27646
+ if ('resetValue' in $$props) $$invalidate(13, resetValue = $$props.resetValue);
27647
+ if ('style' in $$props) $$invalidate(14, style = $$props.style);
27648
+ if ('showMessage' in $$props) $$invalidate(4, showMessage = $$props.showMessage);
27649
+ if ('$$scope' in $$props) $$invalidate(16, $$scope = $$props.$$scope);
27650
+ };
27651
+
27652
+ $$self.$$.update = () => {
27653
+ if ($$self.$$.dirty & /*resetValue, onChange, value, passwordsDoNotMatch, isRequired*/ 12326) {
27654
+ {
27655
+ if (resetValue) {
27656
+ $$invalidate(5, value = undefined);
27657
+ onChange(value);
27658
+ }
27659
+
27660
+ if (passwordsDoNotMatch) {
27661
+ $$invalidate(8, message = interpolate('passwordConfirmationError', null, 'Passwords do not match'));
27662
+ } else if (isRequired) {
27663
+ $$invalidate(8, message = interpolate('requiredField', null, 'This field is required'));
27664
+ } else {
27665
+ $$invalidate(8, message = '');
27666
+ }
27667
+ }
27668
+ }
27377
27669
  };
27378
27670
 
27379
27671
  return [
27380
27672
  forceValidityFailure,
27381
- key,
27382
- onChange,
27383
- isInvalid,
27673
+ passwordsDoNotMatch,
27384
27674
  isRequired,
27675
+ key,
27385
27676
  showMessage,
27677
+ value,
27386
27678
  isVisible,
27387
27679
  type,
27680
+ message,
27388
27681
  Input,
27389
- value,
27682
+ onChangeWrapper,
27390
27683
  toggleVisibility,
27684
+ onChange,
27685
+ resetValue,
27391
27686
  style,
27392
27687
  slots,
27393
27688
  $$scope
@@ -27400,12 +27695,13 @@ class Confirm_input extends SvelteComponent {
27400
27695
 
27401
27696
  init(this, options, instance$q, create_fragment$q, safe_not_equal, {
27402
27697
  forceValidityFailure: 0,
27403
- key: 1,
27404
- onChange: 2,
27405
- isInvalid: 3,
27406
- isRequired: 4,
27407
- style: 11,
27408
- showMessage: 5
27698
+ passwordsDoNotMatch: 1,
27699
+ isRequired: 2,
27700
+ key: 3,
27701
+ onChange: 12,
27702
+ resetValue: 13,
27703
+ style: 14,
27704
+ showMessage: 4
27409
27705
  });
27410
27706
  }
27411
27707
  }
@@ -27414,8 +27710,8 @@ class Confirm_input extends SvelteComponent {
27414
27710
 
27415
27711
  function create_default_slot_1$7(ctx) {
27416
27712
  let current;
27417
- const default_slot_template = /*#slots*/ ctx[19].default;
27418
- const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[20], null);
27713
+ const default_slot_template = /*#slots*/ ctx[21].default;
27714
+ const default_slot = create_slot(default_slot_template, ctx, /*$$scope*/ ctx[22], null);
27419
27715
 
27420
27716
  return {
27421
27717
  c() {
@@ -27430,15 +27726,15 @@ function create_default_slot_1$7(ctx) {
27430
27726
  },
27431
27727
  p(ctx, dirty) {
27432
27728
  if (default_slot) {
27433
- if (default_slot.p && (!current || dirty & /*$$scope*/ 1048576)) {
27729
+ if (default_slot.p && (!current || dirty & /*$$scope*/ 4194304)) {
27434
27730
  update_slot_base(
27435
27731
  default_slot,
27436
27732
  default_slot_template,
27437
27733
  ctx,
27438
- /*$$scope*/ ctx[20],
27734
+ /*$$scope*/ ctx[22],
27439
27735
  !current
27440
- ? get_all_dirty_from_scope(/*$$scope*/ ctx[20])
27441
- : get_slot_changes(default_slot_template, /*$$scope*/ ctx[20], dirty, null),
27736
+ ? get_all_dirty_from_scope(/*$$scope*/ ctx[22])
27737
+ : get_slot_changes(default_slot_template, /*$$scope*/ ctx[22], dirty, null),
27442
27738
  null
27443
27739
  );
27444
27740
  }
@@ -27459,7 +27755,7 @@ function create_default_slot_1$7(ctx) {
27459
27755
  };
27460
27756
  }
27461
27757
 
27462
- // (82:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible} >
27758
+ // (94:4) <EyeIcon classes="tw_password-icon dark:tw_password-icon_dark" visible={isVisible}>
27463
27759
  function create_default_slot$e(ctx) {
27464
27760
  let t;
27465
27761
  let current;
@@ -27489,7 +27785,7 @@ function create_default_slot$e(ctx) {
27489
27785
  };
27490
27786
  }
27491
27787
 
27492
- // (76:2)
27788
+ // (88:2)
27493
27789
  function create_input_button_slot(ctx) {
27494
27790
  let button;
27495
27791
  let eyeicon;
@@ -27520,7 +27816,7 @@ function create_input_button_slot(ctx) {
27520
27816
  current = true;
27521
27817
 
27522
27818
  if (!mounted) {
27523
- dispose = listen(button, "click", /*toggleVisibility*/ ctx[16]);
27819
+ dispose = listen(button, "click", /*toggleVisibility*/ ctx[17]);
27524
27820
  mounted = true;
27525
27821
  }
27526
27822
  },
@@ -27528,7 +27824,7 @@ function create_input_button_slot(ctx) {
27528
27824
  const eyeicon_changes = {};
27529
27825
  if (dirty & /*isVisible*/ 1024) eyeicon_changes.visible = /*isVisible*/ ctx[10];
27530
27826
 
27531
- if (dirty & /*$$scope*/ 1048576) {
27827
+ if (dirty & /*$$scope*/ 4194304) {
27532
27828
  eyeicon_changes.$$scope = { dirty, ctx };
27533
27829
  }
27534
27830
 
@@ -27552,7 +27848,7 @@ function create_input_button_slot(ctx) {
27552
27848
  };
27553
27849
  }
27554
27850
 
27555
- // (89:0) {#if callbackMetadata?.platform?.confirmPassword}
27851
+ // (101:0) {#if callbackMetadata?.platform?.confirmPassword}
27556
27852
  function create_if_block$a(ctx) {
27557
27853
  let confirminput;
27558
27854
  let current;
@@ -27560,9 +27856,11 @@ function create_if_block$a(ctx) {
27560
27856
  confirminput = new Confirm_input({
27561
27857
  props: {
27562
27858
  forceValidityFailure: /*doPasswordsMatch*/ ctx[9] === false,
27563
- isInvalid: /*doPasswordsMatch*/ ctx[9] === false,
27859
+ passwordsDoNotMatch: /*doPasswordsMatch*/ ctx[9] === false,
27564
27860
  key: /*key*/ ctx[0],
27565
- onChange: /*confirmInput*/ ctx[14],
27861
+ isRequired: /*value*/ ctx[7].length > 0,
27862
+ onChange: /*confirmInput*/ ctx[15],
27863
+ resetValue: /*resetValue*/ ctx[11],
27566
27864
  showMessage: /*doPasswordsMatch*/ ctx[9] === false,
27567
27865
  style: /*style*/ ctx[4]
27568
27866
  }
@@ -27579,8 +27877,10 @@ function create_if_block$a(ctx) {
27579
27877
  p(ctx, dirty) {
27580
27878
  const confirminput_changes = {};
27581
27879
  if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.forceValidityFailure = /*doPasswordsMatch*/ ctx[9] === false;
27582
- if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.isInvalid = /*doPasswordsMatch*/ ctx[9] === false;
27880
+ if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.passwordsDoNotMatch = /*doPasswordsMatch*/ ctx[9] === false;
27583
27881
  if (dirty & /*key*/ 1) confirminput_changes.key = /*key*/ ctx[0];
27882
+ if (dirty & /*value*/ 128) confirminput_changes.isRequired = /*value*/ ctx[7].length > 0;
27883
+ if (dirty & /*resetValue*/ 2048) confirminput_changes.resetValue = /*resetValue*/ ctx[11];
27584
27884
  if (dirty & /*doPasswordsMatch*/ 512) confirminput_changes.showMessage = /*doPasswordsMatch*/ ctx[9] === false;
27585
27885
  if (dirty & /*style*/ 16) confirminput_changes.style = /*style*/ ctx[4];
27586
27886
  confirminput.$set(confirminput_changes);
@@ -27606,20 +27906,20 @@ function create_fragment$p(ctx) {
27606
27906
  let if_block_anchor;
27607
27907
  let current;
27608
27908
 
27609
- input = new /*Input*/ ctx[13]({
27909
+ input = new /*Input*/ ctx[14]({
27610
27910
  props: {
27611
27911
  isFirstInvalidInput: /*callbackMetadata*/ ctx[1]?.derived.isFirstInvalidInput || false,
27612
27912
  hasRightIcon: true,
27613
27913
  key: /*key*/ ctx[0],
27614
- label: interpolate(textToKey(/*callbackType*/ ctx[8]), null, /*textInputLabel*/ ctx[11]),
27914
+ label: interpolate(textToKey(/*callbackType*/ ctx[8]), null, /*textInputLabel*/ ctx[12]),
27615
27915
  message: /*validationFailure*/ ctx[6] || (/*isRequired*/ ctx[3]
27616
27916
  ? interpolate('inputRequiredError')
27617
27917
  : undefined),
27618
- onChange: /*setValue*/ ctx[15],
27918
+ onChange: /*setValue*/ ctx[16],
27619
27919
  isInvalid: /*isInvalid*/ ctx[2],
27620
27920
  isRequired: /*isRequired*/ ctx[3],
27621
27921
  showMessage: /*showMessage*/ ctx[5],
27622
- type: /*type*/ ctx[12],
27922
+ type: /*type*/ ctx[13],
27623
27923
  value: typeof /*value*/ ctx[7] === 'string'
27624
27924
  ? /*value*/ ctx[7]
27625
27925
  : '',
@@ -27651,7 +27951,7 @@ function create_fragment$p(ctx) {
27651
27951
  const input_changes = {};
27652
27952
  if (dirty & /*callbackMetadata*/ 2) input_changes.isFirstInvalidInput = /*callbackMetadata*/ ctx[1]?.derived.isFirstInvalidInput || false;
27653
27953
  if (dirty & /*key*/ 1) input_changes.key = /*key*/ ctx[0];
27654
- if (dirty & /*callbackType, textInputLabel*/ 2304) input_changes.label = interpolate(textToKey(/*callbackType*/ ctx[8]), null, /*textInputLabel*/ ctx[11]);
27954
+ if (dirty & /*callbackType, textInputLabel*/ 4352) input_changes.label = interpolate(textToKey(/*callbackType*/ ctx[8]), null, /*textInputLabel*/ ctx[12]);
27655
27955
 
27656
27956
  if (dirty & /*validationFailure, isRequired*/ 72) input_changes.message = /*validationFailure*/ ctx[6] || (/*isRequired*/ ctx[3]
27657
27957
  ? interpolate('inputRequiredError')
@@ -27660,13 +27960,13 @@ function create_fragment$p(ctx) {
27660
27960
  if (dirty & /*isInvalid*/ 4) input_changes.isInvalid = /*isInvalid*/ ctx[2];
27661
27961
  if (dirty & /*isRequired*/ 8) input_changes.isRequired = /*isRequired*/ ctx[3];
27662
27962
  if (dirty & /*showMessage*/ 32) input_changes.showMessage = /*showMessage*/ ctx[5];
27663
- if (dirty & /*type*/ 4096) input_changes.type = /*type*/ ctx[12];
27963
+ if (dirty & /*type*/ 8192) input_changes.type = /*type*/ ctx[13];
27664
27964
 
27665
27965
  if (dirty & /*value*/ 128) input_changes.value = typeof /*value*/ ctx[7] === 'string'
27666
27966
  ? /*value*/ ctx[7]
27667
27967
  : '';
27668
27968
 
27669
- if (dirty & /*$$scope, isVisible*/ 1049600) {
27969
+ if (dirty & /*$$scope, isVisible*/ 4195328) {
27670
27970
  input_changes.$$scope = { dirty, ctx };
27671
27971
  }
27672
27972
 
@@ -27730,6 +28030,8 @@ function instance$p($$self, $$props, $$invalidate) {
27730
28030
  let callbackType;
27731
28031
  let doPasswordsMatch;
27732
28032
  let isVisible = false;
28033
+ let resetValue = false;
28034
+ let savedValue = '';
27733
28035
  let textInputLabel;
27734
28036
  let type = 'password';
27735
28037
  let value;
@@ -27738,8 +28040,8 @@ function instance$p($$self, $$props, $$invalidate) {
27738
28040
  * @function confirmInput - ensures the second password input matches the first
27739
28041
  * @param event
27740
28042
  */
27741
- function confirmInput(event) {
27742
- $$invalidate(18, confirmValue = event.target?.value);
28043
+ function confirmInput(val) {
28044
+ $$invalidate(19, confirmValue = val);
27743
28045
  }
27744
28046
 
27745
28047
  /**
@@ -27757,6 +28059,8 @@ function instance$p($$self, $$props, $$invalidate) {
27757
28059
  * for writing values to the callbacks received from AM
27758
28060
  *********************************************************************** */
27759
28061
  callback.setInputValue(value);
28062
+
28063
+ $$invalidate(20, savedValue = String(value));
27760
28064
  }
27761
28065
 
27762
28066
  /**
@@ -27764,11 +28068,11 @@ function instance$p($$self, $$props, $$invalidate) {
27764
28068
  */
27765
28069
  function toggleVisibility() {
27766
28070
  $$invalidate(10, isVisible = !isVisible);
27767
- $$invalidate(12, type = isVisible ? 'text' : 'password');
28071
+ $$invalidate(13, type = isVisible ? 'text' : 'password');
27768
28072
  }
27769
28073
 
27770
28074
  $$self.$$set = $$props => {
27771
- if ('callback' in $$props) $$invalidate(17, callback = $$props.callback);
28075
+ if ('callback' in $$props) $$invalidate(18, callback = $$props.callback);
27772
28076
  if ('callbackMetadata' in $$props) $$invalidate(1, callbackMetadata = $$props.callbackMetadata);
27773
28077
  if ('key' in $$props) $$invalidate(0, key = $$props.key);
27774
28078
  if ('isInvalid' in $$props) $$invalidate(2, isInvalid = $$props.isInvalid);
@@ -27776,18 +28080,28 @@ function instance$p($$self, $$props, $$invalidate) {
27776
28080
  if ('style' in $$props) $$invalidate(4, style = $$props.style);
27777
28081
  if ('showMessage' in $$props) $$invalidate(5, showMessage = $$props.showMessage);
27778
28082
  if ('validationFailure' in $$props) $$invalidate(6, validationFailure = $$props.validationFailure);
27779
- if ('$$scope' in $$props) $$invalidate(20, $$scope = $$props.$$scope);
28083
+ if ('$$scope' in $$props) $$invalidate(22, $$scope = $$props.$$scope);
27780
28084
  };
27781
28085
 
27782
28086
  $$self.$$.update = () => {
27783
- if ($$self.$$.dirty & /*callback, callbackMetadata, confirmValue, value*/ 393346) {
28087
+ if ($$self.$$.dirty & /*callback, callbackMetadata, savedValue, value, confirmValue*/ 1835138) {
27784
28088
  {
27785
28089
  $$invalidate(8, callbackType = callback.getType());
27786
28090
  $$invalidate(0, key = callback?.payload?.input?.[0].name || `password-${callbackMetadata?.idx}`);
27787
- $$invalidate(11, textInputLabel = callback.getPrompt());
28091
+ $$invalidate(12, textInputLabel = callback.getPrompt());
27788
28092
  $$invalidate(7, value = callback?.getInputValue());
27789
28093
 
27790
- // Only assign a boolean if the confirm input has an actual value
28094
+ /**
28095
+ * `savedValue` represents what the user set after blur (local component state)
28096
+ * `value` represents what's in the callback (empties from AM response)
28097
+ *
28098
+ * This unique combination is what produces the most reliable reset flag
28099
+ */
28100
+ $$invalidate(11, resetValue = !!savedValue && value === '');
28101
+
28102
+ /**
28103
+ * Only assign a boolean if the confirm input has an actual value.
28104
+ */
27791
28105
  $$invalidate(9, doPasswordsMatch = confirmValue !== undefined
27792
28106
  ? confirmValue === value
27793
28107
  : undefined);
@@ -27807,6 +28121,7 @@ function instance$p($$self, $$props, $$invalidate) {
27807
28121
  callbackType,
27808
28122
  doPasswordsMatch,
27809
28123
  isVisible,
28124
+ resetValue,
27810
28125
  textInputLabel,
27811
28126
  type,
27812
28127
  Input,
@@ -27815,6 +28130,7 @@ function instance$p($$self, $$props, $$invalidate) {
27815
28130
  toggleVisibility,
27816
28131
  callback,
27817
28132
  confirmValue,
28133
+ savedValue,
27818
28134
  slots,
27819
28135
  $$scope
27820
28136
  ];
@@ -27825,7 +28141,7 @@ class Base extends SvelteComponent {
27825
28141
  super();
27826
28142
 
27827
28143
  init(this, options, instance$p, create_fragment$p, safe_not_equal, {
27828
- callback: 17,
28144
+ callback: 18,
27829
28145
  callbackMetadata: 1,
27830
28146
  key: 0,
27831
28147
  isInvalid: 2,
@@ -28517,7 +28833,7 @@ function get_each_context$5(ctx, list, i) {
28517
28833
  }
28518
28834
 
28519
28835
  // (66:56)
28520
- function create_if_block_3$2(ctx) {
28836
+ function create_if_block_3$5(ctx) {
28521
28837
  let button;
28522
28838
  let current;
28523
28839
 
@@ -28861,7 +29177,7 @@ function create_default_slot_1$6(ctx) {
28861
29177
  let if_block;
28862
29178
  let if_block_anchor;
28863
29179
  let current;
28864
- const if_block_creators = [create_if_block_1$7, create_if_block_2$6, create_if_block_3$2];
29180
+ const if_block_creators = [create_if_block_1$7, create_if_block_2$6, create_if_block_3$5];
28865
29181
  const if_blocks = [];
28866
29182
 
28867
29183
  function select_block_type(ctx, dirty) {
@@ -29793,13 +30109,6 @@ function instance$f($$self, $$props, $$invalidate) {
29793
30109
  * @param {Object} event
29794
30110
  */
29795
30111
  function setValue(event) {
29796
- /** ***********************************************************************
29797
- * SDK INTEGRATION POINT
29798
- * Summary: SDK callback methods for setting values
29799
- * ------------------------------------------------------------------------
29800
- * Details: Each callback is wrapped by the SDK to provide helper methods
29801
- * for writing values to the callbacks received from AM
29802
- *********************************************************************** */
29803
30112
  callback.setInputValue(event.target.value);
29804
30113
  }
29805
30114
 
@@ -29988,7 +30297,7 @@ function create_else_block$3(ctx) {
29988
30297
  };
29989
30298
  }
29990
30299
 
29991
- // (41:0) {#if $linksStore?.termsAndConditions}
30300
+ // (27:0) {#if $linksStore?.termsAndConditions}
29992
30301
  function create_if_block$7(ctx) {
29993
30302
  let link;
29994
30303
  let t;
@@ -30066,7 +30375,7 @@ function create_if_block$7(ctx) {
30066
30375
  };
30067
30376
  }
30068
30377
 
30069
- // (42:2) <Link classes="tw_block tw_mb-4" href={$linksStore?.termsAndConditions} target="_blank">
30378
+ // (28:2) <Link classes="tw_block tw_mb-4" href={$linksStore?.termsAndConditions} target="_blank">
30070
30379
  function create_default_slot_1$5(ctx) {
30071
30380
  let t_value = interpolate('termsAndConditionsLinkText') + "";
30072
30381
  let t;
@@ -30085,7 +30394,7 @@ function create_default_slot_1$5(ctx) {
30085
30394
  };
30086
30395
  }
30087
30396
 
30088
- // (45:2) <Checkbox isFirstInvalidInput={callbackMetadata?.derived.isFirstInvalidInput || false} key={inputName} onChange={setValue} value={false} >
30397
+ // (31:2) <Checkbox isFirstInvalidInput={callbackMetadata?.derived.isFirstInvalidInput || false} key={inputName} onChange={setValue} value={false} >
30089
30398
  function create_default_slot$9(ctx) {
30090
30399
  let t;
30091
30400
  let current;
@@ -30193,13 +30502,6 @@ function instance$d($$self, $$props, $$invalidate) {
30193
30502
  let { callback } = $$props;
30194
30503
  let { callbackMetadata } = $$props;
30195
30504
 
30196
- /** *************************************************************************
30197
- * SDK INTEGRATION POINT
30198
- * Summary: SDK callback methods for getting values
30199
- * --------------------------------------------------------------------------
30200
- * Details: Each callback is wrapped by the SDK to provide helper methods
30201
- * for accessing values from the callbacks received from AM
30202
- ************************************************************************* */
30203
30505
  const Checkbox = style.checksAndRadios === 'standard'
30204
30506
  ? Standard$1
30205
30507
  : Animated$1;
@@ -30211,13 +30513,6 @@ function instance$d($$self, $$props, $$invalidate) {
30211
30513
  * @param {Object} event
30212
30514
  */
30213
30515
  function setValue(event) {
30214
- /** ***********************************************************************
30215
- * SDK INTEGRATION POINT
30216
- * Summary: SDK callback methods for setting values
30217
- * ------------------------------------------------------------------------
30218
- * Details: Each callback is wrapped by the SDK to provide helper methods
30219
- * for writing values to the callbacks received from AM
30220
- *********************************************************************** */
30221
30516
  callback.setAccepted(event.target.checked);
30222
30517
  }
30223
30518
 
@@ -30776,13 +31071,6 @@ function instance$9($$self, $$props, $$invalidate) {
30776
31071
  * @param {Object} event
30777
31072
  */
30778
31073
  function setValue(event) {
30779
- /** ***********************************************************************
30780
- * SDK INTEGRATION POINT
30781
- * Summary: SDK callback methods for setting values
30782
- * ------------------------------------------------------------------------
30783
- * Details: Each callback is wrapped by the SDK to provide helper methods
30784
- * for writing values to the callbacks received from AM
30785
- *********************************************************************** */
30786
31074
  callback.setInputValue(event.target.value);
30787
31075
  }
30788
31076
 
@@ -31569,7 +31857,7 @@ function create_if_block_5(ctx) {
31569
31857
  }
31570
31858
 
31571
31859
  // (126:52)
31572
- function create_if_block_4(ctx) {
31860
+ function create_if_block_4$1(ctx) {
31573
31861
  let kbacreate;
31574
31862
  let current;
31575
31863
  const kbacreate_spread_levels = [/*newProps*/ ctx[19]];
@@ -31612,7 +31900,7 @@ function create_if_block_4(ctx) {
31612
31900
  }
31613
31901
 
31614
31902
  // (120:54)
31615
- function create_if_block_3$1(ctx) {
31903
+ function create_if_block_3$4(ctx) {
31616
31904
  let hiddenvalue;
31617
31905
  let current;
31618
31906
  const hiddenvalue_spread_levels = [/*newProps*/ ctx[19]];
@@ -31793,8 +32081,8 @@ function create_fragment$8(ctx) {
31793
32081
  create_if_block$6,
31794
32082
  create_if_block_1$5,
31795
32083
  create_if_block_2$5,
31796
- create_if_block_3$1,
31797
- create_if_block_4,
32084
+ create_if_block_3$4,
32085
+ create_if_block_4$1,
31798
32086
  create_if_block_5,
31799
32087
  create_if_block_6,
31800
32088
  create_if_block_7,
@@ -32027,12 +32315,12 @@ class Callback_mapper extends SvelteComponent {
32027
32315
 
32028
32316
  function get_each_context$3(ctx, list, i) {
32029
32317
  const child_ctx = ctx.slice();
32030
- child_ctx[15] = list[i];
32031
- child_ctx[17] = i;
32318
+ child_ctx[16] = list[i];
32319
+ child_ctx[18] = i;
32032
32320
  return child_ctx;
32033
32321
  }
32034
32322
 
32035
- // (70:2) {#if form?.icon}
32323
+ // (70:2) {#if form?.icon && componentStyle !== 'inline'}
32036
32324
  function create_if_block_2$4(ctx) {
32037
32325
  let div;
32038
32326
  let shieldicon;
@@ -32080,7 +32368,7 @@ function create_if_block_1$4(ctx) {
32080
32368
  alert = new Alert({
32081
32369
  props: {
32082
32370
  id: formFailureMessageId,
32083
- needsFocus: /*alertNeedsFocus*/ ctx[5],
32371
+ needsFocus: /*alertNeedsFocus*/ ctx[6],
32084
32372
  type: "error",
32085
32373
  $$slots: { default: [create_default_slot_2$3] },
32086
32374
  $$scope: { ctx }
@@ -32097,9 +32385,9 @@ function create_if_block_1$4(ctx) {
32097
32385
  },
32098
32386
  p(ctx, dirty) {
32099
32387
  const alert_changes = {};
32100
- if (dirty & /*alertNeedsFocus*/ 32) alert_changes.needsFocus = /*alertNeedsFocus*/ ctx[5];
32388
+ if (dirty & /*alertNeedsFocus*/ 64) alert_changes.needsFocus = /*alertNeedsFocus*/ ctx[6];
32101
32389
 
32102
- if (dirty & /*$$scope, formMessageKey, form*/ 262210) {
32390
+ if (dirty & /*$$scope, formMessageKey, form*/ 524420) {
32103
32391
  alert_changes.$$scope = { dirty, ctx };
32104
32392
  }
32105
32393
 
@@ -32122,7 +32410,7 @@ function create_if_block_1$4(ctx) {
32122
32410
 
32123
32411
  // (87:4) <Alert id={formFailureMessageId} needsFocus={alertNeedsFocus} type="error">
32124
32412
  function create_default_slot_2$3(ctx) {
32125
- let t_value = interpolate(/*formMessageKey*/ ctx[6], null, /*form*/ ctx[1]?.message) + "";
32413
+ let t_value = interpolate(/*formMessageKey*/ ctx[7], null, /*form*/ ctx[2]?.message) + "";
32126
32414
  let t;
32127
32415
 
32128
32416
  return {
@@ -32133,7 +32421,7 @@ function create_default_slot_2$3(ctx) {
32133
32421
  insert(target, t, anchor);
32134
32422
  },
32135
32423
  p(ctx, dirty) {
32136
- if (dirty & /*formMessageKey, form*/ 66 && t_value !== (t_value = interpolate(/*formMessageKey*/ ctx[6], null, /*form*/ ctx[1]?.message) + "")) set_data(t, t_value);
32424
+ if (dirty & /*formMessageKey, form*/ 132 && t_value !== (t_value = interpolate(/*formMessageKey*/ ctx[7], null, /*form*/ ctx[2]?.message) + "")) set_data(t, t_value);
32137
32425
  },
32138
32426
  d(detaching) {
32139
32427
  if (detaching) detach(t);
@@ -32149,11 +32437,11 @@ function create_each_block$3(ctx) {
32149
32437
  callbackmapper = new Callback_mapper({
32150
32438
  props: {
32151
32439
  props: {
32152
- callback: /*callback*/ ctx[15],
32153
- callbackMetadata: /*metadata*/ ctx[3]?.callbacks[/*idx*/ ctx[17]],
32154
- selfSubmitFunction: /*determineSubmission*/ ctx[11],
32155
- stepMetadata: /*metadata*/ ctx[3]?.step && { .../*metadata*/ ctx[3].step },
32156
- style: /*$styleStore*/ ctx[10]
32440
+ callback: /*callback*/ ctx[16],
32441
+ callbackMetadata: /*metadata*/ ctx[4]?.callbacks[/*idx*/ ctx[18]],
32442
+ selfSubmitFunction: /*determineSubmission*/ ctx[12],
32443
+ stepMetadata: /*metadata*/ ctx[4]?.step && { .../*metadata*/ ctx[4].step },
32444
+ style: /*$styleStore*/ ctx[11]
32157
32445
  }
32158
32446
  }
32159
32447
  });
@@ -32169,12 +32457,12 @@ function create_each_block$3(ctx) {
32169
32457
  p(ctx, dirty) {
32170
32458
  const callbackmapper_changes = {};
32171
32459
 
32172
- if (dirty & /*step, metadata, $styleStore*/ 1048) callbackmapper_changes.props = {
32173
- callback: /*callback*/ ctx[15],
32174
- callbackMetadata: /*metadata*/ ctx[3]?.callbacks[/*idx*/ ctx[17]],
32175
- selfSubmitFunction: /*determineSubmission*/ ctx[11],
32176
- stepMetadata: /*metadata*/ ctx[3]?.step && { .../*metadata*/ ctx[3].step },
32177
- style: /*$styleStore*/ ctx[10]
32460
+ if (dirty & /*step, metadata, $styleStore*/ 2096) callbackmapper_changes.props = {
32461
+ callback: /*callback*/ ctx[16],
32462
+ callbackMetadata: /*metadata*/ ctx[4]?.callbacks[/*idx*/ ctx[18]],
32463
+ selfSubmitFunction: /*determineSubmission*/ ctx[12],
32464
+ stepMetadata: /*metadata*/ ctx[4]?.step && { .../*metadata*/ ctx[4].step },
32465
+ style: /*$styleStore*/ ctx[11]
32178
32466
  };
32179
32467
 
32180
32468
  callbackmapper.$set(callbackmapper_changes);
@@ -32201,7 +32489,7 @@ function create_if_block$5(ctx) {
32201
32489
 
32202
32490
  button = new Button({
32203
32491
  props: {
32204
- busy: /*journey*/ ctx[2]?.loading,
32492
+ busy: /*journey*/ ctx[3]?.loading,
32205
32493
  style: "primary",
32206
32494
  type: "submit",
32207
32495
  width: "full",
@@ -32220,9 +32508,9 @@ function create_if_block$5(ctx) {
32220
32508
  },
32221
32509
  p(ctx, dirty) {
32222
32510
  const button_changes = {};
32223
- if (dirty & /*journey*/ 4) button_changes.busy = /*journey*/ ctx[2]?.loading;
32511
+ if (dirty & /*journey*/ 8) button_changes.busy = /*journey*/ ctx[3]?.loading;
32224
32512
 
32225
- if (dirty & /*$$scope*/ 262144) {
32513
+ if (dirty & /*$$scope*/ 524288) {
32226
32514
  button_changes.$$scope = { dirty, ctx };
32227
32515
  }
32228
32516
 
@@ -32288,24 +32576,24 @@ function create_default_slot$5(ctx) {
32288
32576
  let t5;
32289
32577
  let backto;
32290
32578
  let current;
32291
- let if_block0 = /*form*/ ctx[1]?.icon && create_if_block_2$4();
32579
+ let if_block0 = /*form*/ ctx[2]?.icon && /*componentStyle*/ ctx[1] !== 'inline' && create_if_block_2$4();
32292
32580
 
32293
32581
  sanitize0 = new Server_strings({
32294
32582
  props: {
32295
32583
  html: true,
32296
- string: /*step*/ ctx[4]?.getHeader() || ''
32584
+ string: /*step*/ ctx[5]?.getHeader() || ''
32297
32585
  }
32298
32586
  });
32299
32587
 
32300
32588
  sanitize1 = new Server_strings({
32301
32589
  props: {
32302
32590
  html: true,
32303
- string: /*step*/ ctx[4]?.getDescription() || ''
32591
+ string: /*step*/ ctx[5]?.getDescription() || ''
32304
32592
  }
32305
32593
  });
32306
32594
 
32307
- let if_block1 = /*form*/ ctx[1]?.message && create_if_block_1$4(ctx);
32308
- let each_value = /*step*/ ctx[4]?.callbacks;
32595
+ let if_block1 = /*form*/ ctx[2]?.message && create_if_block_1$4(ctx);
32596
+ let each_value = /*step*/ ctx[5]?.callbacks;
32309
32597
  let each_blocks = [];
32310
32598
 
32311
32599
  for (let i = 0; i < each_value.length; i += 1) {
@@ -32316,8 +32604,8 @@ function create_default_slot$5(ctx) {
32316
32604
  each_blocks[i] = null;
32317
32605
  });
32318
32606
 
32319
- let if_block2 = (/*metadata*/ ctx[3]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[3]?.step?.derived.isStepSelfSubmittable) && create_if_block$5(ctx);
32320
- backto = new Back_to({ props: { journey: /*journey*/ ctx[2] } });
32607
+ let if_block2 = (/*metadata*/ ctx[4]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[4]?.step?.derived.isStepSelfSubmittable) && create_if_block$5(ctx);
32608
+ backto = new Back_to({ props: { journey: /*journey*/ ctx[3] } });
32321
32609
 
32322
32610
  return {
32323
32611
  c() {
@@ -32354,7 +32642,7 @@ function create_default_slot$5(ctx) {
32354
32642
  append(header, t1);
32355
32643
  append(header, p);
32356
32644
  mount_component(sanitize1, p, null);
32357
- /*header_binding*/ ctx[13](header);
32645
+ /*header_binding*/ ctx[14](header);
32358
32646
  insert(target, t2, anchor);
32359
32647
  if (if_block1) if_block1.m(target, anchor);
32360
32648
  insert(target, t3, anchor);
@@ -32370,9 +32658,9 @@ function create_default_slot$5(ctx) {
32370
32658
  current = true;
32371
32659
  },
32372
32660
  p(ctx, dirty) {
32373
- if (/*form*/ ctx[1]?.icon) {
32661
+ if (/*form*/ ctx[2]?.icon && /*componentStyle*/ ctx[1] !== 'inline') {
32374
32662
  if (if_block0) {
32375
- if (dirty & /*form*/ 2) {
32663
+ if (dirty & /*form, componentStyle*/ 6) {
32376
32664
  transition_in(if_block0, 1);
32377
32665
  }
32378
32666
  } else {
@@ -32392,17 +32680,17 @@ function create_default_slot$5(ctx) {
32392
32680
  }
32393
32681
 
32394
32682
  const sanitize0_changes = {};
32395
- if (dirty & /*step*/ 16) sanitize0_changes.string = /*step*/ ctx[4]?.getHeader() || '';
32683
+ if (dirty & /*step*/ 32) sanitize0_changes.string = /*step*/ ctx[5]?.getHeader() || '';
32396
32684
  sanitize0.$set(sanitize0_changes);
32397
32685
  const sanitize1_changes = {};
32398
- if (dirty & /*step*/ 16) sanitize1_changes.string = /*step*/ ctx[4]?.getDescription() || '';
32686
+ if (dirty & /*step*/ 32) sanitize1_changes.string = /*step*/ ctx[5]?.getDescription() || '';
32399
32687
  sanitize1.$set(sanitize1_changes);
32400
32688
 
32401
- if (/*form*/ ctx[1]?.message) {
32689
+ if (/*form*/ ctx[2]?.message) {
32402
32690
  if (if_block1) {
32403
32691
  if_block1.p(ctx, dirty);
32404
32692
 
32405
- if (dirty & /*form*/ 2) {
32693
+ if (dirty & /*form*/ 4) {
32406
32694
  transition_in(if_block1, 1);
32407
32695
  }
32408
32696
  } else {
@@ -32421,8 +32709,8 @@ function create_default_slot$5(ctx) {
32421
32709
  check_outros();
32422
32710
  }
32423
32711
 
32424
- if (dirty & /*step, metadata, determineSubmission, $styleStore*/ 3096) {
32425
- each_value = /*step*/ ctx[4]?.callbacks;
32712
+ if (dirty & /*step, metadata, determineSubmission, $styleStore*/ 6192) {
32713
+ each_value = /*step*/ ctx[5]?.callbacks;
32426
32714
  let i;
32427
32715
 
32428
32716
  for (i = 0; i < each_value.length; i += 1) {
@@ -32448,11 +32736,11 @@ function create_default_slot$5(ctx) {
32448
32736
  check_outros();
32449
32737
  }
32450
32738
 
32451
- if (/*metadata*/ ctx[3]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[3]?.step?.derived.isStepSelfSubmittable) {
32739
+ if (/*metadata*/ ctx[4]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[4]?.step?.derived.isStepSelfSubmittable) {
32452
32740
  if (if_block2) {
32453
32741
  if_block2.p(ctx, dirty);
32454
32742
 
32455
- if (dirty & /*metadata*/ 8) {
32743
+ if (dirty & /*metadata*/ 16) {
32456
32744
  transition_in(if_block2, 1);
32457
32745
  }
32458
32746
  } else {
@@ -32472,7 +32760,7 @@ function create_default_slot$5(ctx) {
32472
32760
  }
32473
32761
 
32474
32762
  const backto_changes = {};
32475
- if (dirty & /*journey*/ 4) backto_changes.journey = /*journey*/ ctx[2];
32763
+ if (dirty & /*journey*/ 8) backto_changes.journey = /*journey*/ ctx[3];
32476
32764
  backto.$set(backto_changes);
32477
32765
  },
32478
32766
  i(local) {
@@ -32511,7 +32799,7 @@ function create_default_slot$5(ctx) {
32511
32799
  if (detaching) detach(header);
32512
32800
  destroy_component(sanitize0);
32513
32801
  destroy_component(sanitize1);
32514
- /*header_binding*/ ctx[13](null);
32802
+ /*header_binding*/ ctx[14](null);
32515
32803
  if (detaching) detach(t2);
32516
32804
  if (if_block1) if_block1.d(detaching);
32517
32805
  if (detaching) detach(t3);
@@ -32530,14 +32818,14 @@ function create_fragment$7(ctx) {
32530
32818
  let current;
32531
32819
 
32532
32820
  function form_1_formEl_binding(value) {
32533
- /*form_1_formEl_binding*/ ctx[14](value);
32821
+ /*form_1_formEl_binding*/ ctx[15](value);
32534
32822
  }
32535
32823
 
32536
32824
  let form_1_props = {
32537
- ariaDescribedBy: /*formAriaDescriptor*/ ctx[7],
32825
+ ariaDescribedBy: /*formAriaDescriptor*/ ctx[8],
32538
32826
  id: formElementId,
32539
- needsFocus: /*formNeedsFocus*/ ctx[8],
32540
- onSubmitWhenValid: /*submitFormWrapper*/ ctx[12],
32827
+ needsFocus: /*formNeedsFocus*/ ctx[9],
32828
+ onSubmitWhenValid: /*submitFormWrapper*/ ctx[13],
32541
32829
  $$slots: { default: [create_default_slot$5] },
32542
32830
  $$scope: { ctx }
32543
32831
  };
@@ -32559,10 +32847,10 @@ function create_fragment$7(ctx) {
32559
32847
  },
32560
32848
  p(ctx, [dirty]) {
32561
32849
  const form_1_changes = {};
32562
- if (dirty & /*formAriaDescriptor*/ 128) form_1_changes.ariaDescribedBy = /*formAriaDescriptor*/ ctx[7];
32563
- if (dirty & /*formNeedsFocus*/ 256) form_1_changes.needsFocus = /*formNeedsFocus*/ ctx[8];
32850
+ if (dirty & /*formAriaDescriptor*/ 256) form_1_changes.ariaDescribedBy = /*formAriaDescriptor*/ ctx[8];
32851
+ if (dirty & /*formNeedsFocus*/ 512) form_1_changes.needsFocus = /*formNeedsFocus*/ ctx[9];
32564
32852
 
32565
- if (dirty & /*$$scope, journey, metadata, step, $styleStore, alertNeedsFocus, formMessageKey, form, linkWrapper*/ 263806) {
32853
+ if (dirty & /*$$scope, journey, metadata, step, $styleStore, alertNeedsFocus, formMessageKey, form, linkWrapper, componentStyle*/ 527614) {
32566
32854
  form_1_changes.$$scope = { dirty, ctx };
32567
32855
  }
32568
32856
 
@@ -32595,7 +32883,8 @@ const formElementId = 'genericStepForm';
32595
32883
 
32596
32884
  function instance$7($$self, $$props, $$invalidate) {
32597
32885
  let $styleStore;
32598
- component_subscribe($$self, styleStore, $$value => $$invalidate(10, $styleStore = $$value));
32886
+ component_subscribe($$self, styleStore, $$value => $$invalidate(11, $styleStore = $$value));
32887
+ let { componentStyle } = $$props;
32599
32888
  let { form } = $$props;
32600
32889
  let { formEl = null } = $$props;
32601
32890
  let { journey } = $$props;
@@ -32617,20 +32906,20 @@ function instance$7($$self, $$props, $$invalidate) {
32617
32906
  }
32618
32907
 
32619
32908
  function submitFormWrapper() {
32620
- $$invalidate(5, alertNeedsFocus = false);
32621
- $$invalidate(8, formNeedsFocus = false);
32909
+ $$invalidate(6, alertNeedsFocus = false);
32910
+ $$invalidate(9, formNeedsFocus = false);
32622
32911
  form?.submit();
32623
32912
  }
32624
32913
 
32625
32914
  afterUpdate(() => {
32626
32915
  if (form?.message) {
32627
- $$invalidate(7, formAriaDescriptor = formFailureMessageId);
32628
- $$invalidate(5, alertNeedsFocus = true);
32629
- $$invalidate(8, formNeedsFocus = false);
32916
+ $$invalidate(8, formAriaDescriptor = formFailureMessageId);
32917
+ $$invalidate(6, alertNeedsFocus = true);
32918
+ $$invalidate(9, formNeedsFocus = false);
32630
32919
  } else {
32631
- $$invalidate(7, formAriaDescriptor = formHeaderId);
32632
- $$invalidate(5, alertNeedsFocus = false);
32633
- $$invalidate(8, formNeedsFocus = true);
32920
+ $$invalidate(8, formAriaDescriptor = formHeaderId);
32921
+ $$invalidate(6, alertNeedsFocus = false);
32922
+ $$invalidate(9, formNeedsFocus = true);
32634
32923
  }
32635
32924
  });
32636
32925
 
@@ -32639,7 +32928,7 @@ function instance$7($$self, $$props, $$invalidate) {
32639
32928
  function header_binding($$value) {
32640
32929
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
32641
32930
  linkWrapper = $$value;
32642
- $$invalidate(9, linkWrapper);
32931
+ $$invalidate(10, linkWrapper);
32643
32932
  });
32644
32933
  }
32645
32934
 
@@ -32649,24 +32938,26 @@ function instance$7($$self, $$props, $$invalidate) {
32649
32938
  }
32650
32939
 
32651
32940
  $$self.$$set = $$props => {
32652
- if ('form' in $$props) $$invalidate(1, form = $$props.form);
32941
+ if ('componentStyle' in $$props) $$invalidate(1, componentStyle = $$props.componentStyle);
32942
+ if ('form' in $$props) $$invalidate(2, form = $$props.form);
32653
32943
  if ('formEl' in $$props) $$invalidate(0, formEl = $$props.formEl);
32654
- if ('journey' in $$props) $$invalidate(2, journey = $$props.journey);
32655
- if ('metadata' in $$props) $$invalidate(3, metadata = $$props.metadata);
32656
- if ('step' in $$props) $$invalidate(4, step = $$props.step);
32944
+ if ('journey' in $$props) $$invalidate(3, journey = $$props.journey);
32945
+ if ('metadata' in $$props) $$invalidate(4, metadata = $$props.metadata);
32946
+ if ('step' in $$props) $$invalidate(5, step = $$props.step);
32657
32947
  };
32658
32948
 
32659
32949
  $$self.$$.update = () => {
32660
- if ($$self.$$.dirty & /*step, form*/ 18) {
32950
+ if ($$self.$$.dirty & /*step, form*/ 36) {
32661
32951
  {
32662
32952
  shouldRedirectFromStep(step) && FRAuth$1.redirect(step);
32663
- $$invalidate(6, formMessageKey = convertStringToKey(form?.message));
32953
+ $$invalidate(7, formMessageKey = convertStringToKey(form?.message));
32664
32954
  }
32665
32955
  }
32666
32956
  };
32667
32957
 
32668
32958
  return [
32669
32959
  formEl,
32960
+ componentStyle,
32670
32961
  form,
32671
32962
  journey,
32672
32963
  metadata,
@@ -32689,11 +32980,12 @@ class Generic extends SvelteComponent {
32689
32980
  super();
32690
32981
 
32691
32982
  init(this, options, instance$7, create_fragment$7, safe_not_equal, {
32692
- form: 1,
32983
+ componentStyle: 1,
32984
+ form: 2,
32693
32985
  formEl: 0,
32694
- journey: 2,
32695
- metadata: 3,
32696
- step: 4
32986
+ journey: 3,
32987
+ metadata: 4,
32988
+ step: 5
32697
32989
  });
32698
32990
  }
32699
32991
  }
@@ -32806,13 +33098,101 @@ class Key_icon extends SvelteComponent {
32806
33098
 
32807
33099
  function get_each_context$2(ctx, list, i) {
32808
33100
  const child_ctx = ctx.slice();
32809
- child_ctx[10] = list[i];
32810
- child_ctx[12] = i;
33101
+ child_ctx[11] = list[i];
33102
+ child_ctx[13] = i;
32811
33103
  return child_ctx;
32812
33104
  }
32813
33105
 
32814
- // (39:2) {#if form?.icon}
33106
+ // (38:2) {#if componentStyle !== 'inline'}
32815
33107
  function create_if_block_2$3(ctx) {
33108
+ let t0;
33109
+ let h1;
33110
+ let t1;
33111
+ let t2;
33112
+ let p;
33113
+ let t3;
33114
+ let current;
33115
+ let if_block = /*form*/ ctx[2]?.icon && create_if_block_3$3();
33116
+
33117
+ t1 = new Locale_strings({
33118
+ props: { key: "twoFactorAuthentication" }
33119
+ });
33120
+
33121
+ t3 = new Locale_strings({
33122
+ props: { key: "useTheAuthenticatorAppOnYourPhone" }
33123
+ });
33124
+
33125
+ return {
33126
+ c() {
33127
+ if (if_block) if_block.c();
33128
+ t0 = space();
33129
+ h1 = element("h1");
33130
+ create_component(t1.$$.fragment);
33131
+ t2 = space();
33132
+ p = element("p");
33133
+ create_component(t3.$$.fragment);
33134
+ attr(h1, "class", "tw_primary-header dark:tw_primary-header_dark");
33135
+ attr(p, "class", "tw_text-center tw_text-sm tw_-mt-5 tw_mb-2 tw_py-4 tw_text-secondary-dark dark:tw_text-secondary-light");
33136
+ },
33137
+ m(target, anchor) {
33138
+ if (if_block) if_block.m(target, anchor);
33139
+ insert(target, t0, anchor);
33140
+ insert(target, h1, anchor);
33141
+ mount_component(t1, h1, null);
33142
+ insert(target, t2, anchor);
33143
+ insert(target, p, anchor);
33144
+ mount_component(t3, p, null);
33145
+ current = true;
33146
+ },
33147
+ p(ctx, dirty) {
33148
+ if (/*form*/ ctx[2]?.icon) {
33149
+ if (if_block) {
33150
+ if (dirty & /*form*/ 4) {
33151
+ transition_in(if_block, 1);
33152
+ }
33153
+ } else {
33154
+ if_block = create_if_block_3$3();
33155
+ if_block.c();
33156
+ transition_in(if_block, 1);
33157
+ if_block.m(t0.parentNode, t0);
33158
+ }
33159
+ } else if (if_block) {
33160
+ group_outros();
33161
+
33162
+ transition_out(if_block, 1, 1, () => {
33163
+ if_block = null;
33164
+ });
33165
+
33166
+ check_outros();
33167
+ }
33168
+ },
33169
+ i(local) {
33170
+ if (current) return;
33171
+ transition_in(if_block);
33172
+ transition_in(t1.$$.fragment, local);
33173
+ transition_in(t3.$$.fragment, local);
33174
+ current = true;
33175
+ },
33176
+ o(local) {
33177
+ transition_out(if_block);
33178
+ transition_out(t1.$$.fragment, local);
33179
+ transition_out(t3.$$.fragment, local);
33180
+ current = false;
33181
+ },
33182
+ d(detaching) {
33183
+ if (if_block) if_block.d(detaching);
33184
+ if (detaching) detach(t0);
33185
+ if (detaching) detach(h1);
33186
+ destroy_component(t1);
33187
+ if (detaching) detach(t2);
33188
+ if (detaching) detach(p);
33189
+ destroy_component(t3);
33190
+ }
33191
+ };
33192
+ }
33193
+
33194
+ // (39:4) {#if form?.icon}
33195
+ function create_if_block_3$3(ctx) {
32816
33196
  let div;
32817
33197
  let keyicon;
32818
33198
  let current;
@@ -32851,7 +33231,7 @@ function create_if_block_2$3(ctx) {
32851
33231
  };
32852
33232
  }
32853
33233
 
32854
- // (53:2) {#if form?.message}
33234
+ // (54:2) {#if form?.message}
32855
33235
  function create_if_block_1$3(ctx) {
32856
33236
  let alert;
32857
33237
  let current;
@@ -32859,7 +33239,7 @@ function create_if_block_1$3(ctx) {
32859
33239
  alert = new Alert({
32860
33240
  props: {
32861
33241
  id: "formFailureMessageAlert",
32862
- needsFocus: /*alertNeedsFocus*/ ctx[5],
33242
+ needsFocus: /*alertNeedsFocus*/ ctx[6],
32863
33243
  type: "error",
32864
33244
  $$slots: { default: [create_default_slot_2$2] },
32865
33245
  $$scope: { ctx }
@@ -32876,9 +33256,9 @@ function create_if_block_1$3(ctx) {
32876
33256
  },
32877
33257
  p(ctx, dirty) {
32878
33258
  const alert_changes = {};
32879
- if (dirty & /*alertNeedsFocus*/ 32) alert_changes.needsFocus = /*alertNeedsFocus*/ ctx[5];
33259
+ if (dirty & /*alertNeedsFocus*/ 64) alert_changes.needsFocus = /*alertNeedsFocus*/ ctx[6];
32880
33260
 
32881
- if (dirty & /*$$scope, formMessageKey, form*/ 8258) {
33261
+ if (dirty & /*$$scope, formMessageKey, form*/ 16516) {
32882
33262
  alert_changes.$$scope = { dirty, ctx };
32883
33263
  }
32884
33264
 
@@ -32899,9 +33279,9 @@ function create_if_block_1$3(ctx) {
32899
33279
  };
32900
33280
  }
32901
33281
 
32902
- // (54:4) <Alert id="formFailureMessageAlert" needsFocus={alertNeedsFocus} type="error">
33282
+ // (55:4) <Alert id="formFailureMessageAlert" needsFocus={alertNeedsFocus} type="error">
32903
33283
  function create_default_slot_2$2(ctx) {
32904
- let t_value = interpolate(/*formMessageKey*/ ctx[6], null, /*form*/ ctx[1]?.message) + "";
33284
+ let t_value = interpolate(/*formMessageKey*/ ctx[7], null, /*form*/ ctx[2]?.message) + "";
32905
33285
  let t;
32906
33286
 
32907
33287
  return {
@@ -32912,7 +33292,7 @@ function create_default_slot_2$2(ctx) {
32912
33292
  insert(target, t, anchor);
32913
33293
  },
32914
33294
  p(ctx, dirty) {
32915
- if (dirty & /*formMessageKey, form*/ 66 && t_value !== (t_value = interpolate(/*formMessageKey*/ ctx[6], null, /*form*/ ctx[1]?.message) + "")) set_data(t, t_value);
33295
+ if (dirty & /*formMessageKey, form*/ 132 && t_value !== (t_value = interpolate(/*formMessageKey*/ ctx[7], null, /*form*/ ctx[2]?.message) + "")) set_data(t, t_value);
32916
33296
  },
32917
33297
  d(detaching) {
32918
33298
  if (detaching) detach(t);
@@ -32920,7 +33300,7 @@ function create_default_slot_2$2(ctx) {
32920
33300
  };
32921
33301
  }
32922
33302
 
32923
- // (59:2) {#each step?.callbacks as callback, idx}
33303
+ // (60:2) {#each step?.callbacks as callback, idx}
32924
33304
  function create_each_block$2(ctx) {
32925
33305
  let callbackmapper;
32926
33306
  let current;
@@ -32928,11 +33308,11 @@ function create_each_block$2(ctx) {
32928
33308
  callbackmapper = new Callback_mapper({
32929
33309
  props: {
32930
33310
  props: {
32931
- callback: /*callback*/ ctx[10],
32932
- callbackMetadata: /*metadata*/ ctx[3]?.callbacks[/*idx*/ ctx[12]],
32933
- selfSubmitFunction: /*determineSubmission*/ ctx[8],
32934
- stepMetadata: /*metadata*/ ctx[3]?.step && { .../*metadata*/ ctx[3].step },
32935
- style: /*$style*/ ctx[7]
33311
+ callback: /*callback*/ ctx[11],
33312
+ callbackMetadata: /*metadata*/ ctx[4]?.callbacks[/*idx*/ ctx[13]],
33313
+ selfSubmitFunction: /*determineSubmission*/ ctx[9],
33314
+ stepMetadata: /*metadata*/ ctx[4]?.step && { .../*metadata*/ ctx[4].step },
33315
+ style: /*$style*/ ctx[8]
32936
33316
  }
32937
33317
  }
32938
33318
  });
@@ -32948,12 +33328,12 @@ function create_each_block$2(ctx) {
32948
33328
  p(ctx, dirty) {
32949
33329
  const callbackmapper_changes = {};
32950
33330
 
32951
- if (dirty & /*step, metadata, $style*/ 152) callbackmapper_changes.props = {
32952
- callback: /*callback*/ ctx[10],
32953
- callbackMetadata: /*metadata*/ ctx[3]?.callbacks[/*idx*/ ctx[12]],
32954
- selfSubmitFunction: /*determineSubmission*/ ctx[8],
32955
- stepMetadata: /*metadata*/ ctx[3]?.step && { .../*metadata*/ ctx[3].step },
32956
- style: /*$style*/ ctx[7]
33331
+ if (dirty & /*step, metadata, $style*/ 304) callbackmapper_changes.props = {
33332
+ callback: /*callback*/ ctx[11],
33333
+ callbackMetadata: /*metadata*/ ctx[4]?.callbacks[/*idx*/ ctx[13]],
33334
+ selfSubmitFunction: /*determineSubmission*/ ctx[9],
33335
+ stepMetadata: /*metadata*/ ctx[4]?.step && { .../*metadata*/ ctx[4].step },
33336
+ style: /*$style*/ ctx[8]
32957
33337
  };
32958
33338
 
32959
33339
  callbackmapper.$set(callbackmapper_changes);
@@ -32973,14 +33353,14 @@ function create_each_block$2(ctx) {
32973
33353
  };
32974
33354
  }
32975
33355
 
32976
- // (71:2) {#if metadata?.step?.derived.isUserInputOptional || !metadata?.step?.derived.isStepSelfSubmittable}
33356
+ // (72:2) {#if metadata?.step?.derived.isUserInputOptional || !metadata?.step?.derived.isStepSelfSubmittable}
32977
33357
  function create_if_block$4(ctx) {
32978
33358
  let button;
32979
33359
  let current;
32980
33360
 
32981
33361
  button = new Button({
32982
33362
  props: {
32983
- busy: /*journey*/ ctx[2]?.loading,
33363
+ busy: /*journey*/ ctx[3]?.loading,
32984
33364
  style: "primary",
32985
33365
  type: "submit",
32986
33366
  width: "full",
@@ -32999,9 +33379,9 @@ function create_if_block$4(ctx) {
32999
33379
  },
33000
33380
  p(ctx, dirty) {
33001
33381
  const button_changes = {};
33002
- if (dirty & /*journey*/ 4) button_changes.busy = /*journey*/ ctx[2]?.loading;
33382
+ if (dirty & /*journey*/ 8) button_changes.busy = /*journey*/ ctx[3]?.loading;
33003
33383
 
33004
- if (dirty & /*$$scope*/ 8192) {
33384
+ if (dirty & /*$$scope*/ 16384) {
33005
33385
  button_changes.$$scope = { dirty, ctx };
33006
33386
  }
33007
33387
 
@@ -33022,7 +33402,7 @@ function create_if_block$4(ctx) {
33022
33402
  };
33023
33403
  }
33024
33404
 
33025
- // (72:4) <Button busy={journey?.loading} style="primary" type="submit" width="full">
33405
+ // (73:4) <Button busy={journey?.loading} style="primary" type="submit" width="full">
33026
33406
  function create_default_slot_1$3(ctx) {
33027
33407
  let t;
33028
33408
  let current;
@@ -33052,31 +33432,16 @@ function create_default_slot_1$3(ctx) {
33052
33432
  };
33053
33433
  }
33054
33434
 
33055
- // (38:0) <Form bind:formEl ariaDescribedBy="formFailureMessageAlert" onSubmitWhenValid={form?.submit}>
33435
+ // (37:0) <Form bind:formEl ariaDescribedBy="formFailureMessageAlert" onSubmitWhenValid={form?.submit}>
33056
33436
  function create_default_slot$4(ctx) {
33057
33437
  let t0;
33058
- let h1;
33059
33438
  let t1;
33060
33439
  let t2;
33061
- let p;
33062
- let t3;
33063
- let t4;
33064
- let t5;
33065
- let t6;
33066
33440
  let if_block2_anchor;
33067
33441
  let current;
33068
- let if_block0 = /*form*/ ctx[1]?.icon && create_if_block_2$3();
33069
-
33070
- t1 = new Locale_strings({
33071
- props: { key: "twoFactorAuthentication" }
33072
- });
33073
-
33074
- t3 = new Locale_strings({
33075
- props: { key: "useTheAuthenticatorAppOnYourPhone" }
33076
- });
33077
-
33078
- let if_block1 = /*form*/ ctx[1]?.message && create_if_block_1$3(ctx);
33079
- let each_value = /*step*/ ctx[4]?.callbacks;
33442
+ let if_block0 = /*componentStyle*/ ctx[1] !== 'inline' && create_if_block_2$3(ctx);
33443
+ let if_block1 = /*form*/ ctx[2]?.message && create_if_block_1$3(ctx);
33444
+ let each_value = /*step*/ ctx[5]?.callbacks;
33080
33445
  let each_blocks = [];
33081
33446
 
33082
33447
  for (let i = 0; i < each_value.length; i += 1) {
@@ -33087,60 +33452,48 @@ function create_default_slot$4(ctx) {
33087
33452
  each_blocks[i] = null;
33088
33453
  });
33089
33454
 
33090
- let if_block2 = (/*metadata*/ ctx[3]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[3]?.step?.derived.isStepSelfSubmittable) && create_if_block$4(ctx);
33455
+ let if_block2 = (/*metadata*/ ctx[4]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[4]?.step?.derived.isStepSelfSubmittable) && create_if_block$4(ctx);
33091
33456
 
33092
33457
  return {
33093
33458
  c() {
33094
33459
  if (if_block0) if_block0.c();
33095
33460
  t0 = space();
33096
- h1 = element("h1");
33097
- create_component(t1.$$.fragment);
33098
- t2 = space();
33099
- p = element("p");
33100
- create_component(t3.$$.fragment);
33101
- t4 = space();
33102
33461
  if (if_block1) if_block1.c();
33103
- t5 = space();
33462
+ t1 = space();
33104
33463
 
33105
33464
  for (let i = 0; i < each_blocks.length; i += 1) {
33106
33465
  each_blocks[i].c();
33107
33466
  }
33108
33467
 
33109
- t6 = space();
33468
+ t2 = space();
33110
33469
  if (if_block2) if_block2.c();
33111
33470
  if_block2_anchor = empty();
33112
- attr(h1, "class", "tw_primary-header dark:tw_primary-header_dark");
33113
- attr(p, "class", "tw_text-center tw_text-sm tw_-mt-5 tw_mb-2 tw_py-4 tw_text-secondary-dark dark:tw_text-secondary-light");
33114
33471
  },
33115
33472
  m(target, anchor) {
33116
33473
  if (if_block0) if_block0.m(target, anchor);
33117
33474
  insert(target, t0, anchor);
33118
- insert(target, h1, anchor);
33119
- mount_component(t1, h1, null);
33120
- insert(target, t2, anchor);
33121
- insert(target, p, anchor);
33122
- mount_component(t3, p, null);
33123
- insert(target, t4, anchor);
33124
33475
  if (if_block1) if_block1.m(target, anchor);
33125
- insert(target, t5, anchor);
33476
+ insert(target, t1, anchor);
33126
33477
 
33127
33478
  for (let i = 0; i < each_blocks.length; i += 1) {
33128
33479
  each_blocks[i].m(target, anchor);
33129
33480
  }
33130
33481
 
33131
- insert(target, t6, anchor);
33482
+ insert(target, t2, anchor);
33132
33483
  if (if_block2) if_block2.m(target, anchor);
33133
33484
  insert(target, if_block2_anchor, anchor);
33134
33485
  current = true;
33135
33486
  },
33136
33487
  p(ctx, dirty) {
33137
- if (/*form*/ ctx[1]?.icon) {
33488
+ if (/*componentStyle*/ ctx[1] !== 'inline') {
33138
33489
  if (if_block0) {
33139
- if (dirty & /*form*/ 2) {
33490
+ if_block0.p(ctx, dirty);
33491
+
33492
+ if (dirty & /*componentStyle*/ 2) {
33140
33493
  transition_in(if_block0, 1);
33141
33494
  }
33142
33495
  } else {
33143
- if_block0 = create_if_block_2$3();
33496
+ if_block0 = create_if_block_2$3(ctx);
33144
33497
  if_block0.c();
33145
33498
  transition_in(if_block0, 1);
33146
33499
  if_block0.m(t0.parentNode, t0);
@@ -33155,18 +33508,18 @@ function create_default_slot$4(ctx) {
33155
33508
  check_outros();
33156
33509
  }
33157
33510
 
33158
- if (/*form*/ ctx[1]?.message) {
33511
+ if (/*form*/ ctx[2]?.message) {
33159
33512
  if (if_block1) {
33160
33513
  if_block1.p(ctx, dirty);
33161
33514
 
33162
- if (dirty & /*form*/ 2) {
33515
+ if (dirty & /*form*/ 4) {
33163
33516
  transition_in(if_block1, 1);
33164
33517
  }
33165
33518
  } else {
33166
33519
  if_block1 = create_if_block_1$3(ctx);
33167
33520
  if_block1.c();
33168
33521
  transition_in(if_block1, 1);
33169
- if_block1.m(t5.parentNode, t5);
33522
+ if_block1.m(t1.parentNode, t1);
33170
33523
  }
33171
33524
  } else if (if_block1) {
33172
33525
  group_outros();
@@ -33178,8 +33531,8 @@ function create_default_slot$4(ctx) {
33178
33531
  check_outros();
33179
33532
  }
33180
33533
 
33181
- if (dirty & /*step, metadata, determineSubmission, $style*/ 408) {
33182
- each_value = /*step*/ ctx[4]?.callbacks;
33534
+ if (dirty & /*step, metadata, determineSubmission, $style*/ 816) {
33535
+ each_value = /*step*/ ctx[5]?.callbacks;
33183
33536
  let i;
33184
33537
 
33185
33538
  for (i = 0; i < each_value.length; i += 1) {
@@ -33192,7 +33545,7 @@ function create_default_slot$4(ctx) {
33192
33545
  each_blocks[i] = create_each_block$2(child_ctx);
33193
33546
  each_blocks[i].c();
33194
33547
  transition_in(each_blocks[i], 1);
33195
- each_blocks[i].m(t6.parentNode, t6);
33548
+ each_blocks[i].m(t2.parentNode, t2);
33196
33549
  }
33197
33550
  }
33198
33551
 
@@ -33205,11 +33558,11 @@ function create_default_slot$4(ctx) {
33205
33558
  check_outros();
33206
33559
  }
33207
33560
 
33208
- if (/*metadata*/ ctx[3]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[3]?.step?.derived.isStepSelfSubmittable) {
33561
+ if (/*metadata*/ ctx[4]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[4]?.step?.derived.isStepSelfSubmittable) {
33209
33562
  if (if_block2) {
33210
33563
  if_block2.p(ctx, dirty);
33211
33564
 
33212
- if (dirty & /*metadata*/ 8) {
33565
+ if (dirty & /*metadata*/ 16) {
33213
33566
  transition_in(if_block2, 1);
33214
33567
  }
33215
33568
  } else {
@@ -33231,8 +33584,6 @@ function create_default_slot$4(ctx) {
33231
33584
  i(local) {
33232
33585
  if (current) return;
33233
33586
  transition_in(if_block0);
33234
- transition_in(t1.$$.fragment, local);
33235
- transition_in(t3.$$.fragment, local);
33236
33587
  transition_in(if_block1);
33237
33588
 
33238
33589
  for (let i = 0; i < each_value.length; i += 1) {
@@ -33244,8 +33595,6 @@ function create_default_slot$4(ctx) {
33244
33595
  },
33245
33596
  o(local) {
33246
33597
  transition_out(if_block0);
33247
- transition_out(t1.$$.fragment, local);
33248
- transition_out(t3.$$.fragment, local);
33249
33598
  transition_out(if_block1);
33250
33599
  each_blocks = each_blocks.filter(Boolean);
33251
33600
 
@@ -33259,16 +33608,10 @@ function create_default_slot$4(ctx) {
33259
33608
  d(detaching) {
33260
33609
  if (if_block0) if_block0.d(detaching);
33261
33610
  if (detaching) detach(t0);
33262
- if (detaching) detach(h1);
33263
- destroy_component(t1);
33264
- if (detaching) detach(t2);
33265
- if (detaching) detach(p);
33266
- destroy_component(t3);
33267
- if (detaching) detach(t4);
33268
33611
  if (if_block1) if_block1.d(detaching);
33269
- if (detaching) detach(t5);
33612
+ if (detaching) detach(t1);
33270
33613
  destroy_each(each_blocks, detaching);
33271
- if (detaching) detach(t6);
33614
+ if (detaching) detach(t2);
33272
33615
  if (if_block2) if_block2.d(detaching);
33273
33616
  if (detaching) detach(if_block2_anchor);
33274
33617
  }
@@ -33281,12 +33624,12 @@ function create_fragment$5(ctx) {
33281
33624
  let current;
33282
33625
 
33283
33626
  function form_1_formEl_binding(value) {
33284
- /*form_1_formEl_binding*/ ctx[9](value);
33627
+ /*form_1_formEl_binding*/ ctx[10](value);
33285
33628
  }
33286
33629
 
33287
33630
  let form_1_props = {
33288
33631
  ariaDescribedBy: "formFailureMessageAlert",
33289
- onSubmitWhenValid: /*form*/ ctx[1]?.submit,
33632
+ onSubmitWhenValid: /*form*/ ctx[2]?.submit,
33290
33633
  $$slots: { default: [create_default_slot$4] },
33291
33634
  $$scope: { ctx }
33292
33635
  };
@@ -33308,9 +33651,9 @@ function create_fragment$5(ctx) {
33308
33651
  },
33309
33652
  p(ctx, [dirty]) {
33310
33653
  const form_1_changes = {};
33311
- if (dirty & /*form*/ 2) form_1_changes.onSubmitWhenValid = /*form*/ ctx[1]?.submit;
33654
+ if (dirty & /*form*/ 4) form_1_changes.onSubmitWhenValid = /*form*/ ctx[2]?.submit;
33312
33655
 
33313
- if (dirty & /*$$scope, journey, metadata, step, $style, alertNeedsFocus, formMessageKey, form*/ 8446) {
33656
+ if (dirty & /*$$scope, journey, metadata, step, $style, alertNeedsFocus, formMessageKey, form, componentStyle*/ 16894) {
33314
33657
  form_1_changes.$$scope = { dirty, ctx };
33315
33658
  }
33316
33659
 
@@ -33339,7 +33682,8 @@ function create_fragment$5(ctx) {
33339
33682
 
33340
33683
  function instance$5($$self, $$props, $$invalidate) {
33341
33684
  let $style;
33342
- component_subscribe($$self, styleStore, $$value => $$invalidate(7, $style = $$value));
33685
+ component_subscribe($$self, styleStore, $$value => $$invalidate(8, $style = $$value));
33686
+ let { componentStyle } = $$props;
33343
33687
  let { form } = $$props;
33344
33688
  let { formEl = null } = $$props;
33345
33689
  let { journey } = $$props;
@@ -33358,7 +33702,7 @@ function instance$5($$self, $$props, $$invalidate) {
33358
33702
  }
33359
33703
 
33360
33704
  afterUpdate(() => {
33361
- $$invalidate(5, alertNeedsFocus = !!form?.message);
33705
+ $$invalidate(6, alertNeedsFocus = !!form?.message);
33362
33706
  });
33363
33707
 
33364
33708
  function form_1_formEl_binding(value) {
@@ -33367,23 +33711,25 @@ function instance$5($$self, $$props, $$invalidate) {
33367
33711
  }
33368
33712
 
33369
33713
  $$self.$$set = $$props => {
33370
- if ('form' in $$props) $$invalidate(1, form = $$props.form);
33714
+ if ('componentStyle' in $$props) $$invalidate(1, componentStyle = $$props.componentStyle);
33715
+ if ('form' in $$props) $$invalidate(2, form = $$props.form);
33371
33716
  if ('formEl' in $$props) $$invalidate(0, formEl = $$props.formEl);
33372
- if ('journey' in $$props) $$invalidate(2, journey = $$props.journey);
33373
- if ('metadata' in $$props) $$invalidate(3, metadata = $$props.metadata);
33374
- if ('step' in $$props) $$invalidate(4, step = $$props.step);
33717
+ if ('journey' in $$props) $$invalidate(3, journey = $$props.journey);
33718
+ if ('metadata' in $$props) $$invalidate(4, metadata = $$props.metadata);
33719
+ if ('step' in $$props) $$invalidate(5, step = $$props.step);
33375
33720
  };
33376
33721
 
33377
33722
  $$self.$$.update = () => {
33378
- if ($$self.$$.dirty & /*form*/ 2) {
33723
+ if ($$self.$$.dirty & /*form*/ 4) {
33379
33724
  {
33380
- $$invalidate(6, formMessageKey = convertStringToKey(form?.message));
33725
+ $$invalidate(7, formMessageKey = convertStringToKey(form?.message));
33381
33726
  }
33382
33727
  }
33383
33728
  };
33384
33729
 
33385
33730
  return [
33386
33731
  formEl,
33732
+ componentStyle,
33387
33733
  form,
33388
33734
  journey,
33389
33735
  metadata,
@@ -33401,11 +33747,12 @@ class One_time_password extends SvelteComponent {
33401
33747
  super();
33402
33748
 
33403
33749
  init(this, options, instance$5, create_fragment$5, safe_not_equal, {
33404
- form: 1,
33750
+ componentStyle: 1,
33751
+ form: 2,
33405
33752
  formEl: 0,
33406
- journey: 2,
33407
- metadata: 3,
33408
- step: 4
33753
+ journey: 3,
33754
+ metadata: 4,
33755
+ step: 5
33409
33756
  });
33410
33757
  }
33411
33758
  }
@@ -33518,13 +33865,100 @@ class New_user_icon extends SvelteComponent {
33518
33865
 
33519
33866
  function get_each_context$1(ctx, list, i) {
33520
33867
  const child_ctx = ctx.slice();
33521
- child_ctx[12] = list[i];
33522
- child_ctx[14] = i;
33868
+ child_ctx[13] = list[i];
33869
+ child_ctx[15] = i;
33523
33870
  return child_ctx;
33524
33871
  }
33525
33872
 
33526
- // (41:2) {#if form?.icon}
33873
+ // (50:2) {#if componentStyle !== 'inline'}
33527
33874
  function create_if_block_2$2(ctx) {
33875
+ let t0;
33876
+ let h1;
33877
+ let t1;
33878
+ let t2;
33879
+ let p;
33880
+ let t3;
33881
+ let current;
33882
+ let if_block = /*form*/ ctx[2]?.icon && create_if_block_3$2();
33883
+ t1 = new Locale_strings({ props: { key: "registerHeader" } });
33884
+
33885
+ t3 = new Locale_strings({
33886
+ props: { key: "alreadyHaveAnAccount", html: true }
33887
+ });
33888
+
33889
+ return {
33890
+ c() {
33891
+ if (if_block) if_block.c();
33892
+ t0 = space();
33893
+ h1 = element("h1");
33894
+ create_component(t1.$$.fragment);
33895
+ t2 = space();
33896
+ p = element("p");
33897
+ create_component(t3.$$.fragment);
33898
+ attr(h1, "class", "tw_primary-header dark:tw_primary-header_dark");
33899
+ attr(p, "class", "tw_text-base tw_text-center tw_-mt-5 tw_mb-2 tw_py-4 tw_text-secondary-dark dark:tw_text-secondary-light");
33900
+ },
33901
+ m(target, anchor) {
33902
+ if (if_block) if_block.m(target, anchor);
33903
+ insert(target, t0, anchor);
33904
+ insert(target, h1, anchor);
33905
+ mount_component(t1, h1, null);
33906
+ insert(target, t2, anchor);
33907
+ insert(target, p, anchor);
33908
+ mount_component(t3, p, null);
33909
+ /*p_binding*/ ctx[11](p);
33910
+ current = true;
33911
+ },
33912
+ p(ctx, dirty) {
33913
+ if (/*form*/ ctx[2]?.icon) {
33914
+ if (if_block) {
33915
+ if (dirty & /*form*/ 4) {
33916
+ transition_in(if_block, 1);
33917
+ }
33918
+ } else {
33919
+ if_block = create_if_block_3$2();
33920
+ if_block.c();
33921
+ transition_in(if_block, 1);
33922
+ if_block.m(t0.parentNode, t0);
33923
+ }
33924
+ } else if (if_block) {
33925
+ group_outros();
33926
+
33927
+ transition_out(if_block, 1, 1, () => {
33928
+ if_block = null;
33929
+ });
33930
+
33931
+ check_outros();
33932
+ }
33933
+ },
33934
+ i(local) {
33935
+ if (current) return;
33936
+ transition_in(if_block);
33937
+ transition_in(t1.$$.fragment, local);
33938
+ transition_in(t3.$$.fragment, local);
33939
+ current = true;
33940
+ },
33941
+ o(local) {
33942
+ transition_out(if_block);
33943
+ transition_out(t1.$$.fragment, local);
33944
+ transition_out(t3.$$.fragment, local);
33945
+ current = false;
33946
+ },
33947
+ d(detaching) {
33948
+ if (if_block) if_block.d(detaching);
33949
+ if (detaching) detach(t0);
33950
+ if (detaching) detach(h1);
33951
+ destroy_component(t1);
33952
+ if (detaching) detach(t2);
33953
+ if (detaching) detach(p);
33954
+ destroy_component(t3);
33955
+ /*p_binding*/ ctx[11](null);
33956
+ }
33957
+ };
33958
+ }
33959
+
33960
+ // (51:4) {#if form?.icon}
33961
+ function create_if_block_3$2(ctx) {
33528
33962
  let div;
33529
33963
  let newusericon;
33530
33964
  let current;
@@ -33563,7 +33997,7 @@ function create_if_block_2$2(ctx) {
33563
33997
  };
33564
33998
  }
33565
33999
 
33566
- // (56:2) {#if form.message}
34000
+ // (67:2) {#if form.message}
33567
34001
  function create_if_block_1$2(ctx) {
33568
34002
  let alert;
33569
34003
  let current;
@@ -33571,7 +34005,7 @@ function create_if_block_1$2(ctx) {
33571
34005
  alert = new Alert({
33572
34006
  props: {
33573
34007
  id: "formFailureMessageAlert",
33574
- needsFocus: /*alertNeedsFocus*/ ctx[5],
34008
+ needsFocus: /*alertNeedsFocus*/ ctx[6],
33575
34009
  type: "error",
33576
34010
  $$slots: { default: [create_default_slot_2$1] },
33577
34011
  $$scope: { ctx }
@@ -33588,9 +34022,9 @@ function create_if_block_1$2(ctx) {
33588
34022
  },
33589
34023
  p(ctx, dirty) {
33590
34024
  const alert_changes = {};
33591
- if (dirty & /*alertNeedsFocus*/ 32) alert_changes.needsFocus = /*alertNeedsFocus*/ ctx[5];
34025
+ if (dirty & /*alertNeedsFocus*/ 64) alert_changes.needsFocus = /*alertNeedsFocus*/ ctx[6];
33592
34026
 
33593
- if (dirty & /*$$scope, formMessageKey, form*/ 32834) {
34027
+ if (dirty & /*$$scope, formMessageKey, form*/ 65668) {
33594
34028
  alert_changes.$$scope = { dirty, ctx };
33595
34029
  }
33596
34030
 
@@ -33611,9 +34045,9 @@ function create_if_block_1$2(ctx) {
33611
34045
  };
33612
34046
  }
33613
34047
 
33614
- // (57:4) <Alert id="formFailureMessageAlert" needsFocus={alertNeedsFocus} type="error">
34048
+ // (68:4) <Alert id="formFailureMessageAlert" needsFocus={alertNeedsFocus} type="error">
33615
34049
  function create_default_slot_2$1(ctx) {
33616
- let t_value = interpolate(/*formMessageKey*/ ctx[6], null, /*form*/ ctx[1]?.message) + "";
34050
+ let t_value = interpolate(/*formMessageKey*/ ctx[7], null, /*form*/ ctx[2]?.message) + "";
33617
34051
  let t;
33618
34052
 
33619
34053
  return {
@@ -33624,7 +34058,7 @@ function create_default_slot_2$1(ctx) {
33624
34058
  insert(target, t, anchor);
33625
34059
  },
33626
34060
  p(ctx, dirty) {
33627
- if (dirty & /*formMessageKey, form*/ 66 && t_value !== (t_value = interpolate(/*formMessageKey*/ ctx[6], null, /*form*/ ctx[1]?.message) + "")) set_data(t, t_value);
34061
+ if (dirty & /*formMessageKey, form*/ 132 && t_value !== (t_value = interpolate(/*formMessageKey*/ ctx[7], null, /*form*/ ctx[2]?.message) + "")) set_data(t, t_value);
33628
34062
  },
33629
34063
  d(detaching) {
33630
34064
  if (detaching) detach(t);
@@ -33632,7 +34066,7 @@ function create_default_slot_2$1(ctx) {
33632
34066
  };
33633
34067
  }
33634
34068
 
33635
- // (62:2) {#each step?.callbacks as callback, idx}
34069
+ // (73:2) {#each step?.callbacks as callback, idx}
33636
34070
  function create_each_block$1(ctx) {
33637
34071
  let callbackmapper;
33638
34072
  let current;
@@ -33640,11 +34074,11 @@ function create_each_block$1(ctx) {
33640
34074
  callbackmapper = new Callback_mapper({
33641
34075
  props: {
33642
34076
  props: {
33643
- callback: /*callback*/ ctx[12],
33644
- callbackMetadata: /*metadata*/ ctx[3]?.callbacks[/*idx*/ ctx[14]],
33645
- selfSubmitFunction: /*determineSubmission*/ ctx[9],
33646
- stepMetadata: /*metadata*/ ctx[3]?.step && { .../*metadata*/ ctx[3].step },
33647
- style: /*$styleStore*/ ctx[8]
34077
+ callback: /*callback*/ ctx[13],
34078
+ callbackMetadata: /*metadata*/ ctx[4]?.callbacks[/*idx*/ ctx[15]],
34079
+ selfSubmitFunction: /*determineSubmission*/ ctx[10],
34080
+ stepMetadata: /*metadata*/ ctx[4]?.step && { .../*metadata*/ ctx[4].step },
34081
+ style: /*$styleStore*/ ctx[9]
33648
34082
  }
33649
34083
  }
33650
34084
  });
@@ -33660,12 +34094,12 @@ function create_each_block$1(ctx) {
33660
34094
  p(ctx, dirty) {
33661
34095
  const callbackmapper_changes = {};
33662
34096
 
33663
- if (dirty & /*step, metadata, $styleStore*/ 280) callbackmapper_changes.props = {
33664
- callback: /*callback*/ ctx[12],
33665
- callbackMetadata: /*metadata*/ ctx[3]?.callbacks[/*idx*/ ctx[14]],
33666
- selfSubmitFunction: /*determineSubmission*/ ctx[9],
33667
- stepMetadata: /*metadata*/ ctx[3]?.step && { .../*metadata*/ ctx[3].step },
33668
- style: /*$styleStore*/ ctx[8]
34097
+ if (dirty & /*step, metadata, $styleStore*/ 560) callbackmapper_changes.props = {
34098
+ callback: /*callback*/ ctx[13],
34099
+ callbackMetadata: /*metadata*/ ctx[4]?.callbacks[/*idx*/ ctx[15]],
34100
+ selfSubmitFunction: /*determineSubmission*/ ctx[10],
34101
+ stepMetadata: /*metadata*/ ctx[4]?.step && { .../*metadata*/ ctx[4].step },
34102
+ style: /*$styleStore*/ ctx[9]
33669
34103
  };
33670
34104
 
33671
34105
  callbackmapper.$set(callbackmapper_changes);
@@ -33685,14 +34119,14 @@ function create_each_block$1(ctx) {
33685
34119
  };
33686
34120
  }
33687
34121
 
33688
- // (74:2) {#if metadata?.step?.derived.isUserInputOptional || !metadata?.step?.derived.isStepSelfSubmittable}
34122
+ // (85:2) {#if metadata?.step?.derived.isUserInputOptional || !metadata?.step?.derived.isStepSelfSubmittable}
33689
34123
  function create_if_block$3(ctx) {
33690
34124
  let button;
33691
34125
  let current;
33692
34126
 
33693
34127
  button = new Button({
33694
34128
  props: {
33695
- busy: /*journey*/ ctx[2]?.loading,
34129
+ busy: /*journey*/ ctx[3]?.loading,
33696
34130
  style: "primary",
33697
34131
  type: "submit",
33698
34132
  width: "full",
@@ -33711,9 +34145,9 @@ function create_if_block$3(ctx) {
33711
34145
  },
33712
34146
  p(ctx, dirty) {
33713
34147
  const button_changes = {};
33714
- if (dirty & /*journey*/ 4) button_changes.busy = /*journey*/ ctx[2]?.loading;
34148
+ if (dirty & /*journey*/ 8) button_changes.busy = /*journey*/ ctx[3]?.loading;
33715
34149
 
33716
- if (dirty & /*$$scope*/ 32768) {
34150
+ if (dirty & /*$$scope*/ 65536) {
33717
34151
  button_changes.$$scope = { dirty, ctx };
33718
34152
  }
33719
34153
 
@@ -33734,7 +34168,7 @@ function create_if_block$3(ctx) {
33734
34168
  };
33735
34169
  }
33736
34170
 
33737
- // (75:4) <Button busy={journey?.loading} style="primary" type="submit" width="full">
34171
+ // (86:4) <Button busy={journey?.loading} style="primary" type="submit" width="full">
33738
34172
  function create_default_slot_1$2(ctx) {
33739
34173
  let t;
33740
34174
  let current;
@@ -33764,28 +34198,16 @@ function create_default_slot_1$2(ctx) {
33764
34198
  };
33765
34199
  }
33766
34200
 
33767
- // (40:0) <Form bind:formEl ariaDescribedBy="formFailureMessageAlert" onSubmitWhenValid={form?.submit}>
34201
+ // (49:0) <Form bind:formEl ariaDescribedBy="formFailureMessageAlert" onSubmitWhenValid={form?.submit}>
33768
34202
  function create_default_slot$3(ctx) {
33769
34203
  let t0;
33770
- let h1;
33771
34204
  let t1;
33772
34205
  let t2;
33773
- let p;
33774
- let t3;
33775
- let t4;
33776
- let t5;
33777
- let t6;
33778
34206
  let if_block2_anchor;
33779
34207
  let current;
33780
- let if_block0 = /*form*/ ctx[1]?.icon && create_if_block_2$2();
33781
- t1 = new Locale_strings({ props: { key: "registerHeader" } });
33782
-
33783
- t3 = new Locale_strings({
33784
- props: { key: "alreadyHaveAnAccount", html: true }
33785
- });
33786
-
33787
- let if_block1 = /*form*/ ctx[1].message && create_if_block_1$2(ctx);
33788
- let each_value = /*step*/ ctx[4]?.callbacks;
34208
+ let if_block0 = /*componentStyle*/ ctx[1] !== 'inline' && create_if_block_2$2(ctx);
34209
+ let if_block1 = /*form*/ ctx[2].message && create_if_block_1$2(ctx);
34210
+ let each_value = /*step*/ ctx[5]?.callbacks;
33789
34211
  let each_blocks = [];
33790
34212
 
33791
34213
  for (let i = 0; i < each_value.length; i += 1) {
@@ -33796,61 +34218,48 @@ function create_default_slot$3(ctx) {
33796
34218
  each_blocks[i] = null;
33797
34219
  });
33798
34220
 
33799
- let if_block2 = (/*metadata*/ ctx[3]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[3]?.step?.derived.isStepSelfSubmittable) && create_if_block$3(ctx);
34221
+ let if_block2 = (/*metadata*/ ctx[4]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[4]?.step?.derived.isStepSelfSubmittable) && create_if_block$3(ctx);
33800
34222
 
33801
34223
  return {
33802
34224
  c() {
33803
34225
  if (if_block0) if_block0.c();
33804
34226
  t0 = space();
33805
- h1 = element("h1");
33806
- create_component(t1.$$.fragment);
33807
- t2 = space();
33808
- p = element("p");
33809
- create_component(t3.$$.fragment);
33810
- t4 = space();
33811
34227
  if (if_block1) if_block1.c();
33812
- t5 = space();
34228
+ t1 = space();
33813
34229
 
33814
34230
  for (let i = 0; i < each_blocks.length; i += 1) {
33815
34231
  each_blocks[i].c();
33816
34232
  }
33817
34233
 
33818
- t6 = space();
34234
+ t2 = space();
33819
34235
  if (if_block2) if_block2.c();
33820
34236
  if_block2_anchor = empty();
33821
- attr(h1, "class", "tw_primary-header dark:tw_primary-header_dark");
33822
- attr(p, "class", "tw_text-base tw_text-center tw_-mt-5 tw_mb-2 tw_py-4 tw_text-secondary-dark dark:tw_text-secondary-light");
33823
34237
  },
33824
34238
  m(target, anchor) {
33825
34239
  if (if_block0) if_block0.m(target, anchor);
33826
34240
  insert(target, t0, anchor);
33827
- insert(target, h1, anchor);
33828
- mount_component(t1, h1, null);
33829
- insert(target, t2, anchor);
33830
- insert(target, p, anchor);
33831
- mount_component(t3, p, null);
33832
- /*p_binding*/ ctx[10](p);
33833
- insert(target, t4, anchor);
33834
34241
  if (if_block1) if_block1.m(target, anchor);
33835
- insert(target, t5, anchor);
34242
+ insert(target, t1, anchor);
33836
34243
 
33837
34244
  for (let i = 0; i < each_blocks.length; i += 1) {
33838
34245
  each_blocks[i].m(target, anchor);
33839
34246
  }
33840
34247
 
33841
- insert(target, t6, anchor);
34248
+ insert(target, t2, anchor);
33842
34249
  if (if_block2) if_block2.m(target, anchor);
33843
34250
  insert(target, if_block2_anchor, anchor);
33844
34251
  current = true;
33845
34252
  },
33846
34253
  p(ctx, dirty) {
33847
- if (/*form*/ ctx[1]?.icon) {
34254
+ if (/*componentStyle*/ ctx[1] !== 'inline') {
33848
34255
  if (if_block0) {
33849
- if (dirty & /*form*/ 2) {
34256
+ if_block0.p(ctx, dirty);
34257
+
34258
+ if (dirty & /*componentStyle*/ 2) {
33850
34259
  transition_in(if_block0, 1);
33851
34260
  }
33852
34261
  } else {
33853
- if_block0 = create_if_block_2$2();
34262
+ if_block0 = create_if_block_2$2(ctx);
33854
34263
  if_block0.c();
33855
34264
  transition_in(if_block0, 1);
33856
34265
  if_block0.m(t0.parentNode, t0);
@@ -33865,18 +34274,18 @@ function create_default_slot$3(ctx) {
33865
34274
  check_outros();
33866
34275
  }
33867
34276
 
33868
- if (/*form*/ ctx[1].message) {
34277
+ if (/*form*/ ctx[2].message) {
33869
34278
  if (if_block1) {
33870
34279
  if_block1.p(ctx, dirty);
33871
34280
 
33872
- if (dirty & /*form*/ 2) {
34281
+ if (dirty & /*form*/ 4) {
33873
34282
  transition_in(if_block1, 1);
33874
34283
  }
33875
34284
  } else {
33876
34285
  if_block1 = create_if_block_1$2(ctx);
33877
34286
  if_block1.c();
33878
34287
  transition_in(if_block1, 1);
33879
- if_block1.m(t5.parentNode, t5);
34288
+ if_block1.m(t1.parentNode, t1);
33880
34289
  }
33881
34290
  } else if (if_block1) {
33882
34291
  group_outros();
@@ -33888,8 +34297,8 @@ function create_default_slot$3(ctx) {
33888
34297
  check_outros();
33889
34298
  }
33890
34299
 
33891
- if (dirty & /*step, metadata, determineSubmission, $styleStore*/ 792) {
33892
- each_value = /*step*/ ctx[4]?.callbacks;
34300
+ if (dirty & /*step, metadata, determineSubmission, $styleStore*/ 1584) {
34301
+ each_value = /*step*/ ctx[5]?.callbacks;
33893
34302
  let i;
33894
34303
 
33895
34304
  for (i = 0; i < each_value.length; i += 1) {
@@ -33902,7 +34311,7 @@ function create_default_slot$3(ctx) {
33902
34311
  each_blocks[i] = create_each_block$1(child_ctx);
33903
34312
  each_blocks[i].c();
33904
34313
  transition_in(each_blocks[i], 1);
33905
- each_blocks[i].m(t6.parentNode, t6);
34314
+ each_blocks[i].m(t2.parentNode, t2);
33906
34315
  }
33907
34316
  }
33908
34317
 
@@ -33915,11 +34324,11 @@ function create_default_slot$3(ctx) {
33915
34324
  check_outros();
33916
34325
  }
33917
34326
 
33918
- if (/*metadata*/ ctx[3]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[3]?.step?.derived.isStepSelfSubmittable) {
34327
+ if (/*metadata*/ ctx[4]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[4]?.step?.derived.isStepSelfSubmittable) {
33919
34328
  if (if_block2) {
33920
34329
  if_block2.p(ctx, dirty);
33921
34330
 
33922
- if (dirty & /*metadata*/ 8) {
34331
+ if (dirty & /*metadata*/ 16) {
33923
34332
  transition_in(if_block2, 1);
33924
34333
  }
33925
34334
  } else {
@@ -33941,8 +34350,6 @@ function create_default_slot$3(ctx) {
33941
34350
  i(local) {
33942
34351
  if (current) return;
33943
34352
  transition_in(if_block0);
33944
- transition_in(t1.$$.fragment, local);
33945
- transition_in(t3.$$.fragment, local);
33946
34353
  transition_in(if_block1);
33947
34354
 
33948
34355
  for (let i = 0; i < each_value.length; i += 1) {
@@ -33954,8 +34361,6 @@ function create_default_slot$3(ctx) {
33954
34361
  },
33955
34362
  o(local) {
33956
34363
  transition_out(if_block0);
33957
- transition_out(t1.$$.fragment, local);
33958
- transition_out(t3.$$.fragment, local);
33959
34364
  transition_out(if_block1);
33960
34365
  each_blocks = each_blocks.filter(Boolean);
33961
34366
 
@@ -33969,17 +34374,10 @@ function create_default_slot$3(ctx) {
33969
34374
  d(detaching) {
33970
34375
  if (if_block0) if_block0.d(detaching);
33971
34376
  if (detaching) detach(t0);
33972
- if (detaching) detach(h1);
33973
- destroy_component(t1);
33974
- if (detaching) detach(t2);
33975
- if (detaching) detach(p);
33976
- destroy_component(t3);
33977
- /*p_binding*/ ctx[10](null);
33978
- if (detaching) detach(t4);
33979
34377
  if (if_block1) if_block1.d(detaching);
33980
- if (detaching) detach(t5);
34378
+ if (detaching) detach(t1);
33981
34379
  destroy_each(each_blocks, detaching);
33982
- if (detaching) detach(t6);
34380
+ if (detaching) detach(t2);
33983
34381
  if (if_block2) if_block2.d(detaching);
33984
34382
  if (detaching) detach(if_block2_anchor);
33985
34383
  }
@@ -33992,12 +34390,12 @@ function create_fragment$3(ctx) {
33992
34390
  let current;
33993
34391
 
33994
34392
  function form_1_formEl_binding(value) {
33995
- /*form_1_formEl_binding*/ ctx[11](value);
34393
+ /*form_1_formEl_binding*/ ctx[12](value);
33996
34394
  }
33997
34395
 
33998
34396
  let form_1_props = {
33999
34397
  ariaDescribedBy: "formFailureMessageAlert",
34000
- onSubmitWhenValid: /*form*/ ctx[1]?.submit,
34398
+ onSubmitWhenValid: /*form*/ ctx[2]?.submit,
34001
34399
  $$slots: { default: [create_default_slot$3] },
34002
34400
  $$scope: { ctx }
34003
34401
  };
@@ -34019,9 +34417,9 @@ function create_fragment$3(ctx) {
34019
34417
  },
34020
34418
  p(ctx, [dirty]) {
34021
34419
  const form_1_changes = {};
34022
- if (dirty & /*form*/ 2) form_1_changes.onSubmitWhenValid = /*form*/ ctx[1]?.submit;
34420
+ if (dirty & /*form*/ 4) form_1_changes.onSubmitWhenValid = /*form*/ ctx[2]?.submit;
34023
34421
 
34024
- if (dirty & /*$$scope, journey, metadata, step, $styleStore, alertNeedsFocus, formMessageKey, form, linkWrapper*/ 33278) {
34422
+ if (dirty & /*$$scope, journey, metadata, step, $styleStore, alertNeedsFocus, formMessageKey, form, linkWrapper, componentStyle*/ 66558) {
34025
34423
  form_1_changes.$$scope = { dirty, ctx };
34026
34424
  }
34027
34425
 
@@ -34050,7 +34448,8 @@ function create_fragment$3(ctx) {
34050
34448
 
34051
34449
  function instance$3($$self, $$props, $$invalidate) {
34052
34450
  let $styleStore;
34053
- component_subscribe($$self, styleStore, $$value => $$invalidate(8, $styleStore = $$value));
34451
+ component_subscribe($$self, styleStore, $$value => $$invalidate(9, $styleStore = $$value));
34452
+ let { componentStyle } = $$props;
34054
34453
  let { form } = $$props;
34055
34454
  let { formEl = null } = $$props;
34056
34455
  let { journey } = $$props;
@@ -34070,15 +34469,25 @@ function instance$3($$self, $$props, $$invalidate) {
34070
34469
  }
34071
34470
 
34072
34471
  afterUpdate(() => {
34073
- $$invalidate(5, alertNeedsFocus = !!form?.message);
34472
+ $$invalidate(6, alertNeedsFocus = !!form?.message);
34074
34473
  });
34075
34474
 
34076
- onMount(() => captureLinks(linkWrapper, journey));
34475
+ onMount(() => {
34476
+ if (componentStyle === 'modal') {
34477
+ captureLinks(linkWrapper, journey);
34478
+ }
34479
+ });
34480
+
34481
+ onMount(() => {
34482
+ if (componentStyle === 'modal') {
34483
+ captureLinks(linkWrapper, journey);
34484
+ }
34485
+ });
34077
34486
 
34078
34487
  function p_binding($$value) {
34079
34488
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
34080
34489
  linkWrapper = $$value;
34081
- $$invalidate(7, linkWrapper);
34490
+ $$invalidate(8, linkWrapper);
34082
34491
  });
34083
34492
  }
34084
34493
 
@@ -34088,23 +34497,25 @@ function instance$3($$self, $$props, $$invalidate) {
34088
34497
  }
34089
34498
 
34090
34499
  $$self.$$set = $$props => {
34091
- if ('form' in $$props) $$invalidate(1, form = $$props.form);
34500
+ if ('componentStyle' in $$props) $$invalidate(1, componentStyle = $$props.componentStyle);
34501
+ if ('form' in $$props) $$invalidate(2, form = $$props.form);
34092
34502
  if ('formEl' in $$props) $$invalidate(0, formEl = $$props.formEl);
34093
- if ('journey' in $$props) $$invalidate(2, journey = $$props.journey);
34094
- if ('metadata' in $$props) $$invalidate(3, metadata = $$props.metadata);
34095
- if ('step' in $$props) $$invalidate(4, step = $$props.step);
34503
+ if ('journey' in $$props) $$invalidate(3, journey = $$props.journey);
34504
+ if ('metadata' in $$props) $$invalidate(4, metadata = $$props.metadata);
34505
+ if ('step' in $$props) $$invalidate(5, step = $$props.step);
34096
34506
  };
34097
34507
 
34098
34508
  $$self.$$.update = () => {
34099
- if ($$self.$$.dirty & /*form*/ 2) {
34509
+ if ($$self.$$.dirty & /*form*/ 4) {
34100
34510
  {
34101
- $$invalidate(6, formMessageKey = convertStringToKey(form?.message));
34511
+ $$invalidate(7, formMessageKey = convertStringToKey(form?.message));
34102
34512
  }
34103
34513
  }
34104
34514
  };
34105
34515
 
34106
34516
  return [
34107
34517
  formEl,
34518
+ componentStyle,
34108
34519
  form,
34109
34520
  journey,
34110
34521
  metadata,
@@ -34124,11 +34535,12 @@ class Registration extends SvelteComponent {
34124
34535
  super();
34125
34536
 
34126
34537
  init(this, options, instance$3, create_fragment$3, safe_not_equal, {
34127
- form: 1,
34538
+ componentStyle: 1,
34539
+ form: 2,
34128
34540
  formEl: 0,
34129
- journey: 2,
34130
- metadata: 3,
34131
- step: 4
34541
+ journey: 3,
34542
+ metadata: 4,
34543
+ step: 5
34132
34544
  });
34133
34545
  }
34134
34546
  }
@@ -34137,13 +34549,79 @@ class Registration extends SvelteComponent {
34137
34549
 
34138
34550
  function get_each_context(ctx, list, i) {
34139
34551
  const child_ctx = ctx.slice();
34140
- child_ctx[14] = list[i];
34141
- child_ctx[16] = i;
34552
+ child_ctx[15] = list[i];
34553
+ child_ctx[17] = i;
34142
34554
  return child_ctx;
34143
34555
  }
34144
34556
 
34145
- // (41:2) {#if form?.icon}
34146
- function create_if_block_2$1(ctx) {
34557
+ // (45:2) {#if componentStyle !== 'inline'}
34558
+ function create_if_block_3$1(ctx) {
34559
+ let t0;
34560
+ let h1;
34561
+ let t1;
34562
+ let current;
34563
+ let if_block = /*form*/ ctx[2]?.icon && create_if_block_4();
34564
+ t1 = new Locale_strings({ props: { key: "loginHeader" } });
34565
+
34566
+ return {
34567
+ c() {
34568
+ if (if_block) if_block.c();
34569
+ t0 = space();
34570
+ h1 = element("h1");
34571
+ create_component(t1.$$.fragment);
34572
+ attr(h1, "class", "tw_primary-header dark:tw_primary-header_dark");
34573
+ },
34574
+ m(target, anchor) {
34575
+ if (if_block) if_block.m(target, anchor);
34576
+ insert(target, t0, anchor);
34577
+ insert(target, h1, anchor);
34578
+ mount_component(t1, h1, null);
34579
+ current = true;
34580
+ },
34581
+ p(ctx, dirty) {
34582
+ if (/*form*/ ctx[2]?.icon) {
34583
+ if (if_block) {
34584
+ if (dirty & /*form*/ 4) {
34585
+ transition_in(if_block, 1);
34586
+ }
34587
+ } else {
34588
+ if_block = create_if_block_4();
34589
+ if_block.c();
34590
+ transition_in(if_block, 1);
34591
+ if_block.m(t0.parentNode, t0);
34592
+ }
34593
+ } else if (if_block) {
34594
+ group_outros();
34595
+
34596
+ transition_out(if_block, 1, 1, () => {
34597
+ if_block = null;
34598
+ });
34599
+
34600
+ check_outros();
34601
+ }
34602
+ },
34603
+ i(local) {
34604
+ if (current) return;
34605
+ transition_in(if_block);
34606
+ transition_in(t1.$$.fragment, local);
34607
+ current = true;
34608
+ },
34609
+ o(local) {
34610
+ transition_out(if_block);
34611
+ transition_out(t1.$$.fragment, local);
34612
+ current = false;
34613
+ },
34614
+ d(detaching) {
34615
+ if (if_block) if_block.d(detaching);
34616
+ if (detaching) detach(t0);
34617
+ if (detaching) detach(h1);
34618
+ destroy_component(t1);
34619
+ }
34620
+ };
34621
+ }
34622
+
34623
+ // (46:4) {#if form?.icon}
34624
+ function create_if_block_4(ctx) {
34147
34625
  let div;
34148
34626
  let keyicon;
34149
34627
  let current;
@@ -34182,15 +34660,15 @@ function create_if_block_2$1(ctx) {
34182
34660
  };
34183
34661
  }
34184
34662
 
34185
- // (50:2) {#if form?.message}
34186
- function create_if_block_1$1(ctx) {
34663
+ // (56:2) {#if form?.message}
34664
+ function create_if_block_2$1(ctx) {
34187
34665
  let alert;
34188
34666
  let current;
34189
34667
 
34190
34668
  alert = new Alert({
34191
34669
  props: {
34192
34670
  id: "formFailureMessageAlert",
34193
- needsFocus: /*alertNeedsFocus*/ ctx[5],
34671
+ needsFocus: /*alertNeedsFocus*/ ctx[6],
34194
34672
  type: "error",
34195
34673
  $$slots: { default: [create_default_slot_2] },
34196
34674
  $$scope: { ctx }
@@ -34207,9 +34685,9 @@ function create_if_block_1$1(ctx) {
34207
34685
  },
34208
34686
  p(ctx, dirty) {
34209
34687
  const alert_changes = {};
34210
- if (dirty & /*alertNeedsFocus*/ 32) alert_changes.needsFocus = /*alertNeedsFocus*/ ctx[5];
34688
+ if (dirty & /*alertNeedsFocus*/ 64) alert_changes.needsFocus = /*alertNeedsFocus*/ ctx[6];
34211
34689
 
34212
- if (dirty & /*$$scope, formMessageKey, form*/ 131138) {
34690
+ if (dirty & /*$$scope, formMessageKey, form*/ 262276) {
34213
34691
  alert_changes.$$scope = { dirty, ctx };
34214
34692
  }
34215
34693
 
@@ -34230,9 +34708,9 @@ function create_if_block_1$1(ctx) {
34230
34708
  };
34231
34709
  }
34232
34710
 
34233
- // (51:4) <Alert id="formFailureMessageAlert" needsFocus={alertNeedsFocus} type="error">
34711
+ // (57:4) <Alert id="formFailureMessageAlert" needsFocus={alertNeedsFocus} type="error">
34234
34712
  function create_default_slot_2(ctx) {
34235
- let t_value = interpolate(/*formMessageKey*/ ctx[6], null, /*form*/ ctx[1]?.message) + "";
34713
+ let t_value = interpolate(/*formMessageKey*/ ctx[7], null, /*form*/ ctx[2]?.message) + "";
34236
34714
  let t;
34237
34715
 
34238
34716
  return {
@@ -34243,7 +34721,7 @@ function create_default_slot_2(ctx) {
34243
34721
  insert(target, t, anchor);
34244
34722
  },
34245
34723
  p(ctx, dirty) {
34246
- if (dirty & /*formMessageKey, form*/ 66 && t_value !== (t_value = interpolate(/*formMessageKey*/ ctx[6], null, /*form*/ ctx[1]?.message) + "")) set_data(t, t_value);
34724
+ if (dirty & /*formMessageKey, form*/ 132 && t_value !== (t_value = interpolate(/*formMessageKey*/ ctx[7], null, /*form*/ ctx[2]?.message) + "")) set_data(t, t_value);
34247
34725
  },
34248
34726
  d(detaching) {
34249
34727
  if (detaching) detach(t);
@@ -34251,7 +34729,7 @@ function create_default_slot_2(ctx) {
34251
34729
  };
34252
34730
  }
34253
34731
 
34254
- // (56:2) {#each step?.callbacks as callback, idx}
34732
+ // (62:2) {#each step?.callbacks as callback, idx}
34255
34733
  function create_each_block(ctx) {
34256
34734
  let callbackmapper;
34257
34735
  let current;
@@ -34259,11 +34737,11 @@ function create_each_block(ctx) {
34259
34737
  callbackmapper = new Callback_mapper({
34260
34738
  props: {
34261
34739
  props: {
34262
- callback: /*callback*/ ctx[14],
34263
- callbackMetadata: /*metadata*/ ctx[3]?.callbacks[/*idx*/ ctx[16]],
34264
- selfSubmitFunction: /*determineSubmission*/ ctx[9],
34265
- stepMetadata: /*metadata*/ ctx[3]?.step && { .../*metadata*/ ctx[3].step },
34266
- style: /*$styleStore*/ ctx[8]
34740
+ callback: /*callback*/ ctx[15],
34741
+ callbackMetadata: /*metadata*/ ctx[4]?.callbacks[/*idx*/ ctx[17]],
34742
+ selfSubmitFunction: /*determineSubmission*/ ctx[10],
34743
+ stepMetadata: /*metadata*/ ctx[4]?.step && { .../*metadata*/ ctx[4].step },
34744
+ style: /*$styleStore*/ ctx[9]
34267
34745
  }
34268
34746
  }
34269
34747
  });
@@ -34279,12 +34757,12 @@ function create_each_block(ctx) {
34279
34757
  p(ctx, dirty) {
34280
34758
  const callbackmapper_changes = {};
34281
34759
 
34282
- if (dirty & /*step, metadata, $styleStore*/ 280) callbackmapper_changes.props = {
34283
- callback: /*callback*/ ctx[14],
34284
- callbackMetadata: /*metadata*/ ctx[3]?.callbacks[/*idx*/ ctx[16]],
34285
- selfSubmitFunction: /*determineSubmission*/ ctx[9],
34286
- stepMetadata: /*metadata*/ ctx[3]?.step && { .../*metadata*/ ctx[3].step },
34287
- style: /*$styleStore*/ ctx[8]
34760
+ if (dirty & /*step, metadata, $styleStore*/ 560) callbackmapper_changes.props = {
34761
+ callback: /*callback*/ ctx[15],
34762
+ callbackMetadata: /*metadata*/ ctx[4]?.callbacks[/*idx*/ ctx[17]],
34763
+ selfSubmitFunction: /*determineSubmission*/ ctx[10],
34764
+ stepMetadata: /*metadata*/ ctx[4]?.step && { .../*metadata*/ ctx[4].step },
34765
+ style: /*$styleStore*/ ctx[9]
34288
34766
  };
34289
34767
 
34290
34768
  callbackmapper.$set(callbackmapper_changes);
@@ -34304,14 +34782,14 @@ function create_each_block(ctx) {
34304
34782
  };
34305
34783
  }
34306
34784
 
34307
- // (68:2) {#if metadata?.step?.derived.isUserInputOptional || !metadata?.step?.derived.isStepSelfSubmittable}
34308
- function create_if_block$2(ctx) {
34785
+ // (74:2) {#if metadata?.step?.derived.isUserInputOptional || !metadata?.step?.derived.isStepSelfSubmittable}
34786
+ function create_if_block_1$1(ctx) {
34309
34787
  let button;
34310
34788
  let current;
34311
34789
 
34312
34790
  button = new Button({
34313
34791
  props: {
34314
- busy: /*journey*/ ctx[2]?.loading,
34792
+ busy: /*journey*/ ctx[3]?.loading,
34315
34793
  style: "primary",
34316
34794
  type: "submit",
34317
34795
  width: "full",
@@ -34330,9 +34808,9 @@ function create_if_block$2(ctx) {
34330
34808
  },
34331
34809
  p(ctx, dirty) {
34332
34810
  const button_changes = {};
34333
- if (dirty & /*journey*/ 4) button_changes.busy = /*journey*/ ctx[2]?.loading;
34811
+ if (dirty & /*journey*/ 8) button_changes.busy = /*journey*/ ctx[3]?.loading;
34334
34812
 
34335
- if (dirty & /*$$scope*/ 131072) {
34813
+ if (dirty & /*$$scope*/ 262144) {
34336
34814
  button_changes.$$scope = { dirty, ctx };
34337
34815
  }
34338
34816
 
@@ -34353,7 +34831,7 @@ function create_if_block$2(ctx) {
34353
34831
  };
34354
34832
  }
34355
34833
 
34356
- // (69:4) <Button busy={journey?.loading} style="primary" type="submit" width="full">
34834
+ // (75:4) <Button busy={journey?.loading} style="primary" type="submit" width="full">
34357
34835
  function create_default_slot_1$1(ctx) {
34358
34836
  let t;
34359
34837
  let current;
@@ -34383,31 +34861,99 @@ function create_default_slot_1$1(ctx) {
34383
34861
  };
34384
34862
  }
34385
34863
 
34386
- // (40:0) <Form bind:formEl ariaDescribedBy="formFailureMessageAlert" onSubmitWhenValid={form?.submit}>
34387
- function create_default_slot$2(ctx) {
34388
- let t0;
34389
- let h1;
34390
- let t1;
34391
- let t2;
34392
- let t3;
34393
- let t4;
34394
- let t5;
34864
+ // (80:2) {#if componentStyle !== 'inline'}
34865
+ function create_if_block$2(ctx) {
34395
34866
  let p0;
34396
34867
  let button0;
34397
- let t7;
34868
+ let t1;
34398
34869
  let button1;
34399
- let t9;
34870
+ let t3;
34400
34871
  let hr;
34401
- let t10;
34872
+ let t4;
34402
34873
  let p1;
34403
- let t11;
34874
+ let t5;
34404
34875
  let current;
34405
34876
  let mounted;
34406
34877
  let dispose;
34407
- let if_block0 = /*form*/ ctx[1]?.icon && create_if_block_2$1();
34408
- t1 = new Locale_strings({ props: { key: "loginHeader" } });
34409
- let if_block1 = /*form*/ ctx[1]?.message && create_if_block_1$1(ctx);
34410
- let each_value = /*step*/ ctx[4]?.callbacks;
34878
+
34879
+ t5 = new Locale_strings({
34880
+ props: { key: "dontHaveAnAccount", html: true }
34881
+ });
34882
+
34883
+ return {
34884
+ c() {
34885
+ p0 = element("p");
34886
+ button0 = element("button");
34887
+ button0.textContent = `${interpolate('forgotPassword', null, 'Forgot Password?')}`;
34888
+ t1 = text("\n  \n ");
34889
+ button1 = element("button");
34890
+ button1.textContent = `${interpolate('forgotUsername', null, 'Forgot Username?')}`;
34891
+ t3 = space();
34892
+ hr = element("hr");
34893
+ t4 = space();
34894
+ p1 = element("p");
34895
+ create_component(t5.$$.fragment);
34896
+ attr(p0, "class", "tw_my-4 tw_text-base tw_text-center tw_text-link-dark dark:tw_text-link-light");
34897
+ attr(hr, "class", "tw_border-0 tw_border-b tw_border-secondary-light dark:tw_border-secondary-dark");
34898
+ attr(p1, "class", "tw_text-base tw_text-center tw_py-4 tw_text-secondary-dark dark:tw_text-secondary-light");
34899
+ },
34900
+ m(target, anchor) {
34901
+ insert(target, p0, anchor);
34902
+ append(p0, button0);
34903
+ append(p0, t1);
34904
+ append(p0, button1);
34905
+ insert(target, t3, anchor);
34906
+ insert(target, hr, anchor);
34907
+ insert(target, t4, anchor);
34908
+ insert(target, p1, anchor);
34909
+ mount_component(t5, p1, null);
34910
+ /*p1_binding*/ ctx[13](p1);
34911
+ current = true;
34912
+
34913
+ if (!mounted) {
34914
+ dispose = [
34915
+ listen(button0, "click", prevent_default(/*click_handler*/ ctx[11])),
34916
+ listen(button1, "click", prevent_default(/*click_handler_1*/ ctx[12]))
34917
+ ];
34918
+
34919
+ mounted = true;
34920
+ }
34921
+ },
34922
+ p: noop,
34923
+ i(local) {
34924
+ if (current) return;
34925
+ transition_in(t5.$$.fragment, local);
34926
+ current = true;
34927
+ },
34928
+ o(local) {
34929
+ transition_out(t5.$$.fragment, local);
34930
+ current = false;
34931
+ },
34932
+ d(detaching) {
34933
+ if (detaching) detach(p0);
34934
+ if (detaching) detach(t3);
34935
+ if (detaching) detach(hr);
34936
+ if (detaching) detach(t4);
34937
+ if (detaching) detach(p1);
34938
+ destroy_component(t5);
34939
+ /*p1_binding*/ ctx[13](null);
34940
+ mounted = false;
34941
+ run_all(dispose);
34942
+ }
34943
+ };
34944
+ }
34945
+
34946
+ // (44:0) <Form bind:formEl ariaDescribedBy="formFailureMessageAlert" onSubmitWhenValid={form?.submit}>
34947
+ function create_default_slot$2(ctx) {
34948
+ let t0;
34949
+ let t1;
34950
+ let t2;
34951
+ let t3;
34952
+ let if_block3_anchor;
34953
+ let current;
34954
+ let if_block0 = /*componentStyle*/ ctx[1] !== 'inline' && create_if_block_3$1(ctx);
34955
+ let if_block1 = /*form*/ ctx[2]?.message && create_if_block_2$1(ctx);
34956
+ let each_value = /*step*/ ctx[5]?.callbacks;
34411
34957
  let each_blocks = [];
34412
34958
 
34413
34959
  for (let i = 0; i < each_value.length; i += 1) {
@@ -34418,90 +34964,53 @@ function create_default_slot$2(ctx) {
34418
34964
  each_blocks[i] = null;
34419
34965
  });
34420
34966
 
34421
- let if_block2 = (/*metadata*/ ctx[3]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[3]?.step?.derived.isStepSelfSubmittable) && create_if_block$2(ctx);
34422
-
34423
- t11 = new Locale_strings({
34424
- props: { key: "dontHaveAnAccount", html: true }
34425
- });
34967
+ let if_block2 = (/*metadata*/ ctx[4]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[4]?.step?.derived.isStepSelfSubmittable) && create_if_block_1$1(ctx);
34968
+ let if_block3 = /*componentStyle*/ ctx[1] !== 'inline' && create_if_block$2(ctx);
34426
34969
 
34427
34970
  return {
34428
34971
  c() {
34429
34972
  if (if_block0) if_block0.c();
34430
34973
  t0 = space();
34431
- h1 = element("h1");
34432
- create_component(t1.$$.fragment);
34433
- t2 = space();
34434
34974
  if (if_block1) if_block1.c();
34435
- t3 = space();
34975
+ t1 = space();
34436
34976
 
34437
34977
  for (let i = 0; i < each_blocks.length; i += 1) {
34438
34978
  each_blocks[i].c();
34439
34979
  }
34440
34980
 
34441
- t4 = space();
34981
+ t2 = space();
34442
34982
  if (if_block2) if_block2.c();
34443
- t5 = space();
34444
- p0 = element("p");
34445
- button0 = element("button");
34446
- button0.textContent = `${interpolate('forgotPassword', null, 'Forgot Password?')}`;
34447
- t7 = text("\n  \n ");
34448
- button1 = element("button");
34449
- button1.textContent = `${interpolate('forgotUsername', null, 'Forgot Username?')}`;
34450
- t9 = space();
34451
- hr = element("hr");
34452
- t10 = space();
34453
- p1 = element("p");
34454
- create_component(t11.$$.fragment);
34455
- attr(h1, "class", "tw_primary-header dark:tw_primary-header_dark");
34456
- attr(p0, "class", "tw_my-4 tw_text-base tw_text-center tw_text-link-dark dark:tw_text-link-light");
34457
- attr(hr, "class", "tw_border-0 tw_border-b tw_border-secondary-light dark:tw_border-secondary-dark");
34458
- attr(p1, "class", "tw_text-base tw_text-center tw_py-4 tw_text-secondary-dark dark:tw_text-secondary-light");
34983
+ t3 = space();
34984
+ if (if_block3) if_block3.c();
34985
+ if_block3_anchor = empty();
34459
34986
  },
34460
34987
  m(target, anchor) {
34461
34988
  if (if_block0) if_block0.m(target, anchor);
34462
34989
  insert(target, t0, anchor);
34463
- insert(target, h1, anchor);
34464
- mount_component(t1, h1, null);
34465
- insert(target, t2, anchor);
34466
34990
  if (if_block1) if_block1.m(target, anchor);
34467
- insert(target, t3, anchor);
34991
+ insert(target, t1, anchor);
34468
34992
 
34469
34993
  for (let i = 0; i < each_blocks.length; i += 1) {
34470
34994
  each_blocks[i].m(target, anchor);
34471
34995
  }
34472
34996
 
34473
- insert(target, t4, anchor);
34997
+ insert(target, t2, anchor);
34474
34998
  if (if_block2) if_block2.m(target, anchor);
34475
- insert(target, t5, anchor);
34476
- insert(target, p0, anchor);
34477
- append(p0, button0);
34478
- append(p0, t7);
34479
- append(p0, button1);
34480
- insert(target, t9, anchor);
34481
- insert(target, hr, anchor);
34482
- insert(target, t10, anchor);
34483
- insert(target, p1, anchor);
34484
- mount_component(t11, p1, null);
34485
- /*p1_binding*/ ctx[12](p1);
34999
+ insert(target, t3, anchor);
35000
+ if (if_block3) if_block3.m(target, anchor);
35001
+ insert(target, if_block3_anchor, anchor);
34486
35002
  current = true;
34487
-
34488
- if (!mounted) {
34489
- dispose = [
34490
- listen(button0, "click", prevent_default(/*click_handler*/ ctx[10])),
34491
- listen(button1, "click", prevent_default(/*click_handler_1*/ ctx[11]))
34492
- ];
34493
-
34494
- mounted = true;
34495
- }
34496
35003
  },
34497
35004
  p(ctx, dirty) {
34498
- if (/*form*/ ctx[1]?.icon) {
35005
+ if (/*componentStyle*/ ctx[1] !== 'inline') {
34499
35006
  if (if_block0) {
34500
- if (dirty & /*form*/ 2) {
35007
+ if_block0.p(ctx, dirty);
35008
+
35009
+ if (dirty & /*componentStyle*/ 2) {
34501
35010
  transition_in(if_block0, 1);
34502
35011
  }
34503
35012
  } else {
34504
- if_block0 = create_if_block_2$1();
35013
+ if_block0 = create_if_block_3$1(ctx);
34505
35014
  if_block0.c();
34506
35015
  transition_in(if_block0, 1);
34507
35016
  if_block0.m(t0.parentNode, t0);
@@ -34516,18 +35025,18 @@ function create_default_slot$2(ctx) {
34516
35025
  check_outros();
34517
35026
  }
34518
35027
 
34519
- if (/*form*/ ctx[1]?.message) {
35028
+ if (/*form*/ ctx[2]?.message) {
34520
35029
  if (if_block1) {
34521
35030
  if_block1.p(ctx, dirty);
34522
35031
 
34523
- if (dirty & /*form*/ 2) {
35032
+ if (dirty & /*form*/ 4) {
34524
35033
  transition_in(if_block1, 1);
34525
35034
  }
34526
35035
  } else {
34527
- if_block1 = create_if_block_1$1(ctx);
35036
+ if_block1 = create_if_block_2$1(ctx);
34528
35037
  if_block1.c();
34529
35038
  transition_in(if_block1, 1);
34530
- if_block1.m(t3.parentNode, t3);
35039
+ if_block1.m(t1.parentNode, t1);
34531
35040
  }
34532
35041
  } else if (if_block1) {
34533
35042
  group_outros();
@@ -34539,8 +35048,8 @@ function create_default_slot$2(ctx) {
34539
35048
  check_outros();
34540
35049
  }
34541
35050
 
34542
- if (dirty & /*step, metadata, determineSubmission, $styleStore*/ 792) {
34543
- each_value = /*step*/ ctx[4]?.callbacks;
35051
+ if (dirty & /*step, metadata, determineSubmission, $styleStore*/ 1584) {
35052
+ each_value = /*step*/ ctx[5]?.callbacks;
34544
35053
  let i;
34545
35054
 
34546
35055
  for (i = 0; i < each_value.length; i += 1) {
@@ -34553,7 +35062,7 @@ function create_default_slot$2(ctx) {
34553
35062
  each_blocks[i] = create_each_block(child_ctx);
34554
35063
  each_blocks[i].c();
34555
35064
  transition_in(each_blocks[i], 1);
34556
- each_blocks[i].m(t4.parentNode, t4);
35065
+ each_blocks[i].m(t2.parentNode, t2);
34557
35066
  }
34558
35067
  }
34559
35068
 
@@ -34566,18 +35075,18 @@ function create_default_slot$2(ctx) {
34566
35075
  check_outros();
34567
35076
  }
34568
35077
 
34569
- if (/*metadata*/ ctx[3]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[3]?.step?.derived.isStepSelfSubmittable) {
35078
+ if (/*metadata*/ ctx[4]?.step?.derived.isUserInputOptional || !/*metadata*/ ctx[4]?.step?.derived.isStepSelfSubmittable) {
34570
35079
  if (if_block2) {
34571
35080
  if_block2.p(ctx, dirty);
34572
35081
 
34573
- if (dirty & /*metadata*/ 8) {
35082
+ if (dirty & /*metadata*/ 16) {
34574
35083
  transition_in(if_block2, 1);
34575
35084
  }
34576
35085
  } else {
34577
- if_block2 = create_if_block$2(ctx);
35086
+ if_block2 = create_if_block_1$1(ctx);
34578
35087
  if_block2.c();
34579
35088
  transition_in(if_block2, 1);
34580
- if_block2.m(t5.parentNode, t5);
35089
+ if_block2.m(t3.parentNode, t3);
34581
35090
  }
34582
35091
  } else if (if_block2) {
34583
35092
  group_outros();
@@ -34588,11 +35097,33 @@ function create_default_slot$2(ctx) {
34588
35097
 
34589
35098
  check_outros();
34590
35099
  }
35100
+
35101
+ if (/*componentStyle*/ ctx[1] !== 'inline') {
35102
+ if (if_block3) {
35103
+ if_block3.p(ctx, dirty);
35104
+
35105
+ if (dirty & /*componentStyle*/ 2) {
35106
+ transition_in(if_block3, 1);
35107
+ }
35108
+ } else {
35109
+ if_block3 = create_if_block$2(ctx);
35110
+ if_block3.c();
35111
+ transition_in(if_block3, 1);
35112
+ if_block3.m(if_block3_anchor.parentNode, if_block3_anchor);
35113
+ }
35114
+ } else if (if_block3) {
35115
+ group_outros();
35116
+
35117
+ transition_out(if_block3, 1, 1, () => {
35118
+ if_block3 = null;
35119
+ });
35120
+
35121
+ check_outros();
35122
+ }
34591
35123
  },
34592
35124
  i(local) {
34593
35125
  if (current) return;
34594
35126
  transition_in(if_block0);
34595
- transition_in(t1.$$.fragment, local);
34596
35127
  transition_in(if_block1);
34597
35128
 
34598
35129
  for (let i = 0; i < each_value.length; i += 1) {
@@ -34600,12 +35131,11 @@ function create_default_slot$2(ctx) {
34600
35131
  }
34601
35132
 
34602
35133
  transition_in(if_block2);
34603
- transition_in(t11.$$.fragment, local);
35134
+ transition_in(if_block3);
34604
35135
  current = true;
34605
35136
  },
34606
35137
  o(local) {
34607
35138
  transition_out(if_block0);
34608
- transition_out(t1.$$.fragment, local);
34609
35139
  transition_out(if_block1);
34610
35140
  each_blocks = each_blocks.filter(Boolean);
34611
35141
 
@@ -34614,30 +35144,20 @@ function create_default_slot$2(ctx) {
34614
35144
  }
34615
35145
 
34616
35146
  transition_out(if_block2);
34617
- transition_out(t11.$$.fragment, local);
35147
+ transition_out(if_block3);
34618
35148
  current = false;
34619
35149
  },
34620
35150
  d(detaching) {
34621
35151
  if (if_block0) if_block0.d(detaching);
34622
35152
  if (detaching) detach(t0);
34623
- if (detaching) detach(h1);
34624
- destroy_component(t1);
34625
- if (detaching) detach(t2);
34626
35153
  if (if_block1) if_block1.d(detaching);
34627
- if (detaching) detach(t3);
35154
+ if (detaching) detach(t1);
34628
35155
  destroy_each(each_blocks, detaching);
34629
- if (detaching) detach(t4);
35156
+ if (detaching) detach(t2);
34630
35157
  if (if_block2) if_block2.d(detaching);
34631
- if (detaching) detach(t5);
34632
- if (detaching) detach(p0);
34633
- if (detaching) detach(t9);
34634
- if (detaching) detach(hr);
34635
- if (detaching) detach(t10);
34636
- if (detaching) detach(p1);
34637
- destroy_component(t11);
34638
- /*p1_binding*/ ctx[12](null);
34639
- mounted = false;
34640
- run_all(dispose);
35158
+ if (detaching) detach(t3);
35159
+ if (if_block3) if_block3.d(detaching);
35160
+ if (detaching) detach(if_block3_anchor);
34641
35161
  }
34642
35162
  };
34643
35163
  }
@@ -34648,12 +35168,12 @@ function create_fragment$2(ctx) {
34648
35168
  let current;
34649
35169
 
34650
35170
  function form_1_formEl_binding(value) {
34651
- /*form_1_formEl_binding*/ ctx[13](value);
35171
+ /*form_1_formEl_binding*/ ctx[14](value);
34652
35172
  }
34653
35173
 
34654
35174
  let form_1_props = {
34655
35175
  ariaDescribedBy: "formFailureMessageAlert",
34656
- onSubmitWhenValid: /*form*/ ctx[1]?.submit,
35176
+ onSubmitWhenValid: /*form*/ ctx[2]?.submit,
34657
35177
  $$slots: { default: [create_default_slot$2] },
34658
35178
  $$scope: { ctx }
34659
35179
  };
@@ -34675,9 +35195,9 @@ function create_fragment$2(ctx) {
34675
35195
  },
34676
35196
  p(ctx, [dirty]) {
34677
35197
  const form_1_changes = {};
34678
- if (dirty & /*form*/ 2) form_1_changes.onSubmitWhenValid = /*form*/ ctx[1]?.submit;
35198
+ if (dirty & /*form*/ 4) form_1_changes.onSubmitWhenValid = /*form*/ ctx[2]?.submit;
34679
35199
 
34680
- if (dirty & /*$$scope, linkWrapper, journey, metadata, step, $styleStore, alertNeedsFocus, formMessageKey, form*/ 131582) {
35200
+ if (dirty & /*$$scope, linkWrapper, journey, componentStyle, metadata, step, $styleStore, alertNeedsFocus, formMessageKey, form*/ 263166) {
34681
35201
  form_1_changes.$$scope = { dirty, ctx };
34682
35202
  }
34683
35203
 
@@ -34706,7 +35226,8 @@ function create_fragment$2(ctx) {
34706
35226
 
34707
35227
  function instance$2($$self, $$props, $$invalidate) {
34708
35228
  let $styleStore;
34709
- component_subscribe($$self, styleStore, $$value => $$invalidate(8, $styleStore = $$value));
35229
+ component_subscribe($$self, styleStore, $$value => $$invalidate(9, $styleStore = $$value));
35230
+ let { componentStyle } = $$props;
34710
35231
  let { form } = $$props;
34711
35232
  let { formEl = null } = $$props;
34712
35233
  let { journey } = $$props;
@@ -34726,10 +35247,14 @@ function instance$2($$self, $$props, $$invalidate) {
34726
35247
  }
34727
35248
 
34728
35249
  afterUpdate(() => {
34729
- $$invalidate(5, alertNeedsFocus = !!form?.message);
35250
+ $$invalidate(6, alertNeedsFocus = !!form?.message);
34730
35251
  });
34731
35252
 
34732
- onMount(() => captureLinks(linkWrapper, journey));
35253
+ onMount(() => {
35254
+ if (componentStyle === 'modal') {
35255
+ captureLinks(linkWrapper, journey);
35256
+ }
35257
+ });
34733
35258
 
34734
35259
  const click_handler = () => {
34735
35260
  journey.push({ tree: 'ResetPassword' });
@@ -34742,7 +35267,7 @@ function instance$2($$self, $$props, $$invalidate) {
34742
35267
  function p1_binding($$value) {
34743
35268
  binding_callbacks[$$value ? 'unshift' : 'push'](() => {
34744
35269
  linkWrapper = $$value;
34745
- $$invalidate(7, linkWrapper);
35270
+ $$invalidate(8, linkWrapper);
34746
35271
  });
34747
35272
  }
34748
35273
 
@@ -34752,23 +35277,25 @@ function instance$2($$self, $$props, $$invalidate) {
34752
35277
  }
34753
35278
 
34754
35279
  $$self.$$set = $$props => {
34755
- if ('form' in $$props) $$invalidate(1, form = $$props.form);
35280
+ if ('componentStyle' in $$props) $$invalidate(1, componentStyle = $$props.componentStyle);
35281
+ if ('form' in $$props) $$invalidate(2, form = $$props.form);
34756
35282
  if ('formEl' in $$props) $$invalidate(0, formEl = $$props.formEl);
34757
- if ('journey' in $$props) $$invalidate(2, journey = $$props.journey);
34758
- if ('metadata' in $$props) $$invalidate(3, metadata = $$props.metadata);
34759
- if ('step' in $$props) $$invalidate(4, step = $$props.step);
35283
+ if ('journey' in $$props) $$invalidate(3, journey = $$props.journey);
35284
+ if ('metadata' in $$props) $$invalidate(4, metadata = $$props.metadata);
35285
+ if ('step' in $$props) $$invalidate(5, step = $$props.step);
34760
35286
  };
34761
35287
 
34762
35288
  $$self.$$.update = () => {
34763
- if ($$self.$$.dirty & /*form*/ 2) {
35289
+ if ($$self.$$.dirty & /*form*/ 4) {
34764
35290
  {
34765
- $$invalidate(6, formMessageKey = convertStringToKey(form?.message));
35291
+ $$invalidate(7, formMessageKey = convertStringToKey(form?.message));
34766
35292
  }
34767
35293
  }
34768
35294
  };
34769
35295
 
34770
35296
  return [
34771
35297
  formEl,
35298
+ componentStyle,
34772
35299
  form,
34773
35300
  journey,
34774
35301
  metadata,
@@ -34790,23 +35317,22 @@ class Login extends SvelteComponent {
34790
35317
  super();
34791
35318
 
34792
35319
  init(this, options, instance$2, create_fragment$2, safe_not_equal, {
34793
- form: 1,
35320
+ componentStyle: 1,
35321
+ form: 2,
34794
35322
  formEl: 0,
34795
- journey: 2,
34796
- metadata: 3,
34797
- step: 4
35323
+ journey: 3,
35324
+ metadata: 4,
35325
+ step: 5
34798
35326
  });
34799
35327
  }
34800
35328
  }
34801
35329
 
35330
+ /**
35331
+ * @function mapStepToStage - Maps the current step to the proper stage component.
35332
+ * @param {object} currentStep - The current step to check
35333
+ * @returns {object} - The stage Svelte component
35334
+ */
34802
35335
  function mapStepToStage(currentStep) {
34803
- /** *********************************************************************
34804
- * SDK INTEGRATION POINT
34805
- * Summary:SDK step method for getting the stage value
34806
- * ----------------------------------------------------------------------
34807
- * Details: This method is helpful in quickly identifying the stage
34808
- * when you want to provide special layout or handling of the form
34809
- ********************************************************************* */
34810
35336
  if (!currentStep || currentStep.type !== 'Step') {
34811
35337
  return Generic;
34812
35338
  }
@@ -34833,7 +35359,7 @@ function create_else_block$1(ctx) {
34833
35359
  alert = new Alert({
34834
35360
  props: {
34835
35361
  id: "unrecoverableStepError",
34836
- needsFocus: /*alertNeedsFocus*/ ctx[3],
35362
+ needsFocus: /*alertNeedsFocus*/ ctx[4],
34837
35363
  type: "error",
34838
35364
  $$slots: { default: [create_default_slot_1] },
34839
35365
  $$scope: { ctx }
@@ -34843,7 +35369,7 @@ function create_else_block$1(ctx) {
34843
35369
  button = new Button({
34844
35370
  props: {
34845
35371
  style: "secondary",
34846
- onClick: /*tryAgain*/ ctx[6],
35372
+ onClick: /*tryAgain*/ ctx[7],
34847
35373
  $$slots: { default: [create_default_slot$1] },
34848
35374
  $$scope: { ctx }
34849
35375
  }
@@ -34863,16 +35389,16 @@ function create_else_block$1(ctx) {
34863
35389
  },
34864
35390
  p(ctx, dirty) {
34865
35391
  const alert_changes = {};
34866
- if (dirty & /*alertNeedsFocus*/ 8) alert_changes.needsFocus = /*alertNeedsFocus*/ ctx[3];
35392
+ if (dirty & /*alertNeedsFocus*/ 16) alert_changes.needsFocus = /*alertNeedsFocus*/ ctx[4];
34867
35393
 
34868
- if (dirty & /*$$scope*/ 256) {
35394
+ if (dirty & /*$$scope*/ 512) {
34869
35395
  alert_changes.$$scope = { dirty, ctx };
34870
35396
  }
34871
35397
 
34872
35398
  alert.$set(alert_changes);
34873
35399
  const button_changes = {};
34874
35400
 
34875
- if (dirty & /*$$scope*/ 256) {
35401
+ if (dirty & /*$$scope*/ 512) {
34876
35402
  button_changes.$$scope = { dirty, ctx };
34877
35403
  }
34878
35404
 
@@ -34897,7 +35423,7 @@ function create_else_block$1(ctx) {
34897
35423
  };
34898
35424
  }
34899
35425
 
34900
- // (51:36)
35426
+ // (56:52)
34901
35427
  function create_if_block_3(ctx) {
34902
35428
  let div;
34903
35429
  let spinner;
@@ -34938,7 +35464,7 @@ function create_if_block_3(ctx) {
34938
35464
  };
34939
35465
  }
34940
35466
 
34941
- // (26:0) {#if !$journeyStore?.completed}
35467
+ // (30:0) {#if $journeyStore && !$journeyStore.completed}
34942
35468
  function create_if_block$1(ctx) {
34943
35469
  let current_block_type_index;
34944
35470
  let if_block;
@@ -34948,8 +35474,8 @@ function create_if_block$1(ctx) {
34948
35474
  const if_blocks = [];
34949
35475
 
34950
35476
  function select_block_type_1(ctx, dirty) {
34951
- if (!/*$journeyStore*/ ctx[4].step) return 0;
34952
- if (/*$journeyStore*/ ctx[4].step.type === StepType$1.Step) return 1;
35477
+ if (/*$journeyStore*/ ctx[5] && !/*$journeyStore*/ ctx[5].step) return 0;
35478
+ if (/*$journeyStore*/ ctx[5].step?.type === StepType$1.Step) return 1;
34953
35479
  return -1;
34954
35480
  }
34955
35481
 
@@ -35025,7 +35551,7 @@ function create_if_block$1(ctx) {
35025
35551
  };
35026
35552
  }
35027
35553
 
35028
- // (56:2) <Alert id="unrecoverableStepError" needsFocus={alertNeedsFocus} type="error">
35554
+ // (61:2) <Alert id="unrecoverableStepError" needsFocus={alertNeedsFocus} type="error">
35029
35555
  function create_default_slot_1(ctx) {
35030
35556
  let t;
35031
35557
  let current;
@@ -35058,7 +35584,7 @@ function create_default_slot_1(ctx) {
35058
35584
  };
35059
35585
  }
35060
35586
 
35061
- // (59:2) <Button style="secondary" onClick={tryAgain}>
35587
+ // (64:2) <Button style="secondary" onClick={tryAgain}>
35062
35588
  function create_default_slot$1(ctx) {
35063
35589
  let t;
35064
35590
  let current;
@@ -35088,7 +35614,7 @@ function create_default_slot$1(ctx) {
35088
35614
  };
35089
35615
  }
35090
35616
 
35091
- // (31:54)
35617
+ // (35:55)
35092
35618
  function create_if_block_2(ctx) {
35093
35619
  let switch_instance;
35094
35620
  let updating_formEl;
@@ -35096,27 +35622,28 @@ function create_if_block_2(ctx) {
35096
35622
  let current;
35097
35623
 
35098
35624
  function switch_instance_formEl_binding(value) {
35099
- /*switch_instance_formEl_binding*/ ctx[7](value);
35625
+ /*switch_instance_formEl_binding*/ ctx[8](value);
35100
35626
  }
35101
35627
 
35102
- var switch_value = mapStepToStage(/*$journeyStore*/ ctx[4].step);
35628
+ var switch_value = mapStepToStage(/*$journeyStore*/ ctx[5].step);
35103
35629
 
35104
35630
  function switch_props(ctx) {
35105
35631
  let switch_instance_props = {
35632
+ componentStyle: /*componentStyle*/ ctx[1],
35106
35633
  form: {
35107
- icon: /*displayIcon*/ ctx[1],
35108
- message: /*$journeyStore*/ ctx[4].error?.message || '',
35109
- status: (/*$journeyStore*/ ctx[4].error?.code) ? 'error' : 'ok',
35110
- submit: /*submitForm*/ ctx[5]
35634
+ icon: /*displayIcon*/ ctx[2],
35635
+ message: /*$journeyStore*/ ctx[5].error?.message || '',
35636
+ status: (/*$journeyStore*/ ctx[5].error?.code) ? 'error' : 'ok',
35637
+ submit: /*submitForm*/ ctx[6]
35111
35638
  },
35112
35639
  journey: {
35113
- loading: /*$journeyStore*/ ctx[4].loading,
35114
- pop: /*journeyStore*/ ctx[2].pop,
35115
- push: /*journeyStore*/ ctx[2].push,
35640
+ loading: /*$journeyStore*/ ctx[5].loading,
35641
+ pop: /*journeyStore*/ ctx[3].pop,
35642
+ push: /*journeyStore*/ ctx[3].push,
35116
35643
  stack
35117
35644
  },
35118
- metadata: /*$journeyStore*/ ctx[4].metadata,
35119
- step: /*$journeyStore*/ ctx[4].step
35645
+ metadata: /*$journeyStore*/ ctx[5].metadata,
35646
+ step: /*$journeyStore*/ ctx[5].step
35120
35647
  };
35121
35648
 
35122
35649
  if (/*formEl*/ ctx[0] !== void 0) {
@@ -35143,23 +35670,24 @@ function create_if_block_2(ctx) {
35143
35670
  },
35144
35671
  p(ctx, dirty) {
35145
35672
  const switch_instance_changes = {};
35673
+ if (dirty & /*componentStyle*/ 2) switch_instance_changes.componentStyle = /*componentStyle*/ ctx[1];
35146
35674
 
35147
- if (dirty & /*displayIcon, $journeyStore*/ 18) switch_instance_changes.form = {
35148
- icon: /*displayIcon*/ ctx[1],
35149
- message: /*$journeyStore*/ ctx[4].error?.message || '',
35150
- status: (/*$journeyStore*/ ctx[4].error?.code) ? 'error' : 'ok',
35151
- submit: /*submitForm*/ ctx[5]
35675
+ if (dirty & /*displayIcon, $journeyStore*/ 36) switch_instance_changes.form = {
35676
+ icon: /*displayIcon*/ ctx[2],
35677
+ message: /*$journeyStore*/ ctx[5].error?.message || '',
35678
+ status: (/*$journeyStore*/ ctx[5].error?.code) ? 'error' : 'ok',
35679
+ submit: /*submitForm*/ ctx[6]
35152
35680
  };
35153
35681
 
35154
- if (dirty & /*$journeyStore, journeyStore*/ 20) switch_instance_changes.journey = {
35155
- loading: /*$journeyStore*/ ctx[4].loading,
35156
- pop: /*journeyStore*/ ctx[2].pop,
35157
- push: /*journeyStore*/ ctx[2].push,
35682
+ if (dirty & /*$journeyStore, journeyStore*/ 40) switch_instance_changes.journey = {
35683
+ loading: /*$journeyStore*/ ctx[5].loading,
35684
+ pop: /*journeyStore*/ ctx[3].pop,
35685
+ push: /*journeyStore*/ ctx[3].push,
35158
35686
  stack
35159
35687
  };
35160
35688
 
35161
- if (dirty & /*$journeyStore*/ 16) switch_instance_changes.metadata = /*$journeyStore*/ ctx[4].metadata;
35162
- if (dirty & /*$journeyStore*/ 16) switch_instance_changes.step = /*$journeyStore*/ ctx[4].step;
35689
+ if (dirty & /*$journeyStore*/ 32) switch_instance_changes.metadata = /*$journeyStore*/ ctx[5].metadata;
35690
+ if (dirty & /*$journeyStore*/ 32) switch_instance_changes.step = /*$journeyStore*/ ctx[5].step;
35163
35691
 
35164
35692
  if (!updating_formEl && dirty & /*formEl*/ 1) {
35165
35693
  updating_formEl = true;
@@ -35167,7 +35695,7 @@ function create_if_block_2(ctx) {
35167
35695
  add_flush_callback(() => updating_formEl = false);
35168
35696
  }
35169
35697
 
35170
- if (switch_value !== (switch_value = mapStepToStage(/*$journeyStore*/ ctx[4].step))) {
35698
+ if (switch_value !== (switch_value = mapStepToStage(/*$journeyStore*/ ctx[5].step))) {
35171
35699
  if (switch_instance) {
35172
35700
  group_outros();
35173
35701
  const old_component = switch_instance;
@@ -35208,7 +35736,7 @@ function create_if_block_2(ctx) {
35208
35736
  };
35209
35737
  }
35210
35738
 
35211
- // (27:2) {#if !$journeyStore.step}
35739
+ // (31:2) {#if $journeyStore && !$journeyStore.step}
35212
35740
  function create_if_block_1(ctx) {
35213
35741
  let div;
35214
35742
  let spinner;
@@ -35258,8 +35786,8 @@ function create_fragment$1(ctx) {
35258
35786
  const if_blocks = [];
35259
35787
 
35260
35788
  function select_block_type(ctx, dirty) {
35261
- if (!/*$journeyStore*/ ctx[4]?.completed) return 0;
35262
- if (/*$journeyStore*/ ctx[4]?.successful) return 1;
35789
+ if (/*$journeyStore*/ ctx[5] && !/*$journeyStore*/ ctx[5].completed) return 0;
35790
+ if (/*$journeyStore*/ ctx[5] && /*$journeyStore*/ ctx[5].successful) return 1;
35263
35791
  return 2;
35264
35792
  }
35265
35793
 
@@ -35322,13 +35850,19 @@ function create_fragment$1(ctx) {
35322
35850
  function instance$1($$self, $$props, $$invalidate) {
35323
35851
  let $journeyStore,
35324
35852
  $$unsubscribe_journeyStore = noop,
35325
- $$subscribe_journeyStore = () => ($$unsubscribe_journeyStore(), $$unsubscribe_journeyStore = subscribe(journeyStore, $$value => $$invalidate(4, $journeyStore = $$value)), journeyStore);
35853
+ $$subscribe_journeyStore = () => ($$unsubscribe_journeyStore(), $$unsubscribe_journeyStore = subscribe(journeyStore, $$value => $$invalidate(5, $journeyStore = $$value)), journeyStore);
35326
35854
 
35327
35855
  $$self.$$.on_destroy.push(() => $$unsubscribe_journeyStore());
35856
+ let { componentStyle } = $$props;
35328
35857
  let { displayIcon } = $$props;
35329
35858
  let { formEl = null } = $$props;
35330
35859
  let { journeyStore } = $$props;
35331
35860
  $$subscribe_journeyStore();
35861
+
35862
+ if (!$journeyStore) {
35863
+ console.error('Widget missing configuration. Import and call `configuration()`, then use `set()` to configure.');
35864
+ }
35865
+
35332
35866
  let alertNeedsFocus = false;
35333
35867
 
35334
35868
  function submitForm() {
@@ -35342,7 +35876,7 @@ function instance$1($$self, $$props, $$invalidate) {
35342
35876
  }
35343
35877
 
35344
35878
  afterUpdate(() => {
35345
- $$invalidate(3, alertNeedsFocus = !$journeyStore.successful);
35879
+ $$invalidate(4, alertNeedsFocus = $journeyStore && !$journeyStore.successful);
35346
35880
  });
35347
35881
 
35348
35882
  function switch_instance_formEl_binding(value) {
@@ -35351,13 +35885,15 @@ function instance$1($$self, $$props, $$invalidate) {
35351
35885
  }
35352
35886
 
35353
35887
  $$self.$$set = $$props => {
35354
- if ('displayIcon' in $$props) $$invalidate(1, displayIcon = $$props.displayIcon);
35888
+ if ('componentStyle' in $$props) $$invalidate(1, componentStyle = $$props.componentStyle);
35889
+ if ('displayIcon' in $$props) $$invalidate(2, displayIcon = $$props.displayIcon);
35355
35890
  if ('formEl' in $$props) $$invalidate(0, formEl = $$props.formEl);
35356
- if ('journeyStore' in $$props) $$subscribe_journeyStore($$invalidate(2, journeyStore = $$props.journeyStore));
35891
+ if ('journeyStore' in $$props) $$subscribe_journeyStore($$invalidate(3, journeyStore = $$props.journeyStore));
35357
35892
  };
35358
35893
 
35359
35894
  return [
35360
35895
  formEl,
35896
+ componentStyle,
35361
35897
  displayIcon,
35362
35898
  journeyStore,
35363
35899
  alertNeedsFocus,
@@ -35373,9 +35909,10 @@ class Journey extends SvelteComponent {
35373
35909
  super();
35374
35910
 
35375
35911
  init(this, options, instance$1, create_fragment$1, safe_not_equal, {
35376
- displayIcon: 1,
35912
+ componentStyle: 1,
35913
+ displayIcon: 2,
35377
35914
  formEl: 0,
35378
- journeyStore: 2
35915
+ journeyStore: 3
35379
35916
  });
35380
35917
  }
35381
35918
  }
@@ -35393,6 +35930,7 @@ function create_else_block(ctx) {
35393
35930
  }
35394
35931
 
35395
35932
  let journey_1_props = {
35933
+ componentStyle: "inline",
35396
35934
  displayIcon: /*$styleStore*/ ctx[4]?.stage?.icon ?? true,
35397
35935
  journeyStore: /*journeyStore*/ ctx[5]
35398
35936
  };
@@ -35524,6 +36062,7 @@ function create_default_slot(ctx) {
35524
36062
  }
35525
36063
 
35526
36064
  let journey_1_props = {
36065
+ componentStyle: "modal",
35527
36066
  displayIcon: /*$styleStore*/ ctx[4]?.stage?.icon ?? !/*$styleStore*/ ctx[4]?.logo,
35528
36067
  journeyStore: /*journeyStore*/ ctx[5]
35529
36068
  };