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,GAC5D,IAGFV,EAAiBY,KAAMhD,EAAAA,EAAAA,GAAcsC,EAAKO,GAE1CT,EAAiBa,MAAQ,2CACzBhB,EAAeiB,YAAYd,EAC7B,EAGE/B,OAAO8C,cAAgB9C,OAAO8C,aAAaxB,MAAQtB,OAAO8C,aAAaxB,KAAKyB,QAC9EzB,EAAUtB,OAAO8C,aAAaxB,KAAKyB,SAEnCC,QAAQC,KAAK,yE,wBCxCfC,EAAAA,EAA0BlD,OAAOkD,uB","sources":["webpack://agra/./app/javascript/helpers/url-params.js","webpack://agra/./app/javascript/local/url-keys.js","webpack://agra/./app/javascript/local/embed/index-list-only.js","webpack://agra/./app/javascript/public-path.js"],"sourcesContent":["function urlWithParams(baseUrl, searchParamsMap) {\n const urlObj = new URL(baseUrl, window.location.origin)\n const urlSearchParams = urlObj.searchParams\n Object.entries(searchParamsMap).forEach(([k, v]) => {\n const stringValue = typeof v === 'string' ? v : JSON.stringify(v)\n urlSearchParams.append(k, stringValue)\n })\n\n // Deterministic ordering of url params. This is useful for when we check\n // the url with params in tests.\n urlSearchParams.sort()\n return urlObj.toString()\n}\n\nfunction urlParamsWithNamespace(paramsMap, namespace) {\n const newParamsMap = {}\n Object.entries(paramsMap).forEach(([k, v]) => {\n newParamsMap[`${namespace}[${k}]`] = v\n })\n return newParamsMap\n}\n\nexport {\n urlParamsWithNamespace,\n urlWithParams\n}\n","// tracking URL param for the ActionKit CRM\nexport const URL_KEY_AKID = 'akid'\n// tracking URL param for the Action Network CRM\nexport const URL_KEY_EMAIL_REFERRER = 'email_referrer'\n// Agra uses this to pass partner hints to event creation.\nexport const URL_KEY_PARTNER = 'partner'\nexport const URL_KEY_SOURCE = 'source'\n// generic UTM codes\nexport const URL_KEY_UTM_CAMPAIGN = 'utm_campaign'\nexport const URL_KEY_UTM_CONTENT = 'utm_content'\nexport const URL_KEY_UTM_MEDIUM = 'utm_medium'\nexport const URL_KEY_UTM_SOURCE = 'utm_source'\nexport const URL_KEY_UTM_TERM = 'utm_term'\n// tracking URL param for the EveryAction CRM\nexport const URL_KEY_SOURCE_ID = 'sourceid'\n\nexport const TRACKING_URL_PARAMS = [URL_KEY_AKID, URL_KEY_EMAIL_REFERRER, URL_KEY_SOURCE,\n URL_KEY_SOURCE_ID, URL_KEY_UTM_CAMPAIGN, URL_KEY_UTM_CONTENT,\n URL_KEY_UTM_MEDIUM, URL_KEY_UTM_SOURCE,\n URL_KEY_UTM_TERM]\n","import { TRACKING_URL_PARAMS } from '../url-keys'\nimport { urlParamsWithNamespace, urlWithParams } from '../../helpers/url-params.js'\n\nconst List = {\n init: function({filter, eventCreationAllowed, includeSearchField, siteOrigin, containerId}) {\n const wrapperElement = document.getElementById(containerId)\n const newIframeElement = document.createElement('iframe')\n\n let url = `${siteOrigin}/local/embed_list_only`\n\n if (filter) {\n const searchParams = urlParamsWithNamespace(filter, 'filter')\n url = urlWithParams(url, searchParams)\n }\n\n if (eventCreationAllowed !== undefined) {\n url = urlWithParams(url, {event_creation_allowed: eventCreationAllowed})\n }\n\n if (includeSearchField !== undefined) {\n url = urlWithParams(url, {include_search_field: includeSearchField})\n }\n\n const currentWindowParams = new URLSearchParams(window.location.search)\n const trackingUrlParamsToInclude = {}\n TRACKING_URL_PARAMS.forEach(key => {\n if (currentWindowParams.get(key)) {\n trackingUrlParamsToInclude[key] = currentWindowParams.get(key)\n }\n })\n\n newIframeElement.src = urlWithParams(url, trackingUrlParamsToInclude)\n\n newIframeElement.style = 'width: 100%; height: 100%; border: none;'\n wrapperElement.appendChild(newIframeElement)\n }\n}\n\nif (window.ControlShift && window.ControlShift.List && window.ControlShift.List.options) {\n List.init(window.ControlShift.List.options)\n} else {\n console.warn('ControlShift.List.options script is not properly defined in your page.')\n}\n\n","// eslint-disable-next-line no-undef\n__webpack_public_path__ = window.__webpack_public_path__\n"],"names":["urlWithParams","baseUrl","searchParamsMap","urlObj","URL","window","location","origin","urlSearchParams","searchParams","Object","entries","forEach","k","v","stringValue","JSON","stringify","append","sort","toString","urlParamsWithNamespace","paramsMap","namespace","newParamsMap","URL_KEY_PARTNER","TRACKING_URL_PARAMS","List","filter","eventCreationAllowed","includeSearchField","siteOrigin","containerId","wrapperElement","document","getElementById","newIframeElement","createElement","url","undefined","event_creation_allowed","include_search_field","currentWindowParams","URLSearchParams","search","trackingUrlParamsToInclude","key","get","src","style","appendChild","ControlShift","options","console","warn","__webpack_public_path__"],"sourceRoot":""}