@ptp-us/power-the-polls-form
Advanced tools
Comparing version 1.1.6-beta.4 to 1.1.6-beta.5
@@ -6,3 +6,3 @@ 'use strict'; | ||
require('./index-e844629d.js'); | ||
const WorkElections = require('./WorkElections-be5ba460.js'); | ||
const WorkElections = require('./WorkElections-d7d4330a.js'); | ||
@@ -9,0 +9,0 @@ const index = /*#__PURE__*/Object.freeze({ |
@@ -6,3 +6,3 @@ 'use strict'; | ||
const index = require('./index-e844629d.js'); | ||
const WorkElections = require('./WorkElections-be5ba460.js'); | ||
const WorkElections = require('./WorkElections-d7d4330a.js'); | ||
@@ -209,3 +209,3 @@ const ZipGeocode = async (zipcode) => { | ||
version() { | ||
return Promise.resolve("1.1.6-beta.4"); | ||
return Promise.resolve("1.1.6-beta.5"); | ||
} | ||
@@ -212,0 +212,0 @@ render() { |
@@ -26,3 +26,3 @@ import { Component, Event, Fragment, h, Host, Method, Prop, State } from "@stencil/core"; | ||
version() { | ||
return Promise.resolve("1.1.6-beta.4"); | ||
return Promise.resolve("1.1.6-beta.5"); | ||
} | ||
@@ -29,0 +29,0 @@ render() { |
@@ -1,2 +0,1 @@ | ||
import fromEntries from "object.fromentries"; | ||
import { FullJurisdictions } from "../data"; | ||
@@ -35,3 +34,3 @@ import { States } from "../data"; | ||
const mapped = new Map(Object.keys(jurisdictions).map((key) => [jurisdictions[key], removeAdditionalInfo(key)])); | ||
const stateJurisctionNameIdMap = fromEntries(mapped); | ||
const stateJurisctionNameIdMap = [...mapped.entries()].reduce((obj, tuple) => obj[tuple[0]] = tuple[1], {}); | ||
// find jurisdiction name by id | ||
@@ -38,0 +37,0 @@ const formJurisdiction = stateJurisctionNameIdMap[formData.jurisdictionId]; |
@@ -1,1 +0,1 @@ | ||
import"./index-d1c0464b.js";import{d as data,a as data$1,b as allNullOrEmpty,F as FormSubmissionThankYou,i as isNullOrEmpty,P as PtpLink,T as TextInput,t as toQueryString,f as findIfJurisdictionFilled,W as WorkElections}from"./WorkElections-554584ab.js";var index=Object.freeze({__proto__:null,States:data,FullJurisdictions:data$1});var index$1=Object.freeze({__proto__:null,allNullOrEmpty:allNullOrEmpty,FormSubmissionThankYou:FormSubmissionThankYou,isNullOrEmpty:isNullOrEmpty,PtpLink:PtpLink,TextInput:TextInput,toQueryString:toQueryString,findIfJurisdictionFilled:findIfJurisdictionFilled,WorkElections:WorkElections});export{index as data,index$1 as util}; | ||
import"./index-d1c0464b.js";import{d as data,a as data$1,b as allNullOrEmpty,F as FormSubmissionThankYou,i as isNullOrEmpty,P as PtpLink,T as TextInput,t as toQueryString,f as findIfJurisdictionFilled,W as WorkElections}from"./WorkElections-dfe6a991.js";var index=Object.freeze({__proto__:null,States:data,FullJurisdictions:data$1});var index$1=Object.freeze({__proto__:null,allNullOrEmpty:allNullOrEmpty,FormSubmissionThankYou:FormSubmissionThankYou,isNullOrEmpty:isNullOrEmpty,PtpLink:PtpLink,TextInput:TextInput,toQueryString:toQueryString,findIfJurisdictionFilled:findIfJurisdictionFilled,WorkElections:WorkElections});export{index as data,index$1 as util}; |
@@ -1,1 +0,1 @@ | ||
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function a(t){try{l(i.next(t))}catch(e){r(e)}}function s(t){try{l(i["throw"](t))}catch(e){r(e)}}function l(t){t.done?n(t.value):o(t.value).then(a,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){n.label=a[1];break}if(a[0]===6&&n.label<r[1]){n.label=r[1];r=a;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(a);break}if(r[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(s){a=[6,s];o=0}finally{i=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArrays=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),o=0,e=0;e<n;e++)for(var r=arguments[e],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment}from"./index-d1c0464b.js";import{t as toQueryString,f as findIfJurisdictionFilled,F as FormSubmissionThankYou,P as PtpLink,d as data,c as findJurisdictionId,T as TextInput,e as fetchJurisdictionInfo,g as fetchJurisdictionGeoJson,b as allNullOrEmpty,i as isNullOrEmpty,h as findStateId,j as fetchStateJurisdictionsList,k as fetchStateInfo}from"./WorkElections-554584ab.js";var ZipGeocode=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(n){e=new URL("https"+"://smartystreet.powerthepolls.org/dev/zip");e.searchParams.append("zipcode",t);return[2,fetch(e.toString()).then((function(t){return t.json()}),(function(t){return console.log("SmartyStreets Error:",t)})).then((function(t){var e=t[0];if(e.reason){return{error:e.reason}}var n=new Set;var i=new Set;var o=new Map;var r=e.zipcodes[0];if(e.city_states){e.city_states.forEach((function(t){return n.add(t.city)}))}i.add(r.county_name);o.set(r.state_abbreviation,r.state);if(r.alternate_counties){r.alternate_counties.forEach((function(t){i.add(t.county_name);o.set(t.state_abbreviation,t.state)}))}return{zip:r.zipcode,cities:n,counties:i,states:o}}))]}))}))};var AddressInput=function(){function t(t){registerInstance(this,t);this.onLookup=createEvent(this,"lookup",6);this.m_state="COMPLETED";this.zipValue="";this.cityValue="";this.countyValue="";this.stateValue="";this.cityOptions=new Set;this.countyOptions=new Set;this.stateOptions=new Map}t.prototype.state=function(){return Promise.resolve(this.m_state)};t.prototype.render=function(){var t=this;var e=/^\d{5}$/;var n=function(n){t.zipValue=n.target.value;if(e.test(t.zipValue)){t.m_state="STARTED";t.onLookup.emit(t.m_state);ZipGeocode(t.zipValue).then((function(e){if("error"in e){console.log(e.error)}else{t.cityOptions=e.cities;t.cityValue=t.cityOptions.values().next().value;t.countyOptions=e.counties;t.countyValue=t.countyOptions.values().next().value;t.stateOptions=e.states;t.stateValue=t.stateOptions.keys().next().value}t.m_state="COMPLETED";t.onLookup.emit(t.m_state)}))}};return h(Host,null,h("label",null,"ZIP",h("input",{name:"zip",required:true,value:this.zipValue,pattern:"\\d{5}",maxLength:5,title:"Please enter a valid ZIP code",onInput:n})),h("input-possibly-hidden-select",{fieldLabel:"City",name:"city",selected:this.cityValue,options:this.cityOptions}),h("input-possibly-hidden-select",{fieldLabel:"County",name:"user_county",selected:this.countyValue,options:this.countyOptions}),h("input-possibly-hidden-select",{fieldLabel:"State",name:"state",selected:this.stateValue,options:this.stateOptions}))};return t}();var PossiblyHiddenSelect=function(){function t(t){registerInstance(this,t);this.fieldLabel="";this.name="";this.selected="";this.options=new Set}t.prototype.render=function(){var t=this;if(this.options.size<=1){return h("input",{name:this.name,type:"hidden",value:this.selected})}else{return h("label",null,this.fieldLabel,h("select",{name:this.name,required:true},__spreadArrays(this.options.entries()).map((function(e){var n=e[0],i=e[1];return h("option",{value:n,selected:t.selected===n},i)}))))}};return t}();var submitToActionKit=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,n;var i;return __generator(this,(function(o){switch(o.label){case 0:return[4,fetch("https"+"://ptp.actionkit.com/rest/v1/action/",{method:"POST",body:toQueryString(t),mode:"no-cors",headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:e=o.sent();if(!(e.status===200||e.status===201||e.status===0))return[3,2];return[2,true];case 2:o.trys.push([2,4,,5]);i={statusText:e.statusText,status:e.status};return[4,e.json()];case 3:return[2,(i.data=o.sent(),i)];case 4:n=o.sent();return[2,{statusText:e.statusText,status:e.status}];case 5:return[2]}}))}))};var MichiganAdditionalInfoForm=function(t){var e=t.data,n=t.formSubmitted,i=t.onSubmit;var o=function(t){try{var e=t.target;var n=__spreadArrays(e.getElementsByTagName("input"),e.getElementsByTagName("select"));submitToActionKit(n.reduce((function(t,e){t[e.name]=e.value;return t}),{})).then((function(t){if(t!==true){console.error(t)}}));i()}catch(t){console.error(t)}finally{t.preventDefault();return false}};var r=["Not willing to travel","Less than 10 miles","Less than 50 miles","I'll go wherever I'm needed"];return e.state==="MI"&&!n?h(Fragment,null,h("p",null,"We are sharing your information with election administrators and our state partners who will follow up to help you be placed as a poll worker! ",h("strong",null,"We just need a few more pieces of information from you to help with your application:")),h("form",{onSubmit:o,style:{padding:"0"}},h("input",{type:"hidden",name:"city",value:e===null||e===void 0?void 0:e.city}),h("input",{type:"hidden",name:"state",value:e===null||e===void 0?void 0:e.state}),h("input",{type:"hidden",name:"zip",value:e===null||e===void 0?void 0:e.zip}),h("label",null,"Street address",h("input",{type:"text",required:true,name:"address1"})),h("label",null,"Are you fluent in a language besides English?",h("input",{type:"text",required:true,name:"user_additional_language",value:"English only"})),h("label",null,"In Michigan, eligible poll workers can serve anywhere in the state. Are you willing to travel, and if so, how far can you travel?",h("select",{name:"user_mi_travel",required:true},r.map((function(t){return h("option",{value:t},t)})))),h("input",{type:"hidden",name:"page",value:"mi-extra"}),h("input",{type:"hidden",name:"email",value:e===null||e===void 0?void 0:e.email}),h("button",{type:"submit",class:"button"},"Complete application")),h("hr",null)):null};var powerThePollsFormCss='power-the-polls-form{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}power-the-polls-form *{-webkit-box-sizing:border-box;box-sizing:border-box}power-the-polls-form h3{margin-top:1em}power-the-polls-form button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}power-the-polls-form button:hover{opacity:0.8}power-the-polls-form button:focus{opacity:0.6}power-the-polls-form button:active{opacity:0.4}power-the-polls-form button:disabled{background-color:#aaa;color:#333;cursor:progress}power-the-polls-form button:disabled:hover,power-the-polls-form button:disabled:focus,power-the-polls-form button:disabled:active{opacity:1}power-the-polls-form form{font-size:1rem;padding:1em 0;letter-spacing:0}power-the-polls-form form input,power-the-polls-form form select{width:100%;padding:0.5em 0.75em;display:block}power-the-polls-form form select{padding:0.75em;height:auto}power-the-polls-form form label{margin-bottom:0.75em;display:block;font-size:0.9rem}power-the-polls-form form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}power-the-polls-form form label .checkbox:first-of-type{margin-top:1.5em}power-the-polls-form form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}power-the-polls-form p.disclaimer{font-size:0.9rem;font-weight:normal}power-the-polls-form .next-steps p{clear:left}power-the-polls-form .next-steps p .number{margin:0 0.5em 0.5em 0;border-style:solid;border-width:2px;padding:0.25em;display:block;width:2.2em;text-align:center;font-size:1.6em;font-weight:bold;float:left}@media only screen and (max-width: 620px){power-the-polls-form .next-steps p .number{float:none}}power-the-polls-form .next-steps::after{content:"";display:block;clear:both}';var PowerThePollsForm=function(){function t(t){registerInstance(this,t);this.submitCompleted=createEvent(this,"submitCompleted",6);this.submitError=createEvent(this,"submitError",6);this.formStatus="incomplete";this.formData={};this.michiganFormSubmitted=false}t.prototype.reset=function(){this.formStatus="incomplete";this.formData={};this.michiganFormSubmitted=false;return Promise.resolve()};t.prototype.version=function(){return Promise.resolve("1.1.6-beta.4")};t.prototype.render=function(){var t=this;var e=this.partnerId;var n=this.optUserOutOfChase===true||this.optUserOutOfChase==="true"?false:true;var i=this.customFormFieldLabel;var o=this.formData.state&&this.formData.state in data?data[this.formData.state]:null;var r="(?:\\+1)?[-.\\s]?\\(?([0-9]{3})\\)?[-.\\s]?[0-9]{3}[-.\\s]?[0-9]{4}";var a=function(e){if(t.formStatus!=="incomplete"){e.preventDefault();return false}try{var n=e.target;var i=__spreadArrays(n.getElementsByTagName("input"),n.getElementsByTagName("select"));var o=i.reduce((function(t,e){t[e.name]=e.value;return t}),{});var r=o.city||"";var a=o.user_county||"";var s=o.state||"";var l=o.name||"";var u=o.email||"";var c=o.mobile_phone||"";var p=o.zip||"";t.formStatus="processing";submitToActionKit(o).then((function(e){if(e===true){var n=t.submitCompleted.emit();if(!n.defaultPrevented){t.formStatus="completed";t.formData=Object.assign(Object.assign({},t.formData),{city:r,county:a,state:s,name:l,email:u,phone:c,zip:p,jurisdictionId:findJurisdictionId(s,a,r)+""})}}else{t.submitError.emit(e)}})).catch((function(e){t.submitError.emit(e)}))}catch(e){t.submitError.emit(e)}finally{e.preventDefault();return false}};var s=findIfJurisdictionFilled(this.formData);return h(Host,null,this.formStatus==="completed"?h("article",null,h(FormSubmissionThankYou,{stateInfo:o,isJurisdictionFilled:s}),(o===null||o===void 0?void 0:o.noPollWorkersNeeded)!==true&&h("ptp-info-poll-worker",{city:this.formData.city,county:this.formData.county,state:this.formData.state,formData:this.formData,showNextSteps:true,isJurisdictionFilled:s},h(MichiganAdditionalInfoForm,{formSubmitted:this.michiganFormSubmitted,data:this.formData,onSubmit:function(){return t.michiganFormSubmitted=true}}))):h(Fragment,null,h("h3",null,"Help your community and sign up to Power the Polls!"),h("form",{onSubmit:a},h("label",null,"Name",h("input",{type:"text",required:true,name:"name"})),h("label",null,"Email address",h("input",{type:"email",required:true,name:"email"})),h("label",null,"Mobile phone",h("input",{type:"tel",required:true,name:"mobile_phone",pattern:r,title:"Please enter a valid US phone number"})),i?h("label",null,i,h("input",{type:"text",name:"user_partner_field"})):null,h("input-address",{onLookup:function(e){return t.formStatus=e.detail==="STARTED"?"processing":"incomplete"}}),h("input",{type:"hidden",name:"source",id:"id_source",value:e}),h("input",{type:"hidden",name:"user_chase_enabled",value:n?"true":""}),h("input",{type:"hidden",name:"country",value:"United States"}),h("input",{type:"hidden",name:"page",value:"join"}),h("input",{type:"hidden",name:"utf8",value:"ሴ"}),h("input",{type:"hidden",name:"js",value:"1"}),h("button",{type:"submit",class:"button",disabled:this.formStatus!=="incomplete"},this.formStatus!=="incomplete"?h("ui-loading-spinner",{small:true,style:{padding:"0 0.5em"}}):null,"Sign Up To Get Started"),h("p",{class:"disclaimer"},"By signing up, you agree to receive occasional emails or text messages from Power the Polls and ",!n&&this.partnerName&&this.partnerName+" and ","accept our ",h(PtpLink,{path:"/privacy"},"Privacy Policy"),". You can unsubscribe at any time. For texts, message and data rates may apply. Text HELP for Info. Text STOP to quit.")),h("footer",null,h("p",{class:"disclaimer"},h("a",{href:"https://www.workelections.com/",target:"_blank",rel:"noopener"},"Powered by Work Elections.")))))};return t}();PowerThePollsForm.style=powerThePollsFormCss;var CallToApplyButton=function(t){var e=t.jurisdiction;return h("a",{class:"poll-worker-action cta",href:"tel:"+e.telephone},h("svg",{width:"16",height:"16",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},h("g",{fill:"#1C1834"},h("path",{d:"M7.08911391,5.07058199 C7.50359444,4.51207076 7.65223464,3.92345058 7.18343403,3.40387938 C6.13150467,1.93204497 5.42403175,1.02186547 4.98026318,0.583550019 C4.13662208,-0.249749291 2.74880429,-0.137032747 2.01813934,0.582838091 C1.62569083,0.969486796 1.49283466,1.1022653 1.08988214,1.51151171 C-1.15464397,3.75701149 0.214185005,8.50394506 3.85302172,12.1459749 C7.49103443,15.7872048 12.2380006,17.1565857 14.4872035,14.9063344 C14.859044,14.5478908 15.1738444,14.2329628 15.4221647,13.9705095 C16.1381656,13.2137864 16.2468858,11.8873612 15.4174447,11.0256088 C14.9922441,10.5838137 14.124163,9.9105221 12.590241,8.8134336 C12.1204804,8.39339629 11.5634397,8.48442704 11.052719,8.81943299 C10.8071187,8.98061661 10.6283185,9.14356005 10.2907181,9.48144571 L9.67775726,10.0947434 C9.59703715,10.1755352 8.50071573,9.62655096 7.43647436,8.56137922 C6.37168898,7.49564753 5.82303227,6.39937495 5.90339237,6.31903111 L6.51679317,5.70533348 C6.6239133,5.59814438 6.67511337,5.54624565 6.74079346,5.47723667 C6.87759363,5.33346728 6.99087378,5.20300054 7.08911391,5.07058199 Z M10.8084787,11.2259884 L11.4215995,10.6126107 C11.6074398,10.4266297 11.7278399,10.3123213 11.82576,10.2335293 C13.1695218,11.1983912 13.9476828,11.8050496 14.2656032,12.135336 C14.4564034,12.3335558 14.4268034,12.6953591 14.2608832,12.8707013 C14.0312829,13.1133166 13.7329625,13.4117663 13.366882,13.7648504 C11.9124802,15.2197425 8.08063519,14.1142549 4.98401518,11.0149699 C1.88642717,7.91464495 0.78140974,4.08259441 2.22486761,2.63850117 C2.62619613,2.23093459 2.75334829,2.10385951 3.14018879,1.72272224 C3.28523698,1.57982477 3.68032549,1.54773203 3.85677372,1.72201032 C4.19842216,2.05948002 4.83218298,2.87087755 5.76448019,4.16941758 C5.71621613,4.22933149 5.65593605,4.29703661 5.58257596,4.37412478 C5.52873589,4.43071103 5.48387983,4.4761784 5.3858157,4.57432843 L4.77299891,5.18741812 C3.73047756,6.22974419 4.61832671,8.00375589 6.30548889,9.69238427 C7.99151507,11.3798928 9.76631737,12.2686024 10.8084787,11.2259884 Z",id:"icon"}))))," ","Call ",e.telephone," to finish applying")};var CompleteApplicationButton=function(t){var e=t.jurisdiction;return(e===null||e===void 0?void 0:e.application)&&(e===null||e===void 0?void 0:e.application)!==""&&h("a",{class:"poll-worker-action cta",href:e.application,target:"_blank"},"Complete your application")};var EmailApplicationForm=function(t){var e=t.jurisdiction,n=t.data,i=t.onComplete;var o=e;if((o===null||o===void 0?void 0:o.email)==null||o.email===""){return}var r=function(t){try{fetch("https://smartystreet.powerthepolls.org/dev/electmail",{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).then((function(t){console.log("Email sending "+t.statusText+" ("+t.status+")");i()})).catch((function(t){return console.error(t)}))}finally{t.preventDefault();return false}};var a=["18 and under","19 to 25","26 to 35","36 to 50","51 to 64","65 and older"];return h(Fragment,null,h("h3",null,"Send statement of interest"),h("p",null,"You need to email your local jurisdiction directly in order to apply to be a poll worker. This form generates an email that is sent to your local election administrator on your behalf."),h("form",{onSubmit:r,style:{padding:"0"}},h("label",null,"Name",h(TextInput,{data:n,field:"name",required:true})),h("label",null,"City",h(TextInput,{data:n,field:"city",required:true})),h("label",null,"County",h(TextInput,{data:n,field:"county",required:true})),h("label",null,"Email",h(TextInput,{data:n,field:"email",required:true})),h("label",null,"Phone Number",h(TextInput,{data:n,field:"phone",required:true})),h("label",null,"What languages do you speak other than English?",h(TextInput,{data:n,field:"languages",initialValue:"English only",required:true})),h("label",null,"Age",h("select",{name:"age",required:true},h("option",null,"Please select"),a.map((function(t){return h("option",{value:t,selected:n.age===t},t)})))),h("input",{type:"hidden",value:n.state,name:"state"}),h("button",{type:"submit",class:"button"},"Send statement of interest")),h("p",null,"Or you can send an email yourself to ",h("a",{href:"mailto:"+o.email+"?subject=Becoming%20a%20Poll%20Worker",target:"_blank"},o.email),". Be sure to include your first and last name, city and county of residence, email, phone number, age, and any additional languages you speak other than English."),h("a",{class:"poll-worker-action",href:"mailto:"+o.email+"?subject=Becoming%20a%20Poll%20Worker",target:"_blank"},"Email your poll administrator directly"),h("hr",null))};var ptpInfoJurisdictionCss="ptp-info-jurisdiction button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}ptp-info-jurisdiction button:hover{opacity:0.8}ptp-info-jurisdiction button:focus{opacity:0.6}ptp-info-jurisdiction button:active{opacity:0.4}ptp-info-jurisdiction button:disabled{background-color:#aaa;color:#333;cursor:progress}ptp-info-jurisdiction button:disabled:hover,ptp-info-jurisdiction button:disabled:focus,ptp-info-jurisdiction button:disabled:active{opacity:1}ptp-info-jurisdiction form{font-size:1rem;padding:1em 0;letter-spacing:0}ptp-info-jurisdiction form input,ptp-info-jurisdiction form select{width:100%;padding:0.5em 0.75em;display:block}ptp-info-jurisdiction form select{padding:0.75em;height:auto}ptp-info-jurisdiction form label{margin-bottom:0.75em;display:block;font-size:0.9rem}ptp-info-jurisdiction form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ptp-info-jurisdiction form label .checkbox:first-of-type{margin-top:1.5em}ptp-info-jurisdiction form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}ptp-info-jurisdiction a.poll-worker-action{border:2px solid;padding:0.5em 1em;margin:2rem 0;font-size:1.2em;letter-spacing:0.05rem;display:block;text-align:center;font-weight:bold;text-decoration:none;text-transform:uppercase}ptp-info-jurisdiction a.poll-worker-action:hover{opacity:0.8}ptp-info-jurisdiction a.poll-worker-action:focus{opacity:0.6}ptp-info-jurisdiction a.poll-worker-action:active{opacity:0.4}ptp-info-jurisdiction a.poll-worker-action.cta{border:0;background-color:#444BFD;color:#F5F3F1}";var JurisdictionInfoComponent=function(){function t(t){registerInstance(this,t);this.isJurisdictionFilled=false;this.formData={};this.isMailToFormComplete=false;this.showNextSteps=false}t.prototype.componentWillLoad=function(){var t=this;this.formData=this.initialFormData||{};if(this.jurisdictionId){fetchJurisdictionInfo(this.jurisdictionId).then((function(e){return t.jurisdiction=e}));fetchJurisdictionGeoJson(this.jurisdictionId).then((function(e){return t.jurisdictionShape=e}))}};t.prototype.render=function(){var t=this;var e=this.jurisdiction;if(e==null){return h(Host,null,h("slot",null),h("ui-loading-spinner",null))}if(!e.name){return h(Host,null,h("h3",null,"Uh oh!"),h("p",null,"Unfortunately we're not able to retrieve jurisdiction"," ",h("strong",null,"#",this.jurisdictionId)," ","at this time"),h("p",null,"Please contact ",h("a",{href:"mailto:info@powerthepolls.org?subject=Error%20with%20jurisdiction%20"+this.jurisdictionId},"info@powerthepolls.org")," ","and let us know the zip code you've entered."))}var n=data[e.state.alpha];return h(Host,null,h("div",{style:{display:"flex",alignItems:"start",flexDirection:"column"}},h("ui-geojson-to-svg",{geoJson:this.jurisdictionShape,height:180,width:250})),h("h2",null,e.name,", ",e.state.alpha),e.jurisdiction_link_text&&e.jurisdiction_link&&h("p",null,e.jurisdiction_link_text," ",h(PtpLink,{path:"/jurisdiction/"+e.jurisdiction_link.id},"click here"),"."),h(CompleteApplicationButton,{jurisdiction:e}),(e===null||e===void 0?void 0:e.application)==null||(e===null||e===void 0?void 0:e.application)===""?n.usePhoneInsteadOfEmailForFormFallback?h(Fragment,null,h("p",null,n.name," is looking to quickly place poll workers in the coming weeks ahead of Election Day on November 3rd. ",h("strong",null,"In order to expedite placement, call your local election administrator directly to express your interest in being a poll worker.")),h("p",null,"To complete your application, call ",e.telephone,"."),h(CallToApplyButton,{jurisdiction:e})):!this.isMailToFormComplete&&h(EmailApplicationForm,{jurisdiction:e,data:this.formData,onComplete:function(){return t.isMailToFormComplete=true}}):null,h("slot",null),this.showNextSteps&&!this.isJurisdictionFilled?h(Fragment,null,h("div",{class:"next-steps"},(this.formData.state==="MI"?[function(){return h(Fragment,null,h("strong",null,"You'll hear from a partner in the next week")," about how you can help serve as a poll worker in Michigan.")},function(){return"In the meantime, learn more about hours, compensation, and requirements for your community below and encourage your friends and family to sign up to be poll workers and help ensure a safe and fair election!"}]:((e===null||e===void 0?void 0:e.application)==null||(e===null||e===void 0?void 0:e.application)==="")&&n&&n.usePhoneInsteadOfEmailForFormFallback?[function(){return h(Fragment,null,h("strong",null,"Complete your community's application by calling the number above!")," Learn more about hours, compensation, and requirements for your community below.")},function(){return"In the weeks leading up to the election, you will hear back from your local election administrators if you were selected to be a worker in your jurisdiction."},function(){return"Please encourage your friends and family to sign up to help ensure a safe and fair election!"}]:[function(){return h(Fragment,null,h("strong",null,"Complete your official application to be a poll worker!")," Learn more about hours, compensation, and requirements for your community below and be sure to complete your official application!")},n==null||!n.semiPartner?function(){return"In the weeks leading up to the election, you will hear back from your local election administrators if you were selected to be a worker in your jurisdiction."}:function(){return"We’ll be reaching out in the next week to answer any questions you have and make sure you’ve completed your application so we can help you become a poll worker. Be on the lookout for a call from our team!"},function(){return"Help us recruit more poll workers! Please encourage your friends and family to sign up to help ensure a safe and fair election!"}]).map((function(t,e){return h("p",null,h("span",{class:"number"},e+1),t())}))),h("hr",null)):null,h("section",null,h("h4",null,"Hours and Compensation"),!allNullOrEmpty(e===null||e===void 0?void 0:e.hours_start,e===null||e===void 0?void 0:e.hours_end,e===null||e===void 0?void 0:e.compensation,e===null||e===void 0?void 0:e.full_day_req)?h("ul",null,e.hours_start&&h("li",null,h("strong",null,"Start Time: "),e.hours_start),e.hours_end&&h("li",null,h("strong",null,"End Time: "),e.hours_end),e.compensation&&h("li",null,h("strong",null,"Compensation: "),e.compensation),e.full_day_req==="Y"?h("li",null,"You must work the full day"):null,e.full_day_req==="N"&&h("li",null,"Part-day poll worker shifts are available."),e.full_day_req.length>1&&h("li",null,e.full_day_req)):h("p",null,"Please contact your local election official for more information")),!isNullOrEmpty(e.registration_status)?h("section",null,h("h4",null,"Voter Registration Requirements"),h("ul",null,h("li",null,e.registration_status==="S"?"You can be registered to vote anywhere in the state to work on Election Day in "+e.name+".":e.registration_status==="J"?"You must be registered to vote in "+e.name+" to work on Election Day":e.registration_status))):null,h("section",null,h("h4",null,"Work Requirements"),!allNullOrEmpty(e===null||e===void 0?void 0:e.minimum_age,e===null||e===void 0?void 0:e.training,e===null||e===void 0?void 0:e.complete_training,e===null||e===void 0?void 0:e.training_note)?h("ul",null,e.minimum_age&&h("li",null,h("strong",null,"Minimum Age: "),e.minimum_age),e.training==="Y"&&h("li",null,"You must attend a training session."),e.training.length>1&&h("li",null,e.training),e.complete_training==="Y"&&h("li",null,"You must work the full day."),e.complete_training==="N"&&h("li",null,"Part-day poll worker shifts are available."),e.complete_training.length>1&&h("li",null,e.complete_training),e.training_note&&h("li",null,h("strong",null,"Training Details: "),e.training_note)):h("p",null,"Please contact your local election official for more information")),!allNullOrEmpty(e===null||e===void 0?void 0:e.further_notes,e===null||e===void 0?void 0:e.trusted_notes)?h("section",null,h("h4",null,"Further Notes"),h("p",null,e.further_notes),e.trusted_notes&&h("div",null,h("iframe",{sandbox:"allow-popups",width:"100%",height:"100%",frameBorder:"0",srcDoc:'<head><link href="/build/app.css" rel="stylesheet"></head><body>'+e.trusted_notes.replace(/\<a/g,'<a target="_blank"')+"</body>"}))):null,!allNullOrEmpty(e===null||e===void 0?void 0:e.telephone,e===null||e===void 0?void 0:e.email,e===null||e===void 0?void 0:e.office_address)&&!this.isJurisdictionFilled?h("section",null,h("h4",null,"Contact Information"),(e===null||e===void 0?void 0:e.telephone)&&h("p",null,h("strong",null,"Phone: "),h("a",{href:"tel:"+e.telephone},e.telephone)),(e===null||e===void 0?void 0:e.email)&&h("p",null,h("strong",null,"Email: "),h("a",{href:"mailto:"+e.email},e.email)),(e===null||e===void 0?void 0:e.office_address)&&h("p",null,h("strong",null,"Office Address: "),h("a",{target:"_blank",href:"https://www.google.com/maps/search/"+encodeURIComponent(e===null||e===void 0?void 0:e.office_address)},e===null||e===void 0?void 0:e.office_address))):null,e.website&&h("a",{class:"poll-worker-action",href:e.website,target:"_blank"},"Poll Worker Information"),e.student_website&&h("a",{class:"poll-worker-action",href:e.student_website,target:"_blank"},"Student Poll Worker Information"),(e===null||e===void 0?void 0:e.application)!==null&&(e===null||e===void 0?void 0:e.application)!==""?h(CompleteApplicationButton,{jurisdiction:e}):n.usePhoneInsteadOfEmailForFormFallback?h(CallToApplyButton,{jurisdiction:e}):null)};return t}();JurisdictionInfoComponent.style=ptpInfoJurisdictionCss;var PollWorkerInfo=function(){function t(t){registerInstance(this,t);this.isJurisdictionFilled=false;this.showNextSteps=false}t.prototype.render=function(){var t=this,e=t.state,n=t.county,i=t.city;var o=e?findJurisdictionId(e,n,i):null;return o!=null?h("ptp-info-jurisdiction",{isJurisdictionFilled:this.isJurisdictionFilled,jurisdictionId:o,initialFormData:this.formData||{city:i,state:e,county:n,jurisdictionId:o+""},showNextSteps:this.showNextSteps},h("slot",null)):h("ptp-info-state",{state:e},h("div",{style:{display:"none"}},h("slot",null)))};return t}();var ptpInfoStateCss="ptp-info-state button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}ptp-info-state button:hover{opacity:0.8}ptp-info-state button:focus{opacity:0.6}ptp-info-state button:active{opacity:0.4}ptp-info-state button:disabled{background-color:#aaa;color:#333;cursor:progress}ptp-info-state button:disabled:hover,ptp-info-state button:disabled:focus,ptp-info-state button:disabled:active{opacity:1}ptp-info-state form{font-size:1rem;padding:1em 0;letter-spacing:0}ptp-info-state form input,ptp-info-state form select{width:100%;padding:0.5em 0.75em;display:block}ptp-info-state form select{padding:0.75em;height:auto}ptp-info-state form label{margin-bottom:0.75em;display:block;font-size:0.9rem}ptp-info-state form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ptp-info-state form label .checkbox:first-of-type{margin-top:1.5em}ptp-info-state form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}ptp-info-state .jurisdictions{display:grid;grid-template-columns:50% 50%}ptp-info-state .jurisdictions a.jurisdiction{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;margin:0.5em;text-align:center;text-decoration:none;border:2px solid;padding:0.75em 0.5em}@media only screen and (max-width: 620px){ptp-info-state .jurisdictions{grid-template-columns:100%}}";var StateInfoComponent=function(){function t(t){registerInstance(this,t);this.stateId=null;this.stateJurisdictions=[]}t.prototype.componentWillLoad=function(){this.resetState()};t.prototype.onStateChanged=function(){this.resetState()};t.prototype.render=function(){var t=this.state;var e=this.stateInfo;if(t==="MI"){return h(Host,null,h("h2",null,"Michigan"),h("slot",null),h("h4",null,"Requirements"),h("p",null,"Requirements vary and are determined by cities and towns in Michigan, but all poll workers must be a registered Michigan voter or 16 or 17 years old residing in Michigan. While you can vote with a felony record, you cannot serve as a poll worker in Michigan if you have a felony or any infraction related to voting."),h("h4",null,"Hours & Compensation"),h("ul",null,h("li",null,"Serving as a poll worker is a paid position with a flat daily rate. Many cities are also providing hazard pay for poll workers who serve during the 2020 election."),h("li",null,"While hours vary, both by city and by position worked, most poll workers should expect to work long days, beginning before polls open at 7am and concluding after polls close at 8pm.")))}return e==null?h("ui-loading-spinner",null):h("div",null,h("h2",null,e.name),e.notes&&h("p",null,e.notes),h("div",{class:"jurisdictions"},this.stateJurisdictions.map((function(t){var e=t.id,n=t.name;return h(PtpLink,{path:"/jurisdiction/"+e,anchorClass:"jurisdiction"},n)}))))};t.prototype.resetState=function(){var t=this;this.stateId=this.state?findStateId(this.state):null;if(this.stateId){fetchStateJurisdictionsList(this.stateId).then((function(e){return t.stateJurisdictions=e}));fetchStateInfo(this.stateId).then((function(e){return t.stateInfo=e}))}else{this.stateInfo=undefined;this.stateJurisdictions=[]}};Object.defineProperty(t,"watchers",{get:function(){return{state:["onStateChanged"]}},enumerable:false,configurable:true});return t}();StateInfoComponent.style=ptpInfoStateCss;var explode=function(t){return t&&t.coordinates&&t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e,crs:t.crs}}))};var translateCoordinates=function(t,e,n){return t.map((function(t){return[(t[0]-n.xMin)*e,(n.yMax-t[1])*e]}))};function convertCoordinatesToPathString(t,e,n){return translateCoordinates(t,e,n).map((function(t){return t[0]+","+t[1]})).join(" ")}function Point(t,e,n,i){var o=i&&i.pointRadius?i.pointRadius:1;var r=!!(i&&i.pointAsCircle);var a=convertCoordinatesToPathString([t.coordinates],e,n);return r?[a]:["M"+a+" m"+-o+",0"+" a"+o+","+o+" 0 1,1 "+2*o+","+0+" a"+o+","+o+" 0 1,1 "+-2*o+","+0]}function MultiPoint(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return Point(t,e,n,i)[0]}));return!o?[r.join(" ")]:r}function LineString(t,e,n,i){return["M"+convertCoordinatesToPathString(t.coordinates,e,n)]}function MultiLineString(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return LineString(t,e,n)[0]}));return!o?[r.join(" ")]:r}function Polygon(t,e,n,i){var o=convertCoordinatesToPathString(t.coordinates[0],e,n);if(t.coordinates.length>1){var r=t.coordinates.slice(1,t.coordinates.length);if(r){for(var a=0;a<r.length;a++){o+=" M"+convertCoordinatesToPathString(r[a],e,n)}}}return["M"+o+"Z"]}function MultiPolygon(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return Polygon(t,e,n)[0]}));return!o?[r.join(" ").replace(/Z/g,"")+"Z"]:r}var GeoJsonToPath=Object.freeze({__proto__:null,Point:Point,MultiPoint:MultiPoint,LineString:LineString,MultiLineString:MultiLineString,Polygon:Polygon,MultiPolygon:MultiPolygon});var GeoJsonRenderer=function(){function t(t){if(t===void 0){t={scale:1}}this.options=t;this.options.bounds=this.options.bounds||{xMin:-20037508.342789244,xMax:20037508.342789244,yMin:-20037508.342789244,yMax:20037508.342789244}}t.prototype.convert=function(t,e){var n=Object.assign(Object.assign({},this.options),e||{});var i=[];switch(t.type){case"FeatureCollection":for(var o=0;o<t.features.length;o++){i=__spreadArrays(i,this.convertFeature(t.features[o],n))}break;case"Feature":i=this.convertFeature(t,n);break;case"GeometryCollection":for(var o=0;o<t.geometries.length;o++){i=__spreadArrays(i,this.convertGeometry(t.geometries[o],n))}break;default:i=this.convertGeometry(t,n);break}return i};t.prototype.convertFeature=function(t,e){var n=t===null||t===void 0?void 0:t.geometry;if(n==null){return[]}var i=Object.assign(Object.assign({},this.options),e||{});if(i.attributes&&i.attributes instanceof Array){i.attributes=i.attributes.reduce((function(e,n){if(typeof n==="string"){var i=void 0;var o=n.split(".").pop();try{i=valueAt(t,n)}catch(r){i=false}if(i){e[o]=i}}else if(typeof n==="object"&&n.type&&n.property){if(n.type==="dynamic"){var i=void 0;var o=n.key?n.key:n.property.split(".").pop();try{i=valueAt(t,n.property)}catch(r){i=false}if(i){e[o]=i}}else if(n.type==="static"&&n.value){e[n.property]=n.value}}return e}),{})}else{i.attributes=i.attributes||{}}var o=i.attributes;var r=o.id||t.id||(t.properties&&t.properties.id?t.properties.id:null);if(r){o.id=r}i.attributes=o;return this.convertGeometry(n,i)};t.prototype.convertGeometry=function(t,e){if(isDrawable(t)){var n=Object.assign(Object.assign({},this.options),e||{});var i=n.output||"svg";var o=GeoJsonToPath[t.type](t,this.options.scale,this.options.bounds,n);if(i==="svg"){var r=o.map((function(e){return pathToSvgJson(e,t.type,n.attributes,n)}));var a=r.map((function(e){return jsonToSvgElement(e,t.type,n)}));return a}else{return o}}return[]};return t}();function isDrawable(t){return t.type in GeoJsonToPath}function pathToSvgJson(t,e,n,i){var o={};var r=!!(i&&i.pointAsCircle);if((e==="Point"||e==="MultiPoint")&&r){o.cx=t.split(",")[0];o.cy=t.split(",")[1];o.r=i&&i.pointRadius?i.pointRadius:"1"}else{o={d:t};if(e==="Polygon"||e==="MultiPolygon"){o["fill-rule"]="evenodd"}}for(var a in n){if(n.hasOwnProperty(a)){o[a]=n[a]}}return o}function jsonToSvgElement(t,e,n){var i=!!(n&&n.pointAsCircle);var o=(e==="Point"||e==="MultiPoint")&&i?"<circle":"<path";for(var r in t){if(t.hasOwnProperty(r)){o+=" "+r+'="'+t[r]+'"'}}o+="/>";return o}function valueAt(t,e){return e.split(".").reduce((function(t,e,n,i){if(t.hasOwnProperty(e)){return t[e]}else{throw new Error(i.slice(0,n+1).join(".")+" is not a valid property path")}}),t)}var mercator=function(t,e){var n=6378137;var i=85.0511287798;var o=Math.PI/180;var r={x:n*t*o,y:Math.max(Math.min(i,e),-i)*o};r.y=n*Math.log(Math.tan(Math.PI/4+r.y/2));return r};var uiGeojsonToSvgCss="path{fill:rgba(204, 204, 204, 0.8);stroke-width:1px}";var UiGeojsonToSvg=function(){function t(t){registerInstance(this,t);this.width=200;this.height=200;if(this.geoJson==null){this.renderer=new GeoJsonRenderer(this.options)}else{this.updateProjectedGeoJson();this.resetRenderer()}}t.prototype.render=function(){try{var t=this.projectedGeoJson;return t&&h(Host,{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="'+this.width+'" height="'+this.height+'">\n '+this.renderer.convert(t,this.options).join("\n")+"\n </svg>"})}catch(e){console.error(e);return null}};t.prototype.geoJsonChanged=function(){this.updateProjectedGeoJson();this.resetRenderer()};t.prototype.widthChanged=function(){this.resetRenderer()};t.prototype.heightChanged=function(){this.resetRenderer()};t.prototype.optionsChanged=function(){this.resetRenderer()};t.prototype.resetRenderer=function(){var t=this.projectedGeoJson;if(t!=null){var e=this.getBoundingBox(t);var n=this.calculateScale(e,{width:this.width,height:this.height});this.renderer=new GeoJsonRenderer(Object.assign(Object.assign({},this.options),{bounds:{yMax:e.yMax,xMax:e.xMax,yMin:e.yMin,xMin:e.xMin},scale:n}))}};t.prototype.updateProjectedGeoJson=function(){var t=this.geoJson;if(!isNullOrEmpty(t)){try{var e=explode(t)[0];var n=e.coordinates[0];for(var i=0;i<n.length;i++){var o=n[i][0];var r=n[i][1];var a=mercator(o,r);n[i]=[a.x,a.y]}this.projectedGeoJson=e}catch(s){console.log({status:"ERROR",data:t,error:s})}}};t.prototype.getBoundingBox=function(t){var e={xMin:Number.MAX_VALUE,xMax:Number.MIN_SAFE_INTEGER,yMin:Number.MAX_VALUE,yMax:Number.MIN_SAFE_INTEGER};var n=t.coordinates[0];for(var i=0;i<n.length;i++){var o=n[i][0];var r=n[i][1];e.xMin=e.xMin<o?e.xMin:o;e.xMax=e.xMax>o?e.xMax:o;e.yMin=e.yMin<r?e.yMin:r;e.yMax=e.yMax>r?e.yMax:r}return e};t.prototype.calculateScale=function(t,e,n){var i=e.width/Math.abs(t.xMax-t.xMin);var o=e.height/Math.abs(t.yMax-t.yMin);if(n){return n==="width"?i:n==="height"?o:n==="larger"?Math.max(i,i):Math.min(i,o)}return Math.min(i,o)};Object.defineProperty(t,"watchers",{get:function(){return{geoJson:["geoJsonChanged"],width:["widthChanged"],height:["heightChanged"],options:["optionsChanged"]}},enumerable:false,configurable:true});return t}();UiGeojsonToSvg.style=uiGeojsonToSvgCss;var uiLoadingSpinnerCss=":host .cube-grid{width:40px;height:40px;margin:100px auto}:host .cube-grid .cube{width:33%;height:33%;float:left;background-color:#000;-webkit-animation:cube-delay 1.3s infinite ease-in-out;animation:cube-delay 1.3s infinite ease-in-out}:host .cube-grid .cube1{-webkit-animation-delay:0.2s;animation-delay:0.2s}:host .cube-grid .cube2{-webkit-animation-delay:0.3s;animation-delay:0.3s}:host .cube-grid .cube3{-webkit-animation-delay:0.4s;animation-delay:0.4s}:host .cube-grid .cube4{-webkit-animation-delay:0.1s;animation-delay:0.1s}:host .cube-grid .cube5{-webkit-animation-delay:0.2s;animation-delay:0.2s}:host .cube-grid .cube6{-webkit-animation-delay:0.3s;animation-delay:0.3s}:host .cube-grid .cube7{-webkit-animation-delay:0s;animation-delay:0s}:host .cube-grid .cube8{-webkit-animation-delay:0.1s;animation-delay:0.1s}:host .cube-grid .cube9{-webkit-animation-delay:0.2s;animation-delay:0.2s}:host .spinner,:host .spinner:after{border-radius:50%;width:2em;height:2em;display:inline-block;vertical-align:middle}:host .spinner{margin:0;font-size:10px;position:relative;text-indent:-9999em;border:0.5em solid rgba(255, 255, 255, 0.2);border-left:0.5em solid #ffffff;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-animation:spinner-rotate 1.1s infinite linear;animation:spinner-rotate 1.1s infinite linear}@-webkit-keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes cube-delay{0%,70%,100%{-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}35%{-webkit-transform:scale3D(0, 0, 1);transform:scale3D(0, 0, 1)}}@keyframes cube-delay{0%,70%,100%{-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}35%{-webkit-transform:scale3D(0, 0, 1);transform:scale3D(0, 0, 1)}}";var LoadingSpinner=function(){function t(t){registerInstance(this,t);this.small=false}t.prototype.render=function(){return this.small?h("div",{class:"spinner"}):h("div",{class:{"cube-grid":true}},__spreadArrays(new Array(9).keys()).map((function(t){return h("div",{class:"cube cube"+t,part:"cube"})})))};return t}();LoadingSpinner.style=uiLoadingSpinnerCss;export{AddressInput as input_address,PossiblyHiddenSelect as input_possibly_hidden_select,PowerThePollsForm as power_the_polls_form,JurisdictionInfoComponent as ptp_info_jurisdiction,PollWorkerInfo as ptp_info_poll_worker,StateInfoComponent as ptp_info_state,UiGeojsonToSvg as ui_geojson_to_svg,LoadingSpinner as ui_loading_spinner}; | ||
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,r){function a(t){try{l(i.next(t))}catch(e){r(e)}}function s(t){try{l(i["throw"](t))}catch(e){r(e)}}function l(t){t.done?n(t.value):o(t.value).then(a,s)}l((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,o,r,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(t){return function(e){return l([t,e])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,o&&(r=a[0]&2?o["return"]:a[0]?o["throw"]||((r=o["return"])&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;if(o=0,r)a=[a[0]&2,r.value];switch(a[0]){case 0:case 1:r=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;o=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(r=n.trys,r=r.length>0&&r[r.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!r||a[1]>r[0]&&a[1]<r[3])){n.label=a[1];break}if(a[0]===6&&n.label<r[1]){n.label=r[1];r=a;break}if(r&&n.label<r[2]){n.label=r[2];n.ops.push(a);break}if(r[2])n.ops.pop();n.trys.pop();continue}a=e.call(t,n)}catch(s){a=[6,s];o=0}finally{i=r=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};var __spreadArrays=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e<n;e++)t+=arguments[e].length;for(var i=Array(t),o=0,e=0;e<n;e++)for(var r=arguments[e],a=0,s=r.length;a<s;a++,o++)i[o]=r[a];return i};import{r as registerInstance,c as createEvent,h,H as Host,F as Fragment}from"./index-d1c0464b.js";import{t as toQueryString,f as findIfJurisdictionFilled,F as FormSubmissionThankYou,P as PtpLink,d as data,c as findJurisdictionId,T as TextInput,e as fetchJurisdictionInfo,g as fetchJurisdictionGeoJson,b as allNullOrEmpty,i as isNullOrEmpty,h as findStateId,j as fetchStateJurisdictionsList,k as fetchStateInfo}from"./WorkElections-dfe6a991.js";var ZipGeocode=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e;return __generator(this,(function(n){e=new URL("https"+"://smartystreet.powerthepolls.org/dev/zip");e.searchParams.append("zipcode",t);return[2,fetch(e.toString()).then((function(t){return t.json()}),(function(t){return console.log("SmartyStreets Error:",t)})).then((function(t){var e=t[0];if(e.reason){return{error:e.reason}}var n=new Set;var i=new Set;var o=new Map;var r=e.zipcodes[0];if(e.city_states){e.city_states.forEach((function(t){return n.add(t.city)}))}i.add(r.county_name);o.set(r.state_abbreviation,r.state);if(r.alternate_counties){r.alternate_counties.forEach((function(t){i.add(t.county_name);o.set(t.state_abbreviation,t.state)}))}return{zip:r.zipcode,cities:n,counties:i,states:o}}))]}))}))};var AddressInput=function(){function t(t){registerInstance(this,t);this.onLookup=createEvent(this,"lookup",6);this.m_state="COMPLETED";this.zipValue="";this.cityValue="";this.countyValue="";this.stateValue="";this.cityOptions=new Set;this.countyOptions=new Set;this.stateOptions=new Map}t.prototype.state=function(){return Promise.resolve(this.m_state)};t.prototype.render=function(){var t=this;var e=/^\d{5}$/;var n=function(n){t.zipValue=n.target.value;if(e.test(t.zipValue)){t.m_state="STARTED";t.onLookup.emit(t.m_state);ZipGeocode(t.zipValue).then((function(e){if("error"in e){console.log(e.error)}else{t.cityOptions=e.cities;t.cityValue=t.cityOptions.values().next().value;t.countyOptions=e.counties;t.countyValue=t.countyOptions.values().next().value;t.stateOptions=e.states;t.stateValue=t.stateOptions.keys().next().value}t.m_state="COMPLETED";t.onLookup.emit(t.m_state)}))}};return h(Host,null,h("label",null,"ZIP",h("input",{name:"zip",required:true,value:this.zipValue,pattern:"\\d{5}",maxLength:5,title:"Please enter a valid ZIP code",onInput:n})),h("input-possibly-hidden-select",{fieldLabel:"City",name:"city",selected:this.cityValue,options:this.cityOptions}),h("input-possibly-hidden-select",{fieldLabel:"County",name:"user_county",selected:this.countyValue,options:this.countyOptions}),h("input-possibly-hidden-select",{fieldLabel:"State",name:"state",selected:this.stateValue,options:this.stateOptions}))};return t}();var PossiblyHiddenSelect=function(){function t(t){registerInstance(this,t);this.fieldLabel="";this.name="";this.selected="";this.options=new Set}t.prototype.render=function(){var t=this;if(this.options.size<=1){return h("input",{name:this.name,type:"hidden",value:this.selected})}else{return h("label",null,this.fieldLabel,h("select",{name:this.name,required:true},__spreadArrays(this.options.entries()).map((function(e){var n=e[0],i=e[1];return h("option",{value:n,selected:t.selected===n},i)}))))}};return t}();var submitToActionKit=function(t){return __awaiter(void 0,void 0,void 0,(function(){var e,n;var i;return __generator(this,(function(o){switch(o.label){case 0:return[4,fetch("https"+"://ptp.actionkit.com/rest/v1/action/",{method:"POST",body:toQueryString(t),mode:"no-cors",headers:{"Content-Type":"application/x-www-form-urlencoded"}})];case 1:e=o.sent();if(!(e.status===200||e.status===201||e.status===0))return[3,2];return[2,true];case 2:o.trys.push([2,4,,5]);i={statusText:e.statusText,status:e.status};return[4,e.json()];case 3:return[2,(i.data=o.sent(),i)];case 4:n=o.sent();return[2,{statusText:e.statusText,status:e.status}];case 5:return[2]}}))}))};var MichiganAdditionalInfoForm=function(t){var e=t.data,n=t.formSubmitted,i=t.onSubmit;var o=function(t){try{var e=t.target;var n=__spreadArrays(e.getElementsByTagName("input"),e.getElementsByTagName("select"));submitToActionKit(n.reduce((function(t,e){t[e.name]=e.value;return t}),{})).then((function(t){if(t!==true){console.error(t)}}));i()}catch(t){console.error(t)}finally{t.preventDefault();return false}};var r=["Not willing to travel","Less than 10 miles","Less than 50 miles","I'll go wherever I'm needed"];return e.state==="MI"&&!n?h(Fragment,null,h("p",null,"We are sharing your information with election administrators and our state partners who will follow up to help you be placed as a poll worker! ",h("strong",null,"We just need a few more pieces of information from you to help with your application:")),h("form",{onSubmit:o,style:{padding:"0"}},h("input",{type:"hidden",name:"city",value:e===null||e===void 0?void 0:e.city}),h("input",{type:"hidden",name:"state",value:e===null||e===void 0?void 0:e.state}),h("input",{type:"hidden",name:"zip",value:e===null||e===void 0?void 0:e.zip}),h("label",null,"Street address",h("input",{type:"text",required:true,name:"address1"})),h("label",null,"Are you fluent in a language besides English?",h("input",{type:"text",required:true,name:"user_additional_language",value:"English only"})),h("label",null,"In Michigan, eligible poll workers can serve anywhere in the state. Are you willing to travel, and if so, how far can you travel?",h("select",{name:"user_mi_travel",required:true},r.map((function(t){return h("option",{value:t},t)})))),h("input",{type:"hidden",name:"page",value:"mi-extra"}),h("input",{type:"hidden",name:"email",value:e===null||e===void 0?void 0:e.email}),h("button",{type:"submit",class:"button"},"Complete application")),h("hr",null)):null};var powerThePollsFormCss='power-the-polls-form{display:block;-webkit-box-sizing:border-box;box-sizing:border-box}power-the-polls-form *{-webkit-box-sizing:border-box;box-sizing:border-box}power-the-polls-form h3{margin-top:1em}power-the-polls-form button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}power-the-polls-form button:hover{opacity:0.8}power-the-polls-form button:focus{opacity:0.6}power-the-polls-form button:active{opacity:0.4}power-the-polls-form button:disabled{background-color:#aaa;color:#333;cursor:progress}power-the-polls-form button:disabled:hover,power-the-polls-form button:disabled:focus,power-the-polls-form button:disabled:active{opacity:1}power-the-polls-form form{font-size:1rem;padding:1em 0;letter-spacing:0}power-the-polls-form form input,power-the-polls-form form select{width:100%;padding:0.5em 0.75em;display:block}power-the-polls-form form select{padding:0.75em;height:auto}power-the-polls-form form label{margin-bottom:0.75em;display:block;font-size:0.9rem}power-the-polls-form form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}power-the-polls-form form label .checkbox:first-of-type{margin-top:1.5em}power-the-polls-form form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}power-the-polls-form p.disclaimer{font-size:0.9rem;font-weight:normal}power-the-polls-form .next-steps p{clear:left}power-the-polls-form .next-steps p .number{margin:0 0.5em 0.5em 0;border-style:solid;border-width:2px;padding:0.25em;display:block;width:2.2em;text-align:center;font-size:1.6em;font-weight:bold;float:left}@media only screen and (max-width: 620px){power-the-polls-form .next-steps p .number{float:none}}power-the-polls-form .next-steps::after{content:"";display:block;clear:both}';var PowerThePollsForm=function(){function t(t){registerInstance(this,t);this.submitCompleted=createEvent(this,"submitCompleted",6);this.submitError=createEvent(this,"submitError",6);this.formStatus="incomplete";this.formData={};this.michiganFormSubmitted=false}t.prototype.reset=function(){this.formStatus="incomplete";this.formData={};this.michiganFormSubmitted=false;return Promise.resolve()};t.prototype.version=function(){return Promise.resolve("1.1.6-beta.5")};t.prototype.render=function(){var t=this;var e=this.partnerId;var n=this.optUserOutOfChase===true||this.optUserOutOfChase==="true"?false:true;var i=this.customFormFieldLabel;var o=this.formData.state&&this.formData.state in data?data[this.formData.state]:null;var r="(?:\\+1)?[-.\\s]?\\(?([0-9]{3})\\)?[-.\\s]?[0-9]{3}[-.\\s]?[0-9]{4}";var a=function(e){if(t.formStatus!=="incomplete"){e.preventDefault();return false}try{var n=e.target;var i=__spreadArrays(n.getElementsByTagName("input"),n.getElementsByTagName("select"));var o=i.reduce((function(t,e){t[e.name]=e.value;return t}),{});var r=o.city||"";var a=o.user_county||"";var s=o.state||"";var l=o.name||"";var u=o.email||"";var c=o.mobile_phone||"";var p=o.zip||"";t.formStatus="processing";submitToActionKit(o).then((function(e){if(e===true){var n=t.submitCompleted.emit();if(!n.defaultPrevented){t.formStatus="completed";t.formData=Object.assign(Object.assign({},t.formData),{city:r,county:a,state:s,name:l,email:u,phone:c,zip:p,jurisdictionId:findJurisdictionId(s,a,r)+""})}}else{t.submitError.emit(e)}})).catch((function(e){t.submitError.emit(e)}))}catch(e){t.submitError.emit(e)}finally{e.preventDefault();return false}};var s=findIfJurisdictionFilled(this.formData);return h(Host,null,this.formStatus==="completed"?h("article",null,h(FormSubmissionThankYou,{stateInfo:o,isJurisdictionFilled:s}),(o===null||o===void 0?void 0:o.noPollWorkersNeeded)!==true&&h("ptp-info-poll-worker",{city:this.formData.city,county:this.formData.county,state:this.formData.state,formData:this.formData,showNextSteps:true,isJurisdictionFilled:s},h(MichiganAdditionalInfoForm,{formSubmitted:this.michiganFormSubmitted,data:this.formData,onSubmit:function(){return t.michiganFormSubmitted=true}}))):h(Fragment,null,h("h3",null,"Help your community and sign up to Power the Polls!"),h("form",{onSubmit:a},h("label",null,"Name",h("input",{type:"text",required:true,name:"name"})),h("label",null,"Email address",h("input",{type:"email",required:true,name:"email"})),h("label",null,"Mobile phone",h("input",{type:"tel",required:true,name:"mobile_phone",pattern:r,title:"Please enter a valid US phone number"})),i?h("label",null,i,h("input",{type:"text",name:"user_partner_field"})):null,h("input-address",{onLookup:function(e){return t.formStatus=e.detail==="STARTED"?"processing":"incomplete"}}),h("input",{type:"hidden",name:"source",id:"id_source",value:e}),h("input",{type:"hidden",name:"user_chase_enabled",value:n?"true":""}),h("input",{type:"hidden",name:"country",value:"United States"}),h("input",{type:"hidden",name:"page",value:"join"}),h("input",{type:"hidden",name:"utf8",value:"ሴ"}),h("input",{type:"hidden",name:"js",value:"1"}),h("button",{type:"submit",class:"button",disabled:this.formStatus!=="incomplete"},this.formStatus!=="incomplete"?h("ui-loading-spinner",{small:true,style:{padding:"0 0.5em"}}):null,"Sign Up To Get Started"),h("p",{class:"disclaimer"},"By signing up, you agree to receive occasional emails or text messages from Power the Polls and ",!n&&this.partnerName&&this.partnerName+" and ","accept our ",h(PtpLink,{path:"/privacy"},"Privacy Policy"),". You can unsubscribe at any time. For texts, message and data rates may apply. Text HELP for Info. Text STOP to quit.")),h("footer",null,h("p",{class:"disclaimer"},h("a",{href:"https://www.workelections.com/",target:"_blank",rel:"noopener"},"Powered by Work Elections.")))))};return t}();PowerThePollsForm.style=powerThePollsFormCss;var CallToApplyButton=function(t){var e=t.jurisdiction;return h("a",{class:"poll-worker-action cta",href:"tel:"+e.telephone},h("svg",{width:"16",height:"16",viewBox:"0 0 16 16",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},h("g",{stroke:"none","stroke-width":"1",fill:"none","fill-rule":"evenodd"},h("g",{fill:"#1C1834"},h("path",{d:"M7.08911391,5.07058199 C7.50359444,4.51207076 7.65223464,3.92345058 7.18343403,3.40387938 C6.13150467,1.93204497 5.42403175,1.02186547 4.98026318,0.583550019 C4.13662208,-0.249749291 2.74880429,-0.137032747 2.01813934,0.582838091 C1.62569083,0.969486796 1.49283466,1.1022653 1.08988214,1.51151171 C-1.15464397,3.75701149 0.214185005,8.50394506 3.85302172,12.1459749 C7.49103443,15.7872048 12.2380006,17.1565857 14.4872035,14.9063344 C14.859044,14.5478908 15.1738444,14.2329628 15.4221647,13.9705095 C16.1381656,13.2137864 16.2468858,11.8873612 15.4174447,11.0256088 C14.9922441,10.5838137 14.124163,9.9105221 12.590241,8.8134336 C12.1204804,8.39339629 11.5634397,8.48442704 11.052719,8.81943299 C10.8071187,8.98061661 10.6283185,9.14356005 10.2907181,9.48144571 L9.67775726,10.0947434 C9.59703715,10.1755352 8.50071573,9.62655096 7.43647436,8.56137922 C6.37168898,7.49564753 5.82303227,6.39937495 5.90339237,6.31903111 L6.51679317,5.70533348 C6.6239133,5.59814438 6.67511337,5.54624565 6.74079346,5.47723667 C6.87759363,5.33346728 6.99087378,5.20300054 7.08911391,5.07058199 Z M10.8084787,11.2259884 L11.4215995,10.6126107 C11.6074398,10.4266297 11.7278399,10.3123213 11.82576,10.2335293 C13.1695218,11.1983912 13.9476828,11.8050496 14.2656032,12.135336 C14.4564034,12.3335558 14.4268034,12.6953591 14.2608832,12.8707013 C14.0312829,13.1133166 13.7329625,13.4117663 13.366882,13.7648504 C11.9124802,15.2197425 8.08063519,14.1142549 4.98401518,11.0149699 C1.88642717,7.91464495 0.78140974,4.08259441 2.22486761,2.63850117 C2.62619613,2.23093459 2.75334829,2.10385951 3.14018879,1.72272224 C3.28523698,1.57982477 3.68032549,1.54773203 3.85677372,1.72201032 C4.19842216,2.05948002 4.83218298,2.87087755 5.76448019,4.16941758 C5.71621613,4.22933149 5.65593605,4.29703661 5.58257596,4.37412478 C5.52873589,4.43071103 5.48387983,4.4761784 5.3858157,4.57432843 L4.77299891,5.18741812 C3.73047756,6.22974419 4.61832671,8.00375589 6.30548889,9.69238427 C7.99151507,11.3798928 9.76631737,12.2686024 10.8084787,11.2259884 Z",id:"icon"}))))," ","Call ",e.telephone," to finish applying")};var CompleteApplicationButton=function(t){var e=t.jurisdiction;return(e===null||e===void 0?void 0:e.application)&&(e===null||e===void 0?void 0:e.application)!==""&&h("a",{class:"poll-worker-action cta",href:e.application,target:"_blank"},"Complete your application")};var EmailApplicationForm=function(t){var e=t.jurisdiction,n=t.data,i=t.onComplete;var o=e;if((o===null||o===void 0?void 0:o.email)==null||o.email===""){return}var r=function(t){try{fetch("https://smartystreet.powerthepolls.org/dev/electmail",{method:"POST",body:JSON.stringify(n),headers:{"Content-Type":"application/json"}}).then((function(t){console.log("Email sending "+t.statusText+" ("+t.status+")");i()})).catch((function(t){return console.error(t)}))}finally{t.preventDefault();return false}};var a=["18 and under","19 to 25","26 to 35","36 to 50","51 to 64","65 and older"];return h(Fragment,null,h("h3",null,"Send statement of interest"),h("p",null,"You need to email your local jurisdiction directly in order to apply to be a poll worker. This form generates an email that is sent to your local election administrator on your behalf."),h("form",{onSubmit:r,style:{padding:"0"}},h("label",null,"Name",h(TextInput,{data:n,field:"name",required:true})),h("label",null,"City",h(TextInput,{data:n,field:"city",required:true})),h("label",null,"County",h(TextInput,{data:n,field:"county",required:true})),h("label",null,"Email",h(TextInput,{data:n,field:"email",required:true})),h("label",null,"Phone Number",h(TextInput,{data:n,field:"phone",required:true})),h("label",null,"What languages do you speak other than English?",h(TextInput,{data:n,field:"languages",initialValue:"English only",required:true})),h("label",null,"Age",h("select",{name:"age",required:true},h("option",null,"Please select"),a.map((function(t){return h("option",{value:t,selected:n.age===t},t)})))),h("input",{type:"hidden",value:n.state,name:"state"}),h("button",{type:"submit",class:"button"},"Send statement of interest")),h("p",null,"Or you can send an email yourself to ",h("a",{href:"mailto:"+o.email+"?subject=Becoming%20a%20Poll%20Worker",target:"_blank"},o.email),". Be sure to include your first and last name, city and county of residence, email, phone number, age, and any additional languages you speak other than English."),h("a",{class:"poll-worker-action",href:"mailto:"+o.email+"?subject=Becoming%20a%20Poll%20Worker",target:"_blank"},"Email your poll administrator directly"),h("hr",null))};var ptpInfoJurisdictionCss="ptp-info-jurisdiction button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}ptp-info-jurisdiction button:hover{opacity:0.8}ptp-info-jurisdiction button:focus{opacity:0.6}ptp-info-jurisdiction button:active{opacity:0.4}ptp-info-jurisdiction button:disabled{background-color:#aaa;color:#333;cursor:progress}ptp-info-jurisdiction button:disabled:hover,ptp-info-jurisdiction button:disabled:focus,ptp-info-jurisdiction button:disabled:active{opacity:1}ptp-info-jurisdiction form{font-size:1rem;padding:1em 0;letter-spacing:0}ptp-info-jurisdiction form input,ptp-info-jurisdiction form select{width:100%;padding:0.5em 0.75em;display:block}ptp-info-jurisdiction form select{padding:0.75em;height:auto}ptp-info-jurisdiction form label{margin-bottom:0.75em;display:block;font-size:0.9rem}ptp-info-jurisdiction form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ptp-info-jurisdiction form label .checkbox:first-of-type{margin-top:1.5em}ptp-info-jurisdiction form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}ptp-info-jurisdiction a.poll-worker-action{border:2px solid;padding:0.5em 1em;margin:2rem 0;font-size:1.2em;letter-spacing:0.05rem;display:block;text-align:center;font-weight:bold;text-decoration:none;text-transform:uppercase}ptp-info-jurisdiction a.poll-worker-action:hover{opacity:0.8}ptp-info-jurisdiction a.poll-worker-action:focus{opacity:0.6}ptp-info-jurisdiction a.poll-worker-action:active{opacity:0.4}ptp-info-jurisdiction a.poll-worker-action.cta{border:0;background-color:#444BFD;color:#F5F3F1}";var JurisdictionInfoComponent=function(){function t(t){registerInstance(this,t);this.isJurisdictionFilled=false;this.formData={};this.isMailToFormComplete=false;this.showNextSteps=false}t.prototype.componentWillLoad=function(){var t=this;this.formData=this.initialFormData||{};if(this.jurisdictionId){fetchJurisdictionInfo(this.jurisdictionId).then((function(e){return t.jurisdiction=e}));fetchJurisdictionGeoJson(this.jurisdictionId).then((function(e){return t.jurisdictionShape=e}))}};t.prototype.render=function(){var t=this;var e=this.jurisdiction;if(e==null){return h(Host,null,h("slot",null),h("ui-loading-spinner",null))}if(!e.name){return h(Host,null,h("h3",null,"Uh oh!"),h("p",null,"Unfortunately we're not able to retrieve jurisdiction"," ",h("strong",null,"#",this.jurisdictionId)," ","at this time"),h("p",null,"Please contact ",h("a",{href:"mailto:info@powerthepolls.org?subject=Error%20with%20jurisdiction%20"+this.jurisdictionId},"info@powerthepolls.org")," ","and let us know the zip code you've entered."))}var n=data[e.state.alpha];return h(Host,null,h("div",{style:{display:"flex",alignItems:"start",flexDirection:"column"}},h("ui-geojson-to-svg",{geoJson:this.jurisdictionShape,height:180,width:250})),h("h2",null,e.name,", ",e.state.alpha),e.jurisdiction_link_text&&e.jurisdiction_link&&h("p",null,e.jurisdiction_link_text," ",h(PtpLink,{path:"/jurisdiction/"+e.jurisdiction_link.id},"click here"),"."),h(CompleteApplicationButton,{jurisdiction:e}),(e===null||e===void 0?void 0:e.application)==null||(e===null||e===void 0?void 0:e.application)===""?n.usePhoneInsteadOfEmailForFormFallback?h(Fragment,null,h("p",null,n.name," is looking to quickly place poll workers in the coming weeks ahead of Election Day on November 3rd. ",h("strong",null,"In order to expedite placement, call your local election administrator directly to express your interest in being a poll worker.")),h("p",null,"To complete your application, call ",e.telephone,"."),h(CallToApplyButton,{jurisdiction:e})):!this.isMailToFormComplete&&h(EmailApplicationForm,{jurisdiction:e,data:this.formData,onComplete:function(){return t.isMailToFormComplete=true}}):null,h("slot",null),this.showNextSteps&&!this.isJurisdictionFilled?h(Fragment,null,h("div",{class:"next-steps"},(this.formData.state==="MI"?[function(){return h(Fragment,null,h("strong",null,"You'll hear from a partner in the next week")," about how you can help serve as a poll worker in Michigan.")},function(){return"In the meantime, learn more about hours, compensation, and requirements for your community below and encourage your friends and family to sign up to be poll workers and help ensure a safe and fair election!"}]:((e===null||e===void 0?void 0:e.application)==null||(e===null||e===void 0?void 0:e.application)==="")&&n&&n.usePhoneInsteadOfEmailForFormFallback?[function(){return h(Fragment,null,h("strong",null,"Complete your community's application by calling the number above!")," Learn more about hours, compensation, and requirements for your community below.")},function(){return"In the weeks leading up to the election, you will hear back from your local election administrators if you were selected to be a worker in your jurisdiction."},function(){return"Please encourage your friends and family to sign up to help ensure a safe and fair election!"}]:[function(){return h(Fragment,null,h("strong",null,"Complete your official application to be a poll worker!")," Learn more about hours, compensation, and requirements for your community below and be sure to complete your official application!")},n==null||!n.semiPartner?function(){return"In the weeks leading up to the election, you will hear back from your local election administrators if you were selected to be a worker in your jurisdiction."}:function(){return"We’ll be reaching out in the next week to answer any questions you have and make sure you’ve completed your application so we can help you become a poll worker. Be on the lookout for a call from our team!"},function(){return"Help us recruit more poll workers! Please encourage your friends and family to sign up to help ensure a safe and fair election!"}]).map((function(t,e){return h("p",null,h("span",{class:"number"},e+1),t())}))),h("hr",null)):null,h("section",null,h("h4",null,"Hours and Compensation"),!allNullOrEmpty(e===null||e===void 0?void 0:e.hours_start,e===null||e===void 0?void 0:e.hours_end,e===null||e===void 0?void 0:e.compensation,e===null||e===void 0?void 0:e.full_day_req)?h("ul",null,e.hours_start&&h("li",null,h("strong",null,"Start Time: "),e.hours_start),e.hours_end&&h("li",null,h("strong",null,"End Time: "),e.hours_end),e.compensation&&h("li",null,h("strong",null,"Compensation: "),e.compensation),e.full_day_req==="Y"?h("li",null,"You must work the full day"):null,e.full_day_req==="N"&&h("li",null,"Part-day poll worker shifts are available."),e.full_day_req.length>1&&h("li",null,e.full_day_req)):h("p",null,"Please contact your local election official for more information")),!isNullOrEmpty(e.registration_status)?h("section",null,h("h4",null,"Voter Registration Requirements"),h("ul",null,h("li",null,e.registration_status==="S"?"You can be registered to vote anywhere in the state to work on Election Day in "+e.name+".":e.registration_status==="J"?"You must be registered to vote in "+e.name+" to work on Election Day":e.registration_status))):null,h("section",null,h("h4",null,"Work Requirements"),!allNullOrEmpty(e===null||e===void 0?void 0:e.minimum_age,e===null||e===void 0?void 0:e.training,e===null||e===void 0?void 0:e.complete_training,e===null||e===void 0?void 0:e.training_note)?h("ul",null,e.minimum_age&&h("li",null,h("strong",null,"Minimum Age: "),e.minimum_age),e.training==="Y"&&h("li",null,"You must attend a training session."),e.training.length>1&&h("li",null,e.training),e.complete_training==="Y"&&h("li",null,"You must work the full day."),e.complete_training==="N"&&h("li",null,"Part-day poll worker shifts are available."),e.complete_training.length>1&&h("li",null,e.complete_training),e.training_note&&h("li",null,h("strong",null,"Training Details: "),e.training_note)):h("p",null,"Please contact your local election official for more information")),!allNullOrEmpty(e===null||e===void 0?void 0:e.further_notes,e===null||e===void 0?void 0:e.trusted_notes)?h("section",null,h("h4",null,"Further Notes"),h("p",null,e.further_notes),e.trusted_notes&&h("div",null,h("iframe",{sandbox:"allow-popups",width:"100%",height:"100%",frameBorder:"0",srcDoc:'<head><link href="/build/app.css" rel="stylesheet"></head><body>'+e.trusted_notes.replace(/\<a/g,'<a target="_blank"')+"</body>"}))):null,!allNullOrEmpty(e===null||e===void 0?void 0:e.telephone,e===null||e===void 0?void 0:e.email,e===null||e===void 0?void 0:e.office_address)&&!this.isJurisdictionFilled?h("section",null,h("h4",null,"Contact Information"),(e===null||e===void 0?void 0:e.telephone)&&h("p",null,h("strong",null,"Phone: "),h("a",{href:"tel:"+e.telephone},e.telephone)),(e===null||e===void 0?void 0:e.email)&&h("p",null,h("strong",null,"Email: "),h("a",{href:"mailto:"+e.email},e.email)),(e===null||e===void 0?void 0:e.office_address)&&h("p",null,h("strong",null,"Office Address: "),h("a",{target:"_blank",href:"https://www.google.com/maps/search/"+encodeURIComponent(e===null||e===void 0?void 0:e.office_address)},e===null||e===void 0?void 0:e.office_address))):null,e.website&&h("a",{class:"poll-worker-action",href:e.website,target:"_blank"},"Poll Worker Information"),e.student_website&&h("a",{class:"poll-worker-action",href:e.student_website,target:"_blank"},"Student Poll Worker Information"),(e===null||e===void 0?void 0:e.application)!==null&&(e===null||e===void 0?void 0:e.application)!==""?h(CompleteApplicationButton,{jurisdiction:e}):n.usePhoneInsteadOfEmailForFormFallback?h(CallToApplyButton,{jurisdiction:e}):null)};return t}();JurisdictionInfoComponent.style=ptpInfoJurisdictionCss;var PollWorkerInfo=function(){function t(t){registerInstance(this,t);this.isJurisdictionFilled=false;this.showNextSteps=false}t.prototype.render=function(){var t=this,e=t.state,n=t.county,i=t.city;var o=e?findJurisdictionId(e,n,i):null;return o!=null?h("ptp-info-jurisdiction",{isJurisdictionFilled:this.isJurisdictionFilled,jurisdictionId:o,initialFormData:this.formData||{city:i,state:e,county:n,jurisdictionId:o+""},showNextSteps:this.showNextSteps},h("slot",null)):h("ptp-info-state",{state:e},h("div",{style:{display:"none"}},h("slot",null)))};return t}();var ptpInfoStateCss="ptp-info-state button{border:0;padding:0.5em 1em;width:100%;text-transform:uppercase;background-color:#444BFD;color:#F5F3F1;font-size:1.2rem;letter-spacing:0.05rem;font-weight:bold;cursor:pointer;-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}ptp-info-state button:hover{opacity:0.8}ptp-info-state button:focus{opacity:0.6}ptp-info-state button:active{opacity:0.4}ptp-info-state button:disabled{background-color:#aaa;color:#333;cursor:progress}ptp-info-state button:disabled:hover,ptp-info-state button:disabled:focus,ptp-info-state button:disabled:active{opacity:1}ptp-info-state form{font-size:1rem;padding:1em 0;letter-spacing:0}ptp-info-state form input,ptp-info-state form select{width:100%;padding:0.5em 0.75em;display:block}ptp-info-state form select{padding:0.75em;height:auto}ptp-info-state form label{margin-bottom:0.75em;display:block;font-size:0.9rem}ptp-info-state form label .checkbox{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}ptp-info-state form label .checkbox:first-of-type{margin-top:1.5em}ptp-info-state form label .checkbox input{-webkit-transform:scale(1.5);transform:scale(1.5);-ms-flex:0 1 1.5em;flex:0 1 1.5em;margin-right:0.5em;z-index:-1}ptp-info-state .jurisdictions{display:grid;grid-template-columns:50% 50%}ptp-info-state .jurisdictions a.jurisdiction{-webkit-box-sizing:border-box;box-sizing:border-box;display:block;margin:0.5em;text-align:center;text-decoration:none;border:2px solid;padding:0.75em 0.5em}@media only screen and (max-width: 620px){ptp-info-state .jurisdictions{grid-template-columns:100%}}";var StateInfoComponent=function(){function t(t){registerInstance(this,t);this.stateId=null;this.stateJurisdictions=[]}t.prototype.componentWillLoad=function(){this.resetState()};t.prototype.onStateChanged=function(){this.resetState()};t.prototype.render=function(){var t=this.state;var e=this.stateInfo;if(t==="MI"){return h(Host,null,h("h2",null,"Michigan"),h("slot",null),h("h4",null,"Requirements"),h("p",null,"Requirements vary and are determined by cities and towns in Michigan, but all poll workers must be a registered Michigan voter or 16 or 17 years old residing in Michigan. While you can vote with a felony record, you cannot serve as a poll worker in Michigan if you have a felony or any infraction related to voting."),h("h4",null,"Hours & Compensation"),h("ul",null,h("li",null,"Serving as a poll worker is a paid position with a flat daily rate. Many cities are also providing hazard pay for poll workers who serve during the 2020 election."),h("li",null,"While hours vary, both by city and by position worked, most poll workers should expect to work long days, beginning before polls open at 7am and concluding after polls close at 8pm.")))}return e==null?h("ui-loading-spinner",null):h("div",null,h("h2",null,e.name),e.notes&&h("p",null,e.notes),h("div",{class:"jurisdictions"},this.stateJurisdictions.map((function(t){var e=t.id,n=t.name;return h(PtpLink,{path:"/jurisdiction/"+e,anchorClass:"jurisdiction"},n)}))))};t.prototype.resetState=function(){var t=this;this.stateId=this.state?findStateId(this.state):null;if(this.stateId){fetchStateJurisdictionsList(this.stateId).then((function(e){return t.stateJurisdictions=e}));fetchStateInfo(this.stateId).then((function(e){return t.stateInfo=e}))}else{this.stateInfo=undefined;this.stateJurisdictions=[]}};Object.defineProperty(t,"watchers",{get:function(){return{state:["onStateChanged"]}},enumerable:false,configurable:true});return t}();StateInfoComponent.style=ptpInfoStateCss;var explode=function(t){return t&&t.coordinates&&t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e,crs:t.crs}}))};var translateCoordinates=function(t,e,n){return t.map((function(t){return[(t[0]-n.xMin)*e,(n.yMax-t[1])*e]}))};function convertCoordinatesToPathString(t,e,n){return translateCoordinates(t,e,n).map((function(t){return t[0]+","+t[1]})).join(" ")}function Point(t,e,n,i){var o=i&&i.pointRadius?i.pointRadius:1;var r=!!(i&&i.pointAsCircle);var a=convertCoordinatesToPathString([t.coordinates],e,n);return r?[a]:["M"+a+" m"+-o+",0"+" a"+o+","+o+" 0 1,1 "+2*o+","+0+" a"+o+","+o+" 0 1,1 "+-2*o+","+0]}function MultiPoint(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return Point(t,e,n,i)[0]}));return!o?[r.join(" ")]:r}function LineString(t,e,n,i){return["M"+convertCoordinatesToPathString(t.coordinates,e,n)]}function MultiLineString(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return LineString(t,e,n)[0]}));return!o?[r.join(" ")]:r}function Polygon(t,e,n,i){var o=convertCoordinatesToPathString(t.coordinates[0],e,n);if(t.coordinates.length>1){var r=t.coordinates.slice(1,t.coordinates.length);if(r){for(var a=0;a<r.length;a++){o+=" M"+convertCoordinatesToPathString(r[a],e,n)}}}return["M"+o+"Z"]}function MultiPolygon(t,e,n,i){var o=!!(i&&i.explode);var r=explode(t).map((function(t){return Polygon(t,e,n)[0]}));return!o?[r.join(" ").replace(/Z/g,"")+"Z"]:r}var GeoJsonToPath=Object.freeze({__proto__:null,Point:Point,MultiPoint:MultiPoint,LineString:LineString,MultiLineString:MultiLineString,Polygon:Polygon,MultiPolygon:MultiPolygon});var GeoJsonRenderer=function(){function t(t){if(t===void 0){t={scale:1}}this.options=t;this.options.bounds=this.options.bounds||{xMin:-20037508.342789244,xMax:20037508.342789244,yMin:-20037508.342789244,yMax:20037508.342789244}}t.prototype.convert=function(t,e){var n=Object.assign(Object.assign({},this.options),e||{});var i=[];switch(t.type){case"FeatureCollection":for(var o=0;o<t.features.length;o++){i=__spreadArrays(i,this.convertFeature(t.features[o],n))}break;case"Feature":i=this.convertFeature(t,n);break;case"GeometryCollection":for(var o=0;o<t.geometries.length;o++){i=__spreadArrays(i,this.convertGeometry(t.geometries[o],n))}break;default:i=this.convertGeometry(t,n);break}return i};t.prototype.convertFeature=function(t,e){var n=t===null||t===void 0?void 0:t.geometry;if(n==null){return[]}var i=Object.assign(Object.assign({},this.options),e||{});if(i.attributes&&i.attributes instanceof Array){i.attributes=i.attributes.reduce((function(e,n){if(typeof n==="string"){var i=void 0;var o=n.split(".").pop();try{i=valueAt(t,n)}catch(r){i=false}if(i){e[o]=i}}else if(typeof n==="object"&&n.type&&n.property){if(n.type==="dynamic"){var i=void 0;var o=n.key?n.key:n.property.split(".").pop();try{i=valueAt(t,n.property)}catch(r){i=false}if(i){e[o]=i}}else if(n.type==="static"&&n.value){e[n.property]=n.value}}return e}),{})}else{i.attributes=i.attributes||{}}var o=i.attributes;var r=o.id||t.id||(t.properties&&t.properties.id?t.properties.id:null);if(r){o.id=r}i.attributes=o;return this.convertGeometry(n,i)};t.prototype.convertGeometry=function(t,e){if(isDrawable(t)){var n=Object.assign(Object.assign({},this.options),e||{});var i=n.output||"svg";var o=GeoJsonToPath[t.type](t,this.options.scale,this.options.bounds,n);if(i==="svg"){var r=o.map((function(e){return pathToSvgJson(e,t.type,n.attributes,n)}));var a=r.map((function(e){return jsonToSvgElement(e,t.type,n)}));return a}else{return o}}return[]};return t}();function isDrawable(t){return t.type in GeoJsonToPath}function pathToSvgJson(t,e,n,i){var o={};var r=!!(i&&i.pointAsCircle);if((e==="Point"||e==="MultiPoint")&&r){o.cx=t.split(",")[0];o.cy=t.split(",")[1];o.r=i&&i.pointRadius?i.pointRadius:"1"}else{o={d:t};if(e==="Polygon"||e==="MultiPolygon"){o["fill-rule"]="evenodd"}}for(var a in n){if(n.hasOwnProperty(a)){o[a]=n[a]}}return o}function jsonToSvgElement(t,e,n){var i=!!(n&&n.pointAsCircle);var o=(e==="Point"||e==="MultiPoint")&&i?"<circle":"<path";for(var r in t){if(t.hasOwnProperty(r)){o+=" "+r+'="'+t[r]+'"'}}o+="/>";return o}function valueAt(t,e){return e.split(".").reduce((function(t,e,n,i){if(t.hasOwnProperty(e)){return t[e]}else{throw new Error(i.slice(0,n+1).join(".")+" is not a valid property path")}}),t)}var mercator=function(t,e){var n=6378137;var i=85.0511287798;var o=Math.PI/180;var r={x:n*t*o,y:Math.max(Math.min(i,e),-i)*o};r.y=n*Math.log(Math.tan(Math.PI/4+r.y/2));return r};var uiGeojsonToSvgCss="path{fill:rgba(204, 204, 204, 0.8);stroke-width:1px}";var UiGeojsonToSvg=function(){function t(t){registerInstance(this,t);this.width=200;this.height=200;if(this.geoJson==null){this.renderer=new GeoJsonRenderer(this.options)}else{this.updateProjectedGeoJson();this.resetRenderer()}}t.prototype.render=function(){try{var t=this.projectedGeoJson;return t&&h(Host,{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" width="'+this.width+'" height="'+this.height+'">\n '+this.renderer.convert(t,this.options).join("\n")+"\n </svg>"})}catch(e){console.error(e);return null}};t.prototype.geoJsonChanged=function(){this.updateProjectedGeoJson();this.resetRenderer()};t.prototype.widthChanged=function(){this.resetRenderer()};t.prototype.heightChanged=function(){this.resetRenderer()};t.prototype.optionsChanged=function(){this.resetRenderer()};t.prototype.resetRenderer=function(){var t=this.projectedGeoJson;if(t!=null){var e=this.getBoundingBox(t);var n=this.calculateScale(e,{width:this.width,height:this.height});this.renderer=new GeoJsonRenderer(Object.assign(Object.assign({},this.options),{bounds:{yMax:e.yMax,xMax:e.xMax,yMin:e.yMin,xMin:e.xMin},scale:n}))}};t.prototype.updateProjectedGeoJson=function(){var t=this.geoJson;if(!isNullOrEmpty(t)){try{var e=explode(t)[0];var n=e.coordinates[0];for(var i=0;i<n.length;i++){var o=n[i][0];var r=n[i][1];var a=mercator(o,r);n[i]=[a.x,a.y]}this.projectedGeoJson=e}catch(s){console.log({status:"ERROR",data:t,error:s})}}};t.prototype.getBoundingBox=function(t){var e={xMin:Number.MAX_VALUE,xMax:Number.MIN_SAFE_INTEGER,yMin:Number.MAX_VALUE,yMax:Number.MIN_SAFE_INTEGER};var n=t.coordinates[0];for(var i=0;i<n.length;i++){var o=n[i][0];var r=n[i][1];e.xMin=e.xMin<o?e.xMin:o;e.xMax=e.xMax>o?e.xMax:o;e.yMin=e.yMin<r?e.yMin:r;e.yMax=e.yMax>r?e.yMax:r}return e};t.prototype.calculateScale=function(t,e,n){var i=e.width/Math.abs(t.xMax-t.xMin);var o=e.height/Math.abs(t.yMax-t.yMin);if(n){return n==="width"?i:n==="height"?o:n==="larger"?Math.max(i,i):Math.min(i,o)}return Math.min(i,o)};Object.defineProperty(t,"watchers",{get:function(){return{geoJson:["geoJsonChanged"],width:["widthChanged"],height:["heightChanged"],options:["optionsChanged"]}},enumerable:false,configurable:true});return t}();UiGeojsonToSvg.style=uiGeojsonToSvgCss;var uiLoadingSpinnerCss=":host .cube-grid{width:40px;height:40px;margin:100px auto}:host .cube-grid .cube{width:33%;height:33%;float:left;background-color:#000;-webkit-animation:cube-delay 1.3s infinite ease-in-out;animation:cube-delay 1.3s infinite ease-in-out}:host .cube-grid .cube1{-webkit-animation-delay:0.2s;animation-delay:0.2s}:host .cube-grid .cube2{-webkit-animation-delay:0.3s;animation-delay:0.3s}:host .cube-grid .cube3{-webkit-animation-delay:0.4s;animation-delay:0.4s}:host .cube-grid .cube4{-webkit-animation-delay:0.1s;animation-delay:0.1s}:host .cube-grid .cube5{-webkit-animation-delay:0.2s;animation-delay:0.2s}:host .cube-grid .cube6{-webkit-animation-delay:0.3s;animation-delay:0.3s}:host .cube-grid .cube7{-webkit-animation-delay:0s;animation-delay:0s}:host .cube-grid .cube8{-webkit-animation-delay:0.1s;animation-delay:0.1s}:host .cube-grid .cube9{-webkit-animation-delay:0.2s;animation-delay:0.2s}:host .spinner,:host .spinner:after{border-radius:50%;width:2em;height:2em;display:inline-block;vertical-align:middle}:host .spinner{margin:0;font-size:10px;position:relative;text-indent:-9999em;border:0.5em solid rgba(255, 255, 255, 0.2);border-left:0.5em solid #ffffff;-webkit-transform:translateZ(0);transform:translateZ(0);-webkit-animation:spinner-rotate 1.1s infinite linear;animation:spinner-rotate 1.1s infinite linear}@-webkit-keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes cube-delay{0%,70%,100%{-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}35%{-webkit-transform:scale3D(0, 0, 1);transform:scale3D(0, 0, 1)}}@keyframes cube-delay{0%,70%,100%{-webkit-transform:scale3D(1, 1, 1);transform:scale3D(1, 1, 1)}35%{-webkit-transform:scale3D(0, 0, 1);transform:scale3D(0, 0, 1)}}";var LoadingSpinner=function(){function t(t){registerInstance(this,t);this.small=false}t.prototype.render=function(){return this.small?h("div",{class:"spinner"}):h("div",{class:{"cube-grid":true}},__spreadArrays(new Array(9).keys()).map((function(t){return h("div",{class:"cube cube"+t,part:"cube"})})))};return t}();LoadingSpinner.style=uiLoadingSpinnerCss;export{AddressInput as input_address,PossiblyHiddenSelect as input_possibly_hidden_select,PowerThePollsForm as power_the_polls_form,JurisdictionInfoComponent as ptp_info_jurisdiction,PollWorkerInfo as ptp_info_poll_worker,StateInfoComponent as ptp_info_state,UiGeojsonToSvg as ui_geojson_to_svg,LoadingSpinner as ui_loading_spinner}; |
import './index-d1c0464b.js'; | ||
import { d as data, a as data$1, b as allNullOrEmpty, F as FormSubmissionThankYou, i as isNullOrEmpty, P as PtpLink, T as TextInput, t as toQueryString, f as findIfJurisdictionFilled, W as WorkElections } from './WorkElections-554584ab.js'; | ||
import { d as data, a as data$1, b as allNullOrEmpty, F as FormSubmissionThankYou, i as isNullOrEmpty, P as PtpLink, T as TextInput, t as toQueryString, f as findIfJurisdictionFilled, W as WorkElections } from './WorkElections-dfe6a991.js'; | ||
@@ -4,0 +4,0 @@ const index = /*#__PURE__*/Object.freeze({ |
import { r as registerInstance, c as createEvent, h, H as Host, F as Fragment } from './index-d1c0464b.js'; | ||
import { t as toQueryString, f as findIfJurisdictionFilled, F as FormSubmissionThankYou, P as PtpLink, d as data, c as findJurisdictionId, T as TextInput, e as fetchJurisdictionInfo, g as fetchJurisdictionGeoJson, b as allNullOrEmpty, i as isNullOrEmpty, h as findStateId, j as fetchStateJurisdictionsList, k as fetchStateInfo } from './WorkElections-554584ab.js'; | ||
import { t as toQueryString, f as findIfJurisdictionFilled, F as FormSubmissionThankYou, P as PtpLink, d as data, c as findJurisdictionId, T as TextInput, e as fetchJurisdictionInfo, g as fetchJurisdictionGeoJson, b as allNullOrEmpty, i as isNullOrEmpty, h as findStateId, j as fetchStateJurisdictionsList, k as fetchStateInfo } from './WorkElections-dfe6a991.js'; | ||
@@ -204,3 +204,3 @@ const ZipGeocode = async (zipcode) => { | ||
version() { | ||
return Promise.resolve("1.1.6-beta.4"); | ||
return Promise.resolve("1.1.6-beta.5"); | ||
} | ||
@@ -207,0 +207,0 @@ render() { |
{ | ||
"name": "@ptp-us/power-the-polls-form", | ||
"version": "1.1.6-beta.4", | ||
"version": "1.1.6-beta.5", | ||
"description": "Power the Polls Volunteer Form", | ||
@@ -42,5 +42,3 @@ "license": "MIT", | ||
"@stencil/router": "^1.0.1", | ||
"@types/geojson": "^7946.0.7", | ||
"@types/object.fromentries": "^2.0.0", | ||
"object.fromentries": "^2.0.2" | ||
"@types/geojson": "^7946.0.7" | ||
}, | ||
@@ -47,0 +45,0 @@ "devDependencies": { |
@@ -1,1 +0,1 @@ | ||
import"./p-529ba57c.js";import{d as s,a as t,b as a,F as i,i as o,P as l,T as r,t as n,f as u,W as p}from"./p-ded8231d.js";const d=Object.freeze({__proto__:null,States:s,FullJurisdictions:t}),e=Object.freeze({__proto__:null,allNullOrEmpty:a,FormSubmissionThankYou:i,isNullOrEmpty:o,PtpLink:l,TextInput:r,toQueryString:n,findIfJurisdictionFilled:u,WorkElections:p});export{d as data,e as util} | ||
import"./p-529ba57c.js";import{d as s,a as t,b as a,F as i,i as o,P as l,T as r,t as n,f as u,W as p}from"./p-1ae74667.js";const e=Object.freeze({__proto__:null,States:s,FullJurisdictions:t}),_=Object.freeze({__proto__:null,allNullOrEmpty:a,FormSubmissionThankYou:i,isNullOrEmpty:o,PtpLink:l,TextInput:r,toQueryString:n,findIfJurisdictionFilled:u,WorkElections:p});export{e as data,_ as util} |
@@ -1,1 +0,1 @@ | ||
System.register(["./p-5605bd20.system.js"],(function(t,e){"use strict";var r,i,s,n,o,a;return{setters:[function(t){r=t.p;i=t.w;s=t.d;n=t.N;o=t.a;a=t.b}],execute:function(){var t=function(t){return"__sc_import_"+t.replace(/\s|-/g,"_")};var c=function(){{r.$cssShim$=i.__cssshim}var t=Array.from(s.querySelectorAll("script")).find((function(t){return new RegExp("/"+n+"(\\.esm)?\\.js($|\\?|#)").test(t.src)||t.getAttribute("data-stencil-namespace")===n}));var a={};if("onbeforeload"in t&&!history.scrollRestoration){return{then:function(){}}}{a.resourcesUrl=new URL(".",new URL(t.getAttribute("data-resources-url")||t.src,i.location.href)).href;{u(a.resourcesUrl,t)}if(!i.customElements){return e.import("./p-2c95e033.system.js").then((function(){return a}))}}return o(a)};var u=function(e,r){var o=t(n);try{i[o]=new Function("w","return import(w);//"+Math.random())}catch(c){var a=new Map;i[o]=function(t){var n=new URL(t,e).href;var c=a.get(n);if(!c){var u=s.createElement("script");u.type="module";u.crossOrigin=r.crossOrigin;u.src=URL.createObjectURL(new Blob(["import * as m from '"+n+"'; window."+o+".m = m;"],{type:"application/javascript"}));c=new Promise((function(t){u.onload=function(){t(i[o].m);u.remove()}}));a.set(n,c);s.head.appendChild(u)}return c}}};c().then((function(t){return a([["p-7fe77219.system",[[0,"power-the-polls-form",{partnerId:[1,"partner-id"],partnerName:[1,"partner-name"],smartyStreetsApiKey:[1,"smarty-streets-api-key"],customFormFieldLabel:[1,"custom-form-field-label"],optUserOutOfChase:[4,"opt-user-out-of-chase"],formStatus:[32],formData:[32],michiganFormSubmitted:[32],reset:[64],version:[64]}],[4,"ptp-info-poll-worker",{state:[1],county:[1],city:[1],formData:[16],showNextSteps:[4,"show-next-steps"],isJurisdictionFilled:[4,"is-jurisdiction-filled"]}],[0,"input-address",{cityValue:[32],countyValue:[32],stateValue:[32],zipValue:[32],cityOptions:[32],countyOptions:[32],stateOptions:[32],state:[64]}],[4,"ptp-info-jurisdiction",{jurisdictionId:[8,"jurisdiction-id"],showNextSteps:[4,"show-next-steps"],initialFormData:[16],isJurisdictionFilled:[4,"is-jurisdiction-filled"],jurisdiction:[32],jurisdictionShape:[32],formData:[32],isMailToFormComplete:[32]}],[4,"ptp-info-state",{state:[1],stateId:[32],stateJurisdictions:[32],stateInfo:[32]}],[0,"input-possibly-hidden-select",{fieldLabel:[1,"field-label"],name:[1],selected:[1],options:[16]}],[0,"ui-geojson-to-svg",{geoJson:[16],options:[16],width:[2],height:[2],renderer:[32],projectedGeoJson:[32]}],[1,"ui-loading-spinner",{small:[4]}]]]],t)}))}}})); | ||
System.register(["./p-5605bd20.system.js"],(function(t,e){"use strict";var r,i,s,n,o,a;return{setters:[function(t){r=t.p;i=t.w;s=t.d;n=t.N;o=t.a;a=t.b}],execute:function(){var t=function(t){return"__sc_import_"+t.replace(/\s|-/g,"_")};var c=function(){{r.$cssShim$=i.__cssshim}var t=Array.from(s.querySelectorAll("script")).find((function(t){return new RegExp("/"+n+"(\\.esm)?\\.js($|\\?|#)").test(t.src)||t.getAttribute("data-stencil-namespace")===n}));var a={};if("onbeforeload"in t&&!history.scrollRestoration){return{then:function(){}}}{a.resourcesUrl=new URL(".",new URL(t.getAttribute("data-resources-url")||t.src,i.location.href)).href;{u(a.resourcesUrl,t)}if(!i.customElements){return e.import("./p-2c95e033.system.js").then((function(){return a}))}}return o(a)};var u=function(e,r){var o=t(n);try{i[o]=new Function("w","return import(w);//"+Math.random())}catch(c){var a=new Map;i[o]=function(t){var n=new URL(t,e).href;var c=a.get(n);if(!c){var u=s.createElement("script");u.type="module";u.crossOrigin=r.crossOrigin;u.src=URL.createObjectURL(new Blob(["import * as m from '"+n+"'; window."+o+".m = m;"],{type:"application/javascript"}));c=new Promise((function(t){u.onload=function(){t(i[o].m);u.remove()}}));a.set(n,c);s.head.appendChild(u)}return c}}};c().then((function(t){return a([["p-205ddf08.system",[[0,"power-the-polls-form",{partnerId:[1,"partner-id"],partnerName:[1,"partner-name"],smartyStreetsApiKey:[1,"smarty-streets-api-key"],customFormFieldLabel:[1,"custom-form-field-label"],optUserOutOfChase:[4,"opt-user-out-of-chase"],formStatus:[32],formData:[32],michiganFormSubmitted:[32],reset:[64],version:[64]}],[4,"ptp-info-poll-worker",{state:[1],county:[1],city:[1],formData:[16],showNextSteps:[4,"show-next-steps"],isJurisdictionFilled:[4,"is-jurisdiction-filled"]}],[0,"input-address",{cityValue:[32],countyValue:[32],stateValue:[32],zipValue:[32],cityOptions:[32],countyOptions:[32],stateOptions:[32],state:[64]}],[4,"ptp-info-jurisdiction",{jurisdictionId:[8,"jurisdiction-id"],showNextSteps:[4,"show-next-steps"],initialFormData:[16],isJurisdictionFilled:[4,"is-jurisdiction-filled"],jurisdiction:[32],jurisdictionShape:[32],formData:[32],isMailToFormComplete:[32]}],[4,"ptp-info-state",{state:[1],stateId:[32],stateJurisdictions:[32],stateInfo:[32]}],[0,"input-possibly-hidden-select",{fieldLabel:[1,"field-label"],name:[1],selected:[1],options:[16]}],[0,"ui-geojson-to-svg",{geoJson:[16],options:[16],width:[2],height:[2],renderer:[32],projectedGeoJson:[32]}],[1,"ui-loading-spinner",{small:[4]}]]]],t)}))}}})); |
@@ -1,1 +0,1 @@ | ||
import{p as t,w as e,d as s,N as i,a as o,b as r}from"./p-529ba57c.js";(()=>{t.t=e.__cssshim;const r=Array.from(s.querySelectorAll("script")).find(t=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(t.src)||t.getAttribute("data-stencil-namespace")===i),a={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(a.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,e.location.href)).href,((t,o)=>{const r="__sc_import_"+i.replace(/\s|-/g,"_");try{e[r]=new Function("w","return import(w);//"+Math.random())}catch(a){const i=new Map;e[r]=a=>{const n=new URL(a,t).href;let p=i.get(n);if(!p){const t=s.createElement("script");t.type="module",t.crossOrigin=o.crossOrigin,t.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${r}.m = m;`],{type:"application/javascript"})),p=new Promise(s=>{t.onload=()=>{s(e[r].m),t.remove()}}),i.set(n,p),s.head.appendChild(t)}return p}}})(a.resourcesUrl,r),e.customElements?o(a):__sc_import_power_the_polls_form("./p-78109d72.js").then(()=>a))})().then(t=>r([["p-cafc065c",[[0,"power-the-polls-form",{partnerId:[1,"partner-id"],partnerName:[1,"partner-name"],smartyStreetsApiKey:[1,"smarty-streets-api-key"],customFormFieldLabel:[1,"custom-form-field-label"],optUserOutOfChase:[4,"opt-user-out-of-chase"],formStatus:[32],formData:[32],michiganFormSubmitted:[32],reset:[64],version:[64]}],[4,"ptp-info-poll-worker",{state:[1],county:[1],city:[1],formData:[16],showNextSteps:[4,"show-next-steps"],isJurisdictionFilled:[4,"is-jurisdiction-filled"]}],[0,"input-address",{cityValue:[32],countyValue:[32],stateValue:[32],zipValue:[32],cityOptions:[32],countyOptions:[32],stateOptions:[32],state:[64]}],[4,"ptp-info-jurisdiction",{jurisdictionId:[8,"jurisdiction-id"],showNextSteps:[4,"show-next-steps"],initialFormData:[16],isJurisdictionFilled:[4,"is-jurisdiction-filled"],jurisdiction:[32],jurisdictionShape:[32],formData:[32],isMailToFormComplete:[32]}],[4,"ptp-info-state",{state:[1],stateId:[32],stateJurisdictions:[32],stateInfo:[32]}],[0,"input-possibly-hidden-select",{fieldLabel:[1,"field-label"],name:[1],selected:[1],options:[16]}],[0,"ui-geojson-to-svg",{geoJson:[16],options:[16],width:[2],height:[2],renderer:[32],projectedGeoJson:[32]}],[1,"ui-loading-spinner",{small:[4]}]]]],t)); | ||
import{p as t,w as e,d as s,N as i,a as o,b as r}from"./p-529ba57c.js";(()=>{t.t=e.__cssshim;const r=Array.from(s.querySelectorAll("script")).find(t=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(t.src)||t.getAttribute("data-stencil-namespace")===i),a={};return"onbeforeload"in r&&!history.scrollRestoration?{then(){}}:(a.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,e.location.href)).href,((t,o)=>{const r="__sc_import_"+i.replace(/\s|-/g,"_");try{e[r]=new Function("w","return import(w);//"+Math.random())}catch(a){const i=new Map;e[r]=a=>{const n=new URL(a,t).href;let p=i.get(n);if(!p){const t=s.createElement("script");t.type="module",t.crossOrigin=o.crossOrigin,t.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${r}.m = m;`],{type:"application/javascript"})),p=new Promise(s=>{t.onload=()=>{s(e[r].m),t.remove()}}),i.set(n,p),s.head.appendChild(t)}return p}}})(a.resourcesUrl,r),e.customElements?o(a):__sc_import_power_the_polls_form("./p-78109d72.js").then(()=>a))})().then(t=>r([["p-9d352b56",[[0,"power-the-polls-form",{partnerId:[1,"partner-id"],partnerName:[1,"partner-name"],smartyStreetsApiKey:[1,"smarty-streets-api-key"],customFormFieldLabel:[1,"custom-form-field-label"],optUserOutOfChase:[4,"opt-user-out-of-chase"],formStatus:[32],formData:[32],michiganFormSubmitted:[32],reset:[64],version:[64]}],[4,"ptp-info-poll-worker",{state:[1],county:[1],city:[1],formData:[16],showNextSteps:[4,"show-next-steps"],isJurisdictionFilled:[4,"is-jurisdiction-filled"]}],[0,"input-address",{cityValue:[32],countyValue:[32],stateValue:[32],zipValue:[32],cityOptions:[32],countyOptions:[32],stateOptions:[32],state:[64]}],[4,"ptp-info-jurisdiction",{jurisdictionId:[8,"jurisdiction-id"],showNextSteps:[4,"show-next-steps"],initialFormData:[16],isJurisdictionFilled:[4,"is-jurisdiction-filled"],jurisdiction:[32],jurisdictionShape:[32],formData:[32],isMailToFormComplete:[32]}],[4,"ptp-info-state",{state:[1],stateId:[32],stateJurisdictions:[32],stateInfo:[32]}],[0,"input-possibly-hidden-select",{fieldLabel:[1,"field-label"],name:[1],selected:[1],options:[16]}],[0,"ui-geojson-to-svg",{geoJson:[16],options:[16],width:[2],height:[2],renderer:[32],projectedGeoJson:[32]}],[1,"ui-loading-spinner",{small:[4]}]]]],t)); |
Sorry, the diff of this file is too big to display
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 2 instances in 1 package
3
41
1924672
27868
- Removed@types/object.fromentries@^2.0.0
- Removedobject.fromentries@^2.0.2
- Removed@types/object.fromentries@2.0.4(transitive)
- Removedarray-buffer-byte-length@1.0.2(transitive)
- Removedarraybuffer.prototype.slice@1.0.4(transitive)
- Removedasync-function@1.0.0(transitive)
- Removedavailable-typed-arrays@1.0.7(transitive)
- Removedcall-bind@1.0.8(transitive)
- Removedcall-bind-apply-helpers@1.0.2(transitive)
- Removedcall-bound@1.0.4(transitive)
- Removeddata-view-buffer@1.0.2(transitive)
- Removeddata-view-byte-length@1.0.2(transitive)
- Removeddata-view-byte-offset@1.0.1(transitive)
- Removeddefine-data-property@1.1.4(transitive)
- Removeddefine-properties@1.2.1(transitive)
- Removeddunder-proto@1.0.1(transitive)
- Removedes-abstract@1.23.9(transitive)
- Removedes-define-property@1.0.1(transitive)
- Removedes-errors@1.3.0(transitive)
- Removedes-object-atoms@1.1.1(transitive)
- Removedes-set-tostringtag@2.1.0(transitive)
- Removedes-to-primitive@1.3.0(transitive)
- Removedfor-each@0.3.5(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedfunction.prototype.name@1.1.8(transitive)
- Removedfunctions-have-names@1.2.3(transitive)
- Removedget-intrinsic@1.3.0(transitive)
- Removedget-proto@1.0.1(transitive)
- Removedget-symbol-description@1.1.0(transitive)
- Removedglobalthis@1.0.4(transitive)
- Removedgopd@1.2.0(transitive)
- Removedhas-bigints@1.1.0(transitive)
- Removedhas-property-descriptors@1.0.2(transitive)
- Removedhas-proto@1.2.0(transitive)
- Removedhas-symbols@1.1.0(transitive)
- Removedhas-tostringtag@1.0.2(transitive)
- Removedhasown@2.0.2(transitive)
- Removedinternal-slot@1.1.0(transitive)
- Removedis-array-buffer@3.0.5(transitive)
- Removedis-async-function@2.1.1(transitive)
- Removedis-bigint@1.1.0(transitive)
- Removedis-boolean-object@1.2.2(transitive)
- Removedis-callable@1.2.7(transitive)
- Removedis-data-view@1.0.2(transitive)
- Removedis-date-object@1.1.0(transitive)
- Removedis-finalizationregistry@1.1.1(transitive)
- Removedis-generator-function@1.1.0(transitive)
- Removedis-map@2.0.3(transitive)
- Removedis-number-object@1.1.1(transitive)
- Removedis-regex@1.2.1(transitive)
- Removedis-set@2.0.3(transitive)
- Removedis-shared-array-buffer@1.0.4(transitive)
- Removedis-string@1.1.1(transitive)
- Removedis-symbol@1.1.1(transitive)
- Removedis-typed-array@1.1.15(transitive)
- Removedis-weakmap@2.0.2(transitive)
- Removedis-weakref@1.1.1(transitive)
- Removedis-weakset@2.0.4(transitive)
- Removedisarray@2.0.5(transitive)
- Removedmath-intrinsics@1.1.0(transitive)
- Removedobject-inspect@1.13.4(transitive)
- Removedobject-keys@1.1.1(transitive)
- Removedobject.assign@4.1.7(transitive)
- Removedobject.fromentries@2.0.8(transitive)
- Removedown-keys@1.0.1(transitive)
- Removedpossible-typed-array-names@1.1.0(transitive)
- Removedreflect.getprototypeof@1.0.10(transitive)
- Removedregexp.prototype.flags@1.5.4(transitive)
- Removedsafe-array-concat@1.1.3(transitive)
- Removedsafe-push-apply@1.0.0(transitive)
- Removedsafe-regex-test@1.1.0(transitive)
- Removedset-function-length@1.2.2(transitive)
- Removedset-function-name@2.0.2(transitive)
- Removedset-proto@1.0.0(transitive)
- Removedside-channel@1.1.0(transitive)
- Removedside-channel-list@1.0.0(transitive)
- Removedside-channel-map@1.0.1(transitive)
- Removedside-channel-weakmap@1.0.2(transitive)
- Removedstring.prototype.trim@1.2.10(transitive)
- Removedstring.prototype.trimend@1.0.9(transitive)
- Removedstring.prototype.trimstart@1.0.8(transitive)
- Removedtyped-array-buffer@1.0.3(transitive)
- Removedtyped-array-byte-length@1.0.3(transitive)
- Removedtyped-array-byte-offset@1.0.4(transitive)
- Removedtyped-array-length@1.0.7(transitive)
- Removedunbox-primitive@1.1.0(transitive)
- Removedwhich-boxed-primitive@1.1.1(transitive)
- Removedwhich-builtin-type@1.2.1(transitive)
- Removedwhich-collection@1.0.2(transitive)
- Removedwhich-typed-array@1.1.18(transitive)