surveysparrow-ionic-plugin 2.0.4-beta.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -118,7 +118,7 @@ const functionStore = new Store({ functionState: { isLoaded: false } }, (state,
118
118
  const componentStore = new Store({ componentState: { isLoaded: false, schemas: {} } }, (state, update) => ({ componentState: { ...state.componentState, ...(update || {}) } }));
119
119
 
120
120
  // Keep in sync with package.json "version".
121
- const SDK_VERSION = '2.0.4-beta.1';
121
+ const SDK_VERSION = '2.1.0';
122
122
  const FRAMEWORK = 'ionic';
123
123
 
124
124
  // SDK errors go to SurveySparrow's API (backend sentry.processSentryError), never to Sentry servers.
@@ -1 +1 @@
1
- {"version":3,"file":"angular-ui.mjs","sources":["../../../src/angular-ui/lib/spotchecks/state/store.ts","../../../src/angular-ui/lib/spotchecks/helpers/version.ts","../../../src/angular-ui/lib/spotchecks/helpers/sentry.ts","../../../src/angular-ui/lib/spotchecks/helpers/storage.ts","../../../src/angular-ui/lib/spotchecks/helpers/listener.ts","../../../src/angular-ui/lib/spotchecks/helpers/executables.ts","../../../src/angular-ui/lib/spotchecks/helpers/survey-page.ts","../../../src/angular-ui/lib/spotchecks/helpers/render.ts","../../../src/angular-ui/lib/spotchecks/helpers/binding.ts","../../../src/angular-ui/lib/spotchecks/components/builder.component.ts","../../../src/angular-ui/lib/spotcheck.component.ts","../../../src/angular-ui/lib/spotchecks/helpers/device.ts","../../../src/angular-ui/lib/spotchecks/spotcheck.ts","../../../src/angular-ui/lib/angular-ui.ts"],"sourcesContent":["type Listener = () => void;\n\n// Minimal observable store; components re-render on every change.\nexport class Store<T> {\n private listeners = new Set<Listener>();\n\n constructor(private state: T, private reducer: (state: T, update: any) => T) {}\n\n getState(): T {\n return this.state;\n }\n\n dispatch(update: any): void {\n this.state = this.reducer(this.state, update);\n this.listeners.forEach((listener) => {\n try {\n listener();\n } catch (error) {\n console.error('[SpotCheck] store listener failed', error);\n }\n });\n }\n\n subscribe(listener: Listener): () => void {\n this.listeners.add(listener);\n return () => {\n this.listeners.delete(listener);\n };\n }\n}\n\n// Same shape and merge rules as the other SDKs (backend functions read state.SpotCheckState).\nconst initialSpotcheckState: any = {\n allSpotChecksInToken: [],\n customEventsSpotChecks: [],\n filteredSpotChecks: [],\n showSpotCheck: false,\n\n currentSpotcheck: {\n spotcheckURL: '',\n spotcheckID: 0,\n spotcheckContactID: 0,\n triggerToken: '',\n screenName: '',\n afterDelay: 0,\n isChat: false,\n appearance: {},\n },\n\n params: {\n targetToken: '',\n domainName: '',\n userDetails: {},\n variables: {},\n customProperties: {},\n visitor: {},\n framework: 'ionic',\n userAgent: '',\n traceId: '',\n },\n\n spotCheckDetails: {\n keyBoardHeight: 0,\n textPosition: 0,\n isMounted: false,\n isVisible: false,\n isExiting: false,\n currentQuestionHeight: 0,\n miniCardHeight: 0,\n sideTabButtonWidth: 0,\n isFullScreenMode: false,\n spotCheckType: null,\n position: 'bottom',\n mode: '',\n closeButton: {\n isEnabled: false,\n color: '#000000',\n isMiniCard: false,\n },\n isSpotCheckButton: false,\n spotCheckButtonConfig: {},\n showSurveyContent: true,\n avatarEnabled: false,\n avatarUrl: '',\n isRTLLanguage: false,\n },\n\n webViewDetails: {\n isChatEnabled: false,\n isClassicEnabled: false,\n isClassicLoading: true,\n isChatLoading: true,\n chatUrl: null,\n classicUrl: null,\n isCurrentSpotcheckChat: null,\n canShowClassic: false,\n canShowChat: false,\n webViewInjectionData: null,\n chatWebViewRef: null,\n classicWebViewRef: null,\n },\n};\n\nconst NESTED_KEYS = ['currentSpotcheck', 'spotCheckDetails', 'webViewDetails', 'params'];\n\nconst spotcheckReducer = (state: any, update: any) => {\n const payload = update || {};\n const sc = state.SpotCheckState;\n const next: any = { ...sc, ...payload };\n NESTED_KEYS.forEach((key) => {\n next[key] = { ...sc[key], ...(payload[key] || {}) };\n });\n return { SpotCheckState: next };\n};\n\nexport const spotcheckStore = new Store<any>({ SpotCheckState: initialSpotcheckState }, spotcheckReducer);\n\nexport const functionStore = new Store<any>(\n { functionState: { isLoaded: false } },\n (state, update) => ({ functionState: { ...state.functionState, ...(update || {}) } }),\n);\n\nexport const componentStore = new Store<any>(\n { componentState: { isLoaded: false, schemas: {} } },\n (state, update) => ({ componentState: { ...state.componentState, ...(update || {}) } }),\n);\n","// Keep in sync with package.json \"version\".\nexport const SDK_VERSION = '2.0.4-beta.1';\nexport const FRAMEWORK = 'ionic';\n","// SDK errors go to SurveySparrow's API (backend sentry.processSentryError), never to Sentry servers.\nimport { spotcheckStore } from '../state/store';\nimport { SDK_VERSION, FRAMEWORK } from './version';\n\nexport type ErrorSource =\n | 'SDK_INITIALIZATION'\n | 'SPOTCHECK_INITIALIZATION'\n | 'TRACK_SCREEN'\n | 'TRACK_EVENT'\n | 'WEBVIEW_ERROR'\n | 'CLOSE_SPOTCHECK'\n | 'APP_CRASH'\n | 'GENERAL';\n\n// Set by executables.ts at load time (avoids a circular import).\nlet executeRef: ((fn: string, params?: any) => Promise<any>) | null = null;\nexport const registerExecute = (fn: (fnName: string, params?: any) => Promise<any>) => {\n executeRef = fn;\n};\n\nconst MAX_BREADCRUMBS = 30;\nconst sdkBreadcrumbs: any[] = [];\n\nexport const addBreadcrumb = (message: string, data?: Record<string, any>) => {\n sdkBreadcrumbs.push({ category: 'spotcheck', message, data, timestamp: Date.now() / 1000 });\n if (sdkBreadcrumbs.length > MAX_BREADCRUMBS) sdkBreadcrumbs.shift();\n};\n\nconst MAX_BREADCRUMB_STRING = 200;\nconst capString = (value: string) => value.slice(0, MAX_BREADCRUMB_STRING);\n\n// Breadcrumb hook for backend functions; drops bad input and never throws.\nexport const safeAddBreadcrumb = (message: unknown, data?: unknown) => {\n try {\n if (typeof message !== 'string') return;\n let clean: Record<string, any> | undefined;\n const proto = data && typeof data === 'object' ? Object.getPrototypeOf(data) : undefined;\n if (proto === Object.prototype || proto === null) {\n clean = {};\n Object.keys(data as object).forEach((key) => {\n const value = (data as any)[key];\n if (typeof value === 'string') clean![key] = capString(value);\n else if (value === null || typeof value === 'number' || typeof value === 'boolean') clean![key] = value;\n });\n }\n addBreadcrumb(capString(message), clean);\n } catch {}\n};\n\n// Flags an error as reported so execute() does not report it again.\nconst markReported = (error: unknown) => {\n try {\n if (error !== null && typeof error === 'object') {\n Object.defineProperty(error, '__ssReported', { value: true, configurable: true });\n }\n } catch {}\n};\n\nexport const isReported = (error: unknown) => {\n try {\n return !!(error as any)?.__ssReported;\n } catch {\n return false;\n }\n};\n\n// Routes an event to the backend; never throws.\nconst sendToBackend = async (normalizedEvent: any) => {\n try {\n const result = executeRef\n ? await executeRef('sentry.processSentryError', {\n event: normalizedEvent,\n sdkType: FRAMEWORK,\n sdkVersion: SDK_VERSION,\n })\n : null;\n if (result) return;\n\n const { domainName, targetToken } = spotcheckStore.getState().SpotCheckState?.params || {};\n if (!domainName) return;\n await fetch(`https://${domainName}/api/internal/spotcheck/sdkErrors`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n errorMessage: normalizedEvent.errorMessage,\n sdkType: FRAMEWORK,\n sdkVersion: SDK_VERSION,\n level: normalizedEvent.tags?.error_priority === 'P0' ? 'fatal' : 'error',\n tags: normalizedEvent.tags,\n extra: normalizedEvent.extra,\n breadcrumbs: normalizedEvent.breadcrumbs,\n contexts: { user: { spotcheck_token: targetToken || '', spotcheck_domain_name: domainName } },\n }),\n }).catch(() => {});\n } catch {\n // Reporting must never break the host app.\n }\n};\n\nconst report = (error: unknown, priority: 'P0' | 'P1', source: ErrorSource, extra?: Record<string, any>) => {\n markReported(error);\n const err = error as any;\n sendToBackend({\n errorMessage: err?.message || String(error),\n tags: {\n error_priority: priority,\n severity: priority === 'P0' ? 'CRITICAL' : 'HIGH',\n errorType: source,\n },\n contexts: {},\n extra: extra || {},\n breadcrumbs: [...sdkBreadcrumbs],\n exceptions: [{\n type: err?.name || 'Error',\n value: err?.message || String(error),\n stack: String(err?.stack || '').slice(0, 2000),\n }],\n timestamp: Date.now() / 1000,\n platform: 'javascript',\n });\n};\n\nexport const captureP0Error = (error: unknown, source: ErrorSource, extra?: Record<string, any>) =>\n report(error, 'P0', source, extra);\n\nexport const captureP1Error = (error: unknown, source: ErrorSource, extra?: Record<string, any>) =>\n report(error, 'P1', source, extra);\n","import { captureP1Error } from './sentry';\n\n// Same key as the legacy Ionic SDK, so existing installs keep their visitor.\nconst UUID_KEY = 'SurveySparrowUUID';\n\nconst uuidV4 = (): string => {\n const c: any = typeof crypto !== 'undefined' ? crypto : null;\n if (c?.randomUUID) return c.randomUUID();\n const bytes = new Uint8Array(16);\n if (c?.getRandomValues) c.getRandomValues(bytes);\n else for (let i = 0; i < 16; i++) bytes[i] = Math.floor(Math.random() * 256);\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, '0')).join('');\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n};\n\nexport const generateTraceId = () => `${uuidV4()}-${Date.now()}`;\n\nexport const saveData = async (value: string) => {\n try {\n localStorage.setItem(UUID_KEY, value);\n } catch (error: any) {\n captureP1Error(error, 'GENERAL', { action: 'saveData', errorMessage: error?.message });\n }\n};\n\n// isuuid: a new trace id; otherwise the stored visitor UUID.\nexport const loadData = async (isuuid: boolean = false) => {\n try {\n if (isuuid) return generateTraceId();\n return localStorage.getItem(UUID_KEY) || null;\n } catch (error: any) {\n captureP1Error(error, 'GENERAL', { action: 'loadData', isuuid, errorMessage: error?.message });\n return null;\n }\n};\n","import { Subscription } from 'rxjs';\nimport type { SsSpotcheckListener } from '../types';\n\n// Legacy Ionic events, still supported next to the init `listener`.\nexport type SpotCheckEventType = 'surveyCompleted' | 'surveyDismissed' | 'surveyLoadStarted';\n\ntype EventCallback = (data?: any) => void;\n\nconst legacyCallbacks = new Map<SpotCheckEventType, Set<EventCallback>>();\n\nconst emit = (type: SpotCheckEventType, data?: any) => {\n legacyCallbacks.get(type)?.forEach((callback) => {\n try {\n runInApp(() => callback(data));\n } catch (error) {\n console.error(`[SpotCheck] ${type} listener failed`, error);\n }\n });\n};\n\n// Returns an RxJS Subscription, as the legacy SDK did.\nexport const addSpotCheckListener = (eventType: SpotCheckEventType, callback: EventCallback): Subscription => {\n if (!legacyCallbacks.has(eventType)) legacyCallbacks.set(eventType, new Set());\n legacyCallbacks.get(eventType)!.add(callback);\n return new Subscription(() => {\n legacyCallbacks.get(eventType)?.delete(callback);\n });\n};\n\nlet appListener: SsSpotcheckListener = {};\n\n// Set by <SpotCheck>: runs app callbacks inside the Angular zone.\nlet runInApp: <T>(fn: () => T) => T = (fn) => fn();\nexport const setAppRunner = (runner: <T>(fn: () => T) => T) => {\n runInApp = runner;\n};\n\nexport const setListener = (listener?: SsSpotcheckListener) => {\n appListener = listener || {};\n};\n\n// What backend functions call: the app's listener first, then the legacy events.\nexport const sdkListener: Required<SsSpotcheckListener> = {\n onSurveyLoaded: async (data) => {\n await runInApp(() => appListener.onSurveyLoaded?.(data));\n // 2.0.3 passed surveyDetails.\n emit('surveyLoadStarted', data?.['surveyDetails'] ?? data);\n },\n onSurveyResponse: async (data) => {\n await runInApp(() => appListener.onSurveyResponse?.(data));\n // Legacy Ionic passed the response array.\n emit('surveyCompleted', data?.['response'] ?? data);\n },\n onPartialSubmission: async (data) => {\n await runInApp(() => appListener.onPartialSubmission?.(data));\n },\n onCloseButtonTap: async () => {\n await runInApp(() => appListener.onCloseButtonTap?.());\n emit('surveyDismissed');\n },\n};\n","import { functionStore, spotcheckStore } from '../state/store';\nimport { saveData, loadData } from './storage';\nimport { sdkListener } from './listener';\nimport { captureP0Error, captureP1Error, addBreadcrumb, safeAddBreadcrumb, isReported, registerExecute } from './sentry';\nimport { SDK_VERSION } from './version';\n\nexport const dispatchWrapper = (stateUpdate: any) => {\n try {\n spotcheckStore.dispatch(stateUpdate);\n } catch (error: any) {\n captureP1Error(error, 'GENERAL', { action: 'dispatchWrapper', errorMessage: error?.message });\n }\n};\n\ntype PendingCall = { functionName: string; params?: any };\n\nconst pendingExecutes: PendingCall[] = [];\nconst MAX_PENDING_EXECUTES = 20;\n\nconst isTrackScreenOrEvent = (functionName: string) =>\n functionName === 'trackScreen' || functionName === 'trackEvent';\n\nconst flushPendingExecutes = async () => {\n while (pendingExecutes.length > 0) {\n const item = pendingExecutes.shift();\n if (item) await execute(item.functionName, item.params);\n }\n};\n\n// Track calls wait until initializeSpotcheckComponent has finished.\nlet isInitialized = false;\n\nexport const markInitialized = async () => {\n isInitialized = true;\n await flushPendingExecutes();\n};\n\n// Reporting failures are not reported again (avoids loops).\nconst isSentryFunction = (functionName: string) => functionName.startsWith('sentry.');\n\n// Style getters run on every render; they would push useful breadcrumbs out.\nconst isBreadcrumbWorthy = (functionName: string) =>\n !isSentryFunction(functionName) && !/\\.get\\w*Styles$/.test(functionName);\n\n// Message type only; never survey content.\nconst describeParams = (functionName: string, params?: any) => {\n if (functionName !== 'webviewComponent.handleWebViewMessage') return {};\n try {\n return { messageType: JSON.parse(params?.event?.nativeEvent?.data)?.type };\n } catch {\n return {};\n }\n};\n\nconst lookup = (functionName: string): any => {\n let current: any = functionStore.getState().functionState;\n for (const part of functionName.split('.')) current = current?.[part];\n return current;\n};\n\n// True when the backend sent this function (dotted path), e.g. for schema `$execute`.\nexport const hasFunction = (functionName: string): boolean => typeof lookup(functionName) === 'string';\n\n// The SDK has no native keyboard mode to change; the overlay follows the keyboard instead.\nconst keyboard = {\n pauseDefaultKeyboardBehavior: () => {},\n resumeDefaultKeyboardBehavior: () => {},\n};\n\nexport const execute = async (functionName: string, params?: any): Promise<any> => {\n let func: any;\n let payload: any;\n\n try {\n if (isTrackScreenOrEvent(functionName) && !isInitialized) {\n pendingExecutes.push({ functionName, params });\n // Cap the queue while init keeps failing; oldest calls go first.\n if (pendingExecutes.length > MAX_PENDING_EXECUTES) pendingExecutes.shift();\n return null;\n }\n\n if (!functionStore.getState().functionState.isLoaded) return null;\n\n const functionString = lookup(functionName);\n if (!functionString || typeof functionString !== 'string') {\n console.error(`Function ${functionName} not found`);\n return null;\n }\n\n payload = {\n params: { ...params, sdkVersion: SDK_VERSION },\n state: spotcheckStore.getState(),\n dispatchWrapper,\n storage: { saveData, loadData },\n listener: sdkListener,\n sentry: { captureP0Error, captureP1Error, addBreadcrumb: safeAddBreadcrumb },\n keyboard,\n };\n\n // Fresh evaluation per call like the other SDKs; indirect eval keeps it in global scope.\n func = (0, eval)(`(${functionString})`);\n if (isBreadcrumbWorthy(functionName)) {\n addBreadcrumb('execute', { functionName, ...describeParams(functionName, params) });\n }\n } catch (error: any) {\n if (isSentryFunction(functionName)) return null;\n captureP1Error(error, 'GENERAL', { action: 'execute:setup', functionName, errorMessage: error?.message });\n return null;\n }\n\n try {\n return await func(payload);\n } catch (error: any) {\n if (isSentryFunction(functionName)) return null;\n // Skip when the function already reported this error itself.\n if (!isReported(error)) {\n captureP1Error(error, 'GENERAL', { action: 'execute:runtime', functionName, errorMessage: error?.message });\n }\n console.error(`[execute] ${functionName}:`, error);\n return null;\n }\n};\n\nregisterExecute(execute);\n","// Loads the survey page from its own domain in a separate-origin iframe (as in 2.0.3), so the\n// page can never reach the host app. The SDK and the page talk only through postMessage.\n\nexport interface SurveyPageCallbacks {\n onMessage: (data: string) => void;\n onError: (error: { nativeEvent: { url: string; description: string }; message: string }) => void;\n}\n\n// Runs a backend injection with a stand-in window and keeps only the messages it dispatches.\n// Scripts that touch the page DOM (CSS, re-measure) cannot cross origins and are dropped, as in 2.0.3.\nconst messagesFromScript = (script: string): any[] => {\n const messages: any[] = [];\n const pageWindow = {\n dispatchEvent: (event: any) => {\n if (event?.data != null) messages.push(event.data);\n return true;\n },\n };\n class PageMessageEvent {\n data: any;\n constructor(public type: string, init?: { data?: any }) {\n this.data = init?.data;\n }\n }\n try {\n // The host globals are shadowed so a DOM script fails here instead of touching the app.\n new Function('window', 'MessageEvent', 'document', 'self', 'globalThis', 'parent', 'top', script)(\n pageWindow, PageMessageEvent, undefined, pageWindow, pageWindow, pageWindow, pageWindow,\n );\n } catch {\n // DOM-only script: nothing to send.\n }\n return messages;\n};\n\n// Same list as the survey page (rtls).\nconst RTL_LANGUAGES = ['ar', 'he', 'fa', 'ps', 'ur'];\n\n// The web page sends its fields at the top level; the backend reads the RN/Expo shape { type, data }.\nconst toBackendMessage = (message: any): any | null => {\n if (!message || typeof message !== 'object' || typeof message.type !== 'string') return null;\n if (message.type === 'resizeWindow') {\n const height = message.size?.height;\n return typeof height === 'number' ? { type: 'spotCheckData', data: { currentQuestionSize: { height } } } : null;\n }\n if ('data' in message) return message;\n const { type, ...data } = message;\n // The web languageChanged has only the code; add isRtl from the page's own RTL list.\n if (type === 'languageChanged' && typeof data.code === 'string') {\n data.isRtl = RTL_LANGUAGES.includes(data.code.split(/[-_]/)[0].toLowerCase());\n }\n return { type, data };\n};\n\nexport class SurveyPage {\n readonly iframe: HTMLIFrameElement;\n private uri = '';\n private origin = '';\n private loadSeq = 0;\n private readonly onWindowMessage = (event: MessageEvent) => {\n // Only the survey page in this iframe, from the survey domain.\n if (event.source !== this.iframe.contentWindow || event.origin !== this.origin) return;\n const message = toBackendMessage(event.data);\n if (message) this.callbacks.onMessage(JSON.stringify(message));\n };\n\n constructor(host: HTMLElement, private callbacks: SurveyPageCallbacks) {\n this.iframe = document.createElement('iframe');\n this.iframe.setAttribute('title', 'Survey');\n this.iframe.setAttribute(\n 'allow',\n 'camera; microphone; geolocation; display-capture; autoplay; clipboard-read; clipboard-write; fullscreen',\n );\n this.iframe.setAttribute('allowfullscreen', '');\n this.iframe.style.cssText = 'display:block;width:100%;height:100%;border:0;background:transparent;';\n host.appendChild(this.iframe);\n window.addEventListener('message', this.onWindowMessage);\n }\n\n load(uri: string): void {\n if (!uri || uri === this.uri) return;\n this.uri = uri;\n this.origin = new URL(uri).origin;\n const seq = ++this.loadSeq;\n // A cross-origin iframe hides HTTP errors, so check the page first to report a failed load.\n fetch(uri, { credentials: 'omit' })\n .then((response) => {\n if (!response.ok) throw new Error(`Survey page failed with status ${response.status}`);\n if (seq === this.loadSeq) this.iframe.src = uri;\n })\n .catch((error: any) => {\n if (seq !== this.loadSeq) return;\n // A later load() with the same uri retries.\n this.uri = '';\n const description = error?.message || String(error);\n // message: readable text for the Sentry report (the RN event shape has none).\n this.callbacks.onError({ nativeEvent: { url: uri, description }, message: description });\n });\n }\n\n // Same contract as the RN WebView ref the backend functions call; messages go by postMessage.\n injectJavaScript = (script: string): boolean => {\n const win = this.iframe.contentWindow;\n if (!win || !this.origin) return false;\n const messages = messagesFromScript(script);\n messages.forEach((data) => {\n win.postMessage(data, this.origin);\n // 2.0.3 sent the theme right after the survey state; the web page needs it to apply survey colours.\n const themeInfo = data?.type === 'RESET_STATE' ? data.state?.config?.generatedCSS : null;\n if (themeInfo) win.postMessage({ type: 'THEME_UPDATE_SPOTCHECK', themeInfo }, this.origin);\n });\n return messages.length > 0;\n };\n\n destroy(): void {\n this.loadSeq++;\n window.removeEventListener('message', this.onWindowMessage);\n this.iframe.remove();\n }\n}\n","import type { ChangeDetectorRef } from '@angular/core';\nimport { captureP0Error } from './sentry';\n\n// Render guard, like RN's error boundary: a failed draw hides SpotCheck, the app keeps running,\n// and it is reported once as APP_CRASH.\nlet crashed = false;\nconst crashListeners = new Set<() => void>();\n\nexport const hasCrashed = () => crashed;\n\nexport const onCrash = (listener: () => void) => {\n crashListeners.add(listener);\n return () => {\n crashListeners.delete(listener);\n };\n};\n\nexport const guardedDetectChanges = (cdr: ChangeDetectorRef, action: string) => {\n if (crashed) return;\n try {\n cdr.detectChanges();\n } catch (error: any) {\n crashed = true;\n captureP0Error(error, 'APP_CRASH', { action, errorMessage: error?.message });\n crashListeners.forEach((listener) => {\n try {\n listener();\n } catch {}\n });\n }\n};\n\n// Runs fn once per microtask however often it is requested (many dispatches, one render).\nexport const batched = (fn: () => void) => {\n let queued = false;\n return () => {\n if (queued) return;\n queued = true;\n queueMicrotask(() => {\n queued = false;\n fn();\n });\n };\n};\n","import { captureP1Error } from './sentry';\nimport { execute, hasFunction } from './executables';\n\nexport interface SchemaNode {\n type?: string;\n props?: Record<string, any>;\n children?: SchemaNode[];\n if?: any;\n slot?: string;\n meta?: { componentRole?: string; [key: string]: unknown };\n content?: any;\n}\n\nexport interface SlotContent {\n schema: SchemaNode | null;\n context: BuilderContext;\n}\n\nexport interface BuilderContext {\n state?: any;\n styles?: any;\n slots?: Record<string, SlotContent>;\n handlers?: Record<string, (...args: any[]) => void>;\n}\n\n// Same binding rules as the other SDKs' Builder.\nconst evaluateExpression = (expr: string, context: BuilderContext): any => {\n try {\n const safeContext = { state: context.state, styles: context.styles, Math };\n const func = new Function(...Object.keys(safeContext), `return ${expr}`);\n return func(...Object.values(safeContext));\n } catch (error: any) {\n captureP1Error(error, 'GENERAL', {\n action: 'evaluateExpression',\n expression: expr?.substring(0, 200),\n errorMessage: error?.message,\n });\n return undefined;\n }\n};\n\nconst readPath = (root: any, path: string) => {\n let result = root;\n for (const key of path.split('.')) result = result?.[key];\n return result;\n};\n\nexport const resolveBinding = (value: any, context: BuilderContext): any => {\n if (!value || typeof value !== 'object') return value;\n if (Array.isArray(value)) return value.map((item) => resolveBinding(item, context));\n\n if (value.$expr) return evaluateExpression(value.$expr, context);\n if (value.$ref) return readPath(context, value.$ref);\n if (value.$path) return readPath(context.state, value.$path);\n if (value.$handler && context.handlers) return context.handlers[value.$handler];\n\n // Generic action: `{ $execute: 'group.fn', args: {...} }` runs a backend function; unknown names do nothing.\n if (typeof value.$execute === 'string') {\n const functionName = value.$execute;\n const args = value.args && typeof value.args === 'object' ? value.args : {};\n return (event?: any) => {\n if (!functionName || !hasFunction(functionName)) return;\n const nativeEvent = event?.nativeEvent;\n const eventData = nativeEvent && typeof nativeEvent === 'object' ? { ...nativeEvent } : undefined;\n execute(functionName, eventData ? { ...args, event: eventData } : { ...args }).catch(() => {});\n };\n }\n\n if (Array.isArray(value.$handlers) && context.handlers) {\n return (...args: any[]) => {\n value.$handlers.forEach((name: string) => context.handlers?.[name]?.(...args));\n };\n }\n\n const resolved: Record<string, any> = {};\n for (const key in value) resolved[key] = resolveBinding(value[key], context);\n return resolved;\n};\n\nconst pair = (cond: any, op: string, context: BuilderContext) =>\n cond[op].map((val: any) => resolveBinding(val, context));\n\nexport const evaluateCondition = (condition: any, context: BuilderContext): boolean => {\n if (!condition) return true;\n\n if (typeof condition === 'object' && !Array.isArray(condition)) {\n if (Array.isArray(condition.$and)) return condition.$and.every((c: any) => evaluateCondition(c, context));\n if (Array.isArray(condition.$or)) return condition.$or.some((c: any) => evaluateCondition(c, context));\n if (condition.$not !== undefined) return !evaluateCondition(condition.$not, context);\n if (Array.isArray(condition.$eq) && condition.$eq.length === 2) {\n const [l, r] = pair(condition, '$eq', context);\n return l === r;\n }\n if (Array.isArray(condition.$ne) && condition.$ne.length === 2) {\n const [l, r] = pair(condition, '$ne', context);\n return l !== r;\n }\n if (Array.isArray(condition.$gt) && condition.$gt.length === 2) {\n const [l, r] = pair(condition, '$gt', context);\n return l > r;\n }\n if (Array.isArray(condition.$lt) && condition.$lt.length === 2) {\n const [l, r] = pair(condition, '$lt', context);\n return l < r;\n }\n }\n\n return Boolean(resolveBinding(condition, context));\n};\n\n// CSS properties that take plain numbers; every other number is px.\nconst UNITLESS = new Set([\n 'opacity', 'zIndex', 'flex', 'flexGrow', 'flexShrink', 'fontWeight', 'order', 'aspectRatio', 'scale',\n]);\n\n// Backend styles are CSS objects with camelCase keys.\nexport const toCss = (style: any): Record<string, string> | null => {\n if (!style || typeof style !== 'object' || Array.isArray(style)) return null;\n const css: Record<string, string> = {};\n for (const key of Object.keys(style)) {\n const value = style[key];\n if (value == null || typeof value === 'object') continue;\n css[key] = typeof value === 'number' && !UNITLESS.has(key) ? `${value}px` : String(value);\n }\n return css;\n};\n","import {\n ChangeDetectorRef,\n Component,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NgFor, NgIf, NgStyle, NgSwitch, NgSwitchCase } from '@angular/common';\nimport { componentStore, spotcheckStore } from '../state/store';\nimport { execute } from '../helpers/executables';\nimport { SurveyPage } from '../helpers/survey-page';\nimport { batched, guardedDetectChanges } from '../helpers/render';\nimport {\n BuilderContext,\n SchemaNode,\n SlotContent,\n evaluateCondition,\n resolveBinding,\n toCss,\n} from '../helpers/binding';\n\n// Reports the element's untransformed width like RN onLayout ({ nativeEvent: { layout } }).\n@Directive({ selector: '[ssLayout]', standalone: true })\nexport class LayoutDirective implements OnInit, OnDestroy {\n @Output() ssLayout = new EventEmitter<any>();\n private observer?: ResizeObserver;\n private last = '';\n\n constructor(private el: ElementRef<HTMLElement>, private zone: NgZone) {}\n\n ngOnInit(): void {\n if (typeof ResizeObserver === 'undefined') return;\n this.zone.runOutsideAngular(() => {\n this.observer = new ResizeObserver(() => {\n const node = this.el.nativeElement;\n const layout = { x: node.offsetLeft, y: node.offsetTop, width: node.offsetWidth, height: node.offsetHeight };\n const key = `${layout.width}x${layout.height}`;\n if (key === this.last) return;\n this.last = key;\n this.ssLayout.emit({ nativeEvent: { layout } });\n });\n this.observer.observe(this.el.nativeElement);\n });\n }\n\n ngOnDestroy(): void {\n this.observer?.disconnect();\n }\n}\n\n// Hosts one survey page; mirrors the RN WebViewRenderer (hidden pages stay 1x1 off-screen and keep loading).\n@Component({\n selector: 'ss-webview-renderer',\n standalone: true,\n template: '',\n host: { '[style]': 'hostStyle' },\n})\nexport class WebViewRendererComponent implements OnChanges, OnDestroy {\n @Input() uri = '';\n @Input() canShow = false;\n @Input() onMessage?: (event: any) => void;\n @Input() onError?: (error: any) => void;\n @Input() refCallback?: (ref: any) => void;\n\n hostStyle = '';\n private page?: SurveyPage;\n\n constructor(private el: ElementRef<HTMLElement>) {}\n\n ngOnChanges(): void {\n this.hostStyle = this.canShow\n ? 'display:block;position:relative;width:100%;height:100%;'\n : 'display:block;position:absolute;left:-1000px;top:0;width:1px;height:1px;opacity:0;overflow:hidden;';\n if (!this.uri) return;\n if (!this.page) {\n this.page = new SurveyPage(this.el.nativeElement, {\n onMessage: (data) => this.onMessage?.({ nativeEvent: { data } }),\n onError: (error) => this.onError?.(error),\n });\n this.refCallback?.(this.page);\n }\n this.page.load(this.uri);\n }\n\n ngOnDestroy(): void {\n this.refCallback?.(null);\n this.page?.destroy();\n }\n}\n\n// Renders one backend schema node as HTML (same node rules as the other SDKs' Builder).\n@Component({\n selector: 'ss-node',\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n imports: [\n NgIf, NgFor, NgStyle, NgSwitch, NgSwitchCase, LayoutDirective, WebViewRendererComponent,\n forwardRef(() => CloseButtonComponent),\n ],\n styles: [`\n ss-node, ss-close-button { display: contents; }\n .ss-node-box, .ss-node-pressable, .ss-node-text, .ss-node-image, .ss-node-svg { box-sizing: border-box; }\n .ss-node-pressable { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }\n .ss-node-pressable:active { opacity: 0.6; }\n .ss-node-pressable:focus { outline: none; }\n `],\n template: `\n <ng-container *ngIf=\"visible\" [ngSwitch]=\"kind\">\n <ng-container *ngSwitchCase=\"'slot'\">\n <ss-node *ngIf=\"slot?.schema\" [node]=\"slot!.schema!\" [ctx]=\"slot!.context\"></ss-node>\n </ng-container>\n <div *ngSwitchCase=\"'Box'\" class=\"ss-node-box\" [attr.data-ss-role]=\"role\" [ngStyle]=\"css\">\n <ss-node *ngFor=\"let child of children; trackBy: byIndex\" [node]=\"child\" [ctx]=\"ctx\"></ss-node>\n </div>\n <div *ngSwitchCase=\"'Pressable'\" class=\"ss-node-pressable\" role=\"button\" tabindex=\"0\"\n [attr.data-ss-role]=\"role\" [attr.aria-label]=\"props['ariaLabel'] || null\" [ngStyle]=\"css\"\n (click)=\"press($event)\" (keydown.enter)=\"press($event)\" (ssLayout)=\"layout($event)\">\n <ss-node *ngFor=\"let child of children; trackBy: byIndex\" [node]=\"child\" [ctx]=\"ctx\"></ss-node>\n </div>\n <span *ngSwitchCase=\"'Text'\" class=\"ss-node-text\" [ngStyle]=\"css\">{{ content }}</span>\n <!-- A failed image keeps its space but shows nothing, like iOS and Flutter. -->\n <img *ngSwitchCase=\"'Image'\" class=\"ss-node-image\" [attr.data-ss-role]=\"role\" [src]=\"props['src']\" [ngStyle]=\"css\" alt=\"\"\n (error)=\"$any($event.target).style.visibility = 'hidden'\" (load)=\"$any($event.target).style.visibility = ''\" />\n <img *ngSwitchCase=\"'SvgXml'\" class=\"ss-node-svg\" [src]=\"svgSrc\" [ngStyle]=\"css\" alt=\"\" />\n <ss-close-button *ngSwitchCase=\"'CloseButton'\"></ss-close-button>\n <ss-webview-renderer *ngSwitchCase=\"'WebViewRenderer'\"\n [attr.data-ss-webview]=\"node.meta?.['webViewType']\"\n [uri]=\"props['uri']\" [canShow]=\"props['canShow']\" [onMessage]=\"props['onMessage']\"\n [onError]=\"props['onError']\" [refCallback]=\"props['ref']\"></ss-webview-renderer>\n </ng-container>\n `,\n})\nexport class SsNodeComponent implements OnChanges {\n @Input() node!: SchemaNode;\n @Input() ctx: BuilderContext = {};\n\n visible = false;\n kind = '';\n role: string | null = null;\n props: Record<string, any> = {};\n css: Record<string, string> | null = null;\n content: any = null;\n slot: SlotContent | null = null;\n svgSrc = '';\n children: SchemaNode[] = [];\n\n // Binding results are computed once per render so templates see stable values.\n ngOnChanges(): void {\n const node = this.node;\n const ctx = this.ctx || {};\n this.slot = null;\n if (!node) {\n this.visible = false;\n return;\n }\n if (node.slot) {\n this.kind = 'slot';\n this.slot = ctx.slots?.[node.slot] || null;\n this.visible = Boolean(this.slot);\n return;\n }\n this.visible = node.if === undefined || evaluateCondition(node.if, ctx);\n if (!this.visible) return;\n this.kind = node.type || '';\n this.role = (node.meta?.componentRole as string) || null;\n this.props = node.props ? resolveBinding(node.props, ctx) || {} : {};\n this.css = toCss(this.props['style']);\n this.content = node.content !== undefined ? resolveBinding(node.content, ctx) : null;\n this.children = node.children || [];\n if (this.kind === 'SvgXml') {\n const xml = typeof this.props['xml'] === 'string' ? this.props['xml'] : '';\n // As an image, so markup in the icon can never run script.\n this.svgSrc = xml ? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(xml)}` : '';\n }\n }\n\n byIndex(index: number): number {\n return index;\n }\n\n press(event: Event): void {\n event.stopPropagation();\n this.props['onPress']?.(event);\n }\n\n layout(event: any): void {\n this.props['onLayout']?.(event);\n }\n}\n\n// Backend-driven close button (schema closeButton + closeButton.getCloseButtonStyles).\n@Component({\n selector: 'ss-close-button',\n standalone: true,\n imports: [NgIf, SsNodeComponent],\n template: `<ss-node *ngIf=\"schema\" [node]=\"schema\" [ctx]=\"ctx\"></ss-node>`,\n})\nexport class CloseButtonComponent implements OnInit, OnDestroy {\n schema: SchemaNode | null = null;\n ctx: BuilderContext = {};\n\n private styles: any = {};\n private styleKey: any[] = [];\n private unsubscribers: Array<() => void> = [];\n private readonly handlers = {\n handleClosePress: () => {\n execute('closeButton.handleCloseButton');\n },\n };\n\n private destroyed = false;\n private readonly scheduleRender = batched(() => {\n if (this.destroyed) return;\n this.ctx = { state: spotcheckStore.getState().SpotCheckState, styles: this.styles, handlers: this.handlers };\n guardedDetectChanges(this.cdr, 'closeButtonRender');\n });\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n ngOnInit(): void {\n this.unsubscribers.push(spotcheckStore.subscribe(() => this.update()));\n this.unsubscribers.push(componentStore.subscribe(() => this.update()));\n this.update();\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.unsubscribers.forEach((unsubscribe) => unsubscribe());\n }\n\n private update(): void {\n const state = spotcheckStore.getState().SpotCheckState;\n const componentState = componentStore.getState().componentState;\n this.schema = componentState.isLoaded ? componentState.schemas?.closeButton || null : null;\n const key = [state.spotCheckDetails.closeButton, state.spotCheckDetails.isRTLLanguage];\n if (key[0] !== this.styleKey[0] || key[1] !== this.styleKey[1]) {\n this.styleKey = key;\n execute('closeButton.getCloseButtonStyles').then((result) => {\n if (!result) return;\n this.styles = result;\n this.scheduleRender();\n });\n }\n this.scheduleRender();\n }\n}\n","import { ChangeDetectorRef, Component, NgZone, OnDestroy, OnInit, PLATFORM_ID, inject } from '@angular/core';\nimport { NgIf, isPlatformBrowser } from '@angular/common';\nimport { GuardsCheckEnd, NavigationEnd, Router } from '@angular/router';\nimport { SsNodeComponent } from './spotchecks/components/builder.component';\nimport { componentStore, spotcheckStore } from './spotchecks/state/store';\nimport { dispatchWrapper, execute } from './spotchecks/helpers/executables';\nimport { captureP1Error } from './spotchecks/helpers/sentry';\nimport { setAppRunner } from './spotchecks/helpers/listener';\nimport { batched, guardedDetectChanges, hasCrashed, onCrash } from './spotchecks/helpers/render';\nimport type { BuilderContext, SchemaNode } from './spotchecks/helpers/binding';\n\n// Path only: query or hash changes stay on the same screen.\nconst pathOf = (url: string) => (url || '').split(/[?#]/)[0];\n\n// Only one <SpotCheck> renders; extra instances stay empty so they never touch the live page.\nlet owner: SpotCheck | null = null;\n\n// Keyboard cover below this is browser chrome, not a keyboard.\nconst MIN_KEYBOARD_HEIGHT = 80;\n\n// Place once at the app root: <SpotCheck />. One Angular codebase for web, Android and iOS.\n@Component({\n selector: 'SpotCheck',\n standalone: true,\n imports: [NgIf, SsNodeComponent],\n styles: [':host { display: contents; }'],\n template: `\n <ss-node *ngIf=\"wrapperSchema\" [node]=\"wrapperSchema\" [ctx]=\"wrapperCtx\"></ss-node>\n <ss-node *ngIf=\"buttonSchema && buttonReady\" [node]=\"buttonSchema\" [ctx]=\"buttonCtx\"></ss-node>\n `,\n})\nexport class SpotCheck implements OnInit, OnDestroy {\n wrapperSchema: SchemaNode | null = null;\n buttonSchema: SchemaNode | null = null;\n wrapperCtx: BuilderContext = {};\n buttonCtx: BuilderContext = {};\n buttonReady = false;\n\n private wrapperStyles: any = {\n overlayStyle: { position: 'fixed', height: 0, opacity: 0, zIndex: -999999, pointerEvents: 'none' },\n wrapperStyle: {},\n };\n private buttonStyles: any = {};\n private destroyed = false;\n private cleanups: Array<() => void> = [];\n private lastInjectionKey: any[] = [];\n private lastButtonKey: any[] = [];\n private lastPath: string | null = null;\n\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly zone = inject(NgZone);\n private readonly router = inject(Router, { optional: true });\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private readonly webviewHandlers = {\n classicWebViewRefCallback: (ref: any) => execute('webviewComponent.classicWebViewRefCallback', { ref }),\n chatWebViewRefCallback: (ref: any) => execute('webviewComponent.chatWebViewRefCallback', { ref }),\n handleOnMessage: (event: any) => execute('webviewComponent.handleWebViewMessage', { event }),\n handleOnError: (error: any) => execute('webviewComponent.handleWebViewError', { error }),\n };\n\n private readonly buttonHandlers = {\n handleSpotCheckButtonPress: () => execute('spotCheckButton.handleSpotCheckButtonPress'),\n handleSideTabLayout: (event: any) => execute('spotCheckButton.handleSideTabLayout', { event }),\n };\n\n private readonly scheduleRender = batched(() => {\n if (!this.destroyed) this.render();\n });\n\n private readonly scheduleWrapperStyles = batched(() => {\n if (this.destroyed) return;\n execute('wrapper.getWrapperStyles', {\n screenHeight: window.innerHeight,\n screenWidth: window.innerWidth,\n setStyles: (styles: any) => {\n this.wrapperStyles = styles;\n this.scheduleRender();\n },\n });\n });\n\n ngOnInit(): void {\n // Server render (SSR) or a second instance: render nothing.\n if (!this.isBrowser || owner) return;\n owner = this;\n // App callbacks run inside Angular so the app's own UI updates.\n setAppRunner((fn) => this.zone.run(fn));\n this.cleanups.push(spotcheckStore.subscribe(() => this.onStateChange()));\n this.cleanups.push(componentStore.subscribe(() => this.onStateChange()));\n this.cleanups.push(onCrash(() => this.hideAfterCrash()));\n this.watchWindow();\n this.watchRouter();\n this.onStateChange();\n }\n\n ngOnDestroy(): void {\n if (owner === this) owner = null;\n this.destroyed = true;\n this.cleanups.forEach((cleanup) => cleanup());\n }\n\n // Same triggers as the other SDKs' Wrapper / WebViewComponent / SpotCheckButton effects.\n private onStateChange(): void {\n const state = spotcheckStore.getState().SpotCheckState;\n const { webViewDetails, spotCheckDetails } = state;\n\n this.scheduleWrapperStyles();\n\n const injectionKey = [webViewDetails.isChatLoading, webViewDetails.isClassicLoading, webViewDetails.webViewInjectionData];\n if (injectionKey.some((value, i) => value !== this.lastInjectionKey[i])) {\n this.lastInjectionKey = injectionKey;\n execute('webviewComponent.handleWebViewInjection');\n }\n\n const buttonKey = [spotCheckDetails.spotCheckButtonConfig, spotCheckDetails.isSpotCheckButton, spotCheckDetails.sideTabButtonWidth];\n if (buttonKey.some((value, i) => value !== this.lastButtonKey[i])) {\n this.lastButtonKey = buttonKey;\n execute('spotCheckButton.getSpotCheckButtonStyles').then((result) => {\n if (!result) return;\n this.buttonStyles = result;\n this.scheduleRender();\n });\n }\n\n this.scheduleRender();\n }\n\n private render(): void {\n if (hasCrashed()) return;\n const state = spotcheckStore.getState().SpotCheckState;\n const componentState = componentStore.getState().componentState;\n const schemas = componentState.isLoaded ? componentState.schemas || {} : {};\n\n this.wrapperSchema = schemas.wrapper || null;\n this.buttonSchema = schemas.spotCheckButton || null;\n this.wrapperCtx = {\n state,\n styles: this.wrapperStyles,\n slots: {\n children: {\n schema: schemas.webviewComponent || null,\n context: { state, handlers: this.webviewHandlers },\n },\n },\n };\n this.buttonCtx = { state, styles: this.buttonStyles, handlers: this.buttonHandlers };\n // Wait for styles so the button never renders unstyled for a frame.\n this.buttonReady = Object.keys(this.buttonStyles || {}).length > 0;\n guardedDetectChanges(this.cdr, 'render');\n }\n\n // After a failed draw, SpotCheck renders nothing for the rest of the session (RN error boundary parity).\n private hideAfterCrash(): void {\n this.wrapperSchema = null;\n this.buttonSchema = null;\n try {\n this.cdr.detectChanges();\n } catch {}\n }\n\n // Screen size and the part of it the on-screen keyboard covers.\n private watchWindow(): void {\n const vv: any = (window as any).visualViewport;\n const onResize = () => {\n let keyboard = 0;\n if (vv) keyboard = Math.round(window.innerHeight - vv.height - vv.offsetTop);\n if (keyboard < MIN_KEYBOARD_HEIGHT) keyboard = 0;\n const current = spotcheckStore.getState().SpotCheckState.spotCheckDetails.keyBoardHeight || 0;\n if (keyboard !== current) dispatchWrapper({ spotCheckDetails: { keyBoardHeight: keyboard } });\n else this.scheduleWrapperStyles();\n };\n this.zone.runOutsideAngular(() => {\n window.addEventListener('resize', onResize);\n vv?.addEventListener('resize', onResize);\n vv?.addEventListener('scroll', onResize);\n });\n this.cleanups.push(() => {\n window.removeEventListener('resize', onResize);\n vv?.removeEventListener('resize', onResize);\n vv?.removeEventListener('scroll', onResize);\n });\n }\n\n // Leaving a screen closes its spotcheck. GuardsCheckEnd comes after guards and redirects\n // (a blocked navigation keeps the survey) and before the new page's trackScreen.\n private watchRouter(): void {\n if (!this.router) return;\n this.lastPath = this.router.navigated ? pathOf(this.router.url) : null;\n const subscription = this.router.events.subscribe((event) => {\n try {\n if (event instanceof GuardsCheckEnd && event.shouldActivate) {\n const next = pathOf(event.urlAfterRedirects);\n if (this.lastPath !== null && next !== this.lastPath) {\n execute('handleNavigationChange');\n }\n this.lastPath = next;\n } else if (event instanceof NavigationEnd) {\n this.lastPath = pathOf(event.urlAfterRedirects);\n }\n } catch (error: any) {\n captureP1Error(error, 'GENERAL', { action: 'navigationListener', errorMessage: error?.message });\n }\n });\n this.cleanups.push(() => subscription.unsubscribe());\n }\n}\n","import { Capacitor } from '@capacitor/core';\nimport { Device } from '@capacitor/device';\n\nlet deviceInfo: any = null;\n\nconst getDeviceInfo = async () => {\n if (deviceInfo) return deviceInfo;\n try {\n deviceInfo = await Device.getInfo();\n } catch {\n deviceInfo = { platform: Capacitor.getPlatform(), operatingSystem: 'unknown', osVersion: '' };\n }\n return deviceInfo;\n};\n\n// Legacy Ionic visitor: operatingSystem from @capacitor/device (cached at init), size from the window.\nexport const getVisitorInfo = () => {\n const info = deviceInfo || {};\n return {\n deviceType: 'MOBILE',\n operatingSystem: info.operatingSystem || 'unknown',\n screenResolution: {\n width: Math.round(window.innerWidth),\n height: Math.round(window.innerHeight),\n },\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n };\n};\n\nexport const loadDeviceInfo = () => getDeviceInfo();\n\n// Raw device facts; the backend keeps the SDK version per app build.\nexport const getDeviceFacts = async () => {\n const info = await getDeviceInfo();\n const facts: Record<string, unknown> = {\n os: info.platform === 'web' ? 'web' : info.platform,\n osVersion: String(info.osVersion || ''),\n isTablet: false,\n ...(info.model ? { model: String(info.model) } : {}),\n };\n if (Capacitor.isNativePlatform()) {\n try {\n // @capacitor/app is optional; its native plugin registers here when installed.\n const app: any = (Capacitor as any).Plugins?.App;\n const appInfo = app?.getInfo ? await app.getInfo() : null;\n if (appInfo?.version) facts['appVersion'] = String(appInfo.version);\n if (appInfo?.build) facts['appBuild'] = String(appInfo.build);\n } catch {}\n }\n return facts;\n};\n","import { componentStore, functionStore, spotcheckStore } from './state/store';\nimport { execute, markInitialized } from './helpers/executables';\nimport { setListener } from './helpers/listener';\nimport { getDeviceFacts, getVisitorInfo, loadDeviceInfo } from './helpers/device';\nimport { addBreadcrumb, captureP0Error } from './helpers/sentry';\nimport { FRAMEWORK } from './helpers/version';\nimport type {\n SpotcheckProps,\n TrackEventProps,\n TrackScreenOptions,\n TrackScreenProps,\n} from './types';\n\nexport { SDK_VERSION } from './helpers/version';\n\nconst INIT_TIMEOUT_MS = 15000;\n\n// Backend functions, schemas and page script for this SDK (framework=ionic).\nconst getAllSpotcheckFunctions = async (domainName: string) => {\n const controller = typeof AbortController !== 'undefined' ? new AbortController() : null;\n const timer = setTimeout(() => controller?.abort(), INIT_TIMEOUT_MS);\n try {\n const response = await fetch(\n `https://${domainName}/api/internal/spotcheck/mobile/init?framework=${FRAMEWORK}`,\n { signal: controller?.signal, cache: 'no-store' },\n );\n if (!response.ok) throw new Error(`mobile/init failed with status ${response.status}`);\n const data = await response.json().catch(() => null);\n // A non-JSON 200 (e.g. captive portal) counts as a failed init.\n if (!data || typeof data !== 'object' || typeof data.initializeSpotcheckComponent !== 'string') {\n throw new Error('Invalid mobile/init response');\n }\n const { componentSchemas, config, ...functions } = data;\n functionStore.dispatch({ ...functions, isLoaded: true });\n componentStore.dispatch({ schemas: componentSchemas || {}, config: config || {}, isLoaded: Boolean(componentSchemas) });\n return data;\n } catch (error: any) {\n captureP0Error(error, 'SPOTCHECK_INITIALIZATION', {\n component: 'getAllSpotcheckFunctions',\n action: 'fetchFunctions',\n domainName,\n errorMessage: error?.message,\n });\n console.error('Error fetching spotcheck functions:', error);\n throw error;\n } finally {\n clearTimeout(timer);\n }\n};\n\n// Synchronous: trackScreen must reach execute in the same tick as a following trackEvent.\nconst refreshVisitor = () => {\n try {\n spotcheckStore.dispatch({ params: { visitor: getVisitorInfo() } });\n } catch {}\n};\n\n// Init retry: a failed init (e.g. offline at launch) is retried on the next track call.\nconst INIT_RETRY_GAP_MS = 10000;\nlet lastInitParams: SpotcheckProps | null = null;\nlet initStatus: 'idle' | 'running' | 'done' | 'failed' = 'idle';\nlet lastInitAttempt = 0;\n\nconst retryInitIfFailed = () => {\n if (initStatus !== 'failed' || !lastInitParams) return;\n if (Date.now() - lastInitAttempt < INIT_RETRY_GAP_MS) return;\n initializeSpotChecks(lastInitParams).catch(() => {});\n};\n\nexport const initializeSpotChecks = async (params: SpotcheckProps): Promise<void> => {\n lastInitParams = params;\n initStatus = 'running';\n lastInitAttempt = Date.now();\n try {\n setListener(params?.listener);\n if (params?.domainName) spotcheckStore.dispatch({ params: { domainName: params.domainName } });\n await loadDeviceInfo();\n refreshVisitor();\n const device = await getDeviceFacts();\n await getAllSpotcheckFunctions(params.domainName);\n const { listener, ...initParams } = params;\n await execute('initializeSpotcheckComponent', { ...initParams, framework: FRAMEWORK, device });\n await markInitialized();\n initStatus = 'done';\n } catch (error: any) {\n // Legacy never threw into the host app; failures go to the backend and the console.\n console.error('Error initializing spotchecks:', error);\n initStatus = 'failed';\n }\n};\n\nconst resolveTrackOptions = (input?: TrackScreenOptions) => ({\n variables: input?.variables ?? {},\n customProperties: input?.customProperties ?? {},\n userDetails: input?.userDetails ?? {},\n});\n\nexport async function trackScreen(screen: string, options?: TrackScreenOptions): Promise<void>;\nexport async function trackScreen(props: TrackScreenProps): Promise<void>;\nexport async function trackScreen(screenOrProps: string | TrackScreenProps, optionsArg?: TrackScreenOptions) {\n const screen = typeof screenOrProps === 'string' ? screenOrProps : screenOrProps?.screen;\n const options = resolveTrackOptions(typeof screenOrProps === 'string' ? optionsArg : screenOrProps?.options);\n if (!screen) {\n console.error('trackScreen: `screen` is required');\n return;\n }\n addBreadcrumb('trackScreen', { screen });\n retryInitIfFailed();\n try {\n refreshVisitor();\n await execute('trackScreen', { screen, options });\n } catch (error) {\n // Legacy only logged; never throw into the host app.\n console.error('Error tracking screen:', error);\n }\n}\n\nexport async function trackEvent(screen: string, event: Record<string, any>, options?: TrackScreenOptions): Promise<void>;\nexport async function trackEvent(props: TrackEventProps): Promise<void>;\nexport async function trackEvent(\n screenOrProps: string | TrackEventProps,\n eventArg?: Record<string, any>,\n optionsArg?: TrackScreenOptions,\n) {\n const isString = typeof screenOrProps === 'string';\n const screen = isString ? screenOrProps : screenOrProps?.screen;\n const event = isString ? eventArg : screenOrProps?.event;\n if (!screen) {\n console.error('trackEvent: `screen` is required');\n return;\n }\n if (event == null) {\n console.error('trackEvent: `event` is required');\n return;\n }\n const options = resolveTrackOptions(isString ? optionsArg : screenOrProps.options);\n addBreadcrumb('trackEvent', { screen, event: Object.keys(event || {}).join(',') });\n retryInitIfFailed();\n try {\n await execute('trackEvent', { screen, event, options });\n } catch (error) {\n console.error('Error tracking event:', error);\n }\n}\n\n// Closes any open spotcheck and its button (screen changes the SDK can't detect).\nexport async function closeSpotChecks(): Promise<void> {\n addBreadcrumb('closeSpotChecks', {});\n await execute('handleNavigationChange', { reason: 'close' });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAEA;MACa,KAAK,CAAA;AAGI,IAAA,KAAA;AAAkB,IAAA,OAAA;AAF9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QAAQ;AAClD,IAAA,MAAM,MAAM,GAAG,QAAQ,GAAG,aAAa,GAAG,aAAa,EAAE,MAAM;AAC/D,IAAA,MAAM,KAAK,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,EAAE,KAAK;IACxD,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC;QACjD;IACF;AACA,IAAA,IAAI,KAAK,IAAI,IAAI,EAAE;AACjB,QAAA,OAAO,CAAC,KAAK,CAAC,iCAAiC,CAAC;QAChD;IACF;AACA,IAAA,MAAM,OAAO,GAAG,mBAAmB,CAAC,QAAQ,GAAG,UAAU,GAAG,aAAa,CAAC,OAAO,CAAC;IAClF,aAAa,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AAClF,IAAA,iBAAiB,EAAE;AACnB,IAAA,IAAI;AACF,QAAA,MAAM,OAAO,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IACzD;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC;IAC/C;AACF;AAEA;AACO,eAAe,eAAe,GAAA;AACnC,IAAA,aAAa,CAAC,iBAAiB,EAAE,EAAE,CAAC;IACpC,MAAM,OAAO,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAC9D;;ACrJA;;AAEG;;"}
1
+ {"version":3,"file":"angular-ui.mjs","sources":["../../../src/angular-ui/lib/spotchecks/state/store.ts","../../../src/angular-ui/lib/spotchecks/helpers/version.ts","../../../src/angular-ui/lib/spotchecks/helpers/sentry.ts","../../../src/angular-ui/lib/spotchecks/helpers/storage.ts","../../../src/angular-ui/lib/spotchecks/helpers/listener.ts","../../../src/angular-ui/lib/spotchecks/helpers/executables.ts","../../../src/angular-ui/lib/spotchecks/helpers/survey-page.ts","../../../src/angular-ui/lib/spotchecks/helpers/render.ts","../../../src/angular-ui/lib/spotchecks/helpers/binding.ts","../../../src/angular-ui/lib/spotchecks/components/builder.component.ts","../../../src/angular-ui/lib/spotcheck.component.ts","../../../src/angular-ui/lib/spotchecks/helpers/device.ts","../../../src/angular-ui/lib/spotchecks/spotcheck.ts","../../../src/angular-ui/lib/angular-ui.ts"],"sourcesContent":["type Listener = () => void;\n\n// Minimal observable store; components re-render on every change.\nexport class Store<T> {\n private listeners = new Set<Listener>();\n\n constructor(private state: T, private reducer: (state: T, update: any) => T) {}\n\n getState(): T {\n return this.state;\n }\n\n dispatch(update: any): void {\n this.state = this.reducer(this.state, update);\n this.listeners.forEach((listener) => {\n try {\n listener();\n } catch (error) {\n console.error('[SpotCheck] store listener failed', error);\n }\n });\n }\n\n subscribe(listener: Listener): () => void {\n this.listeners.add(listener);\n return () => {\n this.listeners.delete(listener);\n };\n }\n}\n\n// Same shape and merge rules as the other SDKs (backend functions read state.SpotCheckState).\nconst initialSpotcheckState: any = {\n allSpotChecksInToken: [],\n customEventsSpotChecks: [],\n filteredSpotChecks: [],\n showSpotCheck: false,\n\n currentSpotcheck: {\n spotcheckURL: '',\n spotcheckID: 0,\n spotcheckContactID: 0,\n triggerToken: '',\n screenName: '',\n afterDelay: 0,\n isChat: false,\n appearance: {},\n },\n\n params: {\n targetToken: '',\n domainName: '',\n userDetails: {},\n variables: {},\n customProperties: {},\n visitor: {},\n framework: 'ionic',\n userAgent: '',\n traceId: '',\n },\n\n spotCheckDetails: {\n keyBoardHeight: 0,\n textPosition: 0,\n isMounted: false,\n isVisible: false,\n isExiting: false,\n currentQuestionHeight: 0,\n miniCardHeight: 0,\n sideTabButtonWidth: 0,\n isFullScreenMode: false,\n spotCheckType: null,\n position: 'bottom',\n mode: '',\n closeButton: {\n isEnabled: false,\n color: '#000000',\n isMiniCard: false,\n },\n isSpotCheckButton: false,\n spotCheckButtonConfig: {},\n showSurveyContent: true,\n avatarEnabled: false,\n avatarUrl: '',\n isRTLLanguage: false,\n },\n\n webViewDetails: {\n isChatEnabled: false,\n isClassicEnabled: false,\n isClassicLoading: true,\n isChatLoading: true,\n chatUrl: null,\n classicUrl: null,\n isCurrentSpotcheckChat: null,\n canShowClassic: false,\n canShowChat: false,\n webViewInjectionData: null,\n chatWebViewRef: null,\n classicWebViewRef: null,\n },\n};\n\nconst NESTED_KEYS = ['currentSpotcheck', 'spotCheckDetails', 'webViewDetails', 'params'];\n\nconst spotcheckReducer = (state: any, update: any) => {\n const payload = update || {};\n const sc = state.SpotCheckState;\n const next: any = { ...sc, ...payload };\n NESTED_KEYS.forEach((key) => {\n next[key] = { ...sc[key], ...(payload[key] || {}) };\n });\n return { SpotCheckState: next };\n};\n\nexport const spotcheckStore = new Store<any>({ SpotCheckState: initialSpotcheckState }, spotcheckReducer);\n\nexport const functionStore = new Store<any>(\n { functionState: { isLoaded: false } },\n (state, update) => ({ functionState: { ...state.functionState, ...(update || {}) } }),\n);\n\nexport const componentStore = new Store<any>(\n { componentState: { isLoaded: false, schemas: {} } },\n (state, update) => ({ componentState: { ...state.componentState, ...(update || {}) } }),\n);\n","// Keep in sync with package.json \"version\".\nexport const SDK_VERSION = '2.1.0';\nexport const FRAMEWORK = 'ionic';\n","// SDK errors go to SurveySparrow's API (backend sentry.processSentryError), never to Sentry servers.\nimport { spotcheckStore } from '../state/store';\nimport { SDK_VERSION, FRAMEWORK } from './version';\n\nexport type ErrorSource =\n | 'SDK_INITIALIZATION'\n | 'SPOTCHECK_INITIALIZATION'\n | 'TRACK_SCREEN'\n | 'TRACK_EVENT'\n | 'WEBVIEW_ERROR'\n | 'CLOSE_SPOTCHECK'\n | 'APP_CRASH'\n | 'GENERAL';\n\n// Set by executables.ts at load time (avoids a circular import).\nlet executeRef: ((fn: string, params?: any) => Promise<any>) | null = null;\nexport const registerExecute = (fn: (fnName: string, params?: any) => Promise<any>) => {\n executeRef = fn;\n};\n\nconst MAX_BREADCRUMBS = 30;\nconst sdkBreadcrumbs: any[] = [];\n\nexport const addBreadcrumb = (message: string, data?: Record<string, any>) => {\n sdkBreadcrumbs.push({ category: 'spotcheck', message, data, timestamp: Date.now() / 1000 });\n if (sdkBreadcrumbs.length > MAX_BREADCRUMBS) sdkBreadcrumbs.shift();\n};\n\nconst MAX_BREADCRUMB_STRING = 200;\nconst capString = (value: string) => value.slice(0, MAX_BREADCRUMB_STRING);\n\n// Breadcrumb hook for backend functions; drops bad input and never throws.\nexport const safeAddBreadcrumb = (message: unknown, data?: unknown) => {\n try {\n if (typeof message !== 'string') return;\n let clean: Record<string, any> | undefined;\n const proto = data && typeof data === 'object' ? Object.getPrototypeOf(data) : undefined;\n if (proto === Object.prototype || proto === null) {\n clean = {};\n Object.keys(data as object).forEach((key) => {\n const value = (data as any)[key];\n if (typeof value === 'string') clean![key] = capString(value);\n else if (value === null || typeof value === 'number' || typeof value === 'boolean') clean![key] = value;\n });\n }\n addBreadcrumb(capString(message), clean);\n } catch {}\n};\n\n// Flags an error as reported so execute() does not report it again.\nconst markReported = (error: unknown) => {\n try {\n if (error !== null && typeof error === 'object') {\n Object.defineProperty(error, '__ssReported', { value: true, configurable: true });\n }\n } catch {}\n};\n\nexport const isReported = (error: unknown) => {\n try {\n return !!(error as any)?.__ssReported;\n } catch {\n return false;\n }\n};\n\n// Routes an event to the backend; never throws.\nconst sendToBackend = async (normalizedEvent: any) => {\n try {\n const result = executeRef\n ? await executeRef('sentry.processSentryError', {\n event: normalizedEvent,\n sdkType: FRAMEWORK,\n sdkVersion: SDK_VERSION,\n })\n : null;\n if (result) return;\n\n const { domainName, targetToken } = spotcheckStore.getState().SpotCheckState?.params || {};\n if (!domainName) return;\n await fetch(`https://${domainName}/api/internal/spotcheck/sdkErrors`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({\n errorMessage: normalizedEvent.errorMessage,\n sdkType: FRAMEWORK,\n sdkVersion: SDK_VERSION,\n level: normalizedEvent.tags?.error_priority === 'P0' ? 'fatal' : 'error',\n tags: normalizedEvent.tags,\n extra: normalizedEvent.extra,\n breadcrumbs: normalizedEvent.breadcrumbs,\n contexts: { user: { spotcheck_token: targetToken || '', spotcheck_domain_name: domainName } },\n }),\n }).catch(() => {});\n } catch {\n // Reporting must never break the host app.\n }\n};\n\nconst report = (error: unknown, priority: 'P0' | 'P1', source: ErrorSource, extra?: Record<string, any>) => {\n markReported(error);\n const err = error as any;\n sendToBackend({\n errorMessage: err?.message || String(error),\n tags: {\n error_priority: priority,\n severity: priority === 'P0' ? 'CRITICAL' : 'HIGH',\n errorType: source,\n },\n contexts: {},\n extra: extra || {},\n breadcrumbs: [...sdkBreadcrumbs],\n exceptions: [{\n type: err?.name || 'Error',\n value: err?.message || String(error),\n stack: String(err?.stack || '').slice(0, 2000),\n }],\n timestamp: Date.now() / 1000,\n platform: 'javascript',\n });\n};\n\nexport const captureP0Error = (error: unknown, source: ErrorSource, extra?: Record<string, any>) =>\n report(error, 'P0', source, extra);\n\nexport const captureP1Error = (error: unknown, source: ErrorSource, extra?: Record<string, any>) =>\n report(error, 'P1', source, extra);\n","import { captureP1Error } from './sentry';\n\n// Same key as the legacy Ionic SDK, so existing installs keep their visitor.\nconst UUID_KEY = 'SurveySparrowUUID';\n\nconst uuidV4 = (): string => {\n const c: any = typeof crypto !== 'undefined' ? crypto : null;\n if (c?.randomUUID) return c.randomUUID();\n const bytes = new Uint8Array(16);\n if (c?.getRandomValues) c.getRandomValues(bytes);\n else for (let i = 0; i < 16; i++) bytes[i] = Math.floor(Math.random() * 256);\n bytes[6] = (bytes[6] & 0x0f) | 0x40;\n bytes[8] = (bytes[8] & 0x3f) | 0x80;\n const hex = Array.from(bytes, (b) => b.toString(16).padStart(2, '0')).join('');\n return `${hex.slice(0, 8)}-${hex.slice(8, 12)}-${hex.slice(12, 16)}-${hex.slice(16, 20)}-${hex.slice(20)}`;\n};\n\nexport const generateTraceId = () => `${uuidV4()}-${Date.now()}`;\n\nexport const saveData = async (value: string) => {\n try {\n localStorage.setItem(UUID_KEY, value);\n } catch (error: any) {\n captureP1Error(error, 'GENERAL', { action: 'saveData', errorMessage: error?.message });\n }\n};\n\n// isuuid: a new trace id; otherwise the stored visitor UUID.\nexport const loadData = async (isuuid: boolean = false) => {\n try {\n if (isuuid) return generateTraceId();\n return localStorage.getItem(UUID_KEY) || null;\n } catch (error: any) {\n captureP1Error(error, 'GENERAL', { action: 'loadData', isuuid, errorMessage: error?.message });\n return null;\n }\n};\n","import { Subscription } from 'rxjs';\nimport type { SsSpotcheckListener } from '../types';\n\n// Legacy Ionic events, still supported next to the init `listener`.\nexport type SpotCheckEventType = 'surveyCompleted' | 'surveyDismissed' | 'surveyLoadStarted';\n\ntype EventCallback = (data?: any) => void;\n\nconst legacyCallbacks = new Map<SpotCheckEventType, Set<EventCallback>>();\n\nconst emit = (type: SpotCheckEventType, data?: any) => {\n legacyCallbacks.get(type)?.forEach((callback) => {\n try {\n runInApp(() => callback(data));\n } catch (error) {\n console.error(`[SpotCheck] ${type} listener failed`, error);\n }\n });\n};\n\n// Returns an RxJS Subscription, as the legacy SDK did.\nexport const addSpotCheckListener = (eventType: SpotCheckEventType, callback: EventCallback): Subscription => {\n if (!legacyCallbacks.has(eventType)) legacyCallbacks.set(eventType, new Set());\n legacyCallbacks.get(eventType)!.add(callback);\n return new Subscription(() => {\n legacyCallbacks.get(eventType)?.delete(callback);\n });\n};\n\nlet appListener: SsSpotcheckListener = {};\n\n// Set by <SpotCheck>: runs app callbacks inside the Angular zone.\nlet runInApp: <T>(fn: () => T) => T = (fn) => fn();\nexport const setAppRunner = (runner: <T>(fn: () => T) => T) => {\n runInApp = runner;\n};\n\nexport const setListener = (listener?: SsSpotcheckListener) => {\n appListener = listener || {};\n};\n\n// What backend functions call: the app's listener first, then the legacy events.\nexport const sdkListener: Required<SsSpotcheckListener> = {\n onSurveyLoaded: async (data) => {\n await runInApp(() => appListener.onSurveyLoaded?.(data));\n // 2.0.3 passed surveyDetails.\n emit('surveyLoadStarted', data?.['surveyDetails'] ?? data);\n },\n onSurveyResponse: async (data) => {\n await runInApp(() => appListener.onSurveyResponse?.(data));\n // Legacy Ionic passed the response array.\n emit('surveyCompleted', data?.['response'] ?? data);\n },\n onPartialSubmission: async (data) => {\n await runInApp(() => appListener.onPartialSubmission?.(data));\n },\n onCloseButtonTap: async () => {\n await runInApp(() => appListener.onCloseButtonTap?.());\n emit('surveyDismissed');\n },\n};\n","import { functionStore, spotcheckStore } from '../state/store';\nimport { saveData, loadData } from './storage';\nimport { sdkListener } from './listener';\nimport { captureP0Error, captureP1Error, addBreadcrumb, safeAddBreadcrumb, isReported, registerExecute } from './sentry';\nimport { SDK_VERSION } from './version';\n\nexport const dispatchWrapper = (stateUpdate: any) => {\n try {\n spotcheckStore.dispatch(stateUpdate);\n } catch (error: any) {\n captureP1Error(error, 'GENERAL', { action: 'dispatchWrapper', errorMessage: error?.message });\n }\n};\n\ntype PendingCall = { functionName: string; params?: any };\n\nconst pendingExecutes: PendingCall[] = [];\nconst MAX_PENDING_EXECUTES = 20;\n\nconst isTrackScreenOrEvent = (functionName: string) =>\n functionName === 'trackScreen' || functionName === 'trackEvent';\n\nconst flushPendingExecutes = async () => {\n while (pendingExecutes.length > 0) {\n const item = pendingExecutes.shift();\n if (item) await execute(item.functionName, item.params);\n }\n};\n\n// Track calls wait until initializeSpotcheckComponent has finished.\nlet isInitialized = false;\n\nexport const markInitialized = async () => {\n isInitialized = true;\n await flushPendingExecutes();\n};\n\n// Reporting failures are not reported again (avoids loops).\nconst isSentryFunction = (functionName: string) => functionName.startsWith('sentry.');\n\n// Style getters run on every render; they would push useful breadcrumbs out.\nconst isBreadcrumbWorthy = (functionName: string) =>\n !isSentryFunction(functionName) && !/\\.get\\w*Styles$/.test(functionName);\n\n// Message type only; never survey content.\nconst describeParams = (functionName: string, params?: any) => {\n if (functionName !== 'webviewComponent.handleWebViewMessage') return {};\n try {\n return { messageType: JSON.parse(params?.event?.nativeEvent?.data)?.type };\n } catch {\n return {};\n }\n};\n\nconst lookup = (functionName: string): any => {\n let current: any = functionStore.getState().functionState;\n for (const part of functionName.split('.')) current = current?.[part];\n return current;\n};\n\n// True when the backend sent this function (dotted path), e.g. for schema `$execute`.\nexport const hasFunction = (functionName: string): boolean => typeof lookup(functionName) === 'string';\n\n// The SDK has no native keyboard mode to change; the overlay follows the keyboard instead.\nconst keyboard = {\n pauseDefaultKeyboardBehavior: () => {},\n resumeDefaultKeyboardBehavior: () => {},\n};\n\nexport const execute = async (functionName: string, params?: any): Promise<any> => {\n let func: any;\n let payload: any;\n\n try {\n if (isTrackScreenOrEvent(functionName) && !isInitialized) {\n pendingExecutes.push({ functionName, params });\n // Cap the queue while init keeps failing; oldest calls go first.\n if (pendingExecutes.length > MAX_PENDING_EXECUTES) pendingExecutes.shift();\n return null;\n }\n\n if (!functionStore.getState().functionState.isLoaded) return null;\n\n const functionString = lookup(functionName);\n if (!functionString || typeof functionString !== 'string') {\n console.error(`Function ${functionName} not found`);\n return null;\n }\n\n payload = {\n params: { ...params, sdkVersion: SDK_VERSION },\n state: spotcheckStore.getState(),\n dispatchWrapper,\n storage: { saveData, loadData },\n listener: sdkListener,\n sentry: { captureP0Error, captureP1Error, addBreadcrumb: safeAddBreadcrumb },\n keyboard,\n };\n\n // Fresh evaluation per call like the other SDKs; indirect eval keeps it in global scope.\n func = (0, eval)(`(${functionString})`);\n if (isBreadcrumbWorthy(functionName)) {\n addBreadcrumb('execute', { functionName, ...describeParams(functionName, params) });\n }\n } catch (error: any) {\n if (isSentryFunction(functionName)) return null;\n captureP1Error(error, 'GENERAL', { action: 'execute:setup', functionName, errorMessage: error?.message });\n return null;\n }\n\n try {\n return await func(payload);\n } catch (error: any) {\n if (isSentryFunction(functionName)) return null;\n // Skip when the function already reported this error itself.\n if (!isReported(error)) {\n captureP1Error(error, 'GENERAL', { action: 'execute:runtime', functionName, errorMessage: error?.message });\n }\n console.error(`[execute] ${functionName}:`, error);\n return null;\n }\n};\n\nregisterExecute(execute);\n","// Loads the survey page from its own domain in a separate-origin iframe (as in 2.0.3), so the\n// page can never reach the host app. The SDK and the page talk only through postMessage.\n\nexport interface SurveyPageCallbacks {\n onMessage: (data: string) => void;\n onError: (error: { nativeEvent: { url: string; description: string }; message: string }) => void;\n}\n\n// Runs a backend injection with a stand-in window and keeps only the messages it dispatches.\n// Scripts that touch the page DOM (CSS, re-measure) cannot cross origins and are dropped, as in 2.0.3.\nconst messagesFromScript = (script: string): any[] => {\n const messages: any[] = [];\n const pageWindow = {\n dispatchEvent: (event: any) => {\n if (event?.data != null) messages.push(event.data);\n return true;\n },\n };\n class PageMessageEvent {\n data: any;\n constructor(public type: string, init?: { data?: any }) {\n this.data = init?.data;\n }\n }\n try {\n // The host globals are shadowed so a DOM script fails here instead of touching the app.\n new Function('window', 'MessageEvent', 'document', 'self', 'globalThis', 'parent', 'top', script)(\n pageWindow, PageMessageEvent, undefined, pageWindow, pageWindow, pageWindow, pageWindow,\n );\n } catch {\n // DOM-only script: nothing to send.\n }\n return messages;\n};\n\n// Same list as the survey page (rtls).\nconst RTL_LANGUAGES = ['ar', 'he', 'fa', 'ps', 'ur'];\n\n// The web page sends its fields at the top level; the backend reads the RN/Expo shape { type, data }.\nconst toBackendMessage = (message: any): any | null => {\n if (!message || typeof message !== 'object' || typeof message.type !== 'string') return null;\n if (message.type === 'resizeWindow') {\n const height = message.size?.height;\n return typeof height === 'number' ? { type: 'spotCheckData', data: { currentQuestionSize: { height } } } : null;\n }\n if ('data' in message) return message;\n const { type, ...data } = message;\n // The web languageChanged has only the code; add isRtl from the page's own RTL list.\n if (type === 'languageChanged' && typeof data.code === 'string') {\n data.isRtl = RTL_LANGUAGES.includes(data.code.split(/[-_]/)[0].toLowerCase());\n }\n return { type, data };\n};\n\nexport class SurveyPage {\n readonly iframe: HTMLIFrameElement;\n private uri = '';\n private origin = '';\n private loadSeq = 0;\n private readonly onWindowMessage = (event: MessageEvent) => {\n // Only the survey page in this iframe, from the survey domain.\n if (event.source !== this.iframe.contentWindow || event.origin !== this.origin) return;\n const message = toBackendMessage(event.data);\n if (message) this.callbacks.onMessage(JSON.stringify(message));\n };\n\n constructor(host: HTMLElement, private callbacks: SurveyPageCallbacks) {\n this.iframe = document.createElement('iframe');\n this.iframe.setAttribute('title', 'Survey');\n this.iframe.setAttribute(\n 'allow',\n 'camera; microphone; geolocation; display-capture; autoplay; clipboard-read; clipboard-write; fullscreen',\n );\n this.iframe.setAttribute('allowfullscreen', '');\n this.iframe.style.cssText = 'display:block;width:100%;height:100%;border:0;background:transparent;';\n host.appendChild(this.iframe);\n window.addEventListener('message', this.onWindowMessage);\n }\n\n load(uri: string): void {\n if (!uri || uri === this.uri) return;\n this.uri = uri;\n this.origin = new URL(uri).origin;\n const seq = ++this.loadSeq;\n // A cross-origin iframe hides HTTP errors, so check the page first to report a failed load.\n fetch(uri, { credentials: 'omit' })\n .then((response) => {\n if (!response.ok) throw new Error(`Survey page failed with status ${response.status}`);\n if (seq === this.loadSeq) this.iframe.src = uri;\n })\n .catch((error: any) => {\n if (seq !== this.loadSeq) return;\n // A later load() with the same uri retries.\n this.uri = '';\n const description = error?.message || String(error);\n // message: readable text for the Sentry report (the RN event shape has none).\n this.callbacks.onError({ nativeEvent: { url: uri, description }, message: description });\n });\n }\n\n // Same contract as the RN WebView ref the backend functions call; messages go by postMessage.\n injectJavaScript = (script: string): boolean => {\n const win = this.iframe.contentWindow;\n if (!win || !this.origin) return false;\n const messages = messagesFromScript(script);\n messages.forEach((data) => {\n win.postMessage(data, this.origin);\n // 2.0.3 sent the theme right after the survey state; the web page needs it to apply survey colours.\n const themeInfo = data?.type === 'RESET_STATE' ? data.state?.config?.generatedCSS : null;\n if (themeInfo) win.postMessage({ type: 'THEME_UPDATE_SPOTCHECK', themeInfo }, this.origin);\n });\n return messages.length > 0;\n };\n\n destroy(): void {\n this.loadSeq++;\n window.removeEventListener('message', this.onWindowMessage);\n this.iframe.remove();\n }\n}\n","import type { ChangeDetectorRef } from '@angular/core';\nimport { captureP0Error } from './sentry';\n\n// Render guard, like RN's error boundary: a failed draw hides SpotCheck, the app keeps running,\n// and it is reported once as APP_CRASH.\nlet crashed = false;\nconst crashListeners = new Set<() => void>();\n\nexport const hasCrashed = () => crashed;\n\nexport const onCrash = (listener: () => void) => {\n crashListeners.add(listener);\n return () => {\n crashListeners.delete(listener);\n };\n};\n\nexport const guardedDetectChanges = (cdr: ChangeDetectorRef, action: string) => {\n if (crashed) return;\n try {\n cdr.detectChanges();\n } catch (error: any) {\n crashed = true;\n captureP0Error(error, 'APP_CRASH', { action, errorMessage: error?.message });\n crashListeners.forEach((listener) => {\n try {\n listener();\n } catch {}\n });\n }\n};\n\n// Runs fn once per microtask however often it is requested (many dispatches, one render).\nexport const batched = (fn: () => void) => {\n let queued = false;\n return () => {\n if (queued) return;\n queued = true;\n queueMicrotask(() => {\n queued = false;\n fn();\n });\n };\n};\n","import { captureP1Error } from './sentry';\nimport { execute, hasFunction } from './executables';\n\nexport interface SchemaNode {\n type?: string;\n props?: Record<string, any>;\n children?: SchemaNode[];\n if?: any;\n slot?: string;\n meta?: { componentRole?: string; [key: string]: unknown };\n content?: any;\n}\n\nexport interface SlotContent {\n schema: SchemaNode | null;\n context: BuilderContext;\n}\n\nexport interface BuilderContext {\n state?: any;\n styles?: any;\n slots?: Record<string, SlotContent>;\n handlers?: Record<string, (...args: any[]) => void>;\n}\n\n// Same binding rules as the other SDKs' Builder.\nconst evaluateExpression = (expr: string, context: BuilderContext): any => {\n try {\n const safeContext = { state: context.state, styles: context.styles, Math };\n const func = new Function(...Object.keys(safeContext), `return ${expr}`);\n return func(...Object.values(safeContext));\n } catch (error: any) {\n captureP1Error(error, 'GENERAL', {\n action: 'evaluateExpression',\n expression: expr?.substring(0, 200),\n errorMessage: error?.message,\n });\n return undefined;\n }\n};\n\nconst readPath = (root: any, path: string) => {\n let result = root;\n for (const key of path.split('.')) result = result?.[key];\n return result;\n};\n\nexport const resolveBinding = (value: any, context: BuilderContext): any => {\n if (!value || typeof value !== 'object') return value;\n if (Array.isArray(value)) return value.map((item) => resolveBinding(item, context));\n\n if (value.$expr) return evaluateExpression(value.$expr, context);\n if (value.$ref) return readPath(context, value.$ref);\n if (value.$path) return readPath(context.state, value.$path);\n if (value.$handler && context.handlers) return context.handlers[value.$handler];\n\n // Generic action: `{ $execute: 'group.fn', args: {...} }` runs a backend function; unknown names do nothing.\n if (typeof value.$execute === 'string') {\n const functionName = value.$execute;\n const args = value.args && typeof value.args === 'object' ? value.args : {};\n return (event?: any) => {\n if (!functionName || !hasFunction(functionName)) return;\n const nativeEvent = event?.nativeEvent;\n const eventData = nativeEvent && typeof nativeEvent === 'object' ? { ...nativeEvent } : undefined;\n execute(functionName, eventData ? { ...args, event: eventData } : { ...args }).catch(() => {});\n };\n }\n\n if (Array.isArray(value.$handlers) && context.handlers) {\n return (...args: any[]) => {\n value.$handlers.forEach((name: string) => context.handlers?.[name]?.(...args));\n };\n }\n\n const resolved: Record<string, any> = {};\n for (const key in value) resolved[key] = resolveBinding(value[key], context);\n return resolved;\n};\n\nconst pair = (cond: any, op: string, context: BuilderContext) =>\n cond[op].map((val: any) => resolveBinding(val, context));\n\nexport const evaluateCondition = (condition: any, context: BuilderContext): boolean => {\n if (!condition) return true;\n\n if (typeof condition === 'object' && !Array.isArray(condition)) {\n if (Array.isArray(condition.$and)) return condition.$and.every((c: any) => evaluateCondition(c, context));\n if (Array.isArray(condition.$or)) return condition.$or.some((c: any) => evaluateCondition(c, context));\n if (condition.$not !== undefined) return !evaluateCondition(condition.$not, context);\n if (Array.isArray(condition.$eq) && condition.$eq.length === 2) {\n const [l, r] = pair(condition, '$eq', context);\n return l === r;\n }\n if (Array.isArray(condition.$ne) && condition.$ne.length === 2) {\n const [l, r] = pair(condition, '$ne', context);\n return l !== r;\n }\n if (Array.isArray(condition.$gt) && condition.$gt.length === 2) {\n const [l, r] = pair(condition, '$gt', context);\n return l > r;\n }\n if (Array.isArray(condition.$lt) && condition.$lt.length === 2) {\n const [l, r] = pair(condition, '$lt', context);\n return l < r;\n }\n }\n\n return Boolean(resolveBinding(condition, context));\n};\n\n// CSS properties that take plain numbers; every other number is px.\nconst UNITLESS = new Set([\n 'opacity', 'zIndex', 'flex', 'flexGrow', 'flexShrink', 'fontWeight', 'order', 'aspectRatio', 'scale',\n]);\n\n// Backend styles are CSS objects with camelCase keys.\nexport const toCss = (style: any): Record<string, string> | null => {\n if (!style || typeof style !== 'object' || Array.isArray(style)) return null;\n const css: Record<string, string> = {};\n for (const key of Object.keys(style)) {\n const value = style[key];\n if (value == null || typeof value === 'object') continue;\n css[key] = typeof value === 'number' && !UNITLESS.has(key) ? `${value}px` : String(value);\n }\n return css;\n};\n","import {\n ChangeDetectorRef,\n Component,\n Directive,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation,\n forwardRef,\n} from '@angular/core';\nimport { NgFor, NgIf, NgStyle, NgSwitch, NgSwitchCase } from '@angular/common';\nimport { componentStore, spotcheckStore } from '../state/store';\nimport { execute } from '../helpers/executables';\nimport { SurveyPage } from '../helpers/survey-page';\nimport { batched, guardedDetectChanges } from '../helpers/render';\nimport {\n BuilderContext,\n SchemaNode,\n SlotContent,\n evaluateCondition,\n resolveBinding,\n toCss,\n} from '../helpers/binding';\n\n// Reports the element's untransformed width like RN onLayout ({ nativeEvent: { layout } }).\n@Directive({ selector: '[ssLayout]', standalone: true })\nexport class LayoutDirective implements OnInit, OnDestroy {\n @Output() ssLayout = new EventEmitter<any>();\n private observer?: ResizeObserver;\n private last = '';\n\n constructor(private el: ElementRef<HTMLElement>, private zone: NgZone) {}\n\n ngOnInit(): void {\n if (typeof ResizeObserver === 'undefined') return;\n this.zone.runOutsideAngular(() => {\n this.observer = new ResizeObserver(() => {\n const node = this.el.nativeElement;\n const layout = { x: node.offsetLeft, y: node.offsetTop, width: node.offsetWidth, height: node.offsetHeight };\n const key = `${layout.width}x${layout.height}`;\n if (key === this.last) return;\n this.last = key;\n this.ssLayout.emit({ nativeEvent: { layout } });\n });\n this.observer.observe(this.el.nativeElement);\n });\n }\n\n ngOnDestroy(): void {\n this.observer?.disconnect();\n }\n}\n\n// Hosts one survey page; mirrors the RN WebViewRenderer (hidden pages stay 1x1 off-screen and keep loading).\n@Component({\n selector: 'ss-webview-renderer',\n standalone: true,\n template: '',\n host: { '[style]': 'hostStyle' },\n})\nexport class WebViewRendererComponent implements OnChanges, OnDestroy {\n @Input() uri = '';\n @Input() canShow = false;\n @Input() onMessage?: (event: any) => void;\n @Input() onError?: (error: any) => void;\n @Input() refCallback?: (ref: any) => void;\n\n hostStyle = '';\n private page?: SurveyPage;\n\n constructor(private el: ElementRef<HTMLElement>) {}\n\n ngOnChanges(): void {\n this.hostStyle = this.canShow\n ? 'display:block;position:relative;width:100%;height:100%;'\n : 'display:block;position:absolute;left:-1000px;top:0;width:1px;height:1px;opacity:0;overflow:hidden;';\n if (!this.uri) return;\n if (!this.page) {\n this.page = new SurveyPage(this.el.nativeElement, {\n onMessage: (data) => this.onMessage?.({ nativeEvent: { data } }),\n onError: (error) => this.onError?.(error),\n });\n this.refCallback?.(this.page);\n }\n this.page.load(this.uri);\n }\n\n ngOnDestroy(): void {\n this.refCallback?.(null);\n this.page?.destroy();\n }\n}\n\n// Renders one backend schema node as HTML (same node rules as the other SDKs' Builder).\n@Component({\n selector: 'ss-node',\n standalone: true,\n encapsulation: ViewEncapsulation.None,\n imports: [\n NgIf, NgFor, NgStyle, NgSwitch, NgSwitchCase, LayoutDirective, WebViewRendererComponent,\n forwardRef(() => CloseButtonComponent),\n ],\n styles: [`\n ss-node, ss-close-button { display: contents; }\n .ss-node-box, .ss-node-pressable, .ss-node-text, .ss-node-image, .ss-node-svg { box-sizing: border-box; }\n .ss-node-pressable { -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }\n .ss-node-pressable:active { opacity: 0.6; }\n .ss-node-pressable:focus { outline: none; }\n `],\n template: `\n <ng-container *ngIf=\"visible\" [ngSwitch]=\"kind\">\n <ng-container *ngSwitchCase=\"'slot'\">\n <ss-node *ngIf=\"slot?.schema\" [node]=\"slot!.schema!\" [ctx]=\"slot!.context\"></ss-node>\n </ng-container>\n <div *ngSwitchCase=\"'Box'\" class=\"ss-node-box\" [attr.data-ss-role]=\"role\" [ngStyle]=\"css\">\n <ss-node *ngFor=\"let child of children; trackBy: byIndex\" [node]=\"child\" [ctx]=\"ctx\"></ss-node>\n </div>\n <div *ngSwitchCase=\"'Pressable'\" class=\"ss-node-pressable\" role=\"button\" tabindex=\"0\"\n [attr.data-ss-role]=\"role\" [attr.aria-label]=\"props['ariaLabel'] || null\" [ngStyle]=\"css\"\n (click)=\"press($event)\" (keydown.enter)=\"press($event)\" (ssLayout)=\"layout($event)\">\n <ss-node *ngFor=\"let child of children; trackBy: byIndex\" [node]=\"child\" [ctx]=\"ctx\"></ss-node>\n </div>\n <span *ngSwitchCase=\"'Text'\" class=\"ss-node-text\" [ngStyle]=\"css\">{{ content }}</span>\n <!-- A failed image keeps its space but shows nothing, like iOS and Flutter. -->\n <img *ngSwitchCase=\"'Image'\" class=\"ss-node-image\" [attr.data-ss-role]=\"role\" [src]=\"props['src']\" [ngStyle]=\"css\" alt=\"\"\n (error)=\"$any($event.target).style.visibility = 'hidden'\" (load)=\"$any($event.target).style.visibility = ''\" />\n <img *ngSwitchCase=\"'SvgXml'\" class=\"ss-node-svg\" [src]=\"svgSrc\" [ngStyle]=\"css\" alt=\"\" />\n <ss-close-button *ngSwitchCase=\"'CloseButton'\"></ss-close-button>\n <ss-webview-renderer *ngSwitchCase=\"'WebViewRenderer'\"\n [attr.data-ss-webview]=\"node.meta?.['webViewType']\"\n [uri]=\"props['uri']\" [canShow]=\"props['canShow']\" [onMessage]=\"props['onMessage']\"\n [onError]=\"props['onError']\" [refCallback]=\"props['ref']\"></ss-webview-renderer>\n </ng-container>\n `,\n})\nexport class SsNodeComponent implements OnChanges {\n @Input() node!: SchemaNode;\n @Input() ctx: BuilderContext = {};\n\n visible = false;\n kind = '';\n role: string | null = null;\n props: Record<string, any> = {};\n css: Record<string, string> | null = null;\n content: any = null;\n slot: SlotContent | null = null;\n svgSrc = '';\n children: SchemaNode[] = [];\n\n // Binding results are computed once per render so templates see stable values.\n ngOnChanges(): void {\n const node = this.node;\n const ctx = this.ctx || {};\n this.slot = null;\n if (!node) {\n this.visible = false;\n return;\n }\n if (node.slot) {\n this.kind = 'slot';\n this.slot = ctx.slots?.[node.slot] || null;\n this.visible = Boolean(this.slot);\n return;\n }\n this.visible = node.if === undefined || evaluateCondition(node.if, ctx);\n if (!this.visible) return;\n this.kind = node.type || '';\n this.role = (node.meta?.componentRole as string) || null;\n this.props = node.props ? resolveBinding(node.props, ctx) || {} : {};\n this.css = toCss(this.props['style']);\n this.content = node.content !== undefined ? resolveBinding(node.content, ctx) : null;\n this.children = node.children || [];\n if (this.kind === 'SvgXml') {\n const xml = typeof this.props['xml'] === 'string' ? this.props['xml'] : '';\n // As an image, so markup in the icon can never run script.\n this.svgSrc = xml ? `data:image/svg+xml;charset=utf-8,${encodeURIComponent(xml)}` : '';\n }\n }\n\n byIndex(index: number): number {\n return index;\n }\n\n press(event: Event): void {\n event.stopPropagation();\n this.props['onPress']?.(event);\n }\n\n layout(event: any): void {\n this.props['onLayout']?.(event);\n }\n}\n\n// Backend-driven close button (schema closeButton + closeButton.getCloseButtonStyles).\n@Component({\n selector: 'ss-close-button',\n standalone: true,\n imports: [NgIf, SsNodeComponent],\n template: `<ss-node *ngIf=\"schema\" [node]=\"schema\" [ctx]=\"ctx\"></ss-node>`,\n})\nexport class CloseButtonComponent implements OnInit, OnDestroy {\n schema: SchemaNode | null = null;\n ctx: BuilderContext = {};\n\n private styles: any = {};\n private styleKey: any[] = [];\n private unsubscribers: Array<() => void> = [];\n private readonly handlers = {\n handleClosePress: () => {\n execute('closeButton.handleCloseButton');\n },\n };\n\n private destroyed = false;\n private readonly scheduleRender = batched(() => {\n if (this.destroyed) return;\n this.ctx = { state: spotcheckStore.getState().SpotCheckState, styles: this.styles, handlers: this.handlers };\n guardedDetectChanges(this.cdr, 'closeButtonRender');\n });\n\n constructor(private cdr: ChangeDetectorRef) {}\n\n ngOnInit(): void {\n this.unsubscribers.push(spotcheckStore.subscribe(() => this.update()));\n this.unsubscribers.push(componentStore.subscribe(() => this.update()));\n this.update();\n }\n\n ngOnDestroy(): void {\n this.destroyed = true;\n this.unsubscribers.forEach((unsubscribe) => unsubscribe());\n }\n\n private update(): void {\n const state = spotcheckStore.getState().SpotCheckState;\n const componentState = componentStore.getState().componentState;\n this.schema = componentState.isLoaded ? componentState.schemas?.closeButton || null : null;\n const key = [state.spotCheckDetails.closeButton, state.spotCheckDetails.isRTLLanguage];\n if (key[0] !== this.styleKey[0] || key[1] !== this.styleKey[1]) {\n this.styleKey = key;\n execute('closeButton.getCloseButtonStyles').then((result) => {\n if (!result) return;\n this.styles = result;\n this.scheduleRender();\n });\n }\n this.scheduleRender();\n }\n}\n","import { ChangeDetectorRef, Component, NgZone, OnDestroy, OnInit, PLATFORM_ID, inject } from '@angular/core';\nimport { NgIf, isPlatformBrowser } from '@angular/common';\nimport { GuardsCheckEnd, NavigationEnd, Router } from '@angular/router';\nimport { SsNodeComponent } from './spotchecks/components/builder.component';\nimport { componentStore, spotcheckStore } from './spotchecks/state/store';\nimport { dispatchWrapper, execute } from './spotchecks/helpers/executables';\nimport { captureP1Error } from './spotchecks/helpers/sentry';\nimport { setAppRunner } from './spotchecks/helpers/listener';\nimport { batched, guardedDetectChanges, hasCrashed, onCrash } from './spotchecks/helpers/render';\nimport type { BuilderContext, SchemaNode } from './spotchecks/helpers/binding';\n\n// Path only: query or hash changes stay on the same screen.\nconst pathOf = (url: string) => (url || '').split(/[?#]/)[0];\n\n// Only one <SpotCheck> renders; extra instances stay empty so they never touch the live page.\nlet owner: SpotCheck | null = null;\n\n// Keyboard cover below this is browser chrome, not a keyboard.\nconst MIN_KEYBOARD_HEIGHT = 80;\n\n// Place once at the app root: <SpotCheck />. One Angular codebase for web, Android and iOS.\n@Component({\n selector: 'SpotCheck',\n standalone: true,\n imports: [NgIf, SsNodeComponent],\n styles: [':host { display: contents; }'],\n template: `\n <ss-node *ngIf=\"wrapperSchema\" [node]=\"wrapperSchema\" [ctx]=\"wrapperCtx\"></ss-node>\n <ss-node *ngIf=\"buttonSchema && buttonReady\" [node]=\"buttonSchema\" [ctx]=\"buttonCtx\"></ss-node>\n `,\n})\nexport class SpotCheck implements OnInit, OnDestroy {\n wrapperSchema: SchemaNode | null = null;\n buttonSchema: SchemaNode | null = null;\n wrapperCtx: BuilderContext = {};\n buttonCtx: BuilderContext = {};\n buttonReady = false;\n\n private wrapperStyles: any = {\n overlayStyle: { position: 'fixed', height: 0, opacity: 0, zIndex: -999999, pointerEvents: 'none' },\n wrapperStyle: {},\n };\n private buttonStyles: any = {};\n private destroyed = false;\n private cleanups: Array<() => void> = [];\n private lastInjectionKey: any[] = [];\n private lastButtonKey: any[] = [];\n private lastPath: string | null = null;\n\n private readonly cdr = inject(ChangeDetectorRef);\n private readonly zone = inject(NgZone);\n private readonly router = inject(Router, { optional: true });\n private readonly isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\n private readonly webviewHandlers = {\n classicWebViewRefCallback: (ref: any) => execute('webviewComponent.classicWebViewRefCallback', { ref }),\n chatWebViewRefCallback: (ref: any) => execute('webviewComponent.chatWebViewRefCallback', { ref }),\n handleOnMessage: (event: any) => execute('webviewComponent.handleWebViewMessage', { event }),\n handleOnError: (error: any) => execute('webviewComponent.handleWebViewError', { error }),\n };\n\n private readonly buttonHandlers = {\n handleSpotCheckButtonPress: () => execute('spotCheckButton.handleSpotCheckButtonPress'),\n handleSideTabLayout: (event: any) => execute('spotCheckButton.handleSideTabLayout', { event }),\n };\n\n private readonly scheduleRender = batched(() => {\n if (!this.destroyed) this.render();\n });\n\n private readonly scheduleWrapperStyles = batched(() => {\n if (this.destroyed) return;\n execute('wrapper.getWrapperStyles', {\n screenHeight: window.innerHeight,\n screenWidth: window.innerWidth,\n setStyles: (styles: any) => {\n this.wrapperStyles = styles;\n this.scheduleRender();\n },\n });\n });\n\n ngOnInit(): void {\n // Server render (SSR) or a second instance: render nothing.\n if (!this.isBrowser || owner) return;\n owner = this;\n // App callbacks run inside Angular so the app's own UI updates.\n setAppRunner((fn) => this.zone.run(fn));\n this.cleanups.push(spotcheckStore.subscribe(() => this.onStateChange()));\n this.cleanups.push(componentStore.subscribe(() => this.onStateChange()));\n this.cleanups.push(onCrash(() => this.hideAfterCrash()));\n this.watchWindow();\n this.watchRouter();\n this.onStateChange();\n }\n\n ngOnDestroy(): void {\n if (owner === this) owner = null;\n this.destroyed = true;\n this.cleanups.forEach((cleanup) => cleanup());\n }\n\n // Same triggers as the other SDKs' Wrapper / WebViewComponent / SpotCheckButton effects.\n private onStateChange(): void {\n const state = spotcheckStore.getState().SpotCheckState;\n const { webViewDetails, spotCheckDetails } = state;\n\n this.scheduleWrapperStyles();\n\n const injectionKey = [webViewDetails.isChatLoading, webViewDetails.isClassicLoading, webViewDetails.webViewInjectionData];\n if (injectionKey.some((value, i) => value !== this.lastInjectionKey[i])) {\n this.lastInjectionKey = injectionKey;\n execute('webviewComponent.handleWebViewInjection');\n }\n\n const buttonKey = [spotCheckDetails.spotCheckButtonConfig, spotCheckDetails.isSpotCheckButton, spotCheckDetails.sideTabButtonWidth];\n if (buttonKey.some((value, i) => value !== this.lastButtonKey[i])) {\n this.lastButtonKey = buttonKey;\n execute('spotCheckButton.getSpotCheckButtonStyles').then((result) => {\n if (!result) return;\n this.buttonStyles = result;\n this.scheduleRender();\n });\n }\n\n this.scheduleRender();\n }\n\n private render(): void {\n if (hasCrashed()) return;\n const state = spotcheckStore.getState().SpotCheckState;\n const componentState = componentStore.getState().componentState;\n const schemas = componentState.isLoaded ? componentState.schemas || {} : {};\n\n this.wrapperSchema = schemas.wrapper || null;\n this.buttonSchema = schemas.spotCheckButton || null;\n this.wrapperCtx = {\n state,\n styles: this.wrapperStyles,\n slots: {\n children: {\n schema: schemas.webviewComponent || null,\n context: { state, handlers: this.webviewHandlers },\n },\n },\n };\n this.buttonCtx = { state, styles: this.buttonStyles, handlers: this.buttonHandlers };\n // Wait for styles so the button never renders unstyled for a frame.\n this.buttonReady = Object.keys(this.buttonStyles || {}).length > 0;\n guardedDetectChanges(this.cdr, 'render');\n }\n\n // After a failed draw, SpotCheck renders nothing for the rest of the session (RN error boundary parity).\n private hideAfterCrash(): void {\n this.wrapperSchema = null;\n this.buttonSchema = null;\n try {\n this.cdr.detectChanges();\n } catch {}\n }\n\n // Screen size and the part of it the on-screen keyboard covers.\n private watchWindow(): void {\n const vv: any = (window as any).visualViewport;\n const onResize = () => {\n let keyboard = 0;\n if (vv) keyboard = Math.round(window.innerHeight - vv.height - vv.offsetTop);\n if (keyboard < MIN_KEYBOARD_HEIGHT) keyboard = 0;\n const current = spotcheckStore.getState().SpotCheckState.spotCheckDetails.keyBoardHeight || 0;\n if (keyboard !== current) dispatchWrapper({ spotCheckDetails: { keyBoardHeight: keyboard } });\n else this.scheduleWrapperStyles();\n };\n this.zone.runOutsideAngular(() => {\n window.addEventListener('resize', onResize);\n vv?.addEventListener('resize', onResize);\n vv?.addEventListener('scroll', onResize);\n });\n this.cleanups.push(() => {\n window.removeEventListener('resize', onResize);\n vv?.removeEventListener('resize', onResize);\n vv?.removeEventListener('scroll', onResize);\n });\n }\n\n // Leaving a screen closes its spotcheck. GuardsCheckEnd comes after guards and redirects\n // (a blocked navigation keeps the survey) and before the new page's trackScreen.\n private watchRouter(): void {\n if (!this.router) return;\n this.lastPath = this.router.navigated ? pathOf(this.router.url) : null;\n const subscription = this.router.events.subscribe((event) => {\n try {\n if (event instanceof GuardsCheckEnd && event.shouldActivate) {\n const next = pathOf(event.urlAfterRedirects);\n if (this.lastPath !== null && next !== this.lastPath) {\n execute('handleNavigationChange');\n }\n this.lastPath = next;\n } else if (event instanceof NavigationEnd) {\n this.lastPath = pathOf(event.urlAfterRedirects);\n }\n } catch (error: any) {\n captureP1Error(error, 'GENERAL', { action: 'navigationListener', errorMessage: error?.message });\n }\n });\n this.cleanups.push(() => subscription.unsubscribe());\n }\n}\n","import { Capacitor } from '@capacitor/core';\nimport { Device } from '@capacitor/device';\n\nlet deviceInfo: any = null;\n\nconst getDeviceInfo = async () => {\n if (deviceInfo) return deviceInfo;\n try {\n deviceInfo = await Device.getInfo();\n } catch {\n deviceInfo = { platform: Capacitor.getPlatform(), operatingSystem: 'unknown', osVersion: '' };\n }\n return deviceInfo;\n};\n\n// Legacy Ionic visitor: operatingSystem from @capacitor/device (cached at init), size from the window.\nexport const getVisitorInfo = () => {\n const info = deviceInfo || {};\n return {\n deviceType: 'MOBILE',\n operatingSystem: info.operatingSystem || 'unknown',\n screenResolution: {\n width: Math.round(window.innerWidth),\n height: Math.round(window.innerHeight),\n },\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n };\n};\n\nexport const loadDeviceInfo = () => getDeviceInfo();\n\n// Raw device facts; the backend keeps the SDK version per app build.\nexport const getDeviceFacts = async () => {\n const info = await getDeviceInfo();\n const facts: Record<string, unknown> = {\n os: info.platform === 'web' ? 'web' : info.platform,\n osVersion: String(info.osVersion || ''),\n isTablet: false,\n ...(info.model ? { model: String(info.model) } : {}),\n };\n if (Capacitor.isNativePlatform()) {\n try {\n // @capacitor/app is optional; its native plugin registers here when installed.\n const app: any = (Capacitor as any).Plugins?.App;\n const appInfo = app?.getInfo ? await app.getInfo() : null;\n if (appInfo?.version) facts['appVersion'] = String(appInfo.version);\n if (appInfo?.build) facts['appBuild'] = String(appInfo.build);\n } catch {}\n }\n return facts;\n};\n","import { componentStore, functionStore, spotcheckStore } from './state/store';\nimport { execute, markInitialized } from './helpers/executables';\nimport { setListener } from './helpers/listener';\nimport { getDeviceFacts, getVisitorInfo, loadDeviceInfo } from './helpers/device';\nimport { addBreadcrumb, captureP0Error } from './helpers/sentry';\nimport { FRAMEWORK } from './helpers/version';\nimport type {\n SpotcheckProps,\n TrackEventProps,\n TrackScreenOptions,\n TrackScreenProps,\n} from './types';\n\nexport { SDK_VERSION } from './helpers/version';\n\nconst INIT_TIMEOUT_MS = 15000;\n\n// Backend functions, schemas and page script for this SDK (framework=ionic).\nconst getAllSpotcheckFunctions = async (domainName: string) => {\n const controller = typeof AbortController !== 'undefined' ? new AbortController() : null;\n const timer = setTimeout(() => controller?.abort(), INIT_TIMEOUT_MS);\n try {\n const response = await fetch(\n `https://${domainName}/api/internal/spotcheck/mobile/init?framework=${FRAMEWORK}`,\n { signal: controller?.signal, cache: 'no-store' },\n );\n if (!response.ok) throw new Error(`mobile/init failed with status ${response.status}`);\n const data = await response.json().catch(() => null);\n // A non-JSON 200 (e.g. captive portal) counts as a failed init.\n if (!data || typeof data !== 'object' || typeof data.initializeSpotcheckComponent !== 'string') {\n throw new Error('Invalid mobile/init response');\n }\n const { componentSchemas, config, ...functions } = data;\n functionStore.dispatch({ ...functions, isLoaded: true });\n componentStore.dispatch({ schemas: componentSchemas || {}, config: config || {}, isLoaded: Boolean(componentSchemas) });\n return data;\n } catch (error: any) {\n captureP0Error(error, 'SPOTCHECK_INITIALIZATION', {\n component: 'getAllSpotcheckFunctions',\n action: 'fetchFunctions',\n domainName,\n errorMessage: error?.message,\n });\n console.error('Error fetching spotcheck functions:', error);\n throw error;\n } finally {\n clearTimeout(timer);\n }\n};\n\n// Synchronous: trackScreen must reach execute in the same tick as a following trackEvent.\nconst refreshVisitor = () => {\n try {\n spotcheckStore.dispatch({ params: { visitor: getVisitorInfo() } });\n } catch {}\n};\n\n// Init retry: a failed init (e.g. offline at launch) is retried on the next track call.\nconst INIT_RETRY_GAP_MS = 10000;\nlet lastInitParams: SpotcheckProps | null = null;\nlet initStatus: 'idle' | 'running' | 'done' | 'failed' = 'idle';\nlet lastInitAttempt = 0;\n\nconst retryInitIfFailed = () => {\n if (initStatus !== 'failed' || !lastInitParams) return;\n if (Date.now() - lastInitAttempt < INIT_RETRY_GAP_MS) return;\n initializeSpotChecks(lastInitParams).catch(() => {});\n};\n\nexport const initializeSpotChecks = async (params: SpotcheckProps): Promise<void> => {\n lastInitParams = params;\n initStatus = 'running';\n lastInitAttempt = Date.now();\n try {\n setListener(params?.listener);\n if (params?.domainName) spotcheckStore.dispatch({ params: { domainName: params.domainName } });\n await loadDeviceInfo();\n refreshVisitor();\n const device = await getDeviceFacts();\n await getAllSpotcheckFunctions(params.domainName);\n const { listener, ...initParams } = params;\n await execute('initializeSpotcheckComponent', { ...initParams, framework: FRAMEWORK, device });\n await markInitialized();\n initStatus = 'done';\n } catch (error: any) {\n // Legacy never threw into the host app; failures go to the backend and the console.\n console.error('Error initializing spotchecks:', error);\n initStatus = 'failed';\n }\n};\n\nconst resolveTrackOptions = (input?: TrackScreenOptions) => ({\n variables: input?.variables ?? {},\n customProperties: input?.customProperties ?? {},\n userDetails: input?.userDetails ?? {},\n});\n\nexport async function trackScreen(screen: string, options?: TrackScreenOptions): Promise<void>;\nexport async function trackScreen(props: TrackScreenProps): Promise<void>;\nexport async function trackScreen(screenOrProps: string | TrackScreenProps, optionsArg?: TrackScreenOptions) {\n const screen = typeof screenOrProps === 'string' ? screenOrProps : screenOrProps?.screen;\n const options = resolveTrackOptions(typeof screenOrProps === 'string' ? optionsArg : screenOrProps?.options);\n if (!screen) {\n console.error('trackScreen: `screen` is required');\n return;\n }\n addBreadcrumb('trackScreen', { screen });\n retryInitIfFailed();\n try {\n refreshVisitor();\n await execute('trackScreen', { screen, options });\n } catch (error) {\n // Legacy only logged; never throw into the host app.\n console.error('Error tracking screen:', error);\n }\n}\n\nexport async function trackEvent(screen: string, event: Record<string, any>, options?: TrackScreenOptions): Promise<void>;\nexport async function trackEvent(props: TrackEventProps): Promise<void>;\nexport async function trackEvent(\n screenOrProps: string | TrackEventProps,\n eventArg?: Record<string, any>,\n optionsArg?: TrackScreenOptions,\n) {\n const isString = typeof screenOrProps === 'string';\n const screen = isString ? screenOrProps : screenOrProps?.screen;\n const event = isString ? eventArg : screenOrProps?.event;\n if (!screen) {\n console.error('trackEvent: `screen` is required');\n return;\n }\n if (event == null) {\n console.error('trackEvent: `event` is required');\n return;\n }\n const options = resolveTrackOptions(isString ? optionsArg : screenOrProps.options);\n addBreadcrumb('trackEvent', { screen, event: Object.keys(event || {}).join(',') });\n retryInitIfFailed();\n try {\n await execute('trackEvent', { screen, event, options });\n } catch (error) {\n console.error('Error tracking event:', error);\n }\n}\n\n// Closes any open spotcheck and its button (screen changes the SDK can't detect).\nexport async function closeSpotChecks(): Promise<void> {\n addBreadcrumb('closeSpotChecks', {});\n await execute('handleNavigationChange', { reason: 'close' });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAEA;MACa,KAAK,CAAA;AAGI,IAAA,KAAA;AAAkB,IAAA,OAAA;AAF9B,IAAA,SAAS,GAAG,IAAI,GAAG,EAAY;IAEvC,WAAA,CAAoB,KAAQ,EAAU,OAAqC,EAAA;QAAvD,IAAA,CAAA,KAAK,GAAL,KAAK;QAAa,IAAA,CAAA,OAAO,GAAP,OAAO;IAAiC;IAE9E,QAAQ,GAAA;QACN,OAAO,IAAI,CAAC,KAAK;IACnB;AAEA,IAAA,QAAQ,CAAC,MAAW,EAAA;AAClB,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,MAAM,CAAC;QAC7C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,KAAI;AAClC,YAAA,IAAI;AACF,gBAAA,QAAQ,EAAE;YACZ;YAAE,OAAO,KAAK,EAAE;AACd,gBAAA,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,KAAK,CAAC;YAC3D;AACF,QAAA,CAAC,CAAC;IACJ;AAEA,IAAA,SAAS,CAAC,QAAkB,EAAA;AAC1B,QAAA,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,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MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IACzD;IAAE,OAAO,KAAK,EAAE;AACd,QAAA,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,KAAK,CAAC;IAC/C;AACF;AAEA;AACO,eAAe,eAAe,GAAA;AACnC,IAAA,aAAa,CAAC,iBAAiB,EAAE,EAAE,CAAC;IACpC,MAAM,OAAO,CAAC,wBAAwB,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC;AAC9D;;ACrJA;;AAEG;;"}
@@ -102,7 +102,7 @@ interface TrackEventProps {
102
102
  options?: TrackScreenOptions;
103
103
  }
104
104
 
105
- declare const SDK_VERSION = "2.0.4-beta.1";
105
+ declare const SDK_VERSION = "2.1.0";
106
106
 
107
107
  declare const initializeSpotChecks: (params: SpotcheckProps) => Promise<void>;
108
108
  declare function trackScreen(screen: string, options?: TrackScreenOptions): Promise<void>;
@@ -1,2 +1,2 @@
1
- export declare const SDK_VERSION = "2.0.4-beta.1";
1
+ export declare const SDK_VERSION = "2.1.0";
2
2
  export declare const FRAMEWORK = "ionic";
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with package.json "version".
2
- export const SDK_VERSION = '2.0.4-beta.1';
2
+ export const SDK_VERSION = '2.1.0';
3
3
  export const FRAMEWORK = 'ionic';
4
4
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../../../src/angular-ui/lib/spotchecks/helpers/version.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC;AAC1C,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC","sourcesContent":["// Keep in sync with package.json \"version\".\nexport const SDK_VERSION = '2.0.4-beta.1';\nexport const FRAMEWORK = 'ionic';\n"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../../../../../src/angular-ui/lib/spotchecks/helpers/version.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC;AACnC,MAAM,CAAC,MAAM,SAAS,GAAG,OAAO,CAAC","sourcesContent":["// Keep in sync with package.json \"version\".\nexport const SDK_VERSION = '2.1.0';\nexport const FRAMEWORK = 'ionic';\n"]}
@@ -116,7 +116,7 @@ const functionStore = new Store({ functionState: { isLoaded: false } }, (state,
116
116
  const componentStore = new Store({ componentState: { isLoaded: false, schemas: {} } }, (state, update) => ({ componentState: Object.assign(Object.assign({}, state.componentState), (update || {})) }));
117
117
 
118
118
  // Keep in sync with package.json "version".
119
- const SDK_VERSION = '2.0.4-beta.1';
119
+ const SDK_VERSION = '2.1.0';
120
120
  const FRAMEWORK = 'ionic';
121
121
 
122
122
  // SDK errors go to SurveySparrow's API (backend sentry.processSentryError), never to Sentry servers.