@flarehr/apollo-super-selection 5.24.54264 → 5.26.55632

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.
Files changed (152) hide show
  1. package/dist/lib/apollo-super-selection/apollo-super-selection.css +1 -1
  2. package/dist/lib/apollo-super-selection/apollo-super-selection.esm.js +1 -1
  3. package/dist/lib/apollo-super-selection/p-32bef81e.entry.js +14 -0
  4. package/dist/lib/apollo-super-selection/p-5be45043.system.entry.js +69 -0
  5. package/dist/lib/apollo-super-selection/p-bdcfc026.system.js +1 -1
  6. package/dist/lib/cjs/apollo-super-selection.cjs.js +1 -1
  7. package/dist/lib/cjs/loader.cjs.js +1 -1
  8. package/dist/lib/cjs/{sss-button_43.cjs.entry.js → sss-button_32.cjs.entry.js} +1062 -2263
  9. package/dist/lib/collection/apollo-super-selection.css +1 -1
  10. package/dist/lib/collection/collection-manifest.json +3 -25
  11. package/dist/lib/collection/components/app-host/super-selection-app-host.css +6 -6
  12. package/dist/lib/collection/components/super-campaign/super-campaign.js +12 -24
  13. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.dto.js +26 -25
  14. package/dist/lib/collection/components/super-selection-app/api/super-selection.api.js +0 -9
  15. package/dist/lib/collection/components/super-selection-app/existing-choice/existing-choice.js +5 -9
  16. package/dist/lib/collection/components/super-selection-app/footer-section/footer-section.js +11 -15
  17. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.js +115 -0
  18. package/dist/lib/collection/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund.js +5 -0
  19. package/dist/lib/collection/components/super-selection-app/funds/slate-super/api/slate.js +4 -0
  20. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-my-own-fund.js +3 -3
  21. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-invalid-smsf.js +2 -2
  22. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-my-own-fund.js +3 -3
  23. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill-smsf.js +3 -3
  24. package/dist/lib/collection/components/super-selection-app/prefill-fund/prefill.js +1 -1
  25. package/dist/lib/collection/components/super-selection-app/services/event-tracking.service.js +10 -0
  26. package/dist/lib/collection/components/super-selection-app/services/existing-super-choice-info.service.js +4 -16
  27. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.routes.js +3 -9
  28. package/dist/lib/collection/components/super-selection-app/services/super-selection-app.service.js +17 -39
  29. package/dist/lib/collection/components/super-selection-app/services/super-selection.store.js +3 -4
  30. package/dist/lib/collection/components/super-selection-app/standard-choice/standard-choice-form.js +16 -13
  31. package/dist/lib/collection/components/super-selection-app/super-selection-app.js +3 -17
  32. package/dist/lib/esm/apollo-super-selection.js +1 -1
  33. package/dist/lib/esm/loader.js +1 -1
  34. package/dist/lib/esm/{sss-button_43.entry.js → sss-button_32.entry.js} +1062 -2252
  35. package/dist/lib/esm-es5/apollo-super-selection.js +1 -1
  36. package/dist/lib/esm-es5/loader.js +1 -1
  37. package/dist/lib/esm-es5/sss-button_32.entry.js +69 -0
  38. package/dist/lib/types/components/super-campaign/super-campaign-types.d.ts +4 -0
  39. package/dist/lib/types/components/super-campaign/super-campaign.d.ts +0 -2
  40. package/dist/lib/types/components/super-selection-app/api/super-selection-events.model.d.ts +11 -0
  41. package/dist/lib/types/components/super-selection-app/api/super-selection.api.d.ts +1 -2
  42. package/dist/lib/types/components/super-selection-app/api/super-selection.api.dto.d.ts +2 -10
  43. package/dist/lib/types/components/super-selection-app/footer-section/footer-section.d.ts +1 -2
  44. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step-types.d.ts +15 -0
  45. package/dist/lib/types/components/super-selection-app/funds/custom-fund/my-own-fund/my-own-fund-engagement-step.d.ts +20 -0
  46. package/dist/lib/types/components/super-selection-app/funds/slate-super/api/slate.d.ts +4 -0
  47. package/dist/lib/types/components/super-selection-app/services/event-tracking.service.d.ts +2 -0
  48. package/dist/lib/types/components/super-selection-app/services/super-selection-app.routes.d.ts +1 -4
  49. package/dist/lib/types/components/super-selection-app/services/super-selection-app.service.d.ts +5 -5
  50. package/dist/lib/types/components/super-selection-app/services/super-selection.store.d.ts +3 -4
  51. package/dist/lib/types/components/super-selection-app/super-selection-app.d.ts +0 -2
  52. package/dist/lib/types/components.d.ts +17 -203
  53. package/package.json +1 -1
  54. package/dist/lib/apollo-super-selection/assets/icon-check.svg +0 -3
  55. package/dist/lib/apollo-super-selection/assets/logo-active.svg +0 -1
  56. package/dist/lib/apollo-super-selection/assets/logo-art.svg +0 -7
  57. package/dist/lib/apollo-super-selection/assets/logo-aus-eth.svg +0 -31
  58. package/dist/lib/apollo-super-selection/assets/logo-aware.svg +0 -58
  59. package/dist/lib/apollo-super-selection/assets/logo-first.svg +0 -15
  60. package/dist/lib/apollo-super-selection/assets/logo-hesta.svg +0 -5
  61. package/dist/lib/apollo-super-selection/assets/logo-mercer-mychoice.svg +0 -1
  62. package/dist/lib/apollo-super-selection/assets/logo-rei.svg +0 -27
  63. package/dist/lib/apollo-super-selection/assets/logo-slate.png +0 -0
  64. package/dist/lib/apollo-super-selection/assets/logo-spirit.svg +0 -141
  65. package/dist/lib/apollo-super-selection/assets/logo-unisuper.svg +0 -15
  66. package/dist/lib/apollo-super-selection/assets/logo-virgin.svg +0 -8
  67. package/dist/lib/apollo-super-selection/assets/unisuper-default-badge1.svg +0 -25
  68. package/dist/lib/apollo-super-selection/assets/unisuper-default-badge2.svg +0 -109
  69. package/dist/lib/apollo-super-selection/assets/unisuper-default-badge3.svg +0 -102
  70. package/dist/lib/apollo-super-selection/p-203c74a8.entry.js +0 -14
  71. package/dist/lib/apollo-super-selection/p-b0120851.system.entry.js +0 -69
  72. package/dist/lib/collection/components/super-selection-app/assets/icon-check.svg +0 -3
  73. package/dist/lib/collection/components/super-selection-app/consent/consent-wrapper.js +0 -32
  74. package/dist/lib/collection/components/super-selection-app/consent/consent.js +0 -88
  75. package/dist/lib/collection/components/super-selection-app/funds/constants.js +0 -43
  76. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/active.js +0 -26
  77. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.js +0 -43
  78. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.js +0 -32
  79. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/aware.js +0 -38
  80. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/first.js +0 -27
  81. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/hesta-default.js +0 -34
  82. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.js +0 -33
  83. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/rei.js +0 -33
  84. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/slate.js +0 -32
  85. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/spirit.js +0 -43
  86. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/unisuper-default-v2.js +0 -56
  87. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/unisuper-default.js +0 -49
  88. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/funds/virgin.js +0 -37
  89. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v1-page.js +0 -30
  90. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.js +0 -30
  91. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/promoted-fund.store.js +0 -10
  92. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.js +0 -125
  93. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.js +0 -271
  94. package/dist/lib/collection/components/super-selection-app/funds/promoted-fund/types.js +0 -15
  95. package/dist/lib/collection/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.js +0 -143
  96. package/dist/lib/collection/components/super-selection-app/funds/slate-super/slate-join-page.js +0 -30
  97. package/dist/lib/collection/components/super-selection-app/loading-component/loading-component.js +0 -29
  98. package/dist/lib/collection/components/super-selection-app/loading-super-indicator/loading-super-indicator.js +0 -11
  99. package/dist/lib/collection/components/super-selection-app/misc/iframe-host.js +0 -32
  100. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-active.svg +0 -1
  101. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-art.svg +0 -7
  102. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aus-eth.svg +0 -31
  103. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-aware.svg +0 -58
  104. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-first.svg +0 -15
  105. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-hesta.svg +0 -5
  106. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-mercer-mychoice.svg +0 -1
  107. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-rei.svg +0 -27
  108. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-slate.png +0 -0
  109. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-spirit.svg +0 -141
  110. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-unisuper.svg +0 -15
  111. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/logo-virgin.svg +0 -8
  112. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge1.svg +0 -25
  113. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge2.svg +0 -109
  114. package/dist/lib/collection/components/super-selection-app/super-choice-page/assets/unisuper-default-badge3.svg +0 -102
  115. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.js +0 -112
  116. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.js +0 -178
  117. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page-wrapper.js +0 -32
  118. package/dist/lib/collection/components/super-selection-app/super-choice-page/super-choice-page.js +0 -171
  119. package/dist/lib/esm-es5/sss-button_43.entry.js +0 -69
  120. package/dist/lib/types/components/super-selection-app/consent/consent-wrapper.d.ts +0 -5
  121. package/dist/lib/types/components/super-selection-app/consent/consent.d.ts +0 -9
  122. package/dist/lib/types/components/super-selection-app/funds/constants.d.ts +0 -9
  123. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/active.d.ts +0 -3
  124. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-ethical.d.ts +0 -3
  125. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/australian-retirement-trust.d.ts +0 -3
  126. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/aware.d.ts +0 -3
  127. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/first.d.ts +0 -3
  128. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/hesta-default.d.ts +0 -3
  129. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/mercermychoice.d.ts +0 -3
  130. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/rei.d.ts +0 -3
  131. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/slate.d.ts +0 -4
  132. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/spirit.d.ts +0 -3
  133. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/unisuper-default-v2.d.ts +0 -3
  134. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/unisuper-default.d.ts +0 -3
  135. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/funds/virgin.d.ts +0 -3
  136. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v1-page.d.ts +0 -5
  137. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund-join-v2-page.d.ts +0 -5
  138. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/promoted-fund.store.d.ts +0 -10
  139. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v1-iframe-builder.d.ts +0 -10
  140. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-iframe-builder.d.ts +0 -12
  141. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/services/promoted-fund-join-v2-types.d.ts +0 -75
  142. package/dist/lib/types/components/super-selection-app/funds/promoted-fund/types.d.ts +0 -26
  143. package/dist/lib/types/components/super-selection-app/funds/slate-super/services/slate-iframe-builder.d.ts +0 -14
  144. package/dist/lib/types/components/super-selection-app/funds/slate-super/slate-join-page.d.ts +0 -5
  145. package/dist/lib/types/components/super-selection-app/loading-component/loading-component.d.ts +0 -4
  146. package/dist/lib/types/components/super-selection-app/loading-super-indicator/loading-super-indicator.d.ts +0 -3
  147. package/dist/lib/types/components/super-selection-app/misc/iframe-host.d.ts +0 -6
  148. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-bottom.d.ts +0 -10
  149. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-item/super-choice-item-top.d.ts +0 -12
  150. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page-wrapper.d.ts +0 -5
  151. package/dist/lib/types/components/super-selection-app/super-choice-page/super-choice-page.d.ts +0 -10
  152. /package/dist/lib/collection/components/super-selection-app/funds/{promoted-fund/services/promoted-fund-join-v2-types.js → custom-fund/my-own-fund/my-own-fund-engagement-step-types.js} +0 -0
@@ -260,7 +260,7 @@ class TapSubscriber extends Subscriber {
260
260
  }
261
261
  }
262
262
 
263
- const AppVersion = '5.24.54264';
263
+ const AppVersion = '5.26.55632';
264
264
 
265
265
  // -------------------------------------------------------------------------------------
266
266
  // guards
@@ -963,6 +963,255 @@ const Button = class {
963
963
  }
964
964
  };
965
965
 
966
+ function appReady() {
967
+ postMessage({
968
+ type: 'appReady'
969
+ });
970
+ }
971
+ function postMessage(message, origin) {
972
+ if (origin === undefined)
973
+ origin = '*';
974
+ message.sender = 'flare';
975
+ window.parent.postMessage(message, origin);
976
+ }
977
+ function resize(height, width) {
978
+ postMessage({
979
+ type: 'contentResized',
980
+ height,
981
+ width
982
+ });
983
+ }
984
+ function navigation(url) {
985
+ postMessage({
986
+ type: 'pageNavigated',
987
+ url
988
+ });
989
+ }
990
+ function complete() {
991
+ postMessage({ type: 'complete' });
992
+ }
993
+ function submitSuccess() {
994
+ postMessage({
995
+ type: 'submitSuccess'
996
+ });
997
+ }
998
+ const iframe = { appReady, resize, navigation, complete, submitSuccess };
999
+
1000
+ const appendToMap = (map, propName, value) => {
1001
+ const items = map.get(propName);
1002
+ if (!items) {
1003
+ map.set(propName, [value]);
1004
+ }
1005
+ else if (!items.includes(value)) {
1006
+ items.push(value);
1007
+ }
1008
+ };
1009
+ const debounce = (fn, ms) => {
1010
+ let timeoutId;
1011
+ return (...args) => {
1012
+ if (timeoutId) {
1013
+ clearTimeout(timeoutId);
1014
+ }
1015
+ timeoutId = setTimeout(() => {
1016
+ timeoutId = 0;
1017
+ fn(...args);
1018
+ }, ms);
1019
+ };
1020
+ };
1021
+
1022
+ /**
1023
+ * Check if a possible element isConnected.
1024
+ * The property might not be there, so we check for it.
1025
+ *
1026
+ * We want it to return true if isConnected is not a property,
1027
+ * otherwise we would remove these elements and would not update.
1028
+ *
1029
+ * Better leak in Edge than to be useless.
1030
+ */
1031
+ const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
1032
+ const cleanupElements = debounce((map) => {
1033
+ for (let key of map.keys()) {
1034
+ map.set(key, map.get(key).filter(isConnected));
1035
+ }
1036
+ }, 2000);
1037
+ const stencilSubscription = ({ on }) => {
1038
+ const elmsToUpdate = new Map();
1039
+ if (typeof getRenderingRef === 'function') {
1040
+ // If we are not in a stencil project, we do nothing.
1041
+ // This function is not really exported by @stencil/core.
1042
+ on('dispose', () => {
1043
+ elmsToUpdate.clear();
1044
+ });
1045
+ on('get', (propName) => {
1046
+ const elm = getRenderingRef();
1047
+ if (elm) {
1048
+ appendToMap(elmsToUpdate, propName, elm);
1049
+ }
1050
+ });
1051
+ on('set', (propName) => {
1052
+ const elements = elmsToUpdate.get(propName);
1053
+ if (elements) {
1054
+ elmsToUpdate.set(propName, elements.filter(forceUpdate));
1055
+ }
1056
+ cleanupElements(elmsToUpdate);
1057
+ });
1058
+ on('reset', () => {
1059
+ elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
1060
+ cleanupElements(elmsToUpdate);
1061
+ });
1062
+ }
1063
+ };
1064
+
1065
+ const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
1066
+ let states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
1067
+ const handlers = {
1068
+ dispose: [],
1069
+ get: [],
1070
+ set: [],
1071
+ reset: [],
1072
+ };
1073
+ const reset = () => {
1074
+ states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
1075
+ handlers.reset.forEach((cb) => cb());
1076
+ };
1077
+ const dispose = () => {
1078
+ // Call first dispose as resetting the state would
1079
+ // cause less updates ;)
1080
+ handlers.dispose.forEach((cb) => cb());
1081
+ reset();
1082
+ };
1083
+ const get = (propName) => {
1084
+ handlers.get.forEach((cb) => cb(propName));
1085
+ return states.get(propName);
1086
+ };
1087
+ const set = (propName, value) => {
1088
+ const oldValue = states.get(propName);
1089
+ if (shouldUpdate(value, oldValue, propName)) {
1090
+ states.set(propName, value);
1091
+ handlers.set.forEach((cb) => cb(propName, value, oldValue));
1092
+ }
1093
+ };
1094
+ const state = (typeof Proxy === 'undefined'
1095
+ ? {}
1096
+ : new Proxy(defaultState, {
1097
+ get(_, propName) {
1098
+ return get(propName);
1099
+ },
1100
+ ownKeys(_) {
1101
+ return Array.from(states.keys());
1102
+ },
1103
+ getOwnPropertyDescriptor() {
1104
+ return {
1105
+ enumerable: true,
1106
+ configurable: true,
1107
+ };
1108
+ },
1109
+ has(_, propName) {
1110
+ return states.has(propName);
1111
+ },
1112
+ set(_, propName, value) {
1113
+ set(propName, value);
1114
+ return true;
1115
+ },
1116
+ }));
1117
+ const on = (eventName, callback) => {
1118
+ handlers[eventName].push(callback);
1119
+ return () => {
1120
+ removeFromArray(handlers[eventName], callback);
1121
+ };
1122
+ };
1123
+ const onChange = (propName, cb) => {
1124
+ const unSet = on('set', (key, newValue) => {
1125
+ if (key === propName) {
1126
+ cb(newValue);
1127
+ }
1128
+ });
1129
+ const unReset = on('reset', () => cb(defaultState[propName]));
1130
+ return () => {
1131
+ unSet();
1132
+ unReset();
1133
+ };
1134
+ };
1135
+ const use = (...subscriptions) => subscriptions.forEach((subscription) => {
1136
+ if (subscription.set) {
1137
+ on('set', subscription.set);
1138
+ }
1139
+ if (subscription.get) {
1140
+ on('get', subscription.get);
1141
+ }
1142
+ if (subscription.reset) {
1143
+ on('reset', subscription.reset);
1144
+ }
1145
+ });
1146
+ return {
1147
+ state,
1148
+ get,
1149
+ set,
1150
+ on,
1151
+ onChange,
1152
+ use,
1153
+ dispose,
1154
+ reset,
1155
+ };
1156
+ };
1157
+ const removeFromArray = (array, item) => {
1158
+ const index = array.indexOf(item);
1159
+ if (index >= 0) {
1160
+ array[index] = array[array.length - 1];
1161
+ array.length--;
1162
+ }
1163
+ };
1164
+
1165
+ const createStore = (defaultState, shouldUpdate) => {
1166
+ const map = createObservableMap(defaultState, shouldUpdate);
1167
+ stencilSubscription(map);
1168
+ return map;
1169
+ };
1170
+
1171
+ const initial = {
1172
+ handleSubmitFn: async function () {
1173
+ return;
1174
+ },
1175
+ fundName: '',
1176
+ fundDetails: { type: 'null' },
1177
+ promotedFundId: undefined
1178
+ };
1179
+ const { state } = createStore(initial);
1180
+
1181
+ var SuperSelectionAppRoutes;
1182
+ (function (SuperSelectionAppRoutes) {
1183
+ SuperSelectionAppRoutes["ExistingChoicePage"] = "/existing";
1184
+ SuperSelectionAppRoutes["SuperCampaign"] = "/super-campaign";
1185
+ SuperSelectionAppRoutes["ChoicePage"] = "/";
1186
+ SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
1187
+ SuperSelectionAppRoutes["MyOwnFundEngagementStep"] = "/super-choice/my-own-fund-engagement/";
1188
+ SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
1189
+ SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
1190
+ SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
1191
+ SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
1192
+ SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
1193
+ SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
1194
+ SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
1195
+ SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
1196
+ SuperSelectionAppRoutes["Success"] = "/success/";
1197
+ })(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
1198
+ const superSelectionAppStencilRoutes = [
1199
+ h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
1200
+ h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
1201
+ h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-super-campaign-host" }),
1202
+ h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
1203
+ h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFundEngagementStep, component: "sss-my-own-fund-engagement-step-host" }),
1204
+ h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
1205
+ h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
1206
+ h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
1207
+ h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
1208
+ h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
1209
+ h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
1210
+ h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
1211
+ h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
1212
+ h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
1213
+ ];
1214
+
966
1215
  function createCommonjsModule(fn, basedir, module) {
967
1216
  return module = {
968
1217
  path: basedir,
@@ -2426,177 +2675,6 @@ exports.sequenceArray =
2426
2675
  exports.traverseArray(_function.identity);
2427
2676
  });
2428
2677
 
2429
- const appendToMap = (map, propName, value) => {
2430
- const items = map.get(propName);
2431
- if (!items) {
2432
- map.set(propName, [value]);
2433
- }
2434
- else if (!items.includes(value)) {
2435
- items.push(value);
2436
- }
2437
- };
2438
- const debounce = (fn, ms) => {
2439
- let timeoutId;
2440
- return (...args) => {
2441
- if (timeoutId) {
2442
- clearTimeout(timeoutId);
2443
- }
2444
- timeoutId = setTimeout(() => {
2445
- timeoutId = 0;
2446
- fn(...args);
2447
- }, ms);
2448
- };
2449
- };
2450
-
2451
- /**
2452
- * Check if a possible element isConnected.
2453
- * The property might not be there, so we check for it.
2454
- *
2455
- * We want it to return true if isConnected is not a property,
2456
- * otherwise we would remove these elements and would not update.
2457
- *
2458
- * Better leak in Edge than to be useless.
2459
- */
2460
- const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
2461
- const cleanupElements = debounce((map) => {
2462
- for (let key of map.keys()) {
2463
- map.set(key, map.get(key).filter(isConnected));
2464
- }
2465
- }, 2000);
2466
- const stencilSubscription = ({ on }) => {
2467
- const elmsToUpdate = new Map();
2468
- if (typeof getRenderingRef === 'function') {
2469
- // If we are not in a stencil project, we do nothing.
2470
- // This function is not really exported by @stencil/core.
2471
- on('dispose', () => {
2472
- elmsToUpdate.clear();
2473
- });
2474
- on('get', (propName) => {
2475
- const elm = getRenderingRef();
2476
- if (elm) {
2477
- appendToMap(elmsToUpdate, propName, elm);
2478
- }
2479
- });
2480
- on('set', (propName) => {
2481
- const elements = elmsToUpdate.get(propName);
2482
- if (elements) {
2483
- elmsToUpdate.set(propName, elements.filter(forceUpdate));
2484
- }
2485
- cleanupElements(elmsToUpdate);
2486
- });
2487
- on('reset', () => {
2488
- elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
2489
- cleanupElements(elmsToUpdate);
2490
- });
2491
- }
2492
- };
2493
-
2494
- const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
2495
- let states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
2496
- const handlers = {
2497
- dispose: [],
2498
- get: [],
2499
- set: [],
2500
- reset: [],
2501
- };
2502
- const reset = () => {
2503
- states = new Map(Object.entries(defaultState !== null && defaultState !== void 0 ? defaultState : {}));
2504
- handlers.reset.forEach((cb) => cb());
2505
- };
2506
- const dispose = () => {
2507
- // Call first dispose as resetting the state would
2508
- // cause less updates ;)
2509
- handlers.dispose.forEach((cb) => cb());
2510
- reset();
2511
- };
2512
- const get = (propName) => {
2513
- handlers.get.forEach((cb) => cb(propName));
2514
- return states.get(propName);
2515
- };
2516
- const set = (propName, value) => {
2517
- const oldValue = states.get(propName);
2518
- if (shouldUpdate(value, oldValue, propName)) {
2519
- states.set(propName, value);
2520
- handlers.set.forEach((cb) => cb(propName, value, oldValue));
2521
- }
2522
- };
2523
- const state = (typeof Proxy === 'undefined'
2524
- ? {}
2525
- : new Proxy(defaultState, {
2526
- get(_, propName) {
2527
- return get(propName);
2528
- },
2529
- ownKeys(_) {
2530
- return Array.from(states.keys());
2531
- },
2532
- getOwnPropertyDescriptor() {
2533
- return {
2534
- enumerable: true,
2535
- configurable: true,
2536
- };
2537
- },
2538
- has(_, propName) {
2539
- return states.has(propName);
2540
- },
2541
- set(_, propName, value) {
2542
- set(propName, value);
2543
- return true;
2544
- },
2545
- }));
2546
- const on = (eventName, callback) => {
2547
- handlers[eventName].push(callback);
2548
- return () => {
2549
- removeFromArray(handlers[eventName], callback);
2550
- };
2551
- };
2552
- const onChange = (propName, cb) => {
2553
- const unSet = on('set', (key, newValue) => {
2554
- if (key === propName) {
2555
- cb(newValue);
2556
- }
2557
- });
2558
- const unReset = on('reset', () => cb(defaultState[propName]));
2559
- return () => {
2560
- unSet();
2561
- unReset();
2562
- };
2563
- };
2564
- const use = (...subscriptions) => subscriptions.forEach((subscription) => {
2565
- if (subscription.set) {
2566
- on('set', subscription.set);
2567
- }
2568
- if (subscription.get) {
2569
- on('get', subscription.get);
2570
- }
2571
- if (subscription.reset) {
2572
- on('reset', subscription.reset);
2573
- }
2574
- });
2575
- return {
2576
- state,
2577
- get,
2578
- set,
2579
- on,
2580
- onChange,
2581
- use,
2582
- dispose,
2583
- reset,
2584
- };
2585
- };
2586
- const removeFromArray = (array, item) => {
2587
- const index = array.indexOf(item);
2588
- if (index >= 0) {
2589
- array[index] = array[array.length - 1];
2590
- array.length--;
2591
- }
2592
- };
2593
-
2594
- const createStore = (defaultState, shouldUpdate) => {
2595
- const map = createObservableMap(defaultState, shouldUpdate);
2596
- stencilSubscription(map);
2597
- return map;
2598
- };
2599
-
2600
2678
  function e(e){this.message=e;}e.prototype=new Error,e.prototype.name="InvalidCharacterError";var r="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(r){var t=String(r).replace(/=+$/,"");if(t.length%4==1)throw new e("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,o,a=0,i=0,c="";o=t.charAt(i++);~o&&(n=a%4?64*n+o:o,a++%4)?c+=String.fromCharCode(255&n>>(-2*a&6)):0)o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(o);return c};function t(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw "Illegal base64url string!"}try{return function(e){return decodeURIComponent(r(e).replace(/(.)/g,(function(e,r){var t=r.charCodeAt(0).toString(16).toUpperCase();return t.length<2&&(t="0"+t),"%"+t})))}(t)}catch(e){return r(t)}}function n(e){this.message=e;}function o(e,r){if("string"!=typeof e)throw new n("Invalid token specified");var o=!0===(r=r||{}).header?0:1;try{return JSON.parse(t(e.split(".")[o]))}catch(e){throw new n("Invalid token specified: "+e.message)}}n.prototype=new Error,n.prototype.name="InvalidTokenError";
2601
2679
 
2602
2680
  var __assign$1 = (undefined && undefined.__assign) || function () {
@@ -3286,6 +3364,11 @@ function buildBackendApiClient() {
3286
3364
  });
3287
3365
  }
3288
3366
 
