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B,UAAW,CACjC,GACJ,CAEA,YAAAD,CAAaL,GACT,MAAM5C,EAAOP,KACbO,EAAK+B,aAAamB,UAAW,EAC7BlD,EAAKkC,UAAUiB,MAAMC,QAAU,OAC/BpD,EAAKmC,WAAWgB,MAAMC,QAAU,QAChCR,EAASS,sBAAqB,SAAUC,EAAyBC,GAG7D,GAAID,EAGA,OAFAT,QAAQC,MAAMQ,QACdtD,EAAK+C,UAAUO,GAIf,OAAO,CACHE,KAAM,OACNC,IAAKzD,EAAK8B,OAAO4B,WACjBC,KAAM,CACF,qBAAwBJ,EAAQK,SAErCC,MAAK,SAAUC,GACVA,EAAOC,QACPC,OAAOC,SAASC,KAAOlE,EAAK8B,OAAOqC,YAEnCvB,EAASwB,6BACTpE,EAAK+C,UAAU,kCAAoCe,EAAOtC,SAElE,GAER,GACJ,CAEA,SAAAuB,CAAUsB,GACN5E,KAAKsC,aAAamB,UAAW,EAC7BzD,KAAKyC,UAAUiB,MAAMC,QAAU,QAC/B3D,KAAK0C,WAAWgB,MAAMC,QAAU,OAC5BiB,IACA5E,KAAK2C,gBAAgBe,MAAMC,QAAU,QACrC3D,KAAK2C,gBAAgBkC,UAAYD,EAEzC,G","sources":["webpack://AJN/webpack/bootstrap","webpack://AJN/webpack/runtime/define property getters","webpack://AJN/webpack/runtime/hasOwnProperty shorthand","webpack://AJN/webpack/runtime/make namespace object","webpack://AJN/./src/js/site/statecheck.ts","webpack://AJN/./src/js/site/checkclass.ts","webpack://AJN/./src/js/site/checkeval.ts","webpack://AJN/external var \"jQuery\"","webpack://AJN/./src/js/site/braintree.ts"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import * as $ from 'jquery';\r\n\r\nexport interface StateCheckItem {\r\n statecode: string;\r\n message: string;\r\n onlyCourt: boolean;\r\n tags: Array;\r\n zipCodes?: Array;\r\n}\r\n\r\nexport class StateCheck {\r\n statecheckitems: Array;\r\n classtags: Array;\r\n $warning: JQuery;\r\n $state: JQuery;\r\n $courtddCourt?: JQuery;\r\n $courtddPersonal?: JQuery;\r\n $zipcode?: JQuery;\r\n\r\n constructor(statecheckitems: Array, classtags: Array) {\r\n this.statecheckitems = statecheckitems;\r\n this.classtags = classtags;\r\n }\r\n\r\n setup($warning: JQuery, $state: JQuery, $courtddCourt?: JQuery, $courtddPersonal?: JQuery, $zipcode?: JQuery) {\r\n const self = this;\r\n this.$warning = $warning;\r\n this.$state = $state;\r\n this.$courtddCourt = $courtddCourt;\r\n this.$courtddPersonal = $courtddPersonal;\r\n this.$zipcode = $zipcode;\r\n\r\n this.$state.on(\"change\", function () {\r\n self.doCheckControls();\r\n });\r\n\r\n if (this.$zipcode)\r\n this.$zipcode.on(\"change\", function () {\r\n self.doCheckControls();\r\n });\r\n\r\n if (this.$courtddCourt) {\r\n this.$courtddCourt.on(\"change\", function () {\r\n self.doCheckControls();\r\n });\r\n }\r\n if (this.$courtddPersonal) {\r\n this.$courtddPersonal.on(\"change\", function () {\r\n self.doCheckControls();\r\n });\r\n }\r\n this.doCheckControls();\r\n }\r\n\r\n getZipcode(): string | null {\r\n if (this.$zipcode) {\r\n const zip = this.$zipcode.val();\r\n return zip.trim().substring(0, 5);\r\n }\r\n return null;\r\n }\r\n\r\n doCheckControls() {\r\n const state = this.$state.val();\r\n if (state) {\r\n const isCourt =\r\n !(this.$courtddCourt) || (this.$courtddCourt.is(\":checked\"));\r\n const zipcode = this.getZipcode();\r\n\r\n this.doCheck(state, isCourt, zipcode);\r\n }\r\n else {\r\n this.$warning.hide();\r\n }\r\n }\r\n\r\n doCheck(statecode: string, isCourt: boolean, zipcode: string | null) {\r\n for (const item of this.statecheckitems) {\r\n if (item.statecode === statecode) {\r\n if (this.doCheckState(item, isCourt, zipcode)) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n this.$warning.hide();\r\n }\r\n\r\n // Returns true if we needed to show a warning\r\n doCheckState(item: StateCheckItem, isCourt: boolean, zipcode: string | null): boolean {\r\n // see if ANY tag matches\r\n for (const classtag of this.classtags) {\r\n for (const statetag of item.tags) {\r\n // do we need to check for a zip code match\r\n if (item.zipCodes && item.zipCodes.length > 0) {\r\n if (!zipcode) {\r\n return false;\r\n }\r\n if (!item.zipCodes.includes(zipcode)) {\r\n return false;\r\n }\r\n }\r\n\r\n if (classtag === statetag && (!item.onlyCourt || isCourt)) {\r\n this.$warning.html(item.message).show();\r\n return true;\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n}","\r\nimport { StateCheckItem } from \"./statecheck\";\r\n\r\nexport const checkClass: Array = [\r\n {\r\n statecode: 'AL',\r\n tags: ['dui', 'alcohol'],\r\n onlyCourt: true,\r\n message: `Warning: Alabama does not accept any online alcohol or drug education classes for\r\ncourt, DMV, probation or other legal requirements. Classes must be taken in person\r\nfrom their approved provider list. Please contact the Administrative Office of the Courts\r\nin Alabama at http://www.alacourt.gov/ or by phone (334) 954-5000 for a list of local\r\n providers or with any questions.`\r\n },\r\n {\r\n statecode: 'CA',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: Do not register for this class if you are taking it for a California DMV requirement.\r\nThe State of California does not allow online classes for DUI requirements.\r\nYou may be allowed to take our classes for a court requirement.\r\nPlease check with your local court for acceptability for your specific case.`\r\n },\r\n {\r\n statecode: 'CO',\r\n tags: ['alcohol'],\r\n onlyCourt: false,\r\n message: `Warning: Do not register for this class if you are taking this for a DUI requirement in the state of Colorado.`\r\n },\r\n {\r\n statecode: 'DC',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: \"Warning: You must take a local in person class certified by the state board of behavioral health. No online classes will be accepted for a DUI requirement.\"\r\n },\r\n {\r\n statecode: 'FL',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: Do not register for this class if you are taking it for a Florida DMV requirement.\r\nThe State of Florida does not allow online classes for DUI requirements.\r\nYou may be allowed to take our classes for a court requirement.\r\nPlease check with your local court for acceptability for your specific case.`\r\n },\r\n {\r\n statecode: 'GA',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: Do not register for this class if you are taking it for a Georgia DMV requirement. The State of Georgia does not allow online classes for DUI requirements. You may be allowed to take our classes for a court requirement. Please check with your local court for acceptability for your specific case.`\r\n },\r\n {\r\n statecode: 'IA',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: Do not register for this class if you are taking it for a Iowa DMV requirement.\r\nThe State of Iowa does not allow online classes for DUI requirements.\r\nYou may be allowed to take our classes for a court requirement.\r\nPlease check with your local court for acceptability for your specific case.`\r\n },\r\n {\r\n statecode: 'IA',\r\n tags: ['alcohol'],\r\n onlyCourt: false,\r\n message: `Warning: Do not register for this class if you are taking this for a DUI requirement in the state of Iowa.`\r\n },\r\n {\r\n statecode: 'IL',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you live in the state of IL and have a requirement in IL to complete a risk reduction class or assessment, you must go through a local provider in your state.\r\n If you have a requirement in IL but live out of the state, you may be able to complete our programs with prior approval. `\r\n },\r\n {\r\n statecode: 'KY',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you live in KY and had a KY DUI offence, \r\n in accordance with statute KRS 189A.040, \r\n DUI treatment and/or education must be conducted by facilities licensed and regulated \r\n by the Kentucky Cabinet for Health and Family Services, \r\n and no online programs are accepted. \r\n If you live out of the state of KY, you may be able to take this program with prior approval from the Kentucky Dept. of Transportation.`\r\n },\r\n {\r\n statecode: 'MO',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you are a resident of the state of Missouri and had a DUI in this state, you must go through a local SATOP provider.`\r\n },\r\n {\r\n statecode: 'MN',\r\n tags: ['dui20'],\r\n onlyCourt: false,\r\n message: `Warning: The state of MN does not allow online classes for this 20 hour program requirement. You must take a locally approved Driving with Care program within the state of MN.`\r\n },\r\n {\r\n statecode: 'NC',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: Do not register for this class if you are taking it for a North Carolina DMV requirement.\r\nThe State of North Carolina does not allow online classes for DUI requirements.\r\nYou may be allowed to take our classes for a court requirement.\r\nPlease check with your local court for acceptability for your specific case.`\r\n },\r\n {\r\n statecode: 'NJ',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: Do not register for this class if you are taking it for a New Jersey DMV requirement.\r\nThe State of New Jersey does not allow online classes for DUI requirements.\r\nYou may be allowed to take our classes for a court requirement.\r\nPlease check with your local court for acceptability for your specific case.`\r\n },\r\n {\r\n statecode: 'NY',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: The state of NY does not allow online classes to be completed by NY residents.`\r\n },\r\n {\r\n statecode: 'OK',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you are taking this class for an Oklahoma requirement, these programs must be completed by a local provider.`\r\n },\r\n {\r\n statecode: 'OR',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you are a resident of Oregon and have a DUI requirement, no online classes are allowed. You must go through a state approved provider. If you had a DUI in OR but live out of state, you may be able to take this class with prior approval and submitting the required out of state form.`\r\n },\r\n {\r\n statecode: 'PA',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: The state of PA does not currently allow online classes for DUI requirements. If you wish to take this class online, you must get prior approval from the DMV before enrolling to ensure it will meet your specific requirements.`\r\n },\r\n {\r\n statecode: 'RI',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: The state of Rhode Island requires classes to be completed in person from their state approved provider list. You may be able to take this class for a court only requirement with prior approval. Please contact http://www.dmv.ri.gov/ for more information.`\r\n },\r\n {\r\n statecode: 'SC',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: The state of South Carolina does not allow online classes for residents of SC to complete for a DMV requirement. Our programs can often be taken for a court requirement only with prior approval. You must go through a local ADSAP program in your state for a SC DMV requirement if you are a resident of SC.`\r\n },\r\n {\r\n statecode: 'TX',\r\n zipCodes: [\"75165\", \"75154\", \"76065\", \"75119\", \"75167\", \"76084\", \"76050\", \"75125\", \"75152\", \"76651\", \"76064\", \"76670\", \"76666\", \"76041\", \"75101\", \"75120\", \"75168\", \"76623\"],\r\n tags: ['dui','anger'],\r\n onlyCourt: false,\r\n message: `Warning: Ellis County, Texas does not allow online clases. Please consult your local court for a list of their approved providers. If you are taking this class for personal growth and not a court requirement then you are allowed to register.`\r\n },\r\n {\r\n statecode: 'TX',\r\n tags: ['15hour'],\r\n onlyCourt: false,\r\n message: `Warning: TX DPS does not currently allow or accept online classes. If you have a Texas Department of Public Safety requirement, please take your class in person from a locally approved program provider in Texas.`\r\n },\r\n {\r\n statecode: 'WA',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you live in WA state and have a WA state drivers license you must go through a local state approved and certified agency. If you wish to complete our online class and live out of state, you must get prior approval before enrolling.`\r\n },\r\n {\r\n statecode: 'WI',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: Wisconsin does not accept online alcohol education/counseling programs for a OWI. You must go through a local provider or an in person class only. You may be able to take this class for a court requirement with prior approval.`\r\n }\r\n];","import { StateCheckItem } from \"./statecheck\";\r\n\r\nexport const checkEval: Array = [\r\n {\r\n statecode: 'IA',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Attention: The state of Iowa does not allow assessments/​evaluations to be completed for anyone who currently resides in Iowa who had an OWI in Iowa.\r\nIf you need an assessment for an Iowa OWI but live out of state, you may complete this assessment.\r\nPlease ask us for our out of state provider form. `\r\n },\r\n {\r\n statecode: 'GA',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you are required to complete an assessment/evaluation for the state of GA you must go through a local provider in GA approved by DBHDD. If you take our out of state assessment you MUST get prior approval before doing so and NO REFUNDS be provided once the assessment is completed.`\r\n },\r\n {\r\n statecode: 'IL',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Attention: If you live in the state of IL and have a requirement in IL to complete a risk reduction class or assessment, you must go through a local provider in your state.\r\n If you have a requirement in IL but live out of the state, you may be able to complete our programs with prior approval. `\r\n },\r\n {\r\n statecode: 'MI',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Residents of Michigan that need to complete a MI assessment must go through a local in-state provider. Those that have a MI assessment requirement that live out of state may complete an assessment from an out of state provider with prior approval.`\r\n },\r\n {\r\n statecode: 'MO',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you are a resident of the state of Missouri and had a DUI in this state, you must go through a local SATOP provider. \r\n If you had a DUI in MO but live out of state, \r\n then you can complete our assessment using the \"SATOP Comparable Form\".`\r\n },\r\n {\r\n statecode: 'NC',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Attention: If you live in NC and had a DUI in NC you must go through one of their state approved providers. \r\nIf you live out of the state of NC, and you must complete a substance assessment, it is best to contact a North Carolina provider before you begin your services.\r\nIf you complete our substance abuse assessment, you must choose a North Carolina DWI services provider to review and approve it.\r\nPlease be advised we DO NOT refund completed assessments.`\r\n },\r\n {\r\n statecode: 'OK',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: This assessment must be completed by an ADSAC assessor certified by the Oklahoma Department of Mental Health and Substance Abuse Services and cannot be taken by an out of state provider for a DUI in Oklahoma. We do not provide a red stamp for this evaluation. If you live out of state you may be able to complete our assessment with prior approval.`\r\n },\r\n {\r\n statecode: 'OR',\r\n zipCodes: [\"97702\", \"97701\", \"97756\", \"97703\", \"97739\", \"97759\", \"97760\",\"97539\",\r\n \"97707\", \"97413\", \"97712\", \"97709\", \"97708\", \"97741\", \"97759\", \"97760\",\r\n \"97734\", \"97761\", \"97350\", \"97711\", \"97730\", \"97701\", \"97754\", \"97760\",\r\n \"97753\", \"97712\", \"97751\", \"97752\"],\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning If you live in Deschutes, Jefferson or Crook Counties in the state of Oregon, you must use a local in-state provider for your DUI evaluation.`\r\n },\r\n {\r\n statecode: 'NY',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: \r\n NY residents who also have a requirement to complete an evaluation must also contact a local OASIS approved provider in the state of NY.\r\nOut of state residents may be able to have an evaluation completed by an out of state provider with prior approval.`\r\n },\r\n {\r\n statecode: 'WA',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning: If you live in WA state and have a WA state drivers license you must go through a local state approved and certified agency. If you live out of state, you can complete our assessment.`\r\n },\r\n {\r\n statecode: 'WI',\r\n tags: ['dui'],\r\n onlyCourt: false,\r\n message: `Warning The state of WI requires anyone required to complete an assessment to do so with a state licensed counselor in the state you live in. If you have a WI assessment requirement you can only complete ours if you live in CA as we are licensed in this state.`\r\n }\r\n];","const __WEBPACK_NAMESPACE_OBJECT__ = jQuery;","import * as $ from 'jquery';\r\n\r\ndeclare var braintree: any;\r\n\r\n// assume these IDs for dom objects\r\nconst containerid = '#dropin-container';\r\nconst submitbuttonid = '#submit-button';\r\nconst processingid = '#processing-message';\r\nconst checkoutmessageid = '#checkout-message';\r\n\r\nexport interface BraintreeConfig {\r\n clientToken: string;\r\n urlProcess: string; // '/Registration/PaymentBTProcess.ashx'\r\n urlReceipt: string; // '/Registration/RegisterReceipt.aspx'\r\n}\r\n\r\nexport class BraintreePay {\r\n config: BraintreeConfig;\r\n submitButton: HTMLInputElement;\r\n container: HTMLDivElement;\r\n processing: HTMLDivElement;\r\n checkoutmessage: HTMLDivElement;\r\n\r\n constructor(config: BraintreeConfig) {\r\n this.config = config;\r\n this.submitButton = document.querySelector(submitbuttonid) as HTMLInputElement;\r\n this.container = document.querySelector(containerid) as HTMLDivElement;\r\n this.processing = document.querySelector(processingid) as HTMLDivElement;\r\n this.checkoutmessage = document.querySelector(checkoutmessageid) as HTMLDivElement;\r\n }\r\n\r\n initalize() {\r\n const self = this;\r\n braintree.dropin.create({\r\n // Insert your tokenization key here\r\n authorization: this.config.clientToken,\r\n container: '#dropin-container'\r\n }, function (createErr, instance) {\r\n if (createErr) {\r\n // Handle any errors that might've occurred when creating Drop-in\r\n console.error(createErr);\r\n self.showError(createErr);\r\n return;\r\n }\r\n self.submitButton.addEventListener('click', function () {\r\n self.handleSubmit(instance);\r\n });\r\n self.submitButton.disabled = false;\r\n });\r\n }\r\n\r\n handleSubmit(instance: any) {\r\n const self = this;\r\n self.submitButton.disabled = true;\r\n self.container.style.display = \"none\";\r\n self.processing.style.display = \"block\";\r\n instance.requestPaymentMethod(function (requestPaymentMethodErr, payload) {\r\n // When the user clicks on the 'Submit payment' button this code will send the\r\n // encrypted payment information in a variable called a payment method nonce\r\n if (requestPaymentMethodErr) {\r\n console.error(requestPaymentMethodErr);\r\n self.showError(requestPaymentMethodErr);\r\n return;\r\n }\r\n else {\r\n $.ajax({\r\n type: 'POST',\r\n url: self.config.urlProcess,\r\n data: {\r\n 'payment_method_nonce': payload.nonce\r\n }\r\n }).done(function (result) {\r\n if (result.success) {\r\n window.location.href = self.config.urlReceipt;\r\n } else {\r\n instance.clearSelectedPaymentMethod();\r\n self.showError('Payment Error ' + result.message);\r\n }\r\n });\r\n }\r\n });\r\n }\r\n\r\n showError(errormsg: string) {\r\n this.submitButton.disabled = false;\r\n this.container.style.display = \"block\";\r\n this.processing.style.display = \"none\";\r\n if (errormsg) {\r\n this.checkoutmessage.style.display = \"block\";\r\n this.checkoutmessage.innerHTML = errormsg;\r\n }\r\n }\r\n}"],"names":["__webpack_require__","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","StateCheck","constructor","statecheckitems","classtags","this","setup","$warning","$state","$courtddCourt","$courtddPersonal","$zipcode","self","on","doCheckControls","getZipcode","val","trim","substring","state","isCourt","is","zipcode","doCheck","hide","statecode","item","doCheckState","classtag","statetag","tags","zipCodes","length","includes","onlyCourt","html","message","show","checkClass","checkEval","jQuery","BraintreePay","config","submitButton","document","querySelector","container","processing","checkoutmessage","initalize","braintree","dropin","create","authorization","clientToken","createErr","instance","console","error","showError","addEventListener","handleSubmit","disabled","style","display","requestPaymentMethod","requestPaymentMethodErr","payload","type","url","urlProcess","data","nonce","done","result","success","window","location","href","urlReceipt","clearSelectedPaymentMethod","errormsg","innerHTML"],"sourceRoot":""}