3367
+ const slate = {
3368
+ fundId: 'slate',
3369
+ usi: '32367272075001'
3370
+ };
3371
+
3289
3372
  function hydratePromotedFundChoiceDtoKind(dto) {
3290
3373
  if ('slate' in dto) {
3291
3374
  dto.kind = 'slate';
@@ -3321,33 +3404,33 @@ function hydratePromotedFundChoiceDtoKind(dto) {
3321
3404
  function getPromotedFundUsi(dto) {
3322
3405
  switch (dto.kind) {
3323
3406
  case 'slate':
3324
- return none;
3407
+ return slate.usi;
3325
3408
  case 'australianRetirementTrust':
3326
- return some(dto.australianRetirementTrust.usi);
3409
+ return dto.australianRetirementTrust.usi;
3327
3410
  case 'aware':
3328
- return some(dto.aware.usi);
3411
+ return dto.aware.usi;
3329
3412
  case 'active':
3330
- return some(dto.active.usi);
3413
+ return dto.active.usi;
3331
3414
  case 'australianEthical':
3332
- return some(dto.australianEthical.usi);
3415
+ return dto.australianEthical.usi;
3333
3416
  case 'virgin':
3334
- return some(dto.virgin.usi);
3417
+ return dto.virgin.usi;
3335
3418
  case 'spirit':
3336
- return some(dto.spirit.usi);
3419
+ return dto.spirit.usi;
3337
3420
  case 'firstSuper':
3338
- return some(dto.firstSuper.usi);
3421
+ return dto.firstSuper.usi;
3339
3422
  case 'mercerMyChoice':
3340
- return some(dto.mercerMyChoice.usi);
3423
+ return dto.mercerMyChoice.usi;
3341
3424
  case 'generic':
3342
- return some(dto.generic.usi);
3425
+ return dto.generic.usi;
3343
3426
  default:
3344
- return none;
3427
+ return '';
3345
3428
  }
3346
3429
  }
3347
3430
  function getPromotedFundId(dto) {
3348
3431
  switch (dto.kind) {
3349
3432
  case 'slate':
3350
- return 'slate';
3433
+ return slate.fundId;
3351
3434
  case 'australianRetirementTrust':
3352
3435
  return 'australian-retirement-trust';
3353
3436
  case 'aware':
@@ -3373,7 +3456,7 @@ function getPromotedFundId(dto) {
3373
3456
  function getSuperChoiceUsi(dto) {
3374
3457
  switch (dto.kind) {
3375
3458
  case 'Promoted':
3376
- return getPromotedFundUsi(dto.promoted);
3459
+ return some(getPromotedFundUsi(dto.promoted));
3377
3460
  case 'MyOwnFund':
3378
3461
  return some(dto.myOwnFund.usi);
3379
3462
  case 'SMSF':
@@ -3393,33 +3476,33 @@ function getSuperChoiceUsi(dto) {
3393
3476
  function getPromotedFundMemberNumber(dto) {
3394
3477
  switch (dto.kind) {
3395
3478
  case 'slate':
3396
- return some(dto.slate.memberNumber);
3479
+ return dto.slate.memberNumber;
3397
3480
  case 'australianRetirementTrust':
3398
- return some(dto.australianRetirementTrust.memberNumber);
3481
+ return dto.australianRetirementTrust.memberNumber;
3399
3482
  case 'aware':
3400
- return some(dto.aware.memberNumber);
3483
+ return dto.aware.memberNumber;
3401
3484
  case 'active':
3402
- return some(dto.active.memberNumber);
3485
+ return dto.active.memberNumber;
3403
3486
  case 'australianEthical':
3404
- return some(dto.australianEthical.memberNumber);
3487
+ return dto.australianEthical.memberNumber;
3405
3488
  case 'virgin':
3406
- return some(dto.virgin.memberNumber);
3489
+ return dto.virgin.memberNumber;
3407
3490
  case 'spirit':
3408
- return some(dto.spirit.memberNumber);
3491
+ return dto.spirit.memberNumber;
3409
3492
  case 'firstSuper':
3410
- return some(dto.firstSuper.memberNumber);
3493
+ return dto.firstSuper.memberNumber;
3411
3494
  case 'mercerMyChoice':
3412
- return some(dto.mercerMyChoice.memberNumber);
3495
+ return dto.mercerMyChoice.memberNumber;
3413
3496
  case 'generic':
3414
- return some(dto.generic.memberNumber);
3497
+ return dto.generic.memberNumber;
3415
3498
  default:
3416
- return none;
3499
+ return '';
3417
3500
  }
3418
3501
  }
3419
3502
  function getSuperChoiceMemberNumber(dto) {
3420
3503
  switch (dto.kind) {
3421
3504
  case 'Promoted':
3422
- return getPromotedFundMemberNumber(dto.promoted);
3505
+ return some(getPromotedFundMemberNumber(dto.promoted));
3423
3506
  case 'MyOwnFund':
3424
3507
  return some(dto.myOwnFund.memberNumber);
3425
3508
  case 'DefinedBenefits':
@@ -3497,15 +3580,6 @@ class SuperSelectionApi {
3497
3580
  }
3498
3581
  return response;
3499
3582
  }
3500
- async getCampaignConnectAsync() {
3501
- return buildBackendApiClient()
3502
- .url('campaign-connect')
3503
- .get()
3504
- .notFound(() => {
3505
- throw new Error('Failed to fetch campaign connect.');
3506
- })
3507
- .json();
3508
- }
3509
3583
  async clickPromotedTileAsync(payload) {
3510
3584
  return buildBackendApiClient().url('click-promoted-tile').post(payload).res();
3511
3585
  }
@@ -3560,13 +3634,12 @@ const initialState = {
3560
3634
  profileConfiguration: Option.none,
3561
3635
  hasSuccessPageBeenAcknowledged: false,
3562
3636
  hasSuperSelectionBeenSubmitted: false,
3563
- campaignConnectEnabled: false,
3564
3637
  isDefinedBenefitsEligible: Option.none,
3565
- campaignConnect: Option.none,
3566
- superCampaignEnabled: false,
3638
+ superCampaignEnabled: true,
3567
3639
  superCampaignState: undefined,
3568
3640
  superCampaignComponentStatus: SuperCampaignComponentStatus.NotLoaded,
3569
- superCampaignIsInView: false
3641
+ hideFooterSection: false,
3642
+ bringYourOwnFundCustomStepEnabled: false
3570
3643
  };
3571
3644
 
3572
3645
  class SuperSelectionAppService {
@@ -3606,9 +3679,6 @@ class SuperSelectionAppService {
3606
3679
  if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
3607
3680
  return this.superCampaignState.PromotedFundIds;
3608
3681
  }
3609
- if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
3610
- return this._state.campaignConnect.value.promotedFunds.map((v) => v.fundId);
3611
- }
3612
3682
  if (Option.isNone(this._state.promotedFunds)) {
3613
3683
  throw Error('Promoted Funds is not set');
3614
3684
  }
@@ -3618,35 +3688,15 @@ class SuperSelectionAppService {
3618
3688
  if (this.state.superCampaignEnabled && this.superCampaignState !== undefined) {
3619
3689
  return Option.fromNullable(this.superCampaignState.DefaultFundPosition);
3620
3690
  }
3621
- if (this._state.campaignConnectEnabled && Option.isSome(this._state.campaignConnect)) {
3622
- const index = this._state.campaignConnect.value.promotedFunds.findIndex((v) => v.type === 'promoted-default');
3623
- if (index === -1) {
3624
- return Option.fromNullable(null);
3625
- }
3626
- else {
3627
- return Option.fromNullable(index + 1);
3628
- }
3629
- }
3630
3691
  return Option.none;
3631
3692
  }
3632
3693
  get promotedFundsConfig() {
3633
3694
  return {
3634
3695
  shownFunds: this.promotedFunds,
3635
3696
  promotedDefaultFundPosition: Option.toUndefined(this.promotedDefaultFundPosition),
3636
- promotedFundsConfigSource: this.isUsingSuperCampaign
3637
- ? 'superCampaign'
3638
- : Option.isSome(this._state.campaignConnect)
3639
- ? 'campaignConnect'
3640
- : 'superSelection'
3697
+ promotedFundsConfigSource: this.isUsingSuperCampaign ? 'superCampaign' : 'superSelection'
3641
3698
  };
3642
3699
  }
3643
- get definedBenefitsFundId() {
3644
- if (Option.isSome(this._state.campaignConnect)) {
3645
- const definedBenefitsFund = this._state.campaignConnect.value.promotedFunds.find((fund) => fund.type == 'defined-benefits');
3646
- return Option.fromNullable(definedBenefitsFund === null || definedBenefitsFund === void 0 ? void 0 : definedBenefitsFund.fundId);
3647
- }
3648
- return Option.none;
3649
- }
3650
3700
  get profileId() {
3651
3701
  if (Option.isNone(this._state.profileId)) {
3652
3702
  throw Error('Failed to get Profile ID from JWT');
@@ -3678,9 +3728,6 @@ class SuperSelectionAppService {
3678
3728
  markSuperSelectionAsSubmitted() {
3679
3729
  this._state.hasSuperSelectionBeenSubmitted = true;
3680
3730
  }
3681
- get campaignConnectEnabled() {
3682
- return this._state.campaignConnectEnabled;
3683
- }
3684
3731
  get isDefinedBenefitsEligible() {
3685
3732
  return this._state.isDefinedBenefitsEligible;
3686
3733
  }
@@ -3690,17 +3737,11 @@ class SuperSelectionAppService {
3690
3737
  this._state.profileConfiguration = Option.fromNullable(appStateResponse.profileConfiguration);
3691
3738
  this._state.superBuyer = Option.fromNullable(appStateResponse.superBuyer);
3692
3739
  this._state.promotedFunds = Option.fromNullable(appStateResponse.promotedFunds);
3693
- this._state.campaignConnectEnabled = appStateResponse.campaignConnectEnabled;
3694
- this._state.superCampaignEnabled = appStateResponse.superCampaignEnabled;
3740
+ this._state.bringYourOwnFundCustomStepEnabled =
3741
+ appStateResponse.bringYourOwnFundCustomStepEnabled;
3695
3742
  this._state.superChoicePrefill = Option.fromNullable(appStateResponse.prefill);
3696
3743
  this._state.isDefinedBenefitsEligible = Option.fromNullable(appStateResponse.isDefinedBenefitsEligible);
3697
3744
  }
3698
- async loadCampaignConnectAsync() {
3699
- if (this._state.campaignConnectEnabled) {
3700
- const campaignConnect = await superSelectionApi.getCampaignConnectAsync();
3701
- this._state.campaignConnect = Option.fromNullable(campaignConnect);
3702
- }
3703
- }
3704
3745
  setSuperCampaignPromotedFundsShown(shownFunds) {
3705
3746
  if (this._state.superCampaignState !== undefined)
3706
3747
  this._state.superCampaignState.promotedFundsShown = shownFunds;
@@ -3731,320 +3772,57 @@ class SuperSelectionAppService {
3731
3772
  get isUsingSuperCampaign() {
3732
3773
  return this.state.superCampaignEnabled && this.superCampaignState !== undefined;
3733
3774
  }
3775
+ get isBringYourOwnFundCustomStepEnabled() {
3776
+ return this.state.bringYourOwnFundCustomStepEnabled;
3777
+ }
3734
3778
  get isSuperCampaignFallbackActivated() {
3735
3779
  return (this.state.superCampaignEnabled &&
3736
3780
  this.superCampaignComponentStatus === SuperCampaignComponentStatus.NotWorking);
3737
3781
  }
3738
- get superCampaignIsInView() {
3739
- return this._state.superCampaignIsInView;
3740
- }
3741
- set superCampaignIsInView(value) {
3742
- this._state.superCampaignIsInView = value;
3743
- }
3744
- }
3745
- const superSelectionAppService = new SuperSelectionAppService();
3746
-
3747
- const SuperFundDisclaimerViewedDetail = {
3748
- create: (superCampaignEnabled) => {
3749
- let isDefinedBenefitsEligibleString = 'Not set';
3750
- if (Option.isSome(superSelectionAppService.isDefinedBenefitsEligible)) {
3751
- isDefinedBenefitsEligibleString = superSelectionAppService.isDefinedBenefitsEligible.value
3752
- ? 'True'
3753
- : 'False';
3754
- }
3755
- return {
3756
- isDefinedBenefitsEligible: isDefinedBenefitsEligibleString,
3757
- superCampaignEnabled: superCampaignEnabled
3758
- };
3782
+ get hideFooterSection() {
3783
+ return this._state.hideFooterSection;
3759
3784
  }
3760
- };
3761
-
3762
- const initial = {
3763
- fund: {
3764
- id: '',
3765
- type: 'null'
3785
+ set hideFooterSection(value) {
3786
+ this._state.hideFooterSection = value;
3766
3787
  }
3767
- };
3768
- const { state, reset } = createStore(initial);
3769
-
3770
- class EventTrackingApi {
3771
- static get Instance() {
3772
- return this.instance || (this.instance = new this());
3788
+ get backendUrl() {
3789
+ return Option.map(this.getBaseUrl)(this.state.apiBaseUrl);
3773
3790
  }
3774
- async PostAnalyticsEventAsync(event) {
3775
- return buildBackendApiClient().url('analytics-events').post(event).res();
3791
+ getBaseUrl(url) {
3792
+ const parsedUrl = new URL(url);
3793
+ return `${parsedUrl.protocol}//${parsedUrl.hostname}${parsedUrl.port.length > 0 ? `:${parsedUrl.port}` : ''}`;
3776
3794
  }
3777
3795
  }
3796
+ const superSelectionAppService = new SuperSelectionAppService();
3778
3797
 
3779
- class EventTrackingService {
3780
- constructor() {
3781
- this.eventTrackingApi = EventTrackingApi.Instance;
3798
+ class NavigationService {
3799
+ navigateInternally(history, route) {
3800
+ const path = `${this.appBaseUrl}${this.toRouteWithLeadingSlash(route)}`;
3801
+ iframe.navigation(path);
3802
+ history.push(path);
3782
3803
  }
3783
- static get Instance() {
3784
- return this.instance || (this.instance = new this());
3804
+ navigateInternallyToStandardChoice(options) {
3805
+ state.handleSubmitFn = options.handleSubmitFn;
3806
+ state.fundName = options.fundName;
3807
+ state.fundDetails = options.fundDetails;
3808
+ state.promotedFundId = options.promotedFundId;
3809
+ this.navigateInternally(options.history, SuperSelectionAppRoutes.StandardChoice);
3785
3810
  }
3786
- async TrackSuperFundPdsViewedAsync(detail) {
3787
- return this.trackEventAsync({
3788
- SuperFundPdsViewed: detail
3789
- });
3811
+ toExternalUrl(url) {
3812
+ const externalUrl = new URL(url);
3813
+ externalUrl.searchParams.append('_extnav', 'true');
3814
+ return externalUrl.href;
3790
3815
  }
3791
- async TrackPromotedSuperFundDetailViewedAsync(detail) {
3792
- return this.trackEventAsync({
3793
- SuperFundDetailViewed: {
3794
- PromotedFund: detail
3795
- }
3796
- });
3816
+ get appBaseUrl() {
3817
+ const baseUrl = superSelectionAppService.appBaseUrl;
3818
+ return baseUrl.replace(/\/$/, '');
3797
3819
  }
3798
- async TrackPromotedDefaultSuperFundDetailViewedAsync(detail) {
3799
- return this.trackEventAsync({
3800
- SuperFundDetailViewed: {
3801
- PromotedDefaultFund: detail
3802
- }
3803
- });
3804
- }
3805
- async TrackMyOwnSuperFundDetailViewedAsync(detail) {
3806
- return this.trackEventAsync({
3807
- SuperFundDetailViewed: {
3808
- MyOwnFund: detail
3809
- }
3810
- });
3811
- }
3812
- async TrackSmsfSuperFundDetailViewedAsync(detail) {
3813
- return this.trackEventAsync({
3814
- SuperFundDetailViewed: {
3815
- Smsf: detail
3816
- }
3817
- });
3818
- }
3819
- async TrackDefaultSuperFundDetailViewedAsync(detail) {
3820
- return this.trackEventAsync({
3821
- SuperFundDetailViewed: {
3822
- DefaultFund: detail
3823
- }
3824
- });
3825
- }
3826
- async TrackSuperFundNominationViewedAsync(detail) {
3827
- return this.trackEventAsync({
3828
- SuperFundNominationViewed: detail
3829
- });
3830
- }
3831
- async TrackSuperFundNominationDeclinedAsync(detail) {
3832
- return this.trackEventAsync({
3833
- SuperFundNominationDeclined: detail
3834
- });
3835
- }
3836
- async TrackSuperFundDisclaimerViewedAsync(detail) {
3837
- return this.trackEventAsync({
3838
- SuperFundDisclaimerViewed: detail
3839
- });
3840
- }
3841
- async TrackSuperFundDisclaimerAcceptedAsync(detail) {
3842
- return this.trackEventAsync({
3843
- SuperFundDisclaimerAccepted: detail
3844
- });
3845
- }
3846
- async TrackSuperFundPrefillViewedAsync(detail) {
3847
- return this.trackEventAsync({
3848
- SuperFundPrefillViewed: detail
3849
- });
3850
- }
3851
- async TrackSuperFundPrefillDeclinedAsync(detail) {
3852
- return this.trackEventAsync({
3853
- SuperFundPrefillDeclined: detail
3854
- });
3855
- }
3856
- async TrackSuperFundDetailChangeRequestedAsync(detail) {
3857
- return this.trackEventAsync({
3858
- SuperFundDetailChangeRequested: detail
3859
- });
3860
- }
3861
- async TrackSuperCampaignActivationSucceededAsync(detail) {
3862
- return this.trackEventAsync({
3863
- SuperCampaignActivationSucceeded: detail
3864
- });
3865
- }
3866
- async trackEventAsync(event) {
3867
- try {
3868
- await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
3869
- }
3870
- catch (_a) {
3871
- return;
3872
- }
3873
- }
3874
- }
3875
-
3876
- function appReady() {
3877
- postMessage({
3878
- type: 'appReady'
3879
- });
3880
- }
3881
- function postMessage(message, origin) {
3882
- if (origin === undefined)
3883
- origin = '*';
3884
- message.sender = 'flare';
3885
- window.parent.postMessage(message, origin);
3886
- }
3887
- function resize(height, width) {
3888
- postMessage({
3889
- type: 'contentResized',
3890
- height,
3891
- width
3892
- });
3893
- }
3894
- function navigation(url) {
3895
- postMessage({
3896
- type: 'pageNavigated',
3897
- url
3898
- });
3899
- }
3900
- function complete() {
3901
- postMessage({ type: 'complete' });
3902
- }
3903
- function submitSuccess() {
3904
- postMessage({
3905
- type: 'submitSuccess'
3906
- });
3907
- }
3908
- const iframe = { appReady, resize, navigation, complete, submitSuccess };
3909
-
3910
- const initial$1 = {
3911
- handleSubmitFn: async function () {
3912
- return;
3913
- },
3914
- fundName: '',
3915
- fundDetails: { type: 'null' },
3916
- promotedFundId: undefined
3917
- };
3918
- const { state: state$1 } = createStore(initial$1);
3919
-
3920
- var SuperSelectionAppRoutes;
3921
- (function (SuperSelectionAppRoutes) {
3922
- SuperSelectionAppRoutes["ConsentPage"] = "/consent";
3923
- SuperSelectionAppRoutes["ExistingChoicePage"] = "/existing";
3924
- SuperSelectionAppRoutes["SuperCampaign"] = "/super-campaign";
3925
- SuperSelectionAppRoutes["ChoicePage"] = "/";
3926
- SuperSelectionAppRoutes["SlateJoin"] = "/slate/join/";
3927
- SuperSelectionAppRoutes["PromotedFundJoinV1"] = "/promoted-fund/join/v1";
3928
- SuperSelectionAppRoutes["PromotedFundJoinV2"] = "/promoted-fund/join/v2";
3929
- SuperSelectionAppRoutes["MyOwnFund"] = "/super-choice/my-own-fund/";
3930
- SuperSelectionAppRoutes["Prefill"] = "/super-choice/prefill/";
3931
- SuperSelectionAppRoutes["PrefillInvalidMyOwnFundPage"] = "/super-choice/sss-prefill-invalid-my-own-fund/";
3932
- SuperSelectionAppRoutes["PrefillMyOwnFundPage"] = "/super-choice/prefill-my-own-fund/";
3933
- SuperSelectionAppRoutes["PrefillSMSFPage"] = "/super-choice/prefill-smsf/";
3934
- SuperSelectionAppRoutes["PrefillInvalidSMSFPage"] = "/super-choice/prefill-invalid-smsf/";
3935
- SuperSelectionAppRoutes["SelfManagedFund"] = "/super-choice/smsf/";
3936
- SuperSelectionAppRoutes["DefaultFund"] = "/super-choice/default/";
3937
- SuperSelectionAppRoutes["StandardChoice"] = "/standard-choice/";
3938
- SuperSelectionAppRoutes["Success"] = "/success/";
3939
- })(SuperSelectionAppRoutes || (SuperSelectionAppRoutes = {}));
3940
- const superSelectionAppStencilRoutes = [
3941
- h("stencil-route", { url: SuperSelectionAppRoutes.ConsentPage, component: "sss-consent-page-wrapper" }),
3942
- h("stencil-route", { url: SuperSelectionAppRoutes.ExistingChoicePage, component: "sss-existing-choice-page" }),
3943
- h("stencil-route", { url: SuperSelectionAppRoutes.SuperCampaign, component: "sss-super-campaign-host" }),
3944
- h("stencil-route", { exact: true, url: SuperSelectionAppRoutes.ChoicePage, component: "sss-super-choice-page-wrapper" }),
3945
- h("stencil-route", { url: SuperSelectionAppRoutes.SlateJoin, component: "sss-slate-join-page" }),
3946
- h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV1, component: "sss-promoted-fund-join-v1-page" }),
3947
- h("stencil-route", { url: SuperSelectionAppRoutes.PromotedFundJoinV2, component: "sss-promoted-fund-join-v2-page" }),
3948
- h("stencil-route", { url: SuperSelectionAppRoutes.MyOwnFund, component: "sss-my-own-fund" }),
3949
- h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage, component: "sss-prefill-invalid-my-own-fund" }),
3950
- h("stencil-route", { url: SuperSelectionAppRoutes.Prefill, component: "sss-prefill" }),
3951
- h("stencil-route", { url: SuperSelectionAppRoutes.PrefillMyOwnFundPage, component: "sss-prefill-my-own-fund" }),
3952
- h("stencil-route", { url: SuperSelectionAppRoutes.PrefillSMSFPage, component: "sss-prefill-smsf" }),
3953
- h("stencil-route", { url: SuperSelectionAppRoutes.PrefillInvalidSMSFPage, component: "sss-prefill-invalid-smsf" }),
3954
- h("stencil-route", { url: SuperSelectionAppRoutes.SelfManagedFund, component: "sss-self-managed-fund" }),
3955
- h("stencil-route", { url: SuperSelectionAppRoutes.DefaultFund, component: "sss-default-fund" }),
3956
- h("stencil-route", { url: SuperSelectionAppRoutes.StandardChoice, component: "sss-standard-choice-form" }),
3957
- h("stencil-route", { url: SuperSelectionAppRoutes.Success, component: "sss-success" })
3958
- ];
3959
-
3960
- class NavigationService {
3961
- navigateInternally(history, route) {
3962
- const path = `${this.appBaseUrl}${this.toRouteWithLeadingSlash(route)}`;
3963
- iframe.navigation(path);
3964
- history.push(path);
3965
- }
3966
- navigateInternallyToStandardChoice(options) {
3967
- state$1.handleSubmitFn = options.handleSubmitFn;
3968
- state$1.fundName = options.fundName;
3969
- state$1.fundDetails = options.fundDetails;
3970
- state$1.promotedFundId = options.promotedFundId;
3971
- this.navigateInternally(options.history, SuperSelectionAppRoutes.StandardChoice);
3972
- }
3973
- toExternalUrl(url) {
3974
- const externalUrl = new URL(url);
3975
- externalUrl.searchParams.append('_extnav', 'true');
3976
- return externalUrl.href;
3977
- }
3978
- get appBaseUrl() {
3979
- const baseUrl = superSelectionAppService.appBaseUrl;
3980
- return baseUrl.replace(/\/$/, '');
3981
- }
3982
- toRouteWithLeadingSlash(route) {
3983
- return route.length > 0 && route[0] === '/' ? route : `/${route}`;
3820
+ toRouteWithLeadingSlash(route) {
3821
+ return route.length > 0 && route[0] === '/' ? route : `/${route}`;
3984
3822
  }
3985
3823
  }
3986
3824
  const navigationService = new NavigationService();
3987
3825
 
3988
- const Link = (props, children) => {
3989
- return (h("a", { class: props.className || 'font-medium underline underline-offset-2 hover:text-gray-600', target: "_blank", href: navigationService.toExternalUrl(props.href), onClick: props.onClick }, children));
3990
- };
3991
- const PoweredByFlareFS = 'Powered by Flare FS';
3992
- function pdsViewedAsync(name, usi) {
3993
- return EventTrackingService.Instance.TrackSuperFundPdsViewedAsync({
3994
- fundUsi: usi,
3995
- fundName: name,
3996
- pageName: 'Panel Fund Page',
3997
- superCampaignEnabled: false
3998
- });
3999
- }
4000
-
4001
- const Consent = class {
4002
- constructor(hostRef) {
4003
- registerInstance(this, hostRef);
4004
- this.campaignConnectRequestInProgress = false;
4005
- this.eventTrackingService = EventTrackingService.Instance;
4006
- }
4007
- componentDidLoad() {
4008
- return this.eventTrackingService.TrackSuperFundDisclaimerViewedAsync(SuperFundDisclaimerViewedDetail.create(false));
4009
- }
4010
- render() {
4011
- if (this.campaignConnectRequestInProgress) {
4012
- return h("sss-loading-super-indicator", null);
4013
- }
4014
- return (h("div", null, h("div", { class: "text-2xl sm:text-3xl font-bold text-center leading-8" }, "Important information about super"), h("div", { class: "sm:text-lg text-gray-600 mt-3 sm:mt-4 max-w-800 text-center leading-7 sm:leading-8" }, "The choice of superannuation fund is an important personal financial decision. Next, you\u2019ll be asked to nominate a super fund to receive your employer contributions."), h("div", { class: "flex justify-center mt-8 sm:mt-12" }, h("div", { class: "border shadow-sm p-4 pb-6 sm:p-6 sm:pb-8 max-w-560 rounded-lg" }, h("div", { class: "sm:text-lg font-bold leading-6" }, "By clicking \u201CContinue\u201D you acknowledge that:"), h("ul", { class: "list-disc list-outside ml-6 mt-3 mb-6 space-y-2 text-sm leading-6" }, h("li", null, "Flare (we/us) provides this paperless employee management service, will feature superannuation funds and offer you employee benefits that you may be interested in;"), h("li", null, "all content contained in the following pages does not take into account any of your objectives, financial situation or needs and does not constitute financial product advice;"), h("li", null, "in featuring any superannuation funds, we, the technology partner you are accessing us via, or your employer, are not providing any opinion or recommendation (actual or implied) in relation to the suitability or appropriateness of the featured funds;"), h("li", null, "Trustees of the featured superannuation funds pay fees to Flare and/or its associates. Some funds pay us a fee if you choose one of the featured funds, while others pay us to have their application form on our platform;"), h("li", null, "in the event that you choose one of the featured superannuation funds, we may pass on your personal information and TFN to a related party for the purpose of completing your chosen fund's application form."), h("li", null, "Your personal data that is provided to us will be subject to our", ' ', h(Link, { className: "font-medium text-blue-600 hover:text-blue-800", href: "https://www.flarehr.com/privacy-policy" }, "Privacy Policy"), ".")), h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSuperFundDisclaimerAccepted() }, "Continue")))));
4015
- }
4016
- async handleSuperFundDisclaimerAccepted() {
4017
- await this.eventTrackingService.TrackSuperFundDisclaimerAcceptedAsync({
4018
- superCampaignEnabled: false
4019
- });
4020
- if (superSelectionAppService.campaignConnectEnabled) {
4021
- this.campaignConnectRequestInProgress = true;
4022
- await superSelectionAppService.loadCampaignConnectAsync();
4023
- if (superSelectionAppService.isDefinedBenefitsEligible &&
4024
- Option.isSome(superSelectionAppService.definedBenefitsFundId)) {
4025
- state.fund = {
4026
- id: superSelectionAppService.definedBenefitsFundId.value,
4027
- type: 'DefinedBenefits'
4028
- };
4029
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PromotedFundJoinV2);
4030
- return;
4031
- }
4032
- }
4033
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
4034
- }
4035
- };
4036
- injectHistory(Consent);
4037
-
4038
- const ConsentWrapper = class {
4039
- constructor(hostRef) {
4040
- registerInstance(this, hostRef);
4041
- }
4042
- render() {
4043
- return superSelectionAppService.state.superCampaignEnabled ? (h("sss-super-campaign-host", null)) : (h("sss-consent-page", null));
4044
- }
4045
- };
4046
- injectHistory(ConsentWrapper);
4047
-
4048
3826
  var CustomFundTypes;
4049
3827
  (function (CustomFundTypes) {
4050
3828
  CustomFundTypes["MyOwnFund"] = "Your current super fund";
@@ -4092,9 +3870,9 @@ const initialStateCustomFund = {
4092
3870
  }
4093
3871
  ]
4094
3872
  };
4095
- const { state: state$2, reset: reset$1 } = createStore(initialStateCustomFund);
3873
+ const { state: state$1, reset } = createStore(initialStateCustomFund);
4096
3874
 
4097
- const customFundOptions = state$2.customFunds;
3875
+ const customFundOptions = state$1.customFunds;
4098
3876
  const CustomFund = class {
4099
3877
  constructor(hostRef) {
4100
3878
  registerInstance(this, hostRef);
@@ -4149,67 +3927,183 @@ class AustralianFundLookupService {
4149
3927
  }
4150
3928
  const australianFundLookupService = new AustralianFundLookupService();
4151
3929
 
4152
- class CustomFundChoiceApi {
4153
- async submitDefaultFundChoiceAsync(dto) {
4154
- return buildBackendApiClient()
4155
- .url('super-choice/default')
4156
- .post(dto)
4157
- .badRequest(() => {
4158
- throw new Error('Failed to process default fund join request');
4159
- })
4160
- .text();
4161
- }
4162
- async submitCustomFundChoiceAsync(dto) {
4163
- return buildBackendApiClient()
4164
- .url('super-choice/custom-fund')
4165
- .post(dto)
4166
- .badRequest(() => {
4167
- throw new Error('Failed to process custom fund join request');
4168
- })
4169
- .text();
4170
- }
4171
- async submitSelfManagedFundChoiceAsync(dto) {
4172
- return buildBackendApiClient()
4173
- .url('super-choice/smsf')
4174
- .post(dto)
4175
- .badRequest(() => {
4176
- throw new Error('Failed to process SMSF choice request');
4177
- })
4178
- .text();
4179
- }
4180
- async submitDefinedBenefitsChoiceAsync(dto) {
4181
- return buildBackendApiClient()
4182
- .url('super-choice/defined-benefits')
4183
- .post(dto)
4184
- .badRequest(() => {
4185
- throw new Error('Failed to process Defined Benefits choice request');
4186
- })
4187
- .text();
3930
+ class EventTrackingApi {
3931
+ static get Instance() {
3932
+ return this.instance || (this.instance = new this());
4188
3933
  }
4189
- async validateAbnForSMSF(abn) {
4190
- const response = await buildBackendApiClient()
4191
- .url(`super-choice/smsf/${abn}/validate`)
4192
- .get()
4193
- .badRequest(() => {
4194
- throw new Error('Failed to verify that if the provided abn is used for regulated fund');
4195
- })
4196
- .json();
4197
- return response.result;
3934
+ async PostAnalyticsEventAsync(event) {
3935
+ return buildBackendApiClient().url('analytics-events').post(event).res();
4198
3936
  }
4199
3937
  }
4200
- const customFundChoiceApi = new CustomFundChoiceApi();
4201
3938
 
4202
- const DefaultFund = class {
4203
- constructor(hostRef) {
4204
- registerInstance(this, hostRef);
4205
- this.defaultFundProductName = 'Loading fund...';
4206
- this.eventTrackingService = EventTrackingService.Instance;
3939
+ class EventTrackingService {
3940
+ constructor() {
3941
+ this.eventTrackingApi = EventTrackingApi.Instance;
4207
3942
  }
4208
- async componentWillLoad() {
4209
- const defaultFundUsi = superSelectionAppService.defaultFundUsi;
4210
- if (Option.isNone(defaultFundUsi)) {
4211
- return;
4212
- }
3943
+ static get Instance() {
3944
+ return this.instance || (this.instance = new this());
3945
+ }
3946
+ async TrackSuperFundPdsViewedAsync(detail) {
3947
+ return this.trackEventAsync({
3948
+ SuperFundPdsViewed: detail
3949
+ });
3950
+ }
3951
+ async TrackPromotedSuperFundDetailViewedAsync(detail) {
3952
+ return this.trackEventAsync({
3953
+ SuperFundDetailViewed: {
3954
+ PromotedFund: detail
3955
+ }
3956
+ });
3957
+ }
3958
+ async TrackPromotedDefaultSuperFundDetailViewedAsync(detail) {
3959
+ return this.trackEventAsync({
3960
+ SuperFundDetailViewed: {
3961
+ PromotedDefaultFund: detail
3962
+ }
3963
+ });
3964
+ }
3965
+ async TrackMyOwnSuperFundDetailViewedAsync(detail) {
3966
+ return this.trackEventAsync({
3967
+ SuperFundDetailViewed: {
3968
+ MyOwnFund: detail
3969
+ }
3970
+ });
3971
+ }
3972
+ async TrackSmsfSuperFundDetailViewedAsync(detail) {
3973
+ return this.trackEventAsync({
3974
+ SuperFundDetailViewed: {
3975
+ Smsf: detail
3976
+ }
3977
+ });
3978
+ }
3979
+ async TrackDefaultSuperFundDetailViewedAsync(detail) {
3980
+ return this.trackEventAsync({
3981
+ SuperFundDetailViewed: {
3982
+ DefaultFund: detail
3983
+ }
3984
+ });
3985
+ }
3986
+ async TrackSuperFundNominationViewedAsync(detail) {
3987
+ return this.trackEventAsync({
3988
+ SuperFundNominationViewed: detail
3989
+ });
3990
+ }
3991
+ async TrackSuperFundNominationDeclinedAsync(detail) {
3992
+ return this.trackEventAsync({
3993
+ SuperFundNominationDeclined: detail
3994
+ });
3995
+ }
3996
+ async TrackSuperFundDisclaimerViewedAsync(detail) {
3997
+ return this.trackEventAsync({
3998
+ SuperFundDisclaimerViewed: detail
3999
+ });
4000
+ }
4001
+ async TrackSuperFundDisclaimerAcceptedAsync(detail) {
4002
+ return this.trackEventAsync({
4003
+ SuperFundDisclaimerAccepted: detail
4004
+ });
4005
+ }
4006
+ async TrackSuperFundPrefillViewedAsync(detail) {
4007
+ return this.trackEventAsync({
4008
+ SuperFundPrefillViewed: detail
4009
+ });
4010
+ }
4011
+ async TrackSuperFundPrefillDeclinedAsync(detail) {
4012
+ return this.trackEventAsync({
4013
+ SuperFundPrefillDeclined: detail
4014
+ });
4015
+ }
4016
+ async TrackSuperFundDetailChangeRequestedAsync(detail) {
4017
+ return this.trackEventAsync({
4018
+ SuperFundDetailChangeRequested: detail
4019
+ });
4020
+ }
4021
+ async TrackSuperCampaignActivationSucceededAsync(detail) {
4022
+ return this.trackEventAsync({
4023
+ SuperCampaignActivationSucceeded: detail
4024
+ });
4025
+ }
4026
+ async TrackSuperMyOwnFundEngagementStepActivationSucceeded(fundUsi) {
4027
+ return this.trackEventAsync({
4028
+ SuperMyOwnFundEngagementStepActivationSucceeded: { fundUsi }
4029
+ });
4030
+ }
4031
+ async TrackSuperMyOwnFundEngagementStepContinued(fundUsi, reason) {
4032
+ return this.trackEventAsync({
4033
+ SuperMyOwnFundEngagementStepContinued: { fundUsi, reason }
4034
+ });
4035
+ }
4036
+ async trackEventAsync(event) {
4037
+ try {
4038
+ await this.eventTrackingApi.PostAnalyticsEventAsync({ event });
4039
+ }
4040
+ catch (_a) {
4041
+ return;
4042
+ }
4043
+ }
4044
+ }
4045
+
4046
+ class CustomFundChoiceApi {
4047
+ async submitDefaultFundChoiceAsync(dto) {
4048
+ return buildBackendApiClient()
4049
+ .url('super-choice/default')
4050
+ .post(dto)
4051
+ .badRequest(() => {
4052
+ throw new Error('Failed to process default fund join request');
4053
+ })
4054
+ .text();
4055
+ }
4056
+ async submitCustomFundChoiceAsync(dto) {
4057
+ return buildBackendApiClient()
4058
+ .url('super-choice/custom-fund')
4059
+ .post(dto)
4060
+ .badRequest(() => {
4061
+ throw new Error('Failed to process custom fund join request');
4062
+ })
4063
+ .text();
4064
+ }
4065
+ async submitSelfManagedFundChoiceAsync(dto) {
4066
+ return buildBackendApiClient()
4067
+ .url('super-choice/smsf')
4068
+ .post(dto)
4069
+ .badRequest(() => {
4070
+ throw new Error('Failed to process SMSF choice request');
4071
+ })
4072
+ .text();
4073
+ }
4074
+ async submitDefinedBenefitsChoiceAsync(dto) {
4075
+ return buildBackendApiClient()
4076
+ .url('super-choice/defined-benefits')
4077
+ .post(dto)
4078
+ .badRequest(() => {
4079
+ throw new Error('Failed to process Defined Benefits choice request');
4080
+ })
4081
+ .text();
4082
+ }
4083
+ async validateAbnForSMSF(abn) {
4084
+ const response = await buildBackendApiClient()
4085
+ .url(`super-choice/smsf/${abn}/validate`)
4086
+ .get()
4087
+ .badRequest(() => {
4088
+ throw new Error('Failed to verify that if the provided abn is used for regulated fund');
4089
+ })
4090
+ .json();
4091
+ return response.result;
4092
+ }
4093
+ }
4094
+ const customFundChoiceApi = new CustomFundChoiceApi();
4095
+
4096
+ const DefaultFund = class {
4097
+ constructor(hostRef) {
4098
+ registerInstance(this, hostRef);
4099
+ this.defaultFundProductName = 'Loading fund...';
4100
+ this.eventTrackingService = EventTrackingService.Instance;
4101
+ }
4102
+ async componentWillLoad() {
4103
+ const defaultFundUsi = superSelectionAppService.defaultFundUsi;
4104
+ if (Option.isNone(defaultFundUsi)) {
4105
+ return;
4106
+ }
4213
4107
  this.isDefaultFundExists = true;
4214
4108
  const defaultFundSearchResult = await australianFundLookupService.getFundAsync(defaultFundUsi.value, true);
4215
4109
  if (Option.isNone(defaultFundSearchResult)) {
@@ -4418,466 +4312,6 @@ const SelectInputAsync = class {
4418
4312
  };
4419
4313
  SelectInputAsync.style = dropdownAsyncCss;
4420
4314
 
4421
- const name = 'Active Super';
4422
- const fund = {
4423
- fundId: 'active',
4424
- name,
4425
- logo: 'logo-active.svg',
4426
- route: SuperSelectionAppRoutes.PromotedFundJoinV1,
4427
- features: [
4428
- h("p", null, "Winner of Canstar's 2023 Outstanding Value \u2013 Superannuation Award considering investment performance, fees and product features*"),
4429
- h("p", null, "Recognised as a leader in responsible investment"),
4430
- h("p", null, "Calls answered in 20 seconds (average over 5 years)")
4431
- ],
4432
- featureSubText: (h("span", null, "*Based on a comparison of the Active Super Accumulation Scheme held by those aged 20-69 years and balances between $30,000 and $1.5 million.")),
4433
- disclaimer: (h("p", null,
4434
- "Issued by LGSS Pty Limited as trustee for Local Government Super (Active Super ABN:28 901 371 321). Consider the PDS and TMD at",
4435
- ' ',
4436
- h(Link, { onClick: () => pdsViewedAsync(name), href: "https://www.activesuper.com.au/pds" }, "activesuper.com.au"),
4437
- ' ',
4438
- "before making a decision.")),
4439
- footnoteTextOverride: Option.some(PoweredByFlareFS),
4440
- dtoPropName: 'active'
4441
- };
4442
-
4443
- const name$1 = 'Australian Ethical';
4444
- const pdsUrl = 'https://www.australianethical.com.au/super/pds-forms/';
4445
- const fund$1 = {
4446
- fundId: 'australian-ethical',
4447
- name: name$1,
4448
- logo: 'logo-aus-eth.svg',
4449
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4450
- features: [
4451
- h("p", null,
4452
- "Fastest growing super fund in Australia",
4453
- h("sup", { class: "text-tiny" }, "1")),
4454
- h("p", null,
4455
- "Nil investments in fossil fuel companies",
4456
- h("sup", { class: "text-tiny" }, "2")),
4457
- h("p", null, "Competitive returns")
4458
- ],
4459
- featureSubText: (h("ol", { class: "list-decimal list-outside ml-3" },
4460
- h("li", null, "Source: KPMG Super Insights Report 2022."),
4461
- h("li", null, "All our options go through positive and negative ethical screening in accordance with the Australian Ethical Charter (in place since 1986)."))),
4462
- disclaimer: (h("p", null,
4463
- "Issued by Australian Ethical Superannuation Pty Ltd (ABN 43 079 259 733, RSE L0001441, AFSL 526055). Please consider the",
4464
- ' ',
4465
- h(Link, { href: "https://www.australianethical.com.au/globalassets/pdf-files/forms--pds/superpension/important-information/ae-financial-services-guide_sec.pdf" }, "Financial Services Guide"),
4466
- ", the",
4467
- ' ',
4468
- h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "Product Disclosure Statement"),
4469
- ' ',
4470
- "and",
4471
- ' ',
4472
- h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "Target Market Determination"),
4473
- ' ',
4474
- "available on our",
4475
- ' ',
4476
- h(Link, { href: pdsUrl, onClick: () => pdsViewedAsync(name$1) }, "website"),
4477
- ".")),
4478
- footnoteTextOverride: Option.none,
4479
- dtoPropName: 'australianEthical'
4480
- };
4481
-
4482
- const name$2 = 'Australian Retirement Trust';
4483
- const fund$2 = {
4484
- fundId: 'australian-retirement-trust',
4485
- name: name$2,
4486
- logo: 'logo-art.svg',
4487
- route: SuperSelectionAppRoutes.PromotedFundJoinV1,
4488
- features: [
4489
- h("p", null, "$200 billion in retirement savings"),
4490
- h("p", null, "2+ million members"),
4491
- h("p", null, "A focus on delivering strong, long\u2011term returns")
4492
- ],
4493
- featureSubText: (h("span", null, "QSuper is now part of Australian Retirement Trust. If you have an existing QSuper account, you will continue to hold that account by selecting this option.")),
4494
- disclaimer: (h("p", null,
4495
- "You should consider the",
4496
- ' ',
4497
- h(Link, { href: "https://www.australianretirementtrust.com.au/library/media/pdfs/pds/super-savings-product-disclosure-statement-and-membership-form.pdf", onClick: () => pdsViewedAsync(name$2) }, "Product Disclosure Statement"),
4498
- ' ',
4499
- "and",
4500
- ' ',
4501
- h(Link, { href: "https://www.australianretirementtrust.com.au/tmd" }, "Target Market Determination"),
4502
- ' ',
4503
- "before deciding to invest in or apply to become a member of this fund.")),
4504
- abnInfo: name$2,
4505
- abn: '60 905 115 063',
4506
- footnoteTextOverride: Option.none,
4507
- dtoPropName: 'australianRetirementTrust'
4508
- };
4509
-
4510
- const name$3 = 'Aware Super';
4511
- const fund$3 = {
4512
- fundId: 'aware',
4513
- name: name$3,
4514
- logo: 'logo-aware.svg',
4515
- route: SuperSelectionAppRoutes.PromotedFundJoinV1,
4516
- features: [
4517
- h("p", null, "Awarded Canstar\u2019s Outstanding Value Super^ in 2022 and 2023."),
4518
- h("p", null,
4519
- "Over 1 million",
4520
- h("sup", { class: "text-tiny" }, "\u2021"),
4521
- " Australians trust us with their super."),
4522
- h("p", null, "Our super helpful app helps you stay in control of your super.")
4523
- ],
4524
- featureSubText: (h("div", { class: "space-y-0.5" },
4525
- h("p", null,
4526
- "^ See ",
4527
- h(Link, { href: "https://aware.com.au/awards" }, "aware.com.au/awards"),
4528
- " for more information"),
4529
- h("p", null,
4530
- h("sup", { class: "text-tiny" }, "\u2021"),
4531
- " Member numbers as of December 2023"))),
4532
- disclaimer: (h("p", null,
4533
- "You should consider the",
4534
- ' ',
4535
- h(Link, { href: "https://aware.com.au/member/campaign/flare-documents?cid=par-aq-no-su-Flare-PDSTMD-Direct-ImpDocs-", onClick: () => pdsViewedAsync(name$3) }, "Product Disclosure Statement and Target Market Determination"),
4536
- ' ',
4537
- "before deciding to invest in or apply to become a member of this fund.")),
4538
- abnInfo: `Aware Super Pty Ltd`,
4539
- abn: '53 226 460 365',
4540
- footnoteTextOverride: Option.none,
4541
- dtoPropName: 'aware'
4542
- };
4543
-
4544
- const name$4 = 'First Super';
4545
- const fund$4 = {
4546
- fundId: 'first-super',
4547
- name: name$4,
4548
- logo: 'logo-first.svg',
4549
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4550
- features: [
4551
- h("p", null, "Industry SuperFund that offers five investment options and default insurance"),
4552
- h("p", null, "Strong long-term investment returns and superior customer service - members first"),
4553
- h("p", null, "Established super fund \u2013 anyone can join including KiwiSaver members")
4554
- ],
4555
- disclaimer: (h("div", null,
4556
- h("p", null,
4557
- "General advice only which has been prepared without taking into account your objectives, financial situation or needs. Consider whether the advice is appropriate for you and read the Product Disclosure Statement (PDS) before making any investment decisions. PDS and Target Market Determination are available at our",
4558
- ' ',
4559
- h(Link, { onClick: () => pdsViewedAsync(name$4), href: "https://www.firstsuper.com.au/forms-tools/product-disclosure-statements/" }, "website"),
4560
- ". Past performance is not a reliable indicator of future performance."),
4561
- h("br", null),
4562
- h("p", null, "Issued by First Super Pty Ltd ABN 42 053 498 472, AFSL 223988 (Trustee) as Trustee of First Super ABN 56 286 625 181."))),
4563
- footnoteTextOverride: Option.none,
4564
- dtoPropName: 'firstSuper'
4565
- };
4566
-
4567
- const name$5 = 'HESTA';
4568
- const fund$5 = {
4569
- fundId: 'hesta-default',
4570
- name: name$5,
4571
- logo: 'logo-hesta.svg',
4572
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4573
- features: [
4574
- h("p", null, "A top-performing super fund* working for real-world impact"),
4575
- h("p", null, "1+ million members"),
4576
- h("p", null, "Expert help whenever you need it to help you face the future with confidence")
4577
- ],
4578
- featureSubText: undefined,
4579
- disclaimer: (h("div", { class: "space-y-2" },
4580
- h("p", { class: "italic" },
4581
- "* SuperRatings 10 Year Platinum Performance 2014-2024 (MySuper). Investment performance contributes to but is not the only factor in determining this product rating. Product ratings and awards are only one factor to be considered. See",
4582
- ' ',
4583
- h(Link, { className: "underline underline-offset-2 hover:text-gray-600", href: "https://www.hesta.com.au/ratings" }, "hesta.com.au/ratings"),
4584
- ' ',
4585
- "for more information."),
4586
- h("p", null,
4587
- "Consider whether this product is appropriate for you by reading the Product Disclosure Statement and Target Market Determination at",
4588
- ' ',
4589
- h(Link, { onClick: () => pdsViewedAsync(name$5), href: "https://www.hesta.com.au/pds" }, "hesta.com.au/pds"),
4590
- ' ',
4591
- "In considering your own circumstances about the suitability of HESTA products, you may wish to consult an adviser or use the ATO YourSuper comparison tool. Please also consider the relevant risks."),
4592
- h("p", null, "Issued by H.E.S.T. Australia Ltd ABN 66 006 818 695 AFSL No. 235249, Trustee of HESTA"))),
4593
- footnoteTextOverride: Option.none,
4594
- isPromotedDefault: true
4595
- };
4596
-
4597
- const name$6 = 'Mercer MyChoice';
4598
- const fund$6 = {
4599
- fundId: 'mercermychoice',
4600
- name: name$6,
4601
- logo: 'logo-mercer-mychoice.svg',
4602
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4603
- features: [
4604
- h("p", null, "Save more super with our low fees"),
4605
- h("p", null, "Take control with 6 MyChoice investment options"),
4606
- h("p", null, "Join 850,000 Australians who trust our global expertise")
4607
- ],
4608
- disclaimer: (h("div", null,
4609
- h("p", null,
4610
- "You should consider the",
4611
- ' ',
4612
- h(Link, { href: "https://www.mercersuper.com.au/campaign-page/mercer-mychoice", onClick: () => pdsViewedAsync(name$6) }, "Product Disclosure Statement"),
4613
- ' ',
4614
- "and",
4615
- ' ',
4616
- h(Link, { href: "https://www.mercersuper.com.au/documents/target-market-determinations" }, "Target Market Determination"),
4617
- ' ',
4618
- "before deciding to invest in or apply to become a member of the fund."),
4619
- h("br", null),
4620
- h("p", null, "Issued by Mercer Superannuation (Australia) Limited (\u2018Mercer Super\u2019) ABN: 79 004 717 533"))),
4621
- footnoteTextOverride: Option.some(PoweredByFlareFS),
4622
- dtoPropName: 'mercerMyChoice',
4623
- extraBadge: (h("span", { class: "text-xs bg-green-100 text-green-800 font-medium rounded-xl py-0.5 px-2.5 mr-1" }, "Low fees"))
4624
- };
4625
-
4626
- const name$7 = 'REI Super';
4627
- const fund$7 = {
4628
- fundId: 'reisuper',
4629
- name: name$7,
4630
- logo: 'logo-rei.svg',
4631
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4632
- features: [
4633
- h("p", null, "Built by and for the real estate industry"),
4634
- h("p", null, "Consistent long-term performance with competitive fees*"),
4635
- h("p", null, "All profits to members, not shareholders")
4636
- ],
4637
- disclaimer: (h("div", { class: "space-y-2" },
4638
- h("p", null, "*Balanced Option net investment return of 9.45% for year ending 30 June 2023."),
4639
- h("p", null,
4640
- "You should consider the",
4641
- ' ',
4642
- h(Link, { href: "https://www.reisuper.com.au/docs/default-source/super/rei-super-pds.pdf?utm_source=flarehr&utm_medium=banners&utm_campaign=flarehr_join&utm_term=pds", onClick: () => pdsViewedAsync(name$7) }, "Product Disclosure Statement"),
4643
- ' ',
4644
- "and",
4645
- ' ',
4646
- h(Link, { href: "https://www.reisuper.com.au/publications-and-forms/target-market-determination?utm_source=flarehr&utm_medium=banners&utm_campaign=flarehr_join&utm_term=tmd" }, "Target Market Determination"),
4647
- ' ',
4648
- "before deciding to invest in or apply to become a member of the fund."))),
4649
- abnInfo: `REI Superannuation Fund Pty Ltd`,
4650
- abn: '68 056 044 770',
4651
- footnoteTextOverride: Option.none,
4652
- dtoPropName: 'reisuper'
4653
- };
4654
-
4655
- const name$8 = 'Slate Super';
4656
- const slateUsi = '32367272075001';
4657
- const fund$8 = {
4658
- fundId: 'slate',
4659
- name: name$8,
4660
- logo: 'logo-slate.png',
4661
- route: SuperSelectionAppRoutes.SlateJoin,
4662
- features: [
4663
- h("p", null, "A lifestage investment strategy that evolves with you"),
4664
- h("p", null, "Advanced mobile app with retirement forecast and smart features"),
4665
- h("p", null, "Member advocates at Slate to assist with your account")
4666
- ],
4667
- disclaimer: (h("p", { class: "small text-muted" },
4668
- "You should consider the",
4669
- ' ',
4670
- h(Link, { href: "https://slate.co/pds/?utm_source=flare&utm_medium=superselection", onClick: () => pdsViewedAsync(name$8, slateUsi) }, "Product Disclosure Statement"),
4671
- ' ',
4672
- "and",
4673
- ' ',
4674
- h(Link, { href: "https://slate.co/forms-and-documents/target-market-determination/" }, "Target Market Determination"),
4675
- ' ',
4676
- "before deciding to invest in or apply to become a member of the fund.")),
4677
- abnInfo: `Diversa Trustees Limited`,
4678
- abn: '49 006 421 638',
4679
- footnoteTextOverride: Option.none,
4680
- dtoPropName: 'slate'
4681
- };
4682
-
4683
- const name$9 = 'Spirit Super';
4684
- const fund$9 = {
4685
- fundId: 'spirit',
4686
- name: name$9,
4687
- logo: 'logo-spirit.svg',
4688
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4689
- features: [
4690
- h("p", null, "Proud Industry SuperFund - all profits go back to members"),
4691
- h("p", null,
4692
- "Best customer experience in super",
4693
- h("sup", { class: "text-tiny" }, "1"),
4694
- " and best for value",
4695
- h("sup", { class: "text-tiny" }, "2")),
4696
- h("p", null,
4697
- "Low fees",
4698
- h("sup", { class: "text-tiny" }, "3"),
4699
- " with a focus on strong returns and investing with impact in communities",
4700
- h("sup", { class: "text-tiny" }, "4"))
4701
- ],
4702
- featureSubText: (h("div", { class: "m-4 pt-2" },
4703
- h("ol", { class: "list-decimal space-y-2" },
4704
- h("li", null,
4705
- h("span", null, "CSBA SenseCX Benchmark 2021-22")),
4706
- h("li", null,
4707
- h("span", null, "Awarded Best for Value in the WeMoney Superannuation Awards 2022")),
4708
- h("li", null,
4709
- h("span", null, "Just $67.60 + 0.15% pa admin fees, capped at $517.60")),
4710
- h("li", null,
4711
- h("span", null, "Rainmaker ESG Leader Rating 2022"))))),
4712
- disclaimer: (h("p", null,
4713
- "Past performance isn\u2019t a reliable indicator of future performance. Consider the PDS and TMD at",
4714
- ' ',
4715
- h(Link, { href: "https://www.spiritsuper.com.au/pds", onClick: () => pdsViewedAsync(name$9) }, "www.spiritsuper.com.au/pds"),
4716
- ' ',
4717
- "before making a decision. Issuer is Motor Trades Association of Australia Superannuation Fund Pty Ltd (AFSL 238 718, ABN 14 008 650 628), the trustee of Spirit Super (ABN 74 559 365 913). Advice is provided by Quadrant First Pty Ltd (ABN 78 102 167 877, AFSL 284443).")),
4718
- footnoteTextOverride: Option.none,
4719
- dtoPropName: 'spirit'
4720
- };
4721
-
4722
- const name$a = 'Unisuper';
4723
- const pdsUrl$1 = 'https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84';
4724
- const tmdUrl = 'https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8';
4725
- const fund$a = {
4726
- fundId: 'unisuper-default',
4727
- name: name$a,
4728
- logo: 'logo-unisuper.svg',
4729
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4730
- features: [
4731
- h("p", null, "Low fees, better value \u2013 Our fees are among the lowest in the industry.^"),
4732
- h("p", null, "Strong, long-term performance \u2013 We regularly exceed industry averages.*"),
4733
- h("p", null,
4734
- "Award winning super \u2013 Continually recognised as one of Australia\u2019s best-performing funds.",
4735
- h("sup", { class: "text-tiny" }, "#"))
4736
- ],
4737
- disclaimer: (h("div", { class: "space-y-2" },
4738
- h("p", null,
4739
- "^Read more about our fees and how we compare",
4740
- ' ',
4741
- h(Link, { href: "https://www.unisuper.com.au/super/products-and-fees" }, "here"),
4742
- "."),
4743
- h("p", null,
4744
- "*Past performance is not an indicator of future performance. Read more about our performance and how we compare",
4745
- ' ',
4746
- h(Link, { href: "https://www.unisuper.com.au/campaigns/greater-super" }, "here"),
4747
- "."),
4748
- h("p", null,
4749
- h("sup", { class: "text-tiny" }, "#"),
4750
- "See our awards",
4751
- ' ',
4752
- h(Link, { href: "https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings" }, "here"),
4753
- "."),
4754
- h("p", null,
4755
- "Remember to consider the",
4756
- ' ',
4757
- h(Link, { href: pdsUrl$1, onClick: () => pdsViewedAsync(name$a) }, "Product Disclosure Statement"),
4758
- ' ',
4759
- "and ",
4760
- h(Link, { href: tmdUrl }, "Target Market Determination"),
4761
- " that is relevant to you."),
4762
- h("p", null, "Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850"))),
4763
- footnoteTextOverride: Option.none,
4764
- isPromotedDefault: true
4765
- };
4766
-
4767
- const name$b = 'Unisuper';
4768
- const pdsUrl$2 = 'https://www.unisuper.com.au/-/media/files/pds/accumulation-1/accumulation-1-pds.pdf?rev=eb3a50fed45543ef91e2d1a38fa1fc0b&hash=B76A6A338550310C27DE1A021C854F84';
4769
- const tmdUrl$1 = 'https://www.unisuper.com.au/-/media/files/tmd/accumulation-1/accumulation-1-tmd.pdf?rev=f4aa3f08d0494f52a7a5e02c69385ead&hash=AC77283EFBF97948DC0CF768FD3E82F8';
4770
- const fund$b = {
4771
- fundId: 'unisuper-default-v2',
4772
- name: name$b,
4773
- logo: 'logo-unisuper.svg',
4774
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4775
- features: [
4776
- h("p", null, "Low fees, better value \u2013 Our fees are among the lowest in the industry.^"),
4777
- h("p", null, "Strong, long-term performance \u2013 We regularly exceed industry averages.*"),
4778
- h("p", null,
4779
- "Award winning super \u2013 Continually recognised as one of Australia\u2019s best-performing funds.",
4780
- h("sup", { class: "text-tiny" }, "#"))
4781
- ],
4782
- customContent: (h("div", { class: "mt-6 flex gap-3" },
4783
- h("div", null,
4784
- h("img", { alt: name$b, src: getAssetPath(`assets/unisuper-default-badge1.svg`) })),
4785
- h("div", null,
4786
- h("img", { alt: name$b, src: getAssetPath(`assets/unisuper-default-badge2.svg`) })),
4787
- h("div", null,
4788
- h("img", { alt: name$b, src: getAssetPath(`assets/unisuper-default-badge3.svg`) })))),
4789
- disclaimer: (h("div", { class: "space-y-2" },
4790
- h("p", null,
4791
- "^Read more about our fees and how we compare",
4792
- ' ',
4793
- h(Link, { href: "https://www.unisuper.com.au/super/products-and-fees" }, "here"),
4794
- "."),
4795
- h("p", null,
4796
- "*Past performance is not an indicator of future performance. Read more about our performance and how we compare",
4797
- ' ',
4798
- h(Link, { href: "https://www.unisuper.com.au/campaigns/greater-super" }, "here"),
4799
- "."),
4800
- h("p", null,
4801
- h("sup", { class: "text-tiny" }, "#"),
4802
- "See our awards",
4803
- ' ',
4804
- h(Link, { href: "https://www.unisuper.com.au/about-us/who-we-are/awards-and-ratings" }, "here"),
4805
- "."),
4806
- h("p", null,
4807
- "Remember to consider the",
4808
- ' ',
4809
- h(Link, { href: pdsUrl$2, onClick: () => pdsViewedAsync(name$b) }, "Product Disclosure Statement"),
4810
- ' ',
4811
- "and ",
4812
- h(Link, { href: tmdUrl$1 }, "Target Market Determination"),
4813
- " that is relevant to you."),
4814
- h("p", null, "Issued by UniSuper Management Pty Ltd. ABN: 91 385 943 850"))),
4815
- footnoteTextOverride: Option.none,
4816
- isPromotedDefault: true
4817
- };
4818
-
4819
- const name$c = 'Virgin Money Super';
4820
- const fund$c = {
4821
- fundId: 'virgin',
4822
- name: name$c,
4823
- logo: 'logo-virgin.svg',
4824
- route: SuperSelectionAppRoutes.PromotedFundJoinV2,
4825
- features: [
4826
- h("p", null,
4827
- "Returns above industry and retail super fund medians over the past 5 years",
4828
- h("sup", { class: "text-tiny" }, "1")),
4829
- h("p", null, "One of the lowest fees in the market"),
4830
- h("p", null,
4831
- "Virgin Money rewards you with Velocity Points on your contributions",
4832
- h("sup", { class: "text-tiny" }, "2"))
4833
- ],
4834
- featureSubText: (h("div", { class: "m-4 pt-2" },
4835
- h("ol", { class: "list-decimal space-y-2" },
4836
- h("li", null,
4837
- h("span", null, "Past performance is not a reliable indicator of future performance. Source: SuperRatings Fund Crediting Rate Survey April 2022.")),
4838
- h("li", null,
4839
- h("span", null,
4840
- h(Link, { className: "underline underline-offset-2 hover:text-gray-600", href: "https://virginmoney.com.au/superannuation/forms-and-key-information/key-documents" }, "Eligibility and T&Cs apply")))))),
4841
- disclaimer: (h("p", null,
4842
- "Prepared by Virgin Money Financial Services Pty Ltd ABN 51 113 285 395 AFSL 286869 (\u2018Virgin Money\u2019). Virgin Money Super is a plan in the Mercer Super Trust ABN 19 905 422 981. Virgin Money Super is issued by Mercer Superannuation (Australia) Limited (MSAL) ABN 79 004 717 533 AFSL 235906 as trustee of the Mercer Super Trust. Consider the PDS and TMD at",
4843
- ' ',
4844
- h(Link, { href: "https://virginmoney.com.au/superannuation/", onClick: () => pdsViewedAsync(name$c) }, "www.virginmoney.com.au"),
4845
- ' ',
4846
- "before making a decision")),
4847
- footnoteTextOverride: Option.some(PoweredByFlareFS),
4848
- dtoPropName: 'virgin',
4849
- extraBadge: (h("span", { class: "text-xs bg-green-100 text-green-800 font-medium rounded-xl py-0.5 px-2.5 mr-1" }, "Low fees"))
4850
- };
4851
-
4852
- const fundsById = {
4853
- [fund$8.fundId]: fund$8,
4854
- [fund$2.fundId]: fund$2,
4855
- [fund$3.fundId]: fund$3,
4856
- [fund.fundId]: fund,
4857
- [fund$1.fundId]: fund$1,
4858
- [fund$c.fundId]: fund$c,
4859
- [fund$9.fundId]: fund$9,
4860
- [fund$4.fundId]: fund$4,
4861
- [fund$6.fundId]: fund$6,
4862
- [fund$5.fundId]: fund$5,
4863
- [fund$a.fundId]: fund$a,
4864
- [fund$b.fundId]: fund$b,
4865
- [fund$7.fundId]: fund$7
4866
- };
4867
- const allPromotedFunds = Object.values(fundsById);
4868
- const getFundByDtoPropName = (dtoPropName) => {
4869
- const fund = allPromotedFunds.find((f) => f.dtoPropName == dtoPropName);
4870
- return fund ? some(fund) : none;
4871
- };
4872
- const getFundByFundId = (fundId) => {
4873
- const fund = allPromotedFunds.find((f) => f.fundId == fundId);
4874
- return fund ? some(fund) : none;
4875
- };
4876
- const getFundNameByFundId = (fundId) => fundsById[fundId] != undefined ? some(fundsById[fundId].name) : none;
4877
- const getFooterTextOverrideByFundId = (fundId) => { var _a, _b; return (_b = (_a = fundsById[fundId]) === null || _a === void 0 ? void 0 : _a.footnoteTextOverride) !== null && _b !== void 0 ? _b : none; };
4878
- const getFundUsiByFundId = (fundId) => fundId == fund$8.fundId ? some(slateUsi) : none;
4879
- const getLogoSrcByFundId = (fundId) => fundsById[fundId] != undefined ? some(getAssetPath(`assets/${fundsById[fundId].logo}`)) : none;
4880
-
4881
4315
  class ExistingFundService {
4882
4316
  async GetExistingFundAsync() {
4883
4317
  var _a;
@@ -4892,24 +4326,13 @@ class ExistingFundService {
4892
4326
  const memberNumber = getSuperChoiceMemberNumber(choiceDetails);
4893
4327
  switch (choiceDetails.kind) {
4894
4328
  case 'Promoted': {
4895
- const fund = choiceDetails.promoted['generic']
4896
- ? getFundByFundId(choiceDetails.promoted['generic'].fundId)
4897
- : getFundByDtoPropName(Object.keys(choiceDetails.promoted)[0]);
4898
- let fundName = '';
4899
- if (isSome(fund)) {
4900
- fundName = fund.value.name;
4901
- }
4902
- else if (isSome(usi)) {
4903
- const fundLookup = await this.getFundByUsiAsync(usi.value);
4904
- fundName = isSome(fundLookup) ? fundLookup.value.productName : usi.value;
4905
- }
4906
- else {
4329
+ if (isNone(usi))
4907
4330
  return none;
4908
- }
4331
+ const fund = await this.getFundByUsiAsync(usi.value);
4909
4332
  return some({
4910
4333
  type: 'Promoted Fund',
4911
4334
  id: getPromotedFundId(choiceDetails.promoted),
4912
- name: fundName,
4335
+ name: isSome(fund) ? fund.value.productName : usi.value,
4913
4336
  usi: usi,
4914
4337
  valid: 'Active',
4915
4338
  memberNumber: memberNumber,
@@ -5043,14 +4466,12 @@ const ExistingChoice = class {
5043
4466
  this.existingFund = chosenFundOption.value;
5044
4467
  }
5045
4468
  else {
5046
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
4469
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5047
4470
  }
5048
4471
  }
5049
4472
  render() {
5050
- const PromotedFundView = (props) => {
5051
- const logo = getLogoSrcByFundId(props.id);
5052
- const fundName = getFundNameByFundId(props.id);
5053
- return (h("div", { class: "flex justify-center" }, h("img", { class: "h-16 object-contain w-full max-w-140", alt: isSome(fundName) ? fundName.value : undefined, src: isSome(logo) ? logo.value : undefined })));
4473
+ const PromotedFundView = (_props) => {
4474
+ return (h("div", { class: "flex justify-center" }));
5054
4475
  };
5055
4476
  const MyOwnFundView = () => {
5056
4477
  return (h("div", { class: "flex h-20 justify-center items-center relative" }, h("div", { class: "h-20 w-20 rounded-full bg-primary-base opacity-10" }), h("div", { class: "h-10 w-10 absolute" }, h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", class: "fill-primary-base" }, h("path", { d: "M174.7 111.8C165.1 110.3 160.1 102.1 161.5 93.35C170.4 40.37 216.5 0 272 0C320.8 0 362.3 31.19 377.6 74.67C380.6 82.1 376.2 92.14 367.9 95.09C359.5 98.03 350.4 93.66 347.5 85.33C336.5 54.24 306.8 32 272 32C232.4 32 199.5 60.82 193.1 98.65C191.6 107.4 183.4 113.2 174.7 111.8V111.8zM400 264C400 250.7 410.7 240 424 240C437.3 240 448 250.7 448 264C448 277.3 437.3 288 424 288C410.7 288 400 277.3 400 264zM488.5 125.8L480 159.1C501.1 176.5 519.6 198.5 530.7 224H544C561.7 224 576 238.3 576 256V352C576 369.7 561.7 384 544 384H512C495.5 405.1 473.5 423.6 448 434.7V464C448 490.5 426.5 512 400 512H368C341.5 512 320 490.5 320 464V448H256V464C256 490.5 234.5 512 208 512H176C149.5 512 128 490.5 128 464V416C89.14 386.8 64 340.3 64 288C28.52 287.2 0 258.2 0 222.6C0 197.8 14 175.1 36.18 164L40.84 161.7C48.75 157.7 58.36 160.9 62.31 168.8C66.26 176.7 63.06 186.4 55.16 190.3L50.49 192.6C39.16 198.3 31.1 209.9 31.1 222.6C31.1 241 46.97 256 65.44 256H67.2C82.02 182.1 146.6 128 223.1 128H376.4C394 108.4 419.6 96 448 96H465.3C480.9 96 492.3 110.7 488.5 125.8H488.5zM224 160C153.3 160 96 217.3 96 288C96 329.9 116.1 367 147.2 390.4L160 400V464C160 472.8 167.2 480 176 480H208C216.8 480 224 472.8 224 464V416H352V464C352 472.8 359.2 480 368 480H400C408.8 480 416 472.8 416 464V413.7L435.2 405.4C455.6 396.5 473.2 382.4 486.4 364.8L496 352H544V256H509.7L501.4 236.8C492.5 216.4 478.4 198.8 460.8 185.6L443.8 172.8L455 128H448C429 128 412.1 136.2 400.3 149.3L390.7 160H224z" })))));
@@ -5071,7 +4492,7 @@ const ExistingChoice = class {
5071
4492
  switch (this.existingFund.type) {
5072
4493
  case 'Promoted Fund':
5073
4494
  case 'Promoted Default Fund':
5074
- return h(PromotedFundView, { id: this.existingFund.id });
4495
+ return h(PromotedFundView, { name: this.existingFund.name });
5075
4496
  case 'Self Managed Fund':
5076
4497
  return h(SelfManagedFundView, null);
5077
4498
  case 'My Own Fund':
@@ -5108,7 +4529,7 @@ const ExistingChoice = class {
5108
4529
  async handleFundNominationDeclined() {
5109
4530
  const detail = this.createSuperFundNominationDetail(this.existingFund);
5110
4531
  await this.eventTrackingService.TrackSuperFundNominationDeclinedAsync(detail);
5111
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
4532
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5112
4533
  }
5113
4534
  };
5114
4535
 
@@ -5116,13 +4537,13 @@ const DefaultFooterText = 'Powered by Flare';
5116
4537
  const FooterSection = class {
5117
4538
  constructor(hostRef) {
5118
4539
  registerInstance(this, hostRef);
5119
- this.footerText = () => Option.isSome(this.textOverride) ? this.textOverride.value : DefaultFooterText;
4540
+ this.footerText = () => this.textOverride !== undefined ? this.textOverride : DefaultFooterText;
5120
4541
  }
5121
4542
  render() {
5122
4543
  return (h("div", { class: {
5123
4544
  'text-center text-gray-500 text-xs w-full max-w-960 mx-auto': true,
5124
- 'mt-8 sm:mt-20': !superSelectionAppService.superCampaignIsInView
5125
- } }, !superSelectionAppService.superCampaignIsInView && h("span", null, this.footerText()), h("p", { class: "block text-transparent" }, "v", AppVersion)));
4545
+ 'mt-8 sm:mt-20': !superSelectionAppService.hideFooterSection
4546
+ } }, !superSelectionAppService.hideFooterSection && h("span", null, this.footerText()), h("p", { class: "block text-transparent" }, "v", AppVersion)));
5126
4547
  }
5127
4548
  };
5128
4549
 
@@ -5152,27 +4573,6 @@ const HeaderSection = class {
5152
4573
  }
5153
4574
  };
5154
4575
 
5155
- const IFrameHost = class {
5156
- constructor(hostRef) {
5157
- registerInstance(this, hostRef);
5158
- }
5159
- componentDidLoad() {
5160
- this.build(this.iframeElement);
5161
- }
5162
- render() {
5163
- return (h("div", { class: "w-screen" }, h("iframe", { width: "100%", height: window.innerHeight, style: { border: 'none' }, ref: (el) => (this.iframeElement = el) })));
5164
- }
5165
- };
5166
-
5167
- const LoadingComponent = class {
5168
- constructor(hostRef) {
5169
- registerInstance(this, hostRef);
5170
- }
5171
- render() {
5172
- return (h("div", { class: "w-full bg-white flex flex-col items-center" }, h("sss-loading-indicator", null), h("h5", { class: "mt-4 text-xl font-bold leading-7" }, this.header), h("slot", null)));
5173
- }
5174
- };
5175
-
5176
4576
  const LoadingIndicator = class {
5177
4577
  constructor(hostRef) {
5178
4578
  registerInstance(this, hostRef);
@@ -5193,15 +4593,6 @@ const LoadingPage = class {
5193
4593
  }
5194
4594
  };
5195
4595
 
5196
- const LoadingComponent$1 = class {
5197
- constructor(hostRef) {
5198
- registerInstance(this, hostRef);
5199
- }
5200
- render() {
5201
- return (h("sss-loading-component", { header: "Loading Super" }, h("p", { class: "text-base text-gray-600 mt-4 max-w-560 text-center font-normal leading-7" }, "This can take up to 30 seconds.", h("br", null), "Please don\u2019t navigate away or refresh your browser.")));
5202
- }
5203
- };
5204
-
5205
4596
  const MyOwnFund = class {
5206
4597
  constructor(hostRef) {
5207
4598
  registerInstance(this, hostRef);
@@ -5219,8 +4610,8 @@ const MyOwnFund = class {
5219
4610
  const isSuperCampaignFallbackActivated = superSelectionAppService.isSuperCampaignFallbackActivated;
5220
4611
  return (h(Host, null, h("sss-header-section", { currentPage: "own-fund" }), h("div", { class: "flex justify-center mt-11" }, h("sss-custom-fund", null, h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
5221
4612
  'was-validated': this.formState === 'validated'
5222
- }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" }, h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"), h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })), h("div", { class: "ml-2" }, h("ul", { class: "list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5" }, h("li", null, "Make sure you are a current member of the fund before completing this step."), h("li", null, "Please check that the fund USI is correct as some funds have similar names."))))), h("sss-my-own-fund-inputs", { myOwnFundForm: state$2.myOwnFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
5223
- state$2.myOwnFundForm = Object.assign(Object.assign({}, state$2.myOwnFundForm), event.detail);
4613
+ }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg" }, h("p", { class: "sm:text-lg font-bold mb-3" }, "Fund details"), h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-3 sm:mb-4" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })), h("div", { class: "ml-2" }, h("ul", { class: "list-disc list-outside ml-6 space-y-2 text-sm text-yellow-700 leading-5" }, h("li", null, "Make sure you are a current member of the fund before completing this step."), h("li", null, "Please check that the fund USI is correct as some funds have similar names."))))), h("sss-my-own-fund-inputs", { myOwnFundForm: state$1.myOwnFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
4614
+ state$1.myOwnFundForm = Object.assign(Object.assign({}, state$1.myOwnFundForm), event.detail);
5224
4615
  this.isNotAllInformationProvidedMessageVisible = false;
5225
4616
  } }), this.isNotAllInformationProvidedMessageVisible && (h("div", { class: "mt-4 rounded-md bg-red-50 p-4 text-sm text-red-700" }, "All fields are required to complete submission. Make sure you have selected a fund."))), h("div", { class: "flex justify-center mt-8" }, h("div", { class: "sm:max-w-320 w-full" }, h("div", { class: "mb-4", onClick:
5226
4617
  // user clicks on disabled button (div wrapper) then validation errors will show
@@ -5231,25 +4622,30 @@ const MyOwnFund = class {
5231
4622
  if (!this.formElement.checkValidity()) {
5232
4623
  return;
5233
4624
  }
5234
- const isAllInformationProvided = isSome(state$2.myOwnFundForm.fundUsi) &&
5235
- isSome(state$2.myOwnFundForm.memberNumber) &&
5236
- isSome(state$2.myOwnFundForm.memberFirstName) &&
5237
- isSome(state$2.myOwnFundForm.memberFamilyName);
4625
+ const isAllInformationProvided = isSome(state$1.myOwnFundForm.fundUsi) &&
4626
+ isSome(state$1.myOwnFundForm.memberNumber) &&
4627
+ isSome(state$1.myOwnFundForm.memberFirstName) &&
4628
+ isSome(state$1.myOwnFundForm.memberFamilyName);
5238
4629
  if (!isAllInformationProvided) {
5239
4630
  this.isNotAllInformationProvidedMessageVisible = true;
5240
4631
  return;
5241
4632
  }
4633
+ if (superSelectionAppService.isBringYourOwnFundCustomStepEnabled &&
4634
+ superSelectionAppService.isUsingSuperCampaign) {
4635
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFundEngagementStep);
4636
+ return;
4637
+ }
5242
4638
  navigationService.navigateInternallyToStandardChoice({
5243
4639
  history: this.history,
5244
- fundName: this.getOrError(state$2.myOwnFundForm.fundName),
4640
+ fundName: this.getOrError(state$1.myOwnFundForm.fundName),
5245
4641
  fundDetails: {
5246
4642
  type: 'myOwnFund',
5247
- fundName: this.getOrError(state$2.myOwnFundForm.fundName),
5248
- fundUsi: this.getOrError(state$2.myOwnFundForm.fundUsi),
5249
- memberNumber: this.getOrError(state$2.myOwnFundForm.memberNumber)
4643
+ fundName: this.getOrError(state$1.myOwnFundForm.fundName),
4644
+ fundUsi: this.getOrError(state$1.myOwnFundForm.fundUsi),
4645
+ memberNumber: this.getOrError(state$1.myOwnFundForm.memberNumber)
5250
4646
  },
5251
4647
  handleSubmitFn: async (standardChoiceFormSignature) => {
5252
- const customFundChoiceDto = Object.assign({ fundUsi: this.getOrError(state$2.myOwnFundForm.fundUsi), memberNumber: this.getOrError(state$2.myOwnFundForm.memberNumber), memberFirstName: this.getOrError(state$2.myOwnFundForm.memberFirstName), memberFamilyName: this.getOrError(state$2.myOwnFundForm.memberFamilyName), standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
4648
+ const customFundChoiceDto = Object.assign({ fundUsi: this.getOrError(state$1.myOwnFundForm.fundUsi), memberNumber: this.getOrError(state$1.myOwnFundForm.memberNumber), memberFirstName: this.getOrError(state$1.myOwnFundForm.memberFirstName), memberFamilyName: this.getOrError(state$1.myOwnFundForm.memberFamilyName), standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
5253
4649
  await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
5254
4650
  }
5255
4651
  });
@@ -5262,6 +4658,81 @@ const MyOwnFund = class {
5262
4658
  };
5263
4659
  injectHistory(MyOwnFund);
5264
4660
 
4661
+ const MyOwnFundEngagementStep = class {
4662
+ constructor(hostRef) {
4663
+ registerInstance(this, hostRef);
4664
+ this.stepContinued = async (event) => {
4665
+ if (event.detail.sender == 'byof-engagement') {
4666
+ await EventTrackingService.Instance.TrackSuperMyOwnFundEngagementStepContinued(this.fundUsi, event.detail.reason);
4667
+ this.navigateToStandardChoice();
4668
+ }
4669
+ };
4670
+ this.subscribeToStepEvents = () => {
4671
+ for (const eventName in this.stepEventHandlers) {
4672
+ document.addEventListener(eventName, this.stepEventHandlers[eventName]);
4673
+ }
4674
+ };
4675
+ this.unSubscribeFromStepEvents = () => {
4676
+ for (const eventName in this.stepEventHandlers) {
4677
+ document.removeEventListener(eventName, this.stepEventHandlers[eventName]);
4678
+ }
4679
+ };
4680
+ this.stepEventHandlers = {
4681
+ continue: this.stepContinued.bind(this)
4682
+ };
4683
+ }
4684
+ async componentWillLoad() {
4685
+ if (superSelectionAppService.isBringYourOwnFundCustomStepEnabled &&
4686
+ superSelectionAppService.isUsingSuperCampaign &&
4687
+ Option.isSome(state$1.myOwnFundForm.fundUsi) &&
4688
+ Option.isSome(state$1.myOwnFundForm.fundName) &&
4689
+ Option.isSome(state$1.myOwnFundForm.memberNumber) &&
4690
+ Option.isSome(state$1.myOwnFundForm.memberFirstName) &&
4691
+ Option.isSome(state$1.myOwnFundForm.memberFamilyName) &&
4692
+ Option.isSome(superSelectionAppService.backendUrl) &&
4693
+ Option.isSome(superSelectionAppService.state.jwt)) {
4694
+ this.backendUrl = superSelectionAppService.backendUrl.value;
4695
+ this.accessToken = superSelectionAppService.state.jwt.value;
4696
+ this.fundUsi = state$1.myOwnFundForm.fundUsi.value;
4697
+ this.fundName = state$1.myOwnFundForm.fundName.value;
4698
+ this.memberNumber = state$1.myOwnFundForm.memberNumber.value;
4699
+ this.memberFirstName = state$1.myOwnFundForm.memberFirstName.value;
4700
+ this.memberFamilyName = state$1.myOwnFundForm.memberFamilyName.value;
4701
+ this.unSubscribeFromStepEvents();
4702
+ this.subscribeToStepEvents();
4703
+ superSelectionAppService.hideFooterSection = true;
4704
+ await EventTrackingService.Instance.TrackSuperMyOwnFundEngagementStepActivationSucceeded(this.fundUsi);
4705
+ }
4706
+ else {
4707
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
4708
+ }
4709
+ }
4710
+ disconnectedCallback() {
4711
+ this.unSubscribeFromStepEvents();
4712
+ superSelectionAppService.hideFooterSection = false;
4713
+ }
4714
+ render() {
4715
+ return (h(Host, null, h("apollo-super-byof-engagement", { "backend-url": this.backendUrl, "access-token": this.accessToken, "fund-usi": this.fundUsi })));
4716
+ }
4717
+ navigateToStandardChoice() {
4718
+ navigationService.navigateInternallyToStandardChoice({
4719
+ history: this.history,
4720
+ fundName: this.fundName,
4721
+ fundDetails: {
4722
+ type: 'myOwnFund',
4723
+ fundName: this.fundName,
4724
+ fundUsi: this.fundUsi,
4725
+ memberNumber: this.memberNumber
4726
+ },
4727
+ handleSubmitFn: async (standardChoiceFormSignature) => {
4728
+ const customFundChoiceDto = Object.assign({ fundUsi: this.fundUsi, memberNumber: this.memberNumber, memberFirstName: this.memberFirstName, memberFamilyName: this.memberFamilyName, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
4729
+ await customFundChoiceApi.submitCustomFundChoiceAsync(customFundChoiceDto);
4730
+ }
4731
+ });
4732
+ }
4733
+ };
4734
+ injectHistory(MyOwnFundEngagementStep);
4735
+
5265
4736
  const MyOwnFundInputs = class {
5266
4737
  constructor(hostRef) {
5267
4738
  registerInstance(this, hostRef);
@@ -5300,7 +4771,7 @@ const MyOwnFundInputs = class {
5300
4771
  'shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md': true,
5301
4772
  'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
5302
4773
  .showValidationErrors
5303
- }, required: true, pattern: "[A-Za-z0-9]{4,16}", name: "memberNumber", id: "memberNumber", value: toUndefined(state$2.myOwnFundForm.memberNumber), onChange: (ev) => this.updateMemberNumber(ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid member number (only numbers and / or letters)"))), h("div", { class: "flex space-x-4" }, h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: toUndefined(state$2.myOwnFundForm.memberFirstName), onChange: (ev) => this.updateMemberFirstName(ev.target.value.trim()) }))), h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: toUndefined(state$2.myOwnFundForm.memberFamilyName), onChange: (ev) => this.updateMemberFamilyName(ev.target.value.trim()) }))))));
4774
+ }, required: true, pattern: "[A-Za-z0-9]{4,16}", name: "memberNumber", id: "memberNumber", value: toUndefined(state$1.myOwnFundForm.memberNumber), onChange: (ev) => this.updateMemberNumber(ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid member number (only numbers and / or letters)"))), h("div", { class: "flex space-x-4" }, h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: toUndefined(state$1.myOwnFundForm.memberFirstName), onChange: (ev) => this.updateMemberFirstName(ev.target.value.trim()) }))), h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: toUndefined(state$1.myOwnFundForm.memberFamilyName), onChange: (ev) => this.updateMemberFamilyName(ev.target.value.trim()) }))))));
5304
4775
  }
5305
4776
  updateFund(fund) {
5306
4777
  this.formChanged.emit({ fundUsi: some(fund.value), fundName: some(fund.label) });
@@ -5402,7 +4873,7 @@ const Prefill = class {
5402
4873
  return this.renderInvalidSMSF(this.prefill.data);
5403
4874
  }
5404
4875
  }
5405
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
4876
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5406
4877
  return null;
5407
4878
  }
5408
4879
  renderMyOwnFund(data) {
@@ -5797,8 +5268,8 @@ const PrefillInvalidMyOwnFund = class {
5797
5268
  }
5798
5269
  else {
5799
5270
  // If prefill does not exist, or is valid we should
5800
- // not have landed on this page, navigate to consent page
5801
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5271
+ // not have landed on this page, navigate to choice page
5272
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5802
5273
  }
5803
5274
  }
5804
5275
  render() {
@@ -5809,7 +5280,7 @@ const PrefillInvalidMyOwnFund = class {
5809
5280
  async handleChooseAnotherFund() {
5810
5281
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5811
5282
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5812
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5283
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5813
5284
  }
5814
5285
  };
5815
5286
 
@@ -5844,7 +5315,7 @@ const PrefillInvalidSMSF = class {
5844
5315
  }
5845
5316
  else {
5846
5317
  // If prefill does not exist, or is valid we should
5847
- // not have landed on this page, navigate to consent page
5318
+ // not have landed on this page, navigate to PrefillInvalidMyOwnFundPage page
5848
5319
  navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
5849
5320
  }
5850
5321
  }
@@ -5872,7 +5343,7 @@ const PrefillInvalidSMSF = class {
5872
5343
  async handleFundNominationDeclined() {
5873
5344
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5874
5345
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5875
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5346
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5876
5347
  }
5877
5348
  };
5878
5349
 
@@ -5912,8 +5383,8 @@ const PrefillMyOwnFund = class {
5912
5383
  }
5913
5384
  else {
5914
5385
  // If prefill does not exist, or is invalid we should
5915
- // not have landed on this page, navigate to consent page
5916
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5386
+ // not have landed on this page, navigate to choice page
5387
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5917
5388
  }
5918
5389
  }
5919
5390
  render() {
@@ -5994,7 +5465,7 @@ const PrefillMyOwnFund = class {
5994
5465
  async handleFundNominationDeclined() {
5995
5466
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
5996
5467
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
5997
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5468
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
5998
5469
  }
5999
5470
  };
6000
5471
 
@@ -6144,8 +5615,8 @@ const PrefillSMSF = class {
6144
5615
  }
6145
5616
  else {
6146
5617
  // If prefill does not exist, or is invalid we should
6147
- // not have landed on this page, navigate to consent page
6148
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidMyOwnFundPage);
5618
+ // not have landed on this page, navigate to PrefillInvalidSMSFPage page
5619
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.PrefillInvalidSMSFPage);
6149
5620
  }
6150
5621
  }
6151
5622
  render() {
@@ -6351,7 +5822,7 @@ const PrefillSMSF = class {
6351
5822
  async handleFundNominationDeclined() {
6352
5823
  const detail = this.createSuperFundPrefillDeclinedDetail(this.prefill);
6353
5824
  await this.eventTrackingService.TrackSuperFundPrefillDeclinedAsync(detail);
6354
- return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
5825
+ return navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
6355
5826
  }
6356
5827
  };
6357
5828
 
@@ -6367,181 +5838,344 @@ const PrefillWarningBox = class {
6367
5838
  }
6368
5839
  };
6369
5840
 
6370
- class PromotedFundChoiceApi {
6371
- async submitChoiceAsync(dto) {
6372
- return buildBackendApiClient()
6373
- .url('super-choice/promoted-fund')
6374
- .post(dto)
6375
- .badRequest(() => {
6376
- throw new Error('Failed to process Promoted Fund choice request');
6377
- })
6378
- .text();
6379
- }
6380
- async submitDefaultChoiceAsync(dto) {
6381
- return buildBackendApiClient()
6382
- .url('super-choice/promoted-fund/default')
6383
- .post(dto)
6384
- .badRequest(() => {
6385
- throw new Error('Failed to process Promoted Default Fund choice request');
6386
- })
6387
- .text();
6388
- }
6389
- async submitDefaultChoiceWithJoinAsync(dto) {
6390
- return buildBackendApiClient()
6391
- .url('super-choice/promoted-fund/default-with-join')
6392
- .post(dto)
6393
- .badRequest(() => {
6394
- throw new Error('Failed to process Promoted Default Fund With Join choice request');
6395
- })
6396
- .text();
5841
+ function validateAbn(abn) {
5842
+ const digitArray = abn.split('').map(Number);
5843
+ const isAllDigits = digitArray.every((d) => !isNaN(d));
5844
+ const weightingFactors = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
5845
+ if (!isAllDigits || digitArray.length !== weightingFactors.length) {
5846
+ return false;
6397
5847
  }
5848
+ digitArray[0]--;
5849
+ const sum = digitArray.reduce((sum, digit, i) => sum + digit * weightingFactors[i], 0);
5850
+ return sum % 89 === 0;
6398
5851
  }
6399
- const promotedFundChoiceApi = new PromotedFundChoiceApi();
6400
5852
 
6401
- class PromotedFundJoinV1IFrameBuilder {
6402
- constructor() {
6403
- this.hostIsLocalSuperSelection = () => window.location.origin === 'http://localhost:7100';
6404
- this.environmentDiscriminator = () => {
6405
- return this.hostIsLocalSuperSelection()
6406
- ? 'autodev-partner'
6407
- : window.location.hostname.toLowerCase().split('.')[0];
6408
- };
6409
- this.promotedFundJoinAppUrl = () => {
6410
- return `https://${this.environmentDiscriminator()}.flarehr.com/promoted-fund-join/embed/v1.0/web`;
5853
+ const SelfManagedFund = class {
5854
+ constructor(hostRef) {
5855
+ registerInstance(this, hostRef);
5856
+ this.isSubmitDisabled = true;
5857
+ this.isAbnValid = validateAbn(state$1.selfManagedFundForm.fundAbn);
5858
+ this.eventTrackingService = EventTrackingService.Instance;
5859
+ this.success = () => {
5860
+ navigationService.navigateInternallyToStandardChoice({
5861
+ history: this.history,
5862
+ fundName: 'Self-managed super fund',
5863
+ fundDetails: {
5864
+ type: 'smsf',
5865
+ fundName: state$1.selfManagedFundForm.fundName,
5866
+ fundEsa: state$1.selfManagedFundForm.fundEsa
5867
+ },
5868
+ handleSubmitFn: async (standardChoiceFormSignature) => {
5869
+ const requestDto = Object.assign({ smsfChoice: {
5870
+ abn: state$1.selfManagedFundForm.fundAbn,
5871
+ fundName: state$1.selfManagedFundForm.fundName,
5872
+ fundAddress: {
5873
+ addressLine1: state$1.selfManagedFundForm.addressLine1,
5874
+ addressLine2: state$1.selfManagedFundForm.addressLine2,
5875
+ city: state$1.selfManagedFundForm.city,
5876
+ state: state$1.selfManagedFundForm.state,
5877
+ postcode: state$1.selfManagedFundForm.postcode
5878
+ },
5879
+ bsb: state$1.selfManagedFundForm.bsb,
5880
+ bankAccountName: state$1.selfManagedFundForm.bankAccountName,
5881
+ bankAccountNumber: state$1.selfManagedFundForm.bankAccountNumber,
5882
+ electronicServiceAddress: state$1.selfManagedFundForm.fundEsa,
5883
+ memberFirstName: state$1.selfManagedFundForm.memberFirstName,
5884
+ memberFamilyName: state$1.selfManagedFundForm.memberFamilyName
5885
+ }, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
5886
+ await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
5887
+ }
5888
+ });
6411
5889
  };
6412
5890
  }
6413
- build(iframe$1, history) {
6414
- if (!(iframe$1 === null || iframe$1 === void 0 ? void 0 : iframe$1.contentDocument))
6415
- return;
6416
- const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: state.fund.id, authToken: superSelectionAppService.jwt });
6417
- const handleMessage = (event) => {
6418
- const { data } = event;
6419
- if (!data) {
6420
- return;
6421
- }
6422
- if (data.sender === 'promoted-fund-redirect') {
6423
- window.removeEventListener('message', handleMessage);
6424
- switch (data.type) {
6425
- case 'cancel':
6426
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
6427
- break;
6428
- case 'success':
6429
- if (data.memberNumber) {
6430
- const promotedFundId = state.fund.id;
6431
- const fundName = _function.pipe(getFundNameByFundId(promotedFundId), Option.getOrElse(() => ''));
6432
- const usi = data.usi.replace(/ /g, '');
6433
- navigationService.navigateInternallyToStandardChoice({
6434
- history,
6435
- fundName,
6436
- fundDetails: {
6437
- type: 'promoted',
6438
- fundName,
6439
- fundUsi: usi,
6440
- memberNumber: data.memberNumber,
6441
- promotedFundId
6442
- },
6443
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: promotedFundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
6444
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig)),
6445
- promotedFundId
6446
- });
6447
- break;
6448
- }
6449
- /* falls through */
6450
- default:
6451
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
6452
- break;
6453
- }
6454
- reset();
6455
- return;
6456
- }
6457
- if (data.sender === 'promoted-fund-join') {
6458
- switch (data.type) {
6459
- case 'contentResized':
6460
- iframe$1.height = data.height > 0 ? data.height : iframe$1.height;
6461
- iframe$1.width = data.width > 0 ? data.width : iframe$1.width;
6462
- break;
6463
- case 'pageNavigated':
6464
- window.scroll(iframe$1.offsetLeft, iframe$1.offsetTop);
6465
- iframe.navigation(window.location.href);
6466
- break;
6467
- }
6468
- }
5891
+ componentDidLoad() {
5892
+ this.updateIsSubmitDisabled();
5893
+ return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({
5894
+ promotedFundsShown: superSelectionAppService.promotedFunds,
5895
+ defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
5896
+ });
5897
+ }
5898
+ render() {
5899
+ return (h(Host, null, h("sss-header-section", { currentPage: "own-fund" }), h("div", { class: "flex justify-center mt-11" }, h("sss-custom-fund", null, h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
5900
+ 'was-validated': this.formState === 'validated'
5901
+ }, ref: (el) => (this.formElement = el), onInput: (_) => this.updateIsSubmitDisabled() }, h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg max-w-560" }, h("p", { class: "sm:text-lg font-bold" }, "Fund details"), h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })), h("div", { class: "ml-3 text-sm text-yellow-700 leading-5" }, "Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step."))), h("sss-self-managed-fund-inputs", { fundForm: state$1.selfManagedFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
5902
+ state$1.selfManagedFundForm = Object.assign(Object.assign({}, state$1.selfManagedFundForm), event.detail);
5903
+ if (event.detail.isAbnValid !== undefined)
5904
+ this.isAbnValid = event.detail.isAbnValid;
5905
+ this.updateIsSubmitDisabled();
5906
+ } })), h("div", { class: "flex justify-center mt-8" }, h("div", { class: "sm:max-w-320 w-full" }, h("div", { class: "mb-4", onClick:
5907
+ // user clicks on disabled button (div wrapper) then validation errors will show
5908
+ () => (this.formState = 'validated') }, h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")), h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage }, h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back")))))))));
5909
+ }
5910
+ updateIsSubmitDisabled() {
5911
+ this.isSubmitDisabled = !this.formElement.checkValidity() || !this.isAbnValid;
5912
+ }
5913
+ async handleSubmitForm() {
5914
+ this.formState = 'validated';
5915
+ if (this.formElement.checkValidity())
5916
+ this.success();
5917
+ }
5918
+ };
5919
+ injectHistory(SelfManagedFund);
5920
+
5921
+ var AbnValidationStatus;
5922
+ (function (AbnValidationStatus) {
5923
+ AbnValidationStatus[AbnValidationStatus["Invalid"] = 1] = "Invalid";
5924
+ AbnValidationStatus[AbnValidationStatus["AbnIsUsedForRegulatedFund"] = 2] = "AbnIsUsedForRegulatedFund";
5925
+ AbnValidationStatus[AbnValidationStatus["Valid"] = 3] = "Valid";
5926
+ })(AbnValidationStatus || (AbnValidationStatus = {}));
5927
+ const SelfManagedFundInputs = class {
5928
+ constructor(hostRef) {
5929
+ registerInstance(this, hostRef);
5930
+ this.formChanged = createEvent(this, "formChanged", 7);
5931
+ this.abnValidationStatus = AbnValidationStatus.Invalid;
5932
+ this.isAbnTouched = false;
5933
+ this.currentBank = none;
5934
+ this.addressErrorMessage = none;
5935
+ this.stateOptions = [
5936
+ { value: 'NSW', label: 'NSW' },
5937
+ { value: 'QLD', label: 'QLD' },
5938
+ { value: 'ACT', label: 'ACT' },
5939
+ { value: 'VIC', label: 'VIC' },
5940
+ { value: 'TAS', label: 'TAS' },
5941
+ { value: 'WA', label: 'WA' },
5942
+ { value: 'SA', label: 'SA' },
5943
+ { value: 'NT', label: 'NT' }
5944
+ ];
5945
+ this.bsbRegex = new RegExp(/^[0-9]{3}[0-9]{3}$/);
5946
+ this.bankAccountNumberRegex = new RegExp(/^[0-9]{2,10}$/);
5947
+ }
5948
+ render() {
5949
+ const inputClass = {
5950
+ 'relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md focus:z-10': true,
5951
+ 'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
5952
+ .showValidationErrors
6469
5953
  };
6470
- window.addEventListener('message', handleMessage);
6471
- const iframeDoc = iframe$1.contentDocument;
6472
- iframeDoc.open();
6473
- const form = iframeDoc.createElement('form');
6474
- form.method = 'POST';
6475
- form.target = '_self';
6476
- form.action = this.promotedFundJoinAppUrl();
6477
- let prop;
6478
- for (prop in postData) {
6479
- const value = postData[prop];
6480
- if (value !== undefined) {
6481
- const input = document.createElement('input');
6482
- input.type = 'hidden';
6483
- input.name = prop;
6484
- input.value = value;
6485
- form.append(input);
5954
+ return (h("div", null, h("div", null, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund name"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundName", id: "fundName", value: state$1.selfManagedFundForm.fundName, onChange: (ev) => this.updateFormField('fundName', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund name"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund ABN"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundAbn", id: "fundAbn", value: state$1.selfManagedFundForm.fundAbn, inputmode: "numeric", pattern: "[0-9]*", onKeyUp: async (ev) => {
5955
+ const abnInput = ev.target;
5956
+ this.updateFormField('fundAbn', abnInput.value.trim());
5957
+ this.abnValidationStatus = AbnValidationStatus.Invalid;
5958
+ if (validateAbn(abnInput.value)) {
5959
+ const isAbnUsedForRegulatedFund = await this.isAbnUsedForRegulatedAsync(abnInput.value);
5960
+ this.abnValidationStatus = isAbnUsedForRegulatedFund
5961
+ ? AbnValidationStatus.AbnIsUsedForRegulatedFund
5962
+ : AbnValidationStatus.Valid;
5963
+ }
5964
+ // We need to set a custom validity message to trigger css invalid styles for non valid cases
5965
+ const validityMessage = this.abnValidationStatus === AbnValidationStatus.Valid
5966
+ ? ''
5967
+ : 'Enter a valid fund ABN (digits only)';
5968
+ abnInput.setCustomValidity(validityMessage);
5969
+ this.updateFormField('isAbnValid', this.abnValidationStatus === AbnValidationStatus.Valid);
5970
+ }, onBlur: () => (this.isAbnTouched = true) }), this.renderAbnValidationError())), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Electronic service address alias (ESA)"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundEsa", id: "fundEsa", value: state$1.selfManagedFundForm.fundEsa, onChange: (ev) => this.updateFormField('fundEsa', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund ESA"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund address"), h("div", { class: "mt-1 rounded-md shadow-sm -space-y-px" }, h("input", { placeholder: "Address line 1", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-t-md shadow-none': true }), required: true, minlength: "2", name: "addressLine1", id: "addressLine1", value: state$1.selfManagedFundForm.addressLine1, onChange: (ev) => {
5971
+ this.updateFormField('addressLine1', ev.target.value.trim());
5972
+ this.updateAddressErrorMessage();
5973
+ }, ref: (el) => (this.addressLine1Element = el) }), h("input", { placeholder: "Address line 2 (optional)", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "addressLine2", id: "addressLine2", value: state$1.selfManagedFundForm.addressLine2, onChange: (ev) => this.updateFormField('addressLine2', ev.target.value.trim()) }), h("input", { placeholder: "City/suburb", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "city", required: true, id: "city", value: state$1.selfManagedFundForm.city, onChange: (ev) => {
5974
+ this.updateFormField('city', ev.target.value.trim());
5975
+ this.updateAddressErrorMessage();
5976
+ }, ref: (el) => (this.cityElement = el) }), h("div", { class: "flex -space-x-px" }, h("div", { class: "w-1/2 flex-1 min-w-0" }, h("input", { placeholder: "Postcode", type: "text", required: true, class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-bl-md shadow-none': true }), name: "postcode", minlength: "4", maxlength: "4", pattern: "[0-9]{4}", id: "postcode", value: state$1.selfManagedFundForm.postcode, inputmode: "numeric", onChange: (ev) => {
5977
+ this.updateFormField('postcode', ev.target.value.trim());
5978
+ this.updateAddressErrorMessage();
5979
+ }, ref: (el) => (this.postcodeElement = el) })), h("div", { class: "flex-1 min-w-0" }, h("select", { class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-br-md shadow-none': true, 'text-gray-500': this.fundForm.state !== undefined }), name: "state", required: true, id: "state", onChange: (ev) => {
5980
+ this.updateFormField('state', ev.target.value.trim());
5981
+ this.updateAddressErrorMessage();
5982
+ }, ref: (el) => (this.stateElement = el) }, h("option", { disabled: true, selected: this.fundForm.state !== undefined, value: "" }, "State"), this.stateOptions.map((s) => (h("option", { value: s.value, selected: this.fundForm.state === s.value }, s.label))))))), isSome(this.addressErrorMessage) && this.showValidationErrors && (h("div", { class: "mt-2 text-sm text-red-600" }, this.addressErrorMessage.value))), h("div", { class: "flex space-x-4" }, h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: state$1.selfManagedFundForm.memberFirstName, onChange: (ev) => this.updateFormField('memberFirstName', ev.target.value.trim()) }))), h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: state$1.selfManagedFundForm.memberFamilyName, onChange: (ev) => this.updateFormField('memberFamilyName', ev.target.value.trim()) })))), h("h3", { class: "text-lg font-bold mt-6" }, "Fund bank details"), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Account name"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bankAccountName", minlength: "2", id: "bankAccountName", value: state$1.selfManagedFundForm.bankAccountName, onChange: (ev) => this.updateFormField('bankAccountName', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account name"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "BSB"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bsb", id: "bsb", minlength: "6", maxlength: "7", inputmode: "numeric", onKeyUp: (ev) => this.updateCurrentBank(ev), pattern: this.bsbRegex.source, value: state$1.selfManagedFundForm.bsb }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid BSB"))), isSome(this.currentBank) && (h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Bank name"), h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm" }, this.currentBank.value))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Account number"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bankAccountNumber", id: "bankAccountNumber", minlength: "2", maxlength: "11", pattern: this.bankAccountNumberRegex.source, inputmode: "numeric", value: state$1.selfManagedFundForm.bankAccountNumber, onKeyUp: (ev) => this.updateCurrentBankAccountNumber(ev), onChange: (ev) => this.updateFormField('bankAccountNumber', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account number")))));
5983
+ }
5984
+ updateFormField(key, value) {
5985
+ this.formChanged.emit({ [key]: value });
5986
+ }
5987
+ async isAbnUsedForRegulatedAsync(abn) {
5988
+ return !(await customFundChoiceApi.validateAbnForSMSF(abn));
5989
+ }
5990
+ renderAbnValidationError() {
5991
+ if (this.isAbnTouched || this.showValidationErrors) {
5992
+ switch (this.abnValidationStatus) {
5993
+ case AbnValidationStatus.Invalid:
5994
+ return h("div", { class: "mt-2 text-sm text-red-600" }, "Enter a valid fund ABN (digits only)");
5995
+ case AbnValidationStatus.AbnIsUsedForRegulatedFund:
5996
+ return (h("div", { class: "mt-2 text-sm text-red-600" }, "The supplied ABN is for a regulated fund"));
5997
+ case AbnValidationStatus.Valid:
5998
+ return [];
6486
5999
  }
6487
6000
  }
6488
- iframeDoc.appendChild(form);
6489
- iframeDoc.close();
6490
- form.submit();
6001
+ return [];
6491
6002
  }
6492
- getMemberData() {
6493
- var _a, _b;
6494
- const superBuyer = superSelectionAppService.superBuyer;
6495
- return {
6496
- title: superBuyer.userProfile.title,
6497
- firstName: superBuyer.userProfile.firstName,
6498
- middleName: superBuyer.userProfile.middleName,
6499
- lastName: superBuyer.userProfile.lastName,
6500
- dateOfBirth: superBuyer.userProfile.dateOfBirth,
6501
- gender: superBuyer.userProfile.gender,
6502
- email: superBuyer.userProfile.email,
6503
- mobilePhone: superBuyer.userProfile.mobilePhone,
6504
- taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
6505
- addressLine1: superBuyer.userProfile.address.addressLine1,
6506
- addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
6507
- city: superBuyer.userProfile.address.city,
6508
- state: superBuyer.userProfile.address.state,
6509
- postCode: superBuyer.userProfile.address.postcode
6510
- };
6003
+ filterDigits(str) {
6004
+ return str.replace(/[^0-9]/g, '');
6511
6005
  }
6512
- }
6513
- const PromotedFundJoinV1IFrameBuilder$1 = new PromotedFundJoinV1IFrameBuilder();
6006
+ updateCurrentBank(ev) {
6007
+ const value = this.filterDigits(ev.target.value);
6008
+ const firstTwoNumbers = value.substring(0, 2);
6009
+ const firstThreeNumbers = value.substring(0, 3);
6010
+ const firstTwoNumberBankName = bsbNumbers[firstTwoNumbers];
6011
+ const firstThreeNumberBankName = bsbNumbers[firstThreeNumbers];
6012
+ if (firstTwoNumberBankName)
6013
+ this.currentBank = some(firstTwoNumberBankName);
6014
+ if (firstThreeNumberBankName)
6015
+ this.currentBank = some(firstThreeNumberBankName);
6016
+ if (value === '' || value.length > 6)
6017
+ this.currentBank = none;
6018
+ this.updateFormField('bsb', value);
6019
+ }
6020
+ updateCurrentBankAccountNumber(ev) {
6021
+ const value = this.filterDigits(ev.target.value);
6022
+ this.updateFormField('bankAccountNumber', value);
6023
+ }
6024
+ updateAddressErrorMessage() {
6025
+ let message = none;
6026
+ if (isNone(message) && !this.addressLine1Element.checkValidity()) {
6027
+ message = some('Enter a valid address line 1');
6028
+ }
6029
+ if (isNone(message) && !this.cityElement.checkValidity()) {
6030
+ message = some('Enter a valid city/suburb');
6031
+ }
6032
+ if (isNone(message) && !this.postcodeElement.checkValidity()) {
6033
+ message = some('Enter a valid post code');
6034
+ }
6035
+ if (isNone(message) && !this.stateElement.checkValidity()) {
6036
+ message = some('Select a state');
6037
+ }
6038
+ this.addressErrorMessage = message;
6039
+ }
6040
+ };
6514
6041
 
6515
- const PromotedFundJoinV1Page = class {
6042
+ const StandardChoiceFormInputDefaultFund = class {
6516
6043
  constructor(hostRef) {
6517
6044
  registerInstance(this, hostRef);
6045
+ this.standardChoiceFormSignature = '';
6046
+ this.isSubmitDisabled = true;
6047
+ this.eventTrackingService = EventTrackingService.Instance;
6048
+ this.ignorePopState = () => window.history.pushState(null, '', null);
6049
+ }
6050
+ connectedCallback() {
6051
+ this.ignorePopState();
6052
+ window.addEventListener('popstate', this.ignorePopState);
6053
+ }
6054
+ disconnectedCallback() {
6055
+ window.removeEventListener('popstate', this.ignorePopState);
6518
6056
  }
6519
6057
  render() {
6520
- return (h("sss-iframe-host", { build: (iframe) => PromotedFundJoinV1IFrameBuilder$1.build(iframe, this.history) }));
6058
+ return (h(Host, null, h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Confirm your super choice"), h("div", { class: "sm:text-lg text-gray-600 max-w-800 mt-4 text-center leading-7 sm:leading-8" }, "Your authorisation is required to complete your super choice by signing the standard choice form, which informs your employer of your choice of fund."), h("div", { class: "flex justify-center mt-8 sm:mt-12" }, h("div", { class: "max-w-560" }, h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row" }, this.renderLogo(), h("div", { class: "flex justify-between w-full" }, h("div", null, h("div", { class: "text-xs font-semibold text-gray-500 uppercase" }, "Nominated fund"), h("div", { class: "text-sm mt-2" }, state.fundName)), h("div", { class: "grid content-center ml-4" }, h("sss-button", { testid: "change-fund-button", size: "xs", variant: "secondary", promiseFn: async () => {
6059
+ await this.trackChangeRequestedAsync();
6060
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
6061
+ } }, "Change")))), h("div", { class: "mt-4 p-4 sm:p-6 border shadow-sm rounded-lg" }, h("div", { class: "sm:text-lg font-bold" }, "Superannuation Standard Choice Form"), h("div", { class: "bg-blue-50 border-l-4 border-blue-400 p-4 mt-3" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-information-circle.svg') })), h("div", { class: "ml-2" }, h("p", { class: "text-sm text-blue-800 leading-5" }, "Applying your full name in the text field below is the same as applying your written signature and is legally binding.")))), h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
6062
+ 'mt-3': true,
6063
+ 'was-validated': this.formState === 'validated'
6064
+ }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, h("label", { class: "text-sm font-medium text-gray-700" }, "Type your full name"), h("input", { "data-testid": "standard-choice-form-signature-input", type: "text", autocomplete: "off", class: {
6065
+ 'shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full text-base sm:text-sm border-gray-300 rounded-md mt-1': true,
6066
+ 'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
6067
+ }, required: true, minlength: "2", name: "standardChoiceFormSignature", id: "standardChoiceFormSignature", value: this.standardChoiceFormSignature, onInput: (event) => (this.standardChoiceFormSignature = event.target.value) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Type your full name"), h("div", { class: "mt-6" }, h("sss-button", { testid: "confirm-and-continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Confirm and continue"))))))));
6521
6068
  }
6522
- };
6523
-
6524
- // Copyright (c) Microsoft Corporation. All rights reserved.
6525
- // Licensed under the MIT License.
6526
- var strShimFunction = "function";
6527
- var strShimObject = "object";
6528
- var strShimUndefined = "undefined";
6529
- var strShimPrototype = "prototype";
6530
- var strShimHasOwnProperty = "hasOwnProperty";
6531
- /**
6532
- * Returns the current global scope object, for a normal web page this will be the current
6533
- * window, for a Web Worker this will be current worker global scope via "self". The internal
6534
- * implementation returns the first available instance object in the following order
6535
- * - globalThis (New standard)
6536
- * - self (Will return the current window instance for supported browsers)
6537
- * - window (fallback for older browser implementations)
6538
- * - global (NodeJS standard)
6539
- * - <null> (When all else fails)
6540
- * While the return type is a Window for the normal case, not all environments will support all
6541
- * of the properties or functions.
6542
- */
6543
- function getGlobal() {
6544
- if (typeof globalThis !== strShimUndefined && globalThis) {
6069
+ // TODO: fetch external promoted fund logo
6070
+ renderLogo() {
6071
+ return;
6072
+ // if (standardChoiceFormState.promotedFundId == undefined) return;
6073
+ // const logoSource = getLogoSrcByFundId(standardChoiceFormState.promotedFundId);
6074
+ // if (isSome(logoSource)) {
6075
+ // return (
6076
+ // <div class="pb-4 mb-4 border-b flex justify-center sm:pb-0 sm:mb-0 sm:border-b-0 sm:pr-8 sm:mr-8 sm:border-r sm:justify-start">
6077
+ // <img
6078
+ // class="h-16 max-w-140 sm:h-12 sm:max-w-[100px] object-contain"
6079
+ // alt={standardChoiceFormState.fundName}
6080
+ // src={logoSource.value}
6081
+ // />
6082
+ // </div>
6083
+ // );
6084
+ // }
6085
+ }
6086
+ async trackChangeRequestedAsync() {
6087
+ const common = {
6088
+ promotedFundsShown: superSelectionAppService.promotedFunds,
6089
+ defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
6090
+ };
6091
+ switch (state.fundDetails.type) {
6092
+ case 'default':
6093
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6094
+ DefaultFund: Object.assign(Object.assign({}, state.fundDetails), common)
6095
+ });
6096
+ break;
6097
+ case 'myOwnFund':
6098
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6099
+ MyOwnFund: Object.assign(Object.assign({}, state.fundDetails), common)
6100
+ });
6101
+ break;
6102
+ case 'smsf':
6103
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6104
+ Smsf: Object.assign(Object.assign({}, state.fundDetails), common)
6105
+ });
6106
+ break;
6107
+ case 'promoted':
6108
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6109
+ PromotedFund: Object.assign(Object.assign({}, state.fundDetails), common)
6110
+ });
6111
+ break;
6112
+ case 'promotedDefault':
6113
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6114
+ PromotedDefaultFund: Object.assign(Object.assign({}, state.fundDetails), common)
6115
+ });
6116
+ break;
6117
+ case 'promotedDefaultWithJoin':
6118
+ await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
6119
+ PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, state.fundDetails), common)
6120
+ });
6121
+ break;
6122
+ case 'null':
6123
+ throw 'standardChoiceFormState.fundDetails was not set';
6124
+ }
6125
+ }
6126
+ async handleSubmitForm() {
6127
+ this.formState = 'validated';
6128
+ if (this.formElement.checkValidity()) {
6129
+ await state.handleSubmitFn(this.standardChoiceFormSignature.trim());
6130
+ superSelectionAppService.markSuperSelectionAsSubmitted();
6131
+ }
6132
+ }
6133
+ };
6134
+
6135
+ const Success = class {
6136
+ constructor(hostRef) {
6137
+ registerInstance(this, hostRef);
6138
+ this.ignorePopState = () => window.history.pushState(null, '', null);
6139
+ }
6140
+ connectedCallback() {
6141
+ this.ignorePopState();
6142
+ window.addEventListener('popstate', this.ignorePopState);
6143
+ }
6144
+ disconnectedCallback() {
6145
+ window.removeEventListener('popstate', this.ignorePopState);
6146
+ }
6147
+ render() {
6148
+ const CheckIcon = () => {
6149
+ return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", class: "fill-primary-base" }, h("path", { d: "M443.3 100.7C449.6 106.9 449.6 117.1 443.3 123.3L171.3 395.3C165.1 401.6 154.9 401.6 148.7 395.3L4.686 251.3C-1.562 245.1-1.562 234.9 4.686 228.7C10.93 222.4 21.06 222.4 27.31 228.7L160 361.4L420.7 100.7C426.9 94.44 437.1 94.44 443.3 100.7H443.3z" })));
6150
+ };
6151
+ return (h(Host, { class: "text-center" }, h("div", { class: "flex justify-center" }, h("div", { class: "relative" }, h("div", { class: "h-20 w-20 rounded-full bg-primary-base opacity-10" }), h("div", { class: "h-8 w-8 absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2" }, h(CheckIcon, null)))), h("h3", { class: "text-2xl leading-8 font-bold mt-4" }, "Your super choice has been submitted"), h("p", { class: "mt-4 text-center text-gray-600 leading-7 max-w-560 mx-auto" }, "Your superannuation details have been updated successfully and will be submitted to your employer."), h("div", { class: "flex justify-center mt-8" }, h("div", { class: "max-w-[200px] w-full" }, h("sss-button", { testid: "continue-button", size: "xl", fillWidth: true, onClick: this.handleContinueButtonClick }, h("span", null, "Continue"))))));
6152
+ }
6153
+ handleContinueButtonClick(_event) {
6154
+ superSelectionAppService.completeSuperSelectionFlow();
6155
+ }
6156
+ };
6157
+
6158
+ // Copyright (c) Microsoft Corporation. All rights reserved.
6159
+ // Licensed under the MIT License.
6160
+ var strShimFunction = "function";
6161
+ var strShimObject = "object";
6162
+ var strShimUndefined = "undefined";
6163
+ var strShimPrototype = "prototype";
6164
+ var strShimHasOwnProperty = "hasOwnProperty";
6165
+ /**
6166
+ * Returns the current global scope object, for a normal web page this will be the current
6167
+ * window, for a Web Worker this will be current worker global scope via "self". The internal
6168
+ * implementation returns the first available instance object in the following order
6169
+ * - globalThis (New standard)
6170
+ * - self (Will return the current window instance for supported browsers)
6171
+ * - window (fallback for older browser implementations)
6172
+ * - global (NodeJS standard)
6173
+ * - <null> (When all else fails)
6174
+ * While the return type is a Window for the normal case, not all environments will support all
6175
+ * of the properties or functions.
6176
+ */
6177
+ function getGlobal() {
6178
+ if (typeof globalThis !== strShimUndefined && globalThis) {
6545
6179
  return globalThis;
6546
6180
  }
6547
6181
  if (typeof self !== strShimUndefined && self) {
@@ -16135,813 +15769,117 @@ class AppConfigurationQuery extends Query {
16135
15769
  return configuration.value;
16136
15770
  }
16137
15771
  }
16138
- const appConfigurationQuery = new AppConfigurationQuery(sessionStore);
16139
-
16140
- class AppInsightsService {
16141
- constructor() {
16142
- this.appInsights = new Lazy(() => new Initialization({
16143
- config: {
16144
- instrumentationKey: appConfigurationQuery.configuration.AppInsightsKey,
16145
- enableAutoRouteTracking: true,
16146
- autoTrackPageVisitTime: true,
16147
- maxBatchInterval: 1000,
16148
- enableUnhandledPromiseRejectionTracking: true
16149
- }
16150
- }));
16151
- }
16152
- init() {
16153
- this.appInsights.value.loadAppInsights();
16154
- setErrorHandler((err) => this.appInsightsErrorHandler(err));
16155
- }
16156
- getAppInsights() {
16157
- return this.appInsights.value;
16158
- }
16159
- addCustomProperties(properties) {
16160
- this.appInsights.value.addTelemetryInitializer((envelope) => {
16161
- envelope.data = envelope.data ? envelope.data : {};
16162
- for (const [k, v] of Object.entries(properties)) {
16163
- envelope.data[k] = v;
16164
- }
16165
- });
16166
- }
16167
- trackErrorTrace(message) {
16168
- this.appInsights.value.trackTrace({ message, severityLevel: SeverityLevel.Error });
16169
- }
16170
- appInsightsErrorHandler(error) {
16171
- this.appInsights.value.trackException({
16172
- error: error,
16173
- severityLevel: SeverityLevel.Error
16174
- });
16175
- // eslint-disable-next-line no-console
16176
- const defaultStencilErrorHandler = (error) => console.error(error);
16177
- defaultStencilErrorHandler(error);
16178
- }
16179
- }
16180
- const appInsights = new AppInsightsService();
16181
-
16182
- class PromotedFundJoinV2IFrameBuilder {
16183
- constructor() {
16184
- this.getFundName = (fundId) => {
16185
- return _function.pipe(getFundNameByFundId(fundId), Option.getOrElse(() => ''));
16186
- };
16187
- this.cleanUsi = (usi) => {
16188
- return usi.replace(/ /g, '');
16189
- };
16190
- this.stringIsNullOrEmtpty = (s) => {
16191
- return !(typeof s === 'string' && s.trim().length > 0);
16192
- };
16193
- this.environmentDiscriminator = () => {
16194
- const discriminator = window.location.hostname.toLowerCase().split('.')[0];
16195
- switch (discriminator) {
16196
- case 'autodev-partner':
16197
- case 'test-partner':
16198
- case 'partner':
16199
- case 'sandbox-partner':
16200
- return discriminator.replace('partner', '');
16201
- default:
16202
- return 'autodev-';
16203
- }
16204
- };
16205
- this.promotedFundJoinAppUrl = () => {
16206
- return `https://${this.environmentDiscriminator()}api.simplefinancialchoices.com/promoted-funds/embed`;
16207
- };
16208
- }
16209
- build(iframe$1, history) {
16210
- if (!(iframe$1 === null || iframe$1 === void 0 ? void 0 : iframe$1.contentDocument))
16211
- return;
16212
- const postData = Object.assign(Object.assign({}, this.getMemberData()), { partnerId: superSelectionAppService.partnerIdOrDefault, accountId: superSelectionAppService.accountIdOrDefault, fundId: state.fund.id, authToken: superSelectionAppService.jwt, employerDefault: state.fund.type === 'PromotedDefault', definedBenefitsEligibility: Option.toUndefined(superSelectionAppService.isDefinedBenefitsEligible) });
16213
- const handleMessage = async (event) => {
16214
- const { data } = event;
16215
- if (!data) {
16216
- return;
16217
- }
16218
- if (data.sender === 'promoted-fund-redirect') {
16219
- window.removeEventListener('message', handleMessage);
16220
- switch (data.type) {
16221
- case 'cancel':
16222
- if (state.fund.type === 'DefinedBenefits') {
16223
- // Note: we don't expect a cancel event from Defined Benefits flow but just in case
16224
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ConsentPage);
16225
- }
16226
- else {
16227
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16228
- }
16229
- break;
16230
- case 'success': {
16231
- const promotedFundId = state.fund.id;
16232
- const fundName = this.getFundName(promotedFundId);
16233
- const usi = this.cleanUsi(data.usi);
16234
- switch (state.fund.type) {
16235
- case 'Promoted':
16236
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16237
- this.stringIsNullOrEmtpty(data.usi)) {
16238
- appInsights.trackErrorTrace('PFJ C# did not return (Promoted) memberNumber and/or usi');
16239
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16240
- break;
16241
- }
16242
- navigationService.navigateInternallyToStandardChoice({
16243
- history,
16244
- fundName,
16245
- promotedFundId,
16246
- fundDetails: {
16247
- type: 'promoted',
16248
- fundName,
16249
- fundUsi: usi,
16250
- memberNumber: data.memberNumber,
16251
- promotedFundId
16252
- },
16253
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: promotedFundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi: data.usi.replace(/ /g, ''), standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16254
- });
16255
- break;
16256
- case 'PromotedDefault':
16257
- if (this.stringIsNullOrEmtpty(data.usi)) {
16258
- appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefault) usi');
16259
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16260
- break;
16261
- }
16262
- navigationService.navigateInternallyToStandardChoice({
16263
- history,
16264
- fundName,
16265
- promotedFundId,
16266
- fundDetails: {
16267
- type: 'promotedDefault',
16268
- fundName,
16269
- fundUsi: usi,
16270
- promotedFundId
16271
- },
16272
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: promotedFundId, usi,
16273
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16274
- });
16275
- break;
16276
- case 'DefinedBenefits':
16277
- throw Error('DefinedBenefits is not supported in legacy "success" message');
16278
- case 'null':
16279
- throw Error('PromotedFundState.type was not set.');
16280
- }
16281
- break;
16282
- }
16283
- case 'success-promoted': {
16284
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16285
- this.stringIsNullOrEmtpty(data.usi)) {
16286
- appInsights.trackErrorTrace('PFJ C# did not return (Promoted) memberNumber and/or usi');
16287
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16288
- break;
16289
- }
16290
- const usi = this.cleanUsi(data.usi);
16291
- const fundName = this.getFundName(data.fundId);
16292
- navigationService.navigateInternallyToStandardChoice({
16293
- history,
16294
- fundName,
16295
- promotedFundId: data.fundId,
16296
- fundDetails: {
16297
- type: 'promoted',
16298
- fundName,
16299
- fundUsi: usi,
16300
- memberNumber: data.memberNumber,
16301
- promotedFundId: data.fundId
16302
- },
16303
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitChoiceAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
16304
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16305
- });
16306
- break;
16307
- }
16308
- case 'success-promoted-default': {
16309
- if (this.stringIsNullOrEmtpty(data.usi)) {
16310
- appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefault) usi');
16311
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16312
- break;
16313
- }
16314
- const usi = this.cleanUsi(data.usi);
16315
- const fundName = this.getFundName(data.fundId);
16316
- navigationService.navigateInternallyToStandardChoice({
16317
- history,
16318
- fundName,
16319
- promotedFundId: data.fundId,
16320
- fundDetails: {
16321
- type: 'promotedDefault',
16322
- fundName,
16323
- fundUsi: usi,
16324
- promotedFundId: data.fundId
16325
- },
16326
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceAsync(Object.assign({ fundId: data.fundId, usi,
16327
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16328
- });
16329
- break;
16330
- }
16331
- case 'success-promoted-default-with-join': {
16332
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16333
- this.stringIsNullOrEmtpty(data.usi)) {
16334
- appInsights.trackErrorTrace('PFJ C# did not return (PromotedDefaultWithJoin) memberNumber and/or usi');
16335
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16336
- break;
16337
- }
16338
- const usi = this.cleanUsi(data.usi);
16339
- const fundName = this.getFundName(data.fundId);
16340
- navigationService.navigateInternallyToStandardChoice({
16341
- history,
16342
- fundName,
16343
- promotedFundId: data.fundId,
16344
- fundDetails: {
16345
- type: 'promotedDefaultWithJoin',
16346
- fundName,
16347
- fundUsi: usi,
16348
- memberNumber: data.memberNumber,
16349
- promotedFundId: data.fundId
16350
- },
16351
- handleSubmitFn: (standardChoiceFormSignature) => promotedFundChoiceApi.submitDefaultChoiceWithJoinAsync(Object.assign({ fundId: data.fundId, memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, usi,
16352
- standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig))
16353
- });
16354
- break;
16355
- }
16356
- case 'success-defined-benefits':
16357
- if (this.stringIsNullOrEmtpty(data.memberNumber) ||
16358
- this.stringIsNullOrEmtpty(data.usi)) {
16359
- appInsights.trackErrorTrace('PFJ C# did not return (DefinedBenefits) memberNumber and/or usi');
16360
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ConsentPage);
16361
- break;
16362
- }
16363
- await customFundChoiceApi.submitDefinedBenefitsChoiceAsync(Object.assign(Object.assign({ fundUsi: this.cleanUsi(data.usi) }, data), superSelectionAppService.promotedFundsConfig));
16364
- superSelectionAppService.markSuperSelectionAsSubmitted();
16365
- break;
16366
- /* falls through */
16367
- default:
16368
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16369
- break;
16370
- }
16371
- reset();
16372
- return;
16373
- }
16374
- if (data.sender === 'promoted-fund-join') {
16375
- switch (data.type) {
16376
- case 'contentResized':
16377
- iframe$1.height = data.height > 0 ? String(data.height) : iframe$1.height;
16378
- iframe$1.width = data.width > 0 ? String(data.width) : iframe$1.width;
16379
- break;
16380
- case 'pageNavigated':
16381
- window.scroll(iframe$1.offsetLeft, iframe$1.offsetTop);
16382
- iframe.navigation(window.location.href);
16383
- break;
16384
- }
16385
- }
16386
- };
16387
- window.addEventListener('message', handleMessage);
16388
- const iframeDoc = iframe$1.contentDocument;
16389
- iframeDoc.open();
16390
- const form = iframeDoc.createElement('form');
16391
- form.method = 'POST';
16392
- form.target = '_self';
16393
- form.action = this.promotedFundJoinAppUrl();
16394
- let prop;
16395
- for (prop in postData) {
16396
- const value = postData[prop];
16397
- if (value !== undefined) {
16398
- const input = document.createElement('input');
16399
- input.name = prop;
16400
- input.type = 'hidden';
16401
- if (typeof value === 'boolean') {
16402
- input.value = value ? 'true' : 'false';
16403
- }
16404
- else {
16405
- input.value = value;
16406
- }
16407
- form.append(input);
16408
- }
16409
- }
16410
- iframeDoc.appendChild(form);
16411
- iframeDoc.close();
16412
- form.submit();
16413
- }
16414
- getMemberData() {
16415
- var _a, _b;
16416
- const superBuyer = superSelectionAppService.superBuyer;
16417
- return {
16418
- title: superBuyer.userProfile.title,
16419
- firstName: superBuyer.userProfile.firstName,
16420
- middleName: superBuyer.userProfile.middleName,
16421
- lastName: superBuyer.userProfile.lastName,
16422
- dateOfBirth: superBuyer.userProfile.dateOfBirth,
16423
- gender: superBuyer.userProfile.gender,
16424
- email: superBuyer.userProfile.email,
16425
- mobilePhone: superBuyer.userProfile.mobilePhone,
16426
- taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
16427
- addressLine1: superBuyer.userProfile.address.addressLine1,
16428
- addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
16429
- city: superBuyer.userProfile.address.city,
16430
- state: superBuyer.userProfile.address.state,
16431
- postCode: superBuyer.userProfile.address.postcode
16432
- };
16433
- }
16434
- }
16435
- const PromotedFundJoinV2IFrameBuilder$1 = new PromotedFundJoinV2IFrameBuilder();
16436
-
16437
- const PromotedFundJoinV2Page = class {
16438
- constructor(hostRef) {
16439
- registerInstance(this, hostRef);
16440
- }
16441
- render() {
16442
- return (h("sss-iframe-host", { build: (iframe) => PromotedFundJoinV2IFrameBuilder$1.build(iframe, this.history) }));
16443
- }
16444
- };
16445
-
16446
- function validateAbn(abn) {
16447
- const digitArray = abn.split('').map(Number);
16448
- const isAllDigits = digitArray.every((d) => !isNaN(d));
16449
- const weightingFactors = [10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19];
16450
- if (!isAllDigits || digitArray.length !== weightingFactors.length) {
16451
- return false;
16452
- }
16453
- digitArray[0]--;
16454
- const sum = digitArray.reduce((sum, digit, i) => sum + digit * weightingFactors[i], 0);
16455
- return sum % 89 === 0;
16456
- }
16457
-
16458
- const SelfManagedFund = class {
16459
- constructor(hostRef) {
16460
- registerInstance(this, hostRef);
16461
- this.isSubmitDisabled = true;
16462
- this.isAbnValid = validateAbn(state$2.selfManagedFundForm.fundAbn);
16463
- this.eventTrackingService = EventTrackingService.Instance;
16464
- this.success = () => {
16465
- navigationService.navigateInternallyToStandardChoice({
16466
- history: this.history,
16467
- fundName: 'Self-managed super fund',
16468
- fundDetails: {
16469
- type: 'smsf',
16470
- fundName: state$2.selfManagedFundForm.fundName,
16471
- fundEsa: state$2.selfManagedFundForm.fundEsa
16472
- },
16473
- handleSubmitFn: async (standardChoiceFormSignature) => {
16474
- const requestDto = Object.assign({ smsfChoice: {
16475
- abn: state$2.selfManagedFundForm.fundAbn,
16476
- fundName: state$2.selfManagedFundForm.fundName,
16477
- fundAddress: {
16478
- addressLine1: state$2.selfManagedFundForm.addressLine1,
16479
- addressLine2: state$2.selfManagedFundForm.addressLine2,
16480
- city: state$2.selfManagedFundForm.city,
16481
- state: state$2.selfManagedFundForm.state,
16482
- postcode: state$2.selfManagedFundForm.postcode
16483
- },
16484
- bsb: state$2.selfManagedFundForm.bsb,
16485
- bankAccountName: state$2.selfManagedFundForm.bankAccountName,
16486
- bankAccountNumber: state$2.selfManagedFundForm.bankAccountNumber,
16487
- electronicServiceAddress: state$2.selfManagedFundForm.fundEsa,
16488
- memberFirstName: state$2.selfManagedFundForm.memberFirstName,
16489
- memberFamilyName: state$2.selfManagedFundForm.memberFamilyName
16490
- }, standardChoiceFormSignature }, superSelectionAppService.promotedFundsConfig);
16491
- await customFundChoiceApi.submitSelfManagedFundChoiceAsync(requestDto);
16492
- }
16493
- });
16494
- };
16495
- }
16496
- componentDidLoad() {
16497
- this.updateIsSubmitDisabled();
16498
- return this.eventTrackingService.TrackSmsfSuperFundDetailViewedAsync({
16499
- promotedFundsShown: superSelectionAppService.promotedFunds,
16500
- defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
16501
- });
16502
- }
16503
- render() {
16504
- return (h(Host, null, h("sss-header-section", { currentPage: "own-fund" }), h("div", { class: "flex justify-center mt-11" }, h("sss-custom-fund", null, h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
16505
- 'was-validated': this.formState === 'validated'
16506
- }, ref: (el) => (this.formElement = el), onInput: (_) => this.updateIsSubmitDisabled() }, h("div", { class: "p-4 sm:p-6 pb-6 sm:pb-8 border shadow-sm rounded-lg max-w-560" }, h("p", { class: "sm:text-lg font-bold" }, "Fund details"), h("div", { class: "bg-yellow-50 border-l-4 border-yellow-400 p-4 my-3" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-exclamation.svg') })), h("div", { class: "ml-3 text-sm text-yellow-700 leading-5" }, "Make sure your Self-managed super fund (SMSF) is a registered fund before completing this step."))), h("sss-self-managed-fund-inputs", { fundForm: state$2.selfManagedFundForm, showValidationErrors: this.formState === 'validated', onFormChanged: (event) => {
16507
- state$2.selfManagedFundForm = Object.assign(Object.assign({}, state$2.selfManagedFundForm), event.detail);
16508
- if (event.detail.isAbnValid !== undefined)
16509
- this.isAbnValid = event.detail.isAbnValid;
16510
- this.updateIsSubmitDisabled();
16511
- } })), h("div", { class: "flex justify-center mt-8" }, h("div", { class: "sm:max-w-320 w-full" }, h("div", { class: "mb-4", onClick:
16512
- // user clicks on disabled button (div wrapper) then validation errors will show
16513
- () => (this.formState = 'validated') }, h("sss-button", { testid: "continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Continue")), h("stencil-route-link", { url: SuperSelectionAppRoutes.ChoicePage }, h("sss-button", { testid: "back-button", fillWidth: true, variant: "secondary" }, "Back")))))))));
16514
- }
16515
- updateIsSubmitDisabled() {
16516
- this.isSubmitDisabled = !this.formElement.checkValidity() || !this.isAbnValid;
16517
- }
16518
- async handleSubmitForm() {
16519
- this.formState = 'validated';
16520
- if (this.formElement.checkValidity())
16521
- this.success();
16522
- }
16523
- };
16524
- injectHistory(SelfManagedFund);
16525
-
16526
- var AbnValidationStatus;
16527
- (function (AbnValidationStatus) {
16528
- AbnValidationStatus[AbnValidationStatus["Invalid"] = 1] = "Invalid";
16529
- AbnValidationStatus[AbnValidationStatus["AbnIsUsedForRegulatedFund"] = 2] = "AbnIsUsedForRegulatedFund";
16530
- AbnValidationStatus[AbnValidationStatus["Valid"] = 3] = "Valid";
16531
- })(AbnValidationStatus || (AbnValidationStatus = {}));
16532
- const SelfManagedFundInputs = class {
16533
- constructor(hostRef) {
16534
- registerInstance(this, hostRef);
16535
- this.formChanged = createEvent(this, "formChanged", 7);
16536
- this.abnValidationStatus = AbnValidationStatus.Invalid;
16537
- this.isAbnTouched = false;
16538
- this.currentBank = none;
16539
- this.addressErrorMessage = none;
16540
- this.stateOptions = [
16541
- { value: 'NSW', label: 'NSW' },
16542
- { value: 'QLD', label: 'QLD' },
16543
- { value: 'ACT', label: 'ACT' },
16544
- { value: 'VIC', label: 'VIC' },
16545
- { value: 'TAS', label: 'TAS' },
16546
- { value: 'WA', label: 'WA' },
16547
- { value: 'SA', label: 'SA' },
16548
- { value: 'NT', label: 'NT' }
16549
- ];
16550
- this.bsbRegex = new RegExp(/^[0-9]{3}[0-9]{3}$/);
16551
- this.bankAccountNumberRegex = new RegExp(/^[0-9]{2,10}$/);
16552
- }
16553
- render() {
16554
- const inputClass = {
16555
- 'relative shadow-sm focus:ring-primary-focus focus:border-primary-base block w-full text-base sm:text-sm border-gray-300 rounded-md focus:z-10': true,
16556
- 'invalid:border-red-300 invalid:text-red-900 invalid:placeholder-red-300 invalid:focus:ring-red-500 invalid:focus:border-red-500': this
16557
- .showValidationErrors
16558
- };
16559
- return (h("div", null, h("div", null, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund name"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundName", id: "fundName", value: state$2.selfManagedFundForm.fundName, onChange: (ev) => this.updateFormField('fundName', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund name"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund ABN"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundAbn", id: "fundAbn", value: state$2.selfManagedFundForm.fundAbn, inputmode: "numeric", pattern: "[0-9]*", onKeyUp: async (ev) => {
16560
- const abnInput = ev.target;
16561
- this.updateFormField('fundAbn', abnInput.value.trim());
16562
- this.abnValidationStatus = AbnValidationStatus.Invalid;
16563
- if (validateAbn(abnInput.value)) {
16564
- const isAbnUsedForRegulatedFund = await this.isAbnUsedForRegulatedAsync(abnInput.value);
16565
- this.abnValidationStatus = isAbnUsedForRegulatedFund
16566
- ? AbnValidationStatus.AbnIsUsedForRegulatedFund
16567
- : AbnValidationStatus.Valid;
16568
- }
16569
- // We need to set a custom validity message to trigger css invalid styles for non valid cases
16570
- const validityMessage = this.abnValidationStatus === AbnValidationStatus.Valid
16571
- ? ''
16572
- : 'Enter a valid fund ABN (digits only)';
16573
- abnInput.setCustomValidity(validityMessage);
16574
- this.updateFormField('isAbnValid', this.abnValidationStatus === AbnValidationStatus.Valid);
16575
- }, onBlur: () => (this.isAbnTouched = true) }), this.renderAbnValidationError())), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Electronic service address alias (ESA)"), h("div", { class: "mt-1" }, h("input", { type: "text", class: inputClass, required: true, minlength: "2", name: "fundEsa", id: "fundEsa", value: state$2.selfManagedFundForm.fundEsa, onChange: (ev) => this.updateFormField('fundEsa', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid fund ESA"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Fund address"), h("div", { class: "mt-1 rounded-md shadow-sm -space-y-px" }, h("input", { placeholder: "Address line 1", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-t-md shadow-none': true }), required: true, minlength: "2", name: "addressLine1", id: "addressLine1", value: state$2.selfManagedFundForm.addressLine1, onChange: (ev) => {
16576
- this.updateFormField('addressLine1', ev.target.value.trim());
16577
- this.updateAddressErrorMessage();
16578
- }, ref: (el) => (this.addressLine1Element = el) }), h("input", { placeholder: "Address line 2 (optional)", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "addressLine2", id: "addressLine2", value: state$2.selfManagedFundForm.addressLine2, onChange: (ev) => this.updateFormField('addressLine2', ev.target.value.trim()) }), h("input", { placeholder: "City/suburb", type: "text", class: Object.assign(Object.assign({}, inputClass), { 'rounded-none shadow-none': true }), name: "city", required: true, id: "city", value: state$2.selfManagedFundForm.city, onChange: (ev) => {
16579
- this.updateFormField('city', ev.target.value.trim());
16580
- this.updateAddressErrorMessage();
16581
- }, ref: (el) => (this.cityElement = el) }), h("div", { class: "flex -space-x-px" }, h("div", { class: "w-1/2 flex-1 min-w-0" }, h("input", { placeholder: "Postcode", type: "text", required: true, class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-bl-md shadow-none': true }), name: "postcode", minlength: "4", maxlength: "4", pattern: "[0-9]{4}", id: "postcode", value: state$2.selfManagedFundForm.postcode, inputmode: "numeric", onChange: (ev) => {
16582
- this.updateFormField('postcode', ev.target.value.trim());
16583
- this.updateAddressErrorMessage();
16584
- }, ref: (el) => (this.postcodeElement = el) })), h("div", { class: "flex-1 min-w-0" }, h("select", { class: Object.assign(Object.assign({}, inputClass), { 'rounded-none rounded-br-md shadow-none': true, 'text-gray-500': this.fundForm.state !== undefined }), name: "state", required: true, id: "state", onChange: (ev) => {
16585
- this.updateFormField('state', ev.target.value.trim());
16586
- this.updateAddressErrorMessage();
16587
- }, ref: (el) => (this.stateElement = el) }, h("option", { disabled: true, selected: this.fundForm.state !== undefined, value: "" }, "State"), this.stateOptions.map((s) => (h("option", { value: s.value, selected: this.fundForm.state === s.value }, s.label))))))), isSome(this.addressErrorMessage) && this.showValidationErrors && (h("div", { class: "mt-2 text-sm text-red-600" }, this.addressErrorMessage.value))), h("div", { class: "flex space-x-4" }, h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Given name(s)"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-given-names-input", name: "memberFirstName", readableName: "Member given name(s)", showValidationErrors: this.showValidationErrors, value: state$2.selfManagedFundForm.memberFirstName, onChange: (ev) => this.updateFormField('memberFirstName', ev.target.value.trim()) }))), h("div", { class: "mt-3 w-1/2" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Last name"), h("div", { class: "mt-1" }, h("sss-name-input", { testId: "member-last-name-input", name: "memberFamilyName", readableName: "Member last name", showValidationErrors: this.showValidationErrors, value: state$2.selfManagedFundForm.memberFamilyName, onChange: (ev) => this.updateFormField('memberFamilyName', ev.target.value.trim()) })))), h("h3", { class: "text-lg font-bold mt-6" }, "Fund bank details"), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Account name"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bankAccountName", minlength: "2", id: "bankAccountName", value: state$2.selfManagedFundForm.bankAccountName, onChange: (ev) => this.updateFormField('bankAccountName', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account name"))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "BSB"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bsb", id: "bsb", minlength: "6", maxlength: "7", inputmode: "numeric", onKeyUp: (ev) => this.updateCurrentBank(ev), pattern: this.bsbRegex.source, value: state$2.selfManagedFundForm.bsb }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid BSB"))), isSome(this.currentBank) && (h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Bank name"), h("div", { class: "mt-1 shadow-sm px-3 py-2 rounded-md border border-gray-300 bg-gray-50 text-gray-500 text-sm" }, this.currentBank.value))), h("div", { class: "mt-3" }, h("label", { class: "text-sm font-medium text-gray-700" }, "Account number"), h("div", { class: "mt-1" }, h("input", { type: "text", required: true, class: inputClass, name: "bankAccountNumber", id: "bankAccountNumber", minlength: "2", maxlength: "11", pattern: this.bankAccountNumberRegex.source, inputmode: "numeric", value: state$2.selfManagedFundForm.bankAccountNumber, onKeyUp: (ev) => this.updateCurrentBankAccountNumber(ev), onChange: (ev) => this.updateFormField('bankAccountNumber', ev.target.value.trim()) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Enter a valid bank account number")))));
16588
- }
16589
- updateFormField(key, value) {
16590
- this.formChanged.emit({ [key]: value });
16591
- }
16592
- async isAbnUsedForRegulatedAsync(abn) {
16593
- return !(await customFundChoiceApi.validateAbnForSMSF(abn));
16594
- }
16595
- renderAbnValidationError() {
16596
- if (this.isAbnTouched || this.showValidationErrors) {
16597
- switch (this.abnValidationStatus) {
16598
- case AbnValidationStatus.Invalid:
16599
- return h("div", { class: "mt-2 text-sm text-red-600" }, "Enter a valid fund ABN (digits only)");
16600
- case AbnValidationStatus.AbnIsUsedForRegulatedFund:
16601
- return (h("div", { class: "mt-2 text-sm text-red-600" }, "The supplied ABN is for a regulated fund"));
16602
- case AbnValidationStatus.Valid:
16603
- return [];
16604
- }
16605
- }
16606
- return [];
16607
- }
16608
- filterDigits(str) {
16609
- return str.replace(/[^0-9]/g, '');
16610
- }
16611
- updateCurrentBank(ev) {
16612
- const value = this.filterDigits(ev.target.value);
16613
- const firstTwoNumbers = value.substring(0, 2);
16614
- const firstThreeNumbers = value.substring(0, 3);
16615
- const firstTwoNumberBankName = bsbNumbers[firstTwoNumbers];
16616
- const firstThreeNumberBankName = bsbNumbers[firstThreeNumbers];
16617
- if (firstTwoNumberBankName)
16618
- this.currentBank = some(firstTwoNumberBankName);
16619
- if (firstThreeNumberBankName)
16620
- this.currentBank = some(firstThreeNumberBankName);
16621
- if (value === '' || value.length > 6)
16622
- this.currentBank = none;
16623
- this.updateFormField('bsb', value);
16624
- }
16625
- updateCurrentBankAccountNumber(ev) {
16626
- const value = this.filterDigits(ev.target.value);
16627
- this.updateFormField('bankAccountNumber', value);
16628
- }
16629
- updateAddressErrorMessage() {
16630
- let message = none;
16631
- if (isNone(message) && !this.addressLine1Element.checkValidity()) {
16632
- message = some('Enter a valid address line 1');
16633
- }
16634
- if (isNone(message) && !this.cityElement.checkValidity()) {
16635
- message = some('Enter a valid city/suburb');
16636
- }
16637
- if (isNone(message) && !this.postcodeElement.checkValidity()) {
16638
- message = some('Enter a valid post code');
16639
- }
16640
- if (isNone(message) && !this.stateElement.checkValidity()) {
16641
- message = some('Select a state');
16642
- }
16643
- this.addressErrorMessage = message;
16644
- }
16645
- };
16646
-
16647
- class InteropQuery extends Query {
16648
- constructor(store) {
16649
- super(store);
16650
- this.store = store;
16651
- }
16652
- isReactNativeInteropEnabled() {
16653
- return isSome(this.getValue().reactNativeInterop);
16654
- }
16655
- isIframeInteropEnabled() {
16656
- return isSome(this.getValue().iframeInterop);
16657
- }
16658
- getIframeInteropMode() {
16659
- const iframeInterop = this.getValue().iframeInterop;
16660
- if (isNone(iframeInterop)) {
16661
- throw Error('Failed to get iframe interop information: no data in store');
16662
- }
16663
- if (!this.isIframeInteropEnabled()) {
16664
- throw Error('Failed to get iframe interop information: iframe mode is disabled');
16665
- }
16666
- return iframeInterop.value;
16667
- }
16668
- }
16669
- const interopQuery = new InteropQuery(sessionStore);
16670
-
16671
- class SlateChoiceApi {
16672
- async submitSlateChoiceAsync(dto) {
16673
- return buildBackendApiClient()
16674
- .url('super-choice/slate')
16675
- .post(dto)
16676
- .badRequest(() => {
16677
- throw new Error('Failed to process Slate join request');
16678
- })
16679
- .text();
16680
- }
16681
- }
16682
- const slateChoiceApi = new SlateChoiceApi();
16683
-
16684
- class SlateIFrameBuilder {
16685
- constructor() {
16686
- this.hostIsLocalSuperSelection = () => window.location.origin === 'http://localhost:7100';
16687
- this.hostIsDeployed = () => window.location.origin.endsWith('partner.flarehr.com');
16688
- this.skipConsolidation = () => (interopQuery.isReactNativeInteropEnabled() ? 'true' : 'false');
16689
- this.skipInsurance = () => (interopQuery.isReactNativeInteropEnabled() ? 'true' : 'false');
16690
- this.environmentDiscriminator = () => {
16691
- const discriminator = window.location.hostname.toLowerCase().split('.')[0];
16692
- switch (discriminator) {
16693
- case 'autodev-partner':
16694
- case 'test-partner':
16695
- case 'partner':
16696
- case 'sandbox-partner':
16697
- return discriminator.replace('partner', '');
16698
- default:
16699
- return 'autodev-';
16700
- }
16701
- };
16702
- this.slateJoinAppUrl = () => {
16703
- return `https://${this.environmentDiscriminator()}join.slatesuper.com.au/confirm`;
16704
- };
16705
- }
16706
- build(iframe, history) {
16707
- if (!(iframe === null || iframe === void 0 ? void 0 : iframe.contentDocument))
16708
- return;
16709
- const baseUrl = this.hostIsLocalSuperSelection() || this.hostIsDeployed()
16710
- ? `${window.location.origin}/super-selection/embed/v1.0/app`
16711
- : 'https://autodev-partner.flarehr.com/super-selection/embed/v1.0/app';
16712
- const redirectUrl = `${baseUrl}/slate-redirect.html`;
16713
- const postData = Object.assign(Object.assign({}, this.getSlateJoinMemberData()), { successRedirectUrl: redirectUrl, cancelRedirectUrl: redirectUrl, skipConsolidation: this.skipConsolidation(), skipInsurance: this.skipInsurance() });
16714
- if (this.includeJwt()) {
16715
- postData.authToken = superSelectionAppService.jwt;
16716
- }
16717
- const handleMessage = (event) => {
16718
- const { data, origin } = event;
16719
- if (!data) {
16720
- return;
16721
- }
16722
- if (data.sender === 'slate-redirect') {
16723
- window.removeEventListener('message', handleMessage);
16724
- switch (data.type) {
16725
- case 'success':
16726
- if (data.memberNumber) {
16727
- navigationService.navigateInternallyToStandardChoice({
16728
- history,
16729
- fundName: fund$8.name,
16730
- fundDetails: {
16731
- type: 'promoted',
16732
- fundName: fund$8.name,
16733
- fundUsi: slateUsi,
16734
- memberNumber: data.memberNumber,
16735
- promotedFundId: fund$8.fundId
16736
- },
16737
- handleSubmitFn: (standardChoiceFormSignature) => slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature, defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi) }, superSelectionAppService.promotedFundsConfig)),
16738
- promotedFundId: fund$8.fundId
16739
- });
16740
- break;
16741
- }
16742
- /* falls through */
16743
- default:
16744
- navigationService.navigateInternally(history, SuperSelectionAppRoutes.ChoicePage);
16745
- break;
16746
- }
16747
- reset();
16748
- return;
16749
- }
16750
- if (data.sender === 'flare' && origin.endsWith('join.slatesuper.com.au')) {
16751
- switch (data.type) {
16752
- case 'contentResized':
16753
- iframe.height = data.height > 0 ? data.height : iframe.height;
16754
- iframe.width = data.width > 0 ? data.width : iframe.width;
16755
- break;
16756
- }
16757
- }
16758
- };
16759
- window.addEventListener('message', handleMessage);
16760
- const iframeDoc = iframe.contentDocument;
16761
- iframeDoc.open();
16762
- const form = iframeDoc.createElement('form');
16763
- form.method = 'POST';
16764
- form.target = '_self';
16765
- form.action = this.slateJoinAppUrl();
16766
- let prop;
16767
- for (prop in postData) {
16768
- const value = postData[prop];
16769
- if (value !== undefined) {
16770
- const input = document.createElement('input');
16771
- input.type = 'hidden';
16772
- input.name = prop;
16773
- input.value = value;
16774
- form.append(input);
16775
- }
16776
- }
16777
- iframeDoc.appendChild(form);
16778
- iframeDoc.close();
16779
- form.submit();
16780
- }
16781
- getSlateJoinMemberData() {
16782
- var _a, _b;
16783
- const superBuyer = superSelectionAppService.superBuyer;
16784
- const toSlateGender = (gender) => {
16785
- switch (gender) {
16786
- case 'Male':
16787
- return 'Male';
16788
- case 'Female':
16789
- return 'Female';
16790
- case 'Intersex':
16791
- return 'Intersex/Indeterminate';
16792
- default:
16793
- return 'Unknown';
16794
- }
16795
- };
16796
- return {
16797
- firstName: superBuyer.userProfile.firstName,
16798
- middleName: superBuyer.userProfile.middleName,
16799
- lastName: superBuyer.userProfile.lastName,
16800
- dateOfBirth: superBuyer.userProfile.dateOfBirth,
16801
- gender: toSlateGender(superBuyer.userProfile.gender),
16802
- email: superBuyer.userProfile.email,
16803
- mobilePhone: superBuyer.userProfile.mobilePhone,
16804
- taxFileNumber: (_a = superBuyer.tfn) !== null && _a !== void 0 ? _a : '',
16805
- addressLine1: superBuyer.userProfile.address.addressLine1,
16806
- addressLine2: (_b = superBuyer.userProfile.address.addressLine2) !== null && _b !== void 0 ? _b : '',
16807
- city: superBuyer.userProfile.address.city,
16808
- state: superBuyer.userProfile.address.state,
16809
- postCode: superBuyer.userProfile.address.postcode
16810
- };
16811
- }
16812
- includeJwt() {
16813
- return !this.slateJoinAppUrl().match(/autodev|sandbox/);
16814
- }
16815
- }
16816
- const slateIFrameBuilder = new SlateIFrameBuilder();
15772
+ const appConfigurationQuery = new AppConfigurationQuery(sessionStore);
16817
15773
 
16818
- const SlateJoinPage = class {
16819
- constructor(hostRef) {
16820
- registerInstance(this, hostRef);
15774
+ class AppInsightsService {
15775
+ constructor() {
15776
+ this.appInsights = new Lazy(() => new Initialization({
15777
+ config: {
15778
+ instrumentationKey: appConfigurationQuery.configuration.AppInsightsKey,
15779
+ enableAutoRouteTracking: true,
15780
+ autoTrackPageVisitTime: true,
15781
+ maxBatchInterval: 1000,
15782
+ enableUnhandledPromiseRejectionTracking: true
15783
+ }
15784
+ }));
16821
15785
  }
16822
- render() {
16823
- return h("sss-iframe-host", { build: (iframe) => slateIFrameBuilder.build(iframe, this.history) });
15786
+ init() {
15787
+ this.appInsights.value.loadAppInsights();
15788
+ setErrorHandler((err) => this.appInsightsErrorHandler(err));
16824
15789
  }
16825
- };
16826
-
16827
- const StandardChoiceFormInputDefaultFund = class {
16828
- constructor(hostRef) {
16829
- registerInstance(this, hostRef);
16830
- this.standardChoiceFormSignature = '';
16831
- this.isSubmitDisabled = true;
16832
- this.eventTrackingService = EventTrackingService.Instance;
16833
- this.ignorePopState = () => window.history.pushState(null, '', null);
15790
+ getAppInsights() {
15791
+ return this.appInsights.value;
16834
15792
  }
16835
- connectedCallback() {
16836
- this.ignorePopState();
16837
- window.addEventListener('popstate', this.ignorePopState);
15793
+ addCustomProperties(properties) {
15794
+ this.appInsights.value.addTelemetryInitializer((envelope) => {
15795
+ envelope.data = envelope.data ? envelope.data : {};
15796
+ for (const [k, v] of Object.entries(properties)) {
15797
+ envelope.data[k] = v;
15798
+ }
15799
+ });
16838
15800
  }
16839
- disconnectedCallback() {
16840
- window.removeEventListener('popstate', this.ignorePopState);
15801
+ trackErrorTrace(message) {
15802
+ this.appInsights.value.trackTrace({ message, severityLevel: SeverityLevel.Error });
16841
15803
  }
16842
- render() {
16843
- return (h(Host, null, h("div", { class: "text-2xl sm:text-3xl font-bold text-center" }, "Confirm your super choice"), h("div", { class: "sm:text-lg text-gray-600 max-w-800 mt-4 text-center leading-7 sm:leading-8" }, "Your authorisation is required to complete your super choice by signing the standard choice form, which informs your employer of your choice of fund."), h("div", { class: "flex justify-center mt-8 sm:mt-12" }, h("div", { class: "max-w-560" }, h("div", { class: "p-4 sm:p-6 border shadow-sm rounded-lg flex flex-col sm:flex-row" }, this.renderLogo(), h("div", { class: "flex justify-between w-full" }, h("div", null, h("div", { class: "text-xs font-semibold text-gray-500 uppercase" }, "Nominated fund"), h("div", { class: "text-sm mt-2" }, state$1.fundName)), h("div", { class: "grid content-center ml-4" }, h("sss-button", { testid: "change-fund-button", size: "xs", variant: "secondary", promiseFn: async () => {
16844
- await this.trackChangeRequestedAsync();
16845
- const changeFundRoute = Option.isSome(superSelectionAppService.state.superChoicePrefill)
16846
- ? SuperSelectionAppRoutes.ConsentPage
16847
- : SuperSelectionAppRoutes.ChoicePage;
16848
- navigationService.navigateInternally(this.history, changeFundRoute);
16849
- } }, "Change")))), h("div", { class: "mt-4 p-4 sm:p-6 border shadow-sm rounded-lg" }, h("div", { class: "sm:text-lg font-bold" }, "Superannuation Standard Choice Form"), h("div", { class: "bg-blue-50 border-l-4 border-blue-400 p-4 mt-3" }, h("div", { class: "flex" }, h("div", { class: "flex-shrink-0" }, h("img", { class: "h-5 w-5", src: getAssetPath('assets/icon-information-circle.svg') })), h("div", { class: "ml-2" }, h("p", { class: "text-sm text-blue-800 leading-5" }, "Applying your full name in the text field below is the same as applying your written signature and is legally binding.")))), h("form", { noValidate: true, onSubmit: (ev) => ev.preventDefault(), class: {
16850
- 'mt-3': true,
16851
- 'was-validated': this.formState === 'validated'
16852
- }, ref: (el) => (this.formElement = el), onInput: (_) => (this.isSubmitDisabled = !this.formElement.checkValidity()) }, h("label", { class: "text-sm font-medium text-gray-700" }, "Type your full name"), h("input", { "data-testid": "standard-choice-form-signature-input", type: "text", autocomplete: "off", class: {
16853
- 'shadow-sm focus:ring-primary-focus focus:border-primary-focus w-full text-base sm:text-sm border-gray-300 rounded-md mt-1': true,
16854
- 'invalid:border-red-300 invalid:text-red-900 invalid:focus:ring-red-500 invalid:focus:border-red-500': this.formState === 'validated'
16855
- }, required: true, minlength: "2", name: "standardChoiceFormSignature", id: "standardChoiceFormSignature", value: this.standardChoiceFormSignature, onInput: (event) => (this.standardChoiceFormSignature = event.target.value) }), h("div", { class: "invalid-feedback mt-2 text-sm text-red-600" }, "Type your full name"), h("div", { class: "mt-6" }, h("sss-button", { testid: "confirm-and-continue-button", fillWidth: true, promiseFn: () => this.handleSubmitForm(), disabled: this.isSubmitDisabled }, "Confirm and continue"))))))));
15804
+ appInsightsErrorHandler(error) {
15805
+ this.appInsights.value.trackException({
15806
+ error: error,
15807
+ severityLevel: SeverityLevel.Error
15808
+ });
15809
+ // eslint-disable-next-line no-console
15810
+ const defaultStencilErrorHandler = (error) => console.error(error);
15811
+ defaultStencilErrorHandler(error);
16856
15812
  }
16857
- renderLogo() {
16858
- if (state$1.promotedFundId == undefined)
16859
- return;
16860
- const logoSource = getLogoSrcByFundId(state$1.promotedFundId);
16861
- if (Option.isSome(logoSource)) {
16862
- return (h("div", { class: "pb-4 mb-4 border-b flex justify-center sm:pb-0 sm:mb-0 sm:border-b-0 sm:pr-8 sm:mr-8 sm:border-r sm:justify-start" }, h("img", { class: "h-16 max-w-140 sm:h-12 sm:max-w-[100px] object-contain", alt: state$1.fundName, src: logoSource.value })));
16863
- }
15813
+ }
15814
+ const appInsights = new AppInsightsService();
15815
+
15816
+ class SuperCampaignErrorApi {
15817
+ static get Instance() {
15818
+ return this.instance || (this.instance = new this());
16864
15819
  }
16865
- async trackChangeRequestedAsync() {
16866
- const common = {
16867
- promotedFundsShown: superSelectionAppService.promotedFunds,
16868
- defaultFundUsiSet: toUndefined(superSelectionAppService.defaultFundUsi)
16869
- };
16870
- switch (state$1.fundDetails.type) {
16871
- case 'default':
16872
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16873
- DefaultFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16874
- });
16875
- break;
16876
- case 'myOwnFund':
16877
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16878
- MyOwnFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16879
- });
16880
- break;
16881
- case 'smsf':
16882
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16883
- Smsf: Object.assign(Object.assign({}, state$1.fundDetails), common)
16884
- });
16885
- break;
16886
- case 'promoted':
16887
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16888
- PromotedFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16889
- });
16890
- break;
16891
- case 'promotedDefault':
16892
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16893
- PromotedDefaultFund: Object.assign(Object.assign({}, state$1.fundDetails), common)
16894
- });
16895
- break;
16896
- case 'promotedDefaultWithJoin':
16897
- await this.eventTrackingService.TrackSuperFundDetailChangeRequestedAsync({
16898
- PromotedDefaultFundWithJoin: Object.assign(Object.assign({}, state$1.fundDetails), common)
16899
- });
16900
- break;
16901
- case 'null':
16902
- throw 'standardChoiceFormState.fundDetails was not set';
16903
- }
15820
+ async PostError(error) {
15821
+ buildBackendApiClient().url('super-campaign/errors').post(error);
16904
15822
  }
16905
- async handleSubmitForm() {
16906
- this.formState = 'validated';
16907
- if (this.formElement.checkValidity()) {
16908
- await state$1.handleSubmitFn(this.standardChoiceFormSignature.trim());
16909
- superSelectionAppService.markSuperSelectionAsSubmitted();
15823
+ }
15824
+
15825
+ const SuperFundDisclaimerViewedDetail = {
15826
+ create: (superCampaignEnabled) => {
15827
+ let isDefinedBenefitsEligibleString = 'Not set';
15828
+ if (Option.isSome(superSelectionAppService.isDefinedBenefitsEligible)) {
15829
+ isDefinedBenefitsEligibleString = superSelectionAppService.isDefinedBenefitsEligible.value
15830
+ ? 'True'
15831
+ : 'False';
16910
15832
  }
15833
+ return {
15834
+ isDefinedBenefitsEligible: isDefinedBenefitsEligibleString,
15835
+ superCampaignEnabled: superCampaignEnabled
15836
+ };
16911
15837
  }
16912
15838
  };
16913
15839
 
16914
- const Success = class {
16915
- constructor(hostRef) {
16916
- registerInstance(this, hostRef);
16917
- this.ignorePopState = () => window.history.pushState(null, '', null);
16918
- }
16919
- connectedCallback() {
16920
- this.ignorePopState();
16921
- window.addEventListener('popstate', this.ignorePopState);
16922
- }
16923
- disconnectedCallback() {
16924
- window.removeEventListener('popstate', this.ignorePopState);
15840
+ class PromotedFundChoiceApi {
15841
+ async submitChoiceAsync(dto) {
15842
+ return buildBackendApiClient()
15843
+ .url('super-choice/promoted-fund')
15844
+ .post(dto)
15845
+ .badRequest(() => {
15846
+ throw new Error('Failed to process Promoted Fund choice request');
15847
+ })
15848
+ .text();
16925
15849
  }
16926
- render() {
16927
- const CheckIcon = () => {
16928
- return (h("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", class: "fill-primary-base" }, h("path", { d: "M443.3 100.7C449.6 106.9 449.6 117.1 443.3 123.3L171.3 395.3C165.1 401.6 154.9 401.6 148.7 395.3L4.686 251.3C-1.562 245.1-1.562 234.9 4.686 228.7C10.93 222.4 21.06 222.4 27.31 228.7L160 361.4L420.7 100.7C426.9 94.44 437.1 94.44 443.3 100.7H443.3z" })));
16929
- };
16930
- return (h(Host, { class: "text-center" }, h("div", { class: "flex justify-center" }, h("div", { class: "relative" }, h("div", { class: "h-20 w-20 rounded-full bg-primary-base opacity-10" }), h("div", { class: "h-8 w-8 absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2" }, h(CheckIcon, null)))), h("h3", { class: "text-2xl leading-8 font-bold mt-4" }, "Your super choice has been submitted"), h("p", { class: "mt-4 text-center text-gray-600 leading-7 max-w-560 mx-auto" }, "Your superannuation details have been updated successfully and will be submitted to your employer."), h("div", { class: "flex justify-center mt-8" }, h("div", { class: "max-w-[200px] w-full" }, h("sss-button", { testid: "continue-button", size: "xl", fillWidth: true, onClick: this.handleContinueButtonClick }, h("span", null, "Continue"))))));
15850
+ async submitDefaultChoiceAsync(dto) {
15851
+ return buildBackendApiClient()
15852
+ .url('super-choice/promoted-fund/default')
15853
+ .post(dto)
15854
+ .badRequest(() => {
15855
+ throw new Error('Failed to process Promoted Default Fund choice request');
15856
+ })
15857
+ .text();
16931
15858
  }
16932
- handleContinueButtonClick(_event) {
16933
- superSelectionAppService.completeSuperSelectionFlow();
15859
+ async submitDefaultChoiceWithJoinAsync(dto) {
15860
+ return buildBackendApiClient()
15861
+ .url('super-choice/promoted-fund/default-with-join')
15862
+ .post(dto)
15863
+ .badRequest(() => {
15864
+ throw new Error('Failed to process Promoted Default Fund With Join choice request');
15865
+ })
15866
+ .text();
16934
15867
  }
16935
- };
15868
+ }
15869
+ const promotedFundChoiceApi = new PromotedFundChoiceApi();
16936
15870
 
16937
- class SuperCampaignErrorApi {
16938
- static get Instance() {
16939
- return this.instance || (this.instance = new this());
16940
- }
16941
- async PostError(error) {
16942
- buildBackendApiClient().url('super-campaign/errors').post(error);
15871
+ class SlateChoiceApi {
15872
+ async submitSlateChoiceAsync(dto) {
15873
+ return buildBackendApiClient()
15874
+ .url('super-choice/slate')
15875
+ .post(dto)
15876
+ .badRequest(() => {
15877
+ throw new Error('Failed to process Slate join request');
15878
+ })
15879
+ .text();
16943
15880
  }
16944
15881
  }
15882
+ const slateChoiceApi = new SlateChoiceApi();
16945
15883
 
16946
15884
  class MiscService {
16947
15885
  trackClickPromotedTileAsync(payload) {
@@ -17101,9 +16039,6 @@ const SuperCampaignHost = class {
17101
16039
  }
17102
16040
  return Promise.resolve();
17103
16041
  };
17104
- this.getFundName = (fundId) => {
17105
- return _function.pipe(getFundNameByFundId(fundId), Option.getOrElse(() => ''));
17106
- };
17107
16042
  this.stringIsNullOrEmtpty = (s) => {
17108
16043
  return !(typeof s === 'string' && s.trim().length > 0);
17109
16044
  };
@@ -17113,21 +16048,20 @@ const SuperCampaignHost = class {
17113
16048
  return;
17114
16049
  }
17115
16050
  const usi = Usi.clean(data.usi);
17116
- const fundName = this.getFundName(data.fundId);
17117
16051
  const defaultFundUsiSet = Option.toUndefined(superSelectionAppService.defaultFundUsi);
17118
16052
  navigationService.navigateInternallyToStandardChoice({
17119
16053
  history: this.history,
17120
- fundName,
16054
+ fundName: data.fundName,
17121
16055
  promotedFundId: data.fundId,
17122
16056
  fundDetails: {
17123
16057
  type: 'promoted',
17124
- fundName,
16058
+ fundName: data.fundName,
17125
16059
  fundUsi: usi,
17126
16060
  memberNumber: data.memberNumber,
17127
16061
  promotedFundId: data.fundId
17128
16062
  },
17129
16063
  handleSubmitFn: async (standardChoiceFormSignature) => {
17130
- if (data.fundId == fund$8.fundId) {
16064
+ if (data.fundId == slate.fundId) {
17131
16065
  await slateChoiceApi.submitSlateChoiceAsync(Object.assign({ memberNumber: data.memberNumber, memberFirstName: data.memberFirstName, memberFamilyName: data.memberFamilyName, standardChoiceFormSignature,
17132
16066
  defaultFundUsiSet }, this.PromotedFundsConfig));
17133
16067
  }
@@ -17145,14 +16079,13 @@ const SuperCampaignHost = class {
17145
16079
  return;
17146
16080
  }
17147
16081
  const usi = Usi.clean(data.usi);
17148
- const fundName = this.getFundName(data.fundId);
17149
16082
  navigationService.navigateInternallyToStandardChoice({
17150
16083
  history: this.history,
17151
- fundName,
16084
+ fundName: data.fundName,
17152
16085
  promotedFundId: data.fundId,
17153
16086
  fundDetails: {
17154
16087
  type: 'promotedDefault',
17155
- fundName,
16088
+ fundName: data.fundName,
17156
16089
  fundUsi: usi,
17157
16090
  promotedFundId: data.fundId
17158
16091
  },
@@ -17166,14 +16099,13 @@ const SuperCampaignHost = class {
17166
16099
  return;
17167
16100
  }
17168
16101
  const usi = Usi.clean(data.usi);
17169
- const fundName = this.getFundName(data.fundId);
17170
16102
  navigationService.navigateInternallyToStandardChoice({
17171
16103
  history: this.history,
17172
- fundName,
16104
+ fundName: data.fundName,
17173
16105
  promotedFundId: data.fundId,
17174
16106
  fundDetails: {
17175
16107
  type: 'promotedDefaultWithJoin',
17176
- fundName,
16108
+ fundName: data.fundName,
17177
16109
  fundUsi: usi,
17178
16110
  memberNumber: data.memberNumber,
17179
16111
  promotedFundId: data.fundId
@@ -17206,14 +16138,14 @@ const SuperCampaignHost = class {
17206
16138
  async componentWillLoad() {
17207
16139
  if (superSelectionAppService.state.superCampaignComponentStatus ===
17208
16140
  SuperCampaignComponentStatus.NotWorking) {
17209
- await navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
16141
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.MyOwnFund);
17210
16142
  return;
17211
16143
  }
17212
16144
  let superCampaingScriptPath = undefined;
17213
16145
  try {
17214
- if (Option.isSome(superSelectionAppService.state.apiBaseUrl) &&
16146
+ if (Option.isSome(superSelectionAppService.backendUrl) &&
17215
16147
  Option.isSome(superSelectionAppService.state.jwt)) {
17216
- this.backendUrl = this.getBaseUrl(superSelectionAppService.state.apiBaseUrl.value);
16148
+ this.backendUrl = superSelectionAppService.backendUrl.value;
17217
16149
  this.accessToken = superSelectionAppService.state.jwt.value;
17218
16150
  this.unSubscribeFromSuperCampaignEvents();
17219
16151
  if (superSelectionAppService.state.superCampaignComponentStatus ===
@@ -17224,7 +16156,7 @@ const SuperCampaignHost = class {
17224
16156
  }
17225
16157
  this.subscribeToSuperCampaignEvents();
17226
16158
  this.scriptImported = true;
17227
- superSelectionAppService.superCampaignIsInView = true;
16159
+ superSelectionAppService.hideFooterSection = true;
17228
16160
  }
17229
16161
  else {
17230
16162
  throw Error(`SuperCampaignHost pre-requisites not met.`);
@@ -17240,7 +16172,7 @@ const SuperCampaignHost = class {
17240
16172
  disconnectedCallback() {
17241
16173
  clearTimeout(this.loadingTimeoutRef);
17242
16174
  this.unSubscribeFromSuperCampaignEvents();
17243
- superSelectionAppService.superCampaignIsInView = false;
16175
+ superSelectionAppService.hideFooterSection = false;
17244
16176
  }
17245
16177
  render() {
17246
16178
  return (h("div", null, this.scriptImported ? (h("apollo-super-campaign", { "backend-url": this.backendUrl, "access-token": this.accessToken })) : null));
@@ -17265,10 +16197,6 @@ const SuperCampaignHost = class {
17265
16197
  createApolloSuperCampaignScriptUrl(envTag) {
17266
16198
  return `https://npm-cdn.flarehr.com/@flarehr/apollo-super-campaign@${envTag}/dist/apollo-super-campaign.js`;
17267
16199
  }
17268
- getBaseUrl(url) {
17269
- const parsedUrl = new URL(url);
17270
- return `${parsedUrl.protocol}//${parsedUrl.hostname}${parsedUrl.port.length > 0 ? `:${parsedUrl.port}` : ''}`;
17271
- }
17272
16200
  get SuperCampaignState() {
17273
16201
  if (superSelectionAppService.superCampaignState != undefined)
17274
16202
  return superSelectionAppService.superCampaignState;
@@ -17280,136 +16208,6 @@ const SuperCampaignHost = class {
17280
16208
  };
17281
16209
  injectHistory(SuperCampaignHost);
17282
16210
 
17283
- const SuperChoiceItemBottom = class {
17284
- constructor(hostRef) {
17285
- registerInstance(this, hostRef);
17286
- this.joinFundClicked = createEvent(this, "joinFundClicked", 7);
17287
- }
17288
- render() {
17289
- return (h(Host, null, h("div", { class: "py-6 px-4 flex flex-col justify-between h-full" }, h("div", null, h("div", { class: { 'md:max-w-[240px]': true, 'lg:max-w-full': this.isMultiFund } }, h("sss-button", { testid: "choose-this-fund-button", class: "uuid-button-continue", fillWidth: true, onClick: () => this.handleFundClick() }, "Choose this fund")), h("div", { class: "text-xs text-gray-500 mt-6 leading-4" }, this.disclaimer)), this.abnInfo && this.abn && (h("div", { class: "text-xs text-gray-500 mt-2" }, h("p", null, "Issued by ", this.abnInfo, "."), h("p", null, "ABN: ", this.abn))))));
17290
- }
17291
- handleFundClick() {
17292
- return this.joinFundClicked.emit();
17293
- }
17294
- };
17295
-
17296
- const SuperChoiceItemTop = class {
17297
- constructor(hostRef) {
17298
- registerInstance(this, hostRef);
17299
- }
17300
- render() {
17301
- return (h(Host, null, h("div", { class: "px-4 pt-6" }, h("div", { class: "text-right w-100 -mt-5 -mr-2" }, this.extraBadge, this.isPromotedDefault && (h("span", { class: "text-xs bg-blue-100 text-blue-800 font-medium rounded-xl py-0.5 px-2.5 mr-1" }, "Employer Default")), h("span", { class: "text-xs bg-gray-100 text-gray-800 font-medium rounded-xl py-0.5 px-2.5 mr-0.5" }, "Featured")), h("div", { class: { 'flex lg:block mt-2 md:mt-0': true, 'lg:mt-4': this.isMultiFund } }, h("img", { class: {
17302
- 'h-12 md:h-14 lg:h-16 object-contain w-[80px] md:w-[96px] lg:w-[140px] md:hidden lg:object-left': true,
17303
- 'lg:block': this.isMultiFund
17304
- }, alt: this.name, src: getAssetPath(`assets/${this.logo}`) }), h("div", { class: "grid content-center" }, h("p", { class: {
17305
- 'text-base md:text-lg font-bold ml-4 md:ml-0 md:mb-0': true,
17306
- 'lg:mt-4': this.isMultiFund
17307
- } }, this.name))), h("div", { class: "mt-4 sm:mt-2 text-sm space-y-2" }, this.features.map((feature) => (h("div", { class: "flex" }, h("div", { class: "h-5 w-5 flex-none mr-1.5" }, h("img", { alt: "checked", src: getAssetPath(`assets/icon-check.svg`) })), h("div", { class: "leading-5" }, feature))))), this.featureSubText && (h("p", { class: "text-xs text-gray-500 italic mt-4 leading-4" }, this.featureSubText)), this.customContent)));
17308
- }
17309
- };
17310
-
17311
- const SuperChoicePage = class {
17312
- constructor(hostRef) {
17313
- registerInstance(this, hostRef);
17314
- this.promotedFunds = this.getPromotedFunds();
17315
- this.eventTrackingService = EventTrackingService.Instance;
17316
- }
17317
- async componentDidLoad() {
17318
- const promotedFundsShown = this.promotedFunds.map((item) => item.fundId);
17319
- await superSelectionAppService.viewSuperFundPanelAsync(promotedFundsShown);
17320
- }
17321
- render() {
17322
- const mygovLink = 'https://my.gov.au';
17323
- const mygovLinkDisplay = 'www.my.gov.au';
17324
- const superfundsLink = 'https://www.apra.gov.au/register-of-superannuation-institutions';
17325
- const superfundsLinkDisplay = 'www.apra.gov.au';
17326
- const isMultiFund = this.promotedFunds.length > 1;
17327
- return (h(Host, null, h("div", null, h("sss-header-section", { currentPage: "choice" }), h("div", { class: "mt-8 text-sm text-center leading-6" }, h("p", { class: "leading-6" }, "Not ready to join a new fund, or want to nominate another super fund?"), h("stencil-route-link", { url: SuperSelectionAppRoutes.MyOwnFund }, h("span", { class: "inline-block text-primary-base font-medium mt-3" }, "Skip Featured Funds\u00A0", h("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", "stroke-width": "1.5", stroke: "currentColor", class: "inline h-5 w-5 fill-primary-base group-hover:fill-white" }, h("path", { "stroke-linecap": "round", "stroke-linejoin": "round", d: "M17.25 8.25L21 12m0 0l-3.75 3.75M21 12H3" }))))), h("div", { class: "flex justify-center mt-8" }, h("div", { class: {
17328
- 'lg:grid border-l border-t lg:border-b rounded-lg': true,
17329
- 'lg:grid-cols-1 max-w-720': this.promotedFunds.length === 1,
17330
- 'lg:grid-cols-2 max-w-720': this.promotedFunds.length === 2,
17331
- 'lg:grid-cols-3 max-w-960': this.promotedFunds.length === 3
17332
- } }, this.promotedFunds.map((fund, index) => (h("div", { class: {
17333
- 'border-r': true,
17334
- 'rounded-tr-lg': index === 0,
17335
- 'lg:rounded-tr-none': index === 0 && index !== this.promotedFunds.length - 1,
17336
- 'rounded-br-lg lg:rounded-br-none lg:rounded-tr-lg': index === this.promotedFunds.length - 1
17337
- } }, h("div", { class: {
17338
- 'flex border-b lg:border-b-0': true,
17339
- 'rounded-b-lg': index === this.promotedFunds.length - 1
17340
- } }, h("div", { class: {
17341
- 'hidden md:flex w-36 justify-center pt-6 pl-6': true,
17342
- 'lg:hidden': isMultiFund
17343
- } }, h("img", { class: "h-16 object-contain w-full max-w-[96px]", alt: fund.name, src: getAssetPath(`assets/${fund.logo}`) })), h("div", { class: "w-full" }, h("sss-super-choice-item-top", { logo: fund.logo, name: fund.name, features: fund.features, featureSubText: fund.featureSubText, customContent: fund.customContent, isMultiFund: isMultiFund, isPromotedDefault: fund.isPromotedDefault, extraBadge: fund.extraBadge }), h("div", { class: { 'lg:hidden': isMultiFund } }, h("sss-super-choice-item-bottom", { disclaimer: fund.disclaimer, abnInfo: fund.abnInfo, abn: fund.abn, isMultiFund: isMultiFund, onJoinFundClicked: async () => this.handleJoinSuperClickAsync(fund) }))))))), this.promotedFunds.map((fund, index) => (h("div", { class: {
17344
- 'hidden border-r': true,
17345
- 'lg:block': isMultiFund,
17346
- 'rounded-br-lg': index === this.promotedFunds.length - 1
17347
- } }, h("sss-super-choice-item-bottom", { disclaimer: fund.disclaimer, abnInfo: fund.abnInfo, abn: fund.abn, isMultiFund: isMultiFund, onJoinFundClicked: async () => this.handleJoinSuperClickAsync(fund) })))))), h("div", { class: "flex justify-center mt-8 sm:mt-12" }, h("div", { class: "pb-8 sm:pb-12 max-w-720 border-b" }, h("h5", { class: "font-bold sm:text-lg" }, "Or, choose another super fund:"), h("ul", { class: "list-disc list-outside ml-6 mt-3 mb-6 space-y-2 leading-6 text-sm sm:text-base" }, h("li", null, "Select this option if you'd like to use your current account with another super fund, your self-managed super fund, or your employer's default fund."), h("li", null, "If you are unsure of your current super fund details, you can find out at", ' ', h("a", { class: "text-primary-base font-medium hover:text-primary-hover", target: "_blank", href: navigationService.toExternalUrl(mygovLink) }, mygovLinkDisplay)), h("li", null, "A full list of super funds can be viewed at", ' ', h("a", { class: "text-primary-base font-medium hover:text-primary-hover", target: "_blank", href: navigationService.toExternalUrl(superfundsLink) }, superfundsLinkDisplay))), h("stencil-route-link", { url: SuperSelectionAppRoutes.MyOwnFund }, h("sss-button", { testid: "choose-another-super-fund-button", fillWidthOnMobile: true }, "Choose another super fund")))), h("div", { class: "flex justify-center" }, h("div", { class: "pt-8 sm:pt-12 max-w-720" }, h("h5", { class: "font-semibold" }, "IMPORTANT INFORMATION:"), h("ul", { class: "list-disc list-outside ml-6 mt-3 space-y-2 text-sm leading-6" }, h("li", null, "The superannuation funds featured above are for your information only. The order, position and placement of content should not be interpreted as an opinion or recommendation (actual or implied) by Flare as to the suitability or appropriateness of any superannuation fund for you. In featuring these superannuation funds, Flare has not taken into account your objectives, financial situation or needs."), h("li", null, "This is not a comparison service. This page contains factual information only and does not constitute either general or personal advice about any financial products. We do not take into account your objectives, financial situation or needs. If you have questions or need help making a decision about your superannuation fund, you should speak to a licensed financial product advice provider."), h("li", null, "Flare, the technology partner you are accessing Flare via and your employer do not endorse or accept responsibility for any financial product advice or services provided by the promoters or trustees of the featured superannuation funds. Flare does not endorse or accept responsibility for any of the content shown about any of the featured superannuation funds."), h("li", null, "You should consider the relevant superannuation fund\u2019s PDS and TMD (if applicable) in deciding whether to apply to join the superannuation fund. Each of the superannuation funds featured above include a link to their PDS and TMD (if applicable) for your convenience. If you are considering joining another superannuation fund, you can typically find the PDS and TMD (if applicable) on that fund\u2019s website."), h("li", null, "You should be aware that the trustees of featured superannuation funds pay fees to Flare and/or its associates. Some funds pay us a fee if you choose one of the featured funds, while others pay us to have their application form on our platform.")))))));
17348
- }
17349
- getPromotedFunds() {
17350
- const fundTiles = [];
17351
- superSelectionAppService.promotedFunds.forEach((fundId) => {
17352
- const fund = allPromotedFunds.find((fund) => fundId === fund.fundId);
17353
- if (fund !== undefined) {
17354
- fundTiles.push(fund);
17355
- }
17356
- });
17357
- return fundTiles;
17358
- }
17359
- async handleJoinSuperClickAsync(fund) {
17360
- const promotedFundsShown = superSelectionAppService.promotedFunds;
17361
- const fundUsi = getFundUsiByFundId(fund.fundId);
17362
- const fundName = getFundNameByFundId(fund.fundId);
17363
- await Promise.all([
17364
- fund.isPromotedDefault == true
17365
- ? this.eventTrackingService.TrackPromotedDefaultSuperFundDetailViewedAsync({
17366
- fundUsi: Option.isSome(fundUsi) ? fundUsi.value : '',
17367
- fundName: Option.isSome(fundName) ? fundName.value : '',
17368
- promotedFundId: fund.fundId,
17369
- promotedFundsShown,
17370
- defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi),
17371
- superCampaignEnabled: false
17372
- })
17373
- : this.eventTrackingService.TrackPromotedSuperFundDetailViewedAsync({
17374
- fundUsi: Option.isSome(fundUsi) ? fundUsi.value : undefined,
17375
- fundName: Option.isSome(fundName) ? fundName.value : '',
17376
- promotedFundId: fund.fundId,
17377
- promotedFundsShown,
17378
- defaultFundUsiSet: Option.toUndefined(superSelectionAppService.defaultFundUsi),
17379
- superCampaignEnabled: false
17380
- }),
17381
- miscService.trackClickPromotedTileAsync(fund.isPromotedDefault
17382
- ? {
17383
- promotedDefault: {
17384
- fundId: fund.fundId
17385
- }
17386
- }
17387
- : {
17388
- promoted: {
17389
- fundId: fund.fundId
17390
- }
17391
- })
17392
- ]);
17393
- state.fund = {
17394
- id: fund.fundId,
17395
- type: fund.isPromotedDefault ? 'PromotedDefault' : 'Promoted'
17396
- };
17397
- return navigationService.navigateInternally(this.history, fund.route);
17398
- }
17399
- static get assetsDirs() { return ["assets"]; }
17400
- };
17401
- injectHistory(SuperChoicePage);
17402
-
17403
- const SuperChoicePageWrapper = class {
17404
- constructor(hostRef) {
17405
- registerInstance(this, hostRef);
17406
- }
17407
- render() {
17408
- return superSelectionAppService.state.superCampaignEnabled ? (h("sss-super-campaign-host", null)) : (h("sss-super-choice-page", null));
17409
- }
17410
- };
17411
- injectHistory(SuperChoicePageWrapper);
17412
-
17413
16211
  const routeCss = "stencil-route.inactive{display:none}";
17414
16212
 
17415
16213
  const Route = class {
@@ -18406,7 +17204,7 @@ const SuperSelectionApp = class {
18406
17204
  navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ExistingChoicePage);
18407
17205
  }
18408
17206
  else {
18409
- navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ConsentPage);
17207
+ navigationService.navigateInternally(this.history, SuperSelectionAppRoutes.ChoicePage);
18410
17208
  }
18411
17209
  }
18412
17210
  authTokenChanged(newValue) {
@@ -18418,24 +17216,12 @@ const SuperSelectionApp = class {
18418
17216
  render() {
18419
17217
  return (h(Host, null, h("link", { rel: "stylesheet", href: getAssetPath('apollo-super-selection.css'), media: "all" }), this.renderAppContent()));
18420
17218
  }
18421
- isFundJoinPage() {
18422
- return (window.location.pathname.includes(SuperSelectionAppRoutes.SlateJoin) ||
18423
- window.location.pathname.includes(SuperSelectionAppRoutes.PromotedFundJoinV1) ||
18424
- window.location.pathname.includes(SuperSelectionAppRoutes.PromotedFundJoinV2));
18425
- }
18426
- getFooterTextOverride() {
18427
- return getFooterTextOverrideByFundId(state.fund.id);
18428
- }
18429
17219
  routerBaseUrl() {
18430
17220
  var _a;
18431
17221
  return ((_a = this.appBaseUrl) === null || _a === void 0 ? void 0 : _a.replace(/\/$/, '')) + '/';
18432
17222
  }
18433
17223
  renderAppContent() {
18434
- return (h("stencil-router", { root: this.routerBaseUrl(), class: "font-inter" }, h("stencil-route-switch", { scrollTopOffset: 0 }, this.isAppInitialised ? (h("div", { class: {
18435
- 'pt-28': true,
18436
- '-mt-12 pb-6': !this.isFundJoinPage(),
18437
- '-mt-28': this.isFundJoinPage() // -mt value same as pt to negate it in embedded fund join pages
18438
- } }, superSelectionAppStencilRoutes, h("sss-footer-section", { textOverride: this.getFooterTextOverride() }))) : (h("div", { class: "flex justify-center py-20" }, h("sss-loading-indicator", null))))));
17224
+ return (h("stencil-router", { root: this.routerBaseUrl(), class: "font-inter" }, h("stencil-route-switch", { scrollTopOffset: 0 }, this.isAppInitialised ? (h("div", { class: "pt-28 -mt-12 pb-6" }, superSelectionAppStencilRoutes, h("sss-footer-section", null))) : (h("div", { class: "flex justify-center py-20" }, h("sss-loading-indicator", null))))));
18439
17225
  }
18440
17226
  static get assetsDirs() { return ["assets"]; }
18441
17227
  static get watchers() { return {
@@ -19048,6 +17834,30 @@ class AuthenticationService {
19048
17834
  }
19049
17835
  const authenticationService = new AuthenticationService();
19050
17836
 
17837
+ class InteropQuery extends Query {
17838
+ constructor(store) {
17839
+ super(store);
17840
+ this.store = store;
17841
+ }
17842
+ isReactNativeInteropEnabled() {
17843
+ return isSome(this.getValue().reactNativeInterop);
17844
+ }
17845
+ isIframeInteropEnabled() {
17846
+ return isSome(this.getValue().iframeInterop);
17847
+ }
17848
+ getIframeInteropMode() {
17849
+ const iframeInterop = this.getValue().iframeInterop;
17850
+ if (isNone(iframeInterop)) {
17851
+ throw Error('Failed to get iframe interop information: no data in store');
17852
+ }
17853
+ if (!this.isIframeInteropEnabled()) {
17854
+ throw Error('Failed to get iframe interop information: iframe mode is disabled');
17855
+ }
17856
+ return iframeInterop.value;
17857
+ }
17858
+ }
17859
+ const interopQuery = new InteropQuery(sessionStore);
17860
+
19051
17861
  class IFrameInteropService {
19052
17862
  static completeSuperSelectionStep() {
19053
17863
  const { successRedirectionUrl } = interopQuery.getIframeInteropMode();
@@ -19149,7 +17959,7 @@ class AppParametersQuery extends Query {
19149
17959
  }
19150
17960
  const appParametersQuery = new AppParametersQuery(sessionStore);
19151
17961
 
19152
- const superSelectionAppHostCss = "html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#fdbd00;--fl-color-primary-light:#fef3c7;--fl-color-primary-dark:#d97706;--fl-color-primary-disabled:#ffde7e;--fl-color-primary-hover:#e4aa00;--fl-color-primary-focus:#ca9700;--fl-color-primary-text:#3d3d3d;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";
17962
+ const superSelectionAppHostCss = "html{scroll-behavior:smooth}.sss-app-container{--fl-color-primary:#2E66F7;--fl-color-primary-light:#EAF0FE;--fl-color-primary-dark:#031495;--fl-color-primary-disabled:#88ABFA;--fl-color-primary-hover:#5786F8;--fl-color-primary-focus:#1033C6;--fl-color-primary-text:#3d3d3d;--fl-color-secondary:#e5e5e5;--fl-color-secondary-hover:#b3b3b3;--fl-color-secondary-focus:#b3b3b3}@media screen and (-webkit-min-device-pixel-ratio: 0){select,textarea,input{font-size:16px}}";
19153
17963
 
19154
17964
  const SuperSelectionAppHost = class {
19155
17965
  constructor(hostRef) {
@@ -19211,4 +18021,4 @@ const SuperSelectionAppHost = class {
19211
18021
  };
19212
18022
  SuperSelectionAppHost.style = superSelectionAppHostCss;
19213
18023
 
19214
- export { Button as sss_button, Consent as sss_consent_page, ConsentWrapper as sss_consent_page_wrapper, CustomFund as sss_custom_fund, DefaultFund as sss_default_fund, SelectInputAsync as sss_dropdown_async, ExistingChoice as sss_existing_choice_page, FooterSection as sss_footer_section, HeaderSection as sss_header_section, IFrameHost as sss_iframe_host, LoadingComponent as sss_loading_component, LoadingIndicator as sss_loading_indicator, LoadingPage as sss_loading_page, LoadingComponent$1 as sss_loading_super_indicator, MyOwnFund as sss_my_own_fund, MyOwnFundInputs as sss_my_own_fund_inputs, MemberNameInput as sss_name_input, Prefill as sss_prefill, DisplayField as sss_prefill_display_field, PrefillErrorBox as sss_prefill_error_box, PrefillInvalidMyOwnFund as sss_prefill_invalid_my_own_fund, PrefillInvalidSMSF as sss_prefill_invalid_smsf, PrefillMyOwnFund as sss_prefill_my_own_fund, PrefillSMSF as sss_prefill_smsf, PrefillWarningBox as sss_prefill_warning_box, PromotedFundJoinV1Page as sss_promoted_fund_join_v1_page, PromotedFundJoinV2Page as sss_promoted_fund_join_v2_page, SelfManagedFund as sss_self_managed_fund, SelfManagedFundInputs as sss_self_managed_fund_inputs, SlateJoinPage as sss_slate_join_page, StandardChoiceFormInputDefaultFund as sss_standard_choice_form, Success as sss_success, SuperCampaignHost as sss_super_campaign_host, SuperChoiceItemBottom as sss_super_choice_item_bottom, SuperChoiceItemTop as sss_super_choice_item_top, SuperChoicePage as sss_super_choice_page, SuperChoicePageWrapper as sss_super_choice_page_wrapper, Route as stencil_route, RouteLink$1 as stencil_route_link, RouteSwitch as stencil_route_switch, Router as stencil_router, SuperSelectionApp as super_selection_app, SuperSelectionAppHost as super_selection_app_host };
18024
+ export { Button as sss_button, CustomFund as sss_custom_fund, DefaultFund as sss_default_fund, SelectInputAsync as sss_dropdown_async, ExistingChoice as sss_existing_choice_page, FooterSection as sss_footer_section, HeaderSection as sss_header_section, LoadingIndicator as sss_loading_indicator, LoadingPage as sss_loading_page, MyOwnFund as sss_my_own_fund, MyOwnFundEngagementStep as sss_my_own_fund_engagement_step_host, MyOwnFundInputs as sss_my_own_fund_inputs, MemberNameInput as sss_name_input, Prefill as sss_prefill, DisplayField as sss_prefill_display_field, PrefillErrorBox as sss_prefill_error_box, PrefillInvalidMyOwnFund as sss_prefill_invalid_my_own_fund, PrefillInvalidSMSF as sss_prefill_invalid_smsf, PrefillMyOwnFund as sss_prefill_my_own_fund, PrefillSMSF as sss_prefill_smsf, PrefillWarningBox as sss_prefill_warning_box, SelfManagedFund as sss_self_managed_fund, SelfManagedFundInputs as sss_self_managed_fund_inputs, StandardChoiceFormInputDefaultFund as sss_standard_choice_form, Success as sss_success, SuperCampaignHost as sss_super_campaign_host, Route as stencil_route, RouteLink$1 as stencil_route_link, RouteSwitch as stencil_route_switch, Router as stencil_router, SuperSelectionApp as super_selection_app, SuperSelectionAppHost as super_selection_app_host };