حصل خطأ عند معالجة القالب.
The following has evaluated to null or missing:
==> bankercode  [in template "10153#10191#6524591" at line 42, column 6]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #if bankercode?starts_with("amp") && ...  [in template "10153#10191#6524591" at line 42, column 1]
----
1<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
2<#assign url404 = '/error/404.html' > 
3<#assign oadURL = propsUtil.get('elan.oad.url') > 
4<#assign url = themeDisplay.getURLCurrent() > 
5<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
6 
7<#if qstringmap["ecid"]?has_content> 
8    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
9<#else> 
10    <#assign ecidExt=""> 
11</#if> 
12 
13<#if qstringmap["bankercode"]?has_content> 
14    <#assign bankercode= qstringmap["bankercode"]?first> 
15 
16    <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedApp','0&'+bankercode)> 
17    <#if fiData?first?has_content> 
18        <#assign fi = fiData?first> 
19        <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))> 
20            <#assign subbu_special = fi.offerId> 
21        </#if> 
22    </#if>  
23 
24    <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bankercode)> 
25    <#list bData as b>         
26      <#assign rLC = b.reallocationcode > 
27      <#assign lc = b.locationcode > 
28      <#assign mappedLC = b.mappedLocationCode > 
29    </#list>     
30<#else> 
31    <script> 
32        console.log("MainProductBcode missing"); 
33        //location.href = '${url404}'; 
34    </script> 
35</#if> 
36 
37<#if url?contains('11t1')> 
38    <#assign tier = '11t1'> 
39<#elseif url?contains('11t2')> 
40    <#assign tier = '11t2'> 
41</#if> 
42<#if bankercode?starts_with("amp") && (url?contains("11t1m"))> 
43    <#assign ameriprise = true> 
44<#else> 
45    <#assign ameriprise = false> 
46</#if> 
47<#if ameriprise> 
48    <#assign tier = '11t1m'> 
49</#if> 
50<#assign environment = url?replace('/${tier}.*','','r')> 
51 
52 
53<#if mappedLC?has_content && !ameriprise> 
54    <#assign lc = mappedLC > 
55</#if> 
56 
57<#if lc?has_content> 
58    <#assign prefix = "00000" > 
59    <#assign lcWithPrefix = prefix + lc > 
60    <#assign withPrefixLength = lcWithPrefix?length > 
61    <#assign startHere = withPrefixLength - 5> 
62    <#assign lc = lcWithPrefix?substring(startHere)> 
63    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
64    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
65 
66    <#assign clientProfile = clientProfileList?first> 
67    <#assign partnerName = clientProfile.getMarketingNameLong()> 
68    <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
69    <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')> 
70    <#assign pbu = clientProfile.getPbu()> 
71    <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
72    <script> 
73        console.log('pbu', '${pbu!''}'); 
74        console.log('subbu', '${subbu!''}'); 
75    </script>       
76    <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)> 
77    <#if (optoutData?size == 0)> 
78        <#if (subbu_special?has_content)> 
79            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
80            <script> 
81                console.log('new subbu', '${subbu_special!''}'); 
82            </script>  
83        <#else> 
84            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
85        </#if> 
86 
87        <#if (fiCardsData?size > 0)> 
88            <#assign temp = []> 
89            <#assign offerTypeList = []>        
90            <#assign index = 0> 
91            <#list fiCardsData as fib> 
92                <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>  
93                    <#assign offerTypeList = offerTypeList + [fib.offerType]>                   
94                    <#assign temp = temp + fiCardsData[index..index]>  
95                </#if>  
96                <#assign index = index + 1> 
97            </#list>  
98            <#assign fiCardsData = temp> 
99            <#if !(fiCardsData?size > 0)>  
100                <script> 
101                    console.log("empty card/offerType List"); 
102                    //location.href = '${url404}'; 
103                </script> 
104            </#if> 
105            <#if ameriprise> 
106                <#assign lc_used = mappedLC>  
107            <#else> 
108                <#assign lc_used = lc>  
109            </#if>             
110            <div class="content-container content-container-main" title="${partnerName!''}"> 
111                <header class="jn-header"> 
112                    <div>  
113                        <a href="${environment}/${tier}/index?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}"><< Back to Overview</a> 
114                    </div>  
115                    <div>  
116                        <#if url?contains("11t2")> 
117                            <img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"> 
118                        </#if> 
119                        <div class="styled-select slate"> 
120                            <select> 
121                                <#list fiCardsData as fib> 
122                                    <#if ameriprise> 
123                                        <#if (fib.offerType=="101")> 
124                                            <#assign productURL="premier-visa-signature"> 
125                                            <#assign productName="Ameriprise Premier Visa Signature"> 
126                                        <#elseif (fib.offerType=="103")>      
127                                            <#assign productURL = "visa-signature"> 
128                                            <#assign productName = "Ameriprise Visa Signature">                              
129                                        </#if> 
130                                    <#else> 
131                                        <#if (fib.offerType=="108" || fib.offerType=="109")> 
132                                            <#assign productURL="consumer-platinum2103"> 
133                                            <#assign productName="Platinum Card"> 
134                                        <#elseif (fib.offerType=="104")> 
135                                            <#assign productURL = "max-cash"> 
136                                            <#assign productName = "Max Cash Preferred Card"> 
137                                        <#elseif (fib.offerType=="101" || fib.offerType=="103")> 
138                                            <#assign productURL = "real-rewards"> 
139                                            <#assign productName = "Real Rewards Card"> 
140                                        <#elseif fib.offerType == "115"> 
141                                            <#assign productURL = "secured"> 
142                                            <#assign productName = "Secured Card" > 
143                                        <#elseif fib.offerType == "144"> 
144                                            <#assign productURL = "smart-business-rewards"> 
145                                            <#assign productName = "Smart Business Rewards Card" >                                             
146                                        <#elseif fib.offerType == "128"> 
147                                            <#assign productURL = "business-cashback"> 
148                                            <#assign productName = "Business Cash Card" > 
149                                        <#elseif fib.offerType == "143"> 
150                                            <#assign productURL = "business-real-rewards"> 
151                                            <#assign productName = "Business Real Rewards Card" > 
152                                        <#elseif fib.offerType == "121"> 
153                                            <#assign productURL = "business-platinum2103"> 
154                                            <#assign productName = "Business Card" > 
155                                        </#if> 
156                                    </#if> 
157                                    <#if url?matches(".*/${productURL}.*")> 
158                                        <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}" selected="selected">${productName}</option>                                             
159                                    <#else> 
160                                        <option value="${environment}/${tier}/${productURL}?bankercode=${bankercode}&ecdma-lc=${lc_used}${ecidExt}">${productName}</option> 
161                                    </#if> 
162                                     
163                                </#list> 
164                            </select> 
165                        </div> 
166                    </div>  
167                </header> 
168            </div>  
169            <script> 
170                var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
171                var partnerName = "${partnerName!0}"; 
172                var metaDesc = ""; 
173                switch (page) { 
174                    case "consumer-platinum2103": 
175                        document.title = "The purchasing power of Zero | "+partnerName+" Platinum Card"; 
176                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Limited Time Offer. 0% Intro APR on Purchases and Balance Transfers for 20 Billing Cycles Consolidate your Balances with the "+partnerName+" Intro APR Card."; 
177                        break; 
178                    case "max-cash": 
179                        document.title = "Earn a $150 Bonus and 5% cash back | "+partnerName+" Max Cash Preferred Card"; 
180                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select"; 
181                        break; 
182                    case "real-rewards": 
183                        document.title = "Sign up and earn bonus points | "+partnerName+" Real Rewards Card"; 
184                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
185                        break; 
186                    case "secured": 
187                        document.title = "Strengthen your finances | "+partnerName+" Secured Card"; 
188                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
189                        break; 
190                    case "smart-business-rewards": 
191                        document.title = "2X rewards in your top 2 spend categories | "+partnerName+" Business Smart Business Rewards Card"; 
192                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. More choices. More value for your business. Earn a $200 Bonus and 2x Rewards on your top 2 spend categories each month with the "+partnerName+" Credit Card."; 
193                        break; 
194                    case "business-cashback": 
195                        document.title = "Flexible rewards for your business | "+partnerName+" Business Cash Card"; 
196                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
197                        break; 
198                    case "business-real-rewards": 
199                        document.title = "Earn up to 3X points with no caps | "+partnerName+" Business Real Rewards Card"; 
200                        metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on." ; 
201                        break; 
202                    case "business-platinum2103": 
203                        document.title = "Pay down your other credit card balances faster | "+partnerName+" Business Card"; 
204                        metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
205                        break; 
206                    case "premier-visa-signature": 
207                        document.title = "Exclusively for Ameriprise clients | Ameriprise® Premier Visa Signature® Card"; 
208                        metaDesc = "Apply Today for an Ameriprise Financial Credit Card. Earn Rewards Points worth $375 cash value when deposited into an eligible account after spending $3,000 in eligible net purchases within the first 90 days of account opening."; 
209                        break; 
210                    case "visa-signature": 
211                        document.title = "Exclusively for Ameriprise clients | Ameriprise® Visa Signature® Card"; 
212                        metaDesc = "Apply Today for an Ameriprise Financial Credit Card. Earn Rewards Points worth $250 cash value when deposited into an eligible Ameriprise account after spending $2,000 in eligible net purchases within the first 90 days of account opening."; 
213                        break;                                                                                                 
214
215                if (metaDesc.length > 0) { 
216                    var m = document.createElement('meta');  
217                    m.name = 'description';  
218                    m.content = metaDesc;  
219                    document.head.appendChild(m); 
220
221 
222                AUI().ready(function () { 
223                    jQuery('.styled-select select').change(function () { 
224                        location.href = this.value; 
225                    }); 
226                }); 
227            </script> 
228         
229        <#else> 
230            <script> 
231                console.log("FI Cards Data empty"); 
232                //location.href = '${url404}'; 
233            </script> 
234        </#if>   
235    <#else> 
236        <script> 
237            console.log("FI opt out"); 
238            //location.href = '${url404}'; 
239        </script> 
240    </#if>  
241<#else> 
242    <script> 
243        console.log("location code empty"); 
244        //location.href = '${url404}'; 
245    </script> 
246</#if> 
حصل خطأ عند معالجة القالب.
The following has evaluated to null or missing:
==> bCode  [in template "10153#10191#6716946" at line 75, column 6]

----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #if bCode?starts_with("amp") && (url?...  [in template "10153#10191#6716946" at line 75, column 1]
----
1<#assign url = themeDisplay.getURLCurrent() > 
2<#assign oadURL = propsUtil.get('elan.oad.url') > 
3<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
4<#assign url404 = '/error/404.html' > 
5<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
6<#assign environment = url?replace('/11t1.*','','r')> 
7<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
8<#assign prcaURL = propsUtil.get('elan.prca.url')> 
9<#assign prcaURL_TC = 'https://onboarding.elancreditcard.com/gateway/partner/credit-card/begin?locationCode=XXXXX&offerId=XXXXXXXXXX&page=terms' > 
10 
11<#--  check bankercode validity  --> 
12<#assign useprcaValue = "" > 
13<#assign applicationType = "saa" > 
14<#if qstringmap["bankercode"]?has_content> 
15    <#assign bCode= qstringmap["bankercode"]?first> 
16 
17    <#assign fiData= utilServ.makeCall('crcDDCBankerAssistedApp','0&'+bCode)> 
18    <#if fiData?first?has_content> 
19        <#assign fi = fiData?first> 
20        <#if (fi.projectId == "12" || fi.projectId == "13" || fi.projectId == "14")> 
21            <#assign subbu_special = fi.offerId> 
22        </#if> 
23    </#if>       
24    <#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)> 
25    <#list bData as b> 
26      <#assign lc = b.locationcode > 
27      <#assign bName = b.branch > 
28      <#assign bPhone = b.businessphone > 
29      <#assign boeid = b.oeid?trim> 
30      <#assign fName = b.firstname?trim> 
31      <#assign lName = b.lastname?trim> 
32      <#assign rlc = b.reallocationcode > 
33      <#assign mappedLC = b.mappedLocationCode > 
34    </#list> 
35    <script> 
36        console.groupCollapsed("fi data from service call 'crcDDCBankerAssistedAppDetail'"); 
37            console.log('%clc: ', 'font-weight: bold; color: red;', '${lc}'); 
38            console.log('bName:  ','${bName}') 
39            console.log('bPhone:  ','${bPhone}') 
40            console.log('boeid','${boeid}') 
41            console.log('fName:  ','${fName}') 
42            console.log('lName:  ','${lName}') 
43            console.log('rlc: ','${rlc}') 
44            console.log('mappedLC:  ','${mappedLC}') 
45        console.groupEnd();      
46    </script> 
47    <#if qstringmap["ecdma-lc"]?has_content> 
48        <#assign lc_url= qstringmap["ecdma-lc"]?first> 
49    </#if> 
50    <script> 
51        console.log('%clc from URL: ', 'font-weight: bold; color: green;', '${lc_url}'); 
52    </script> 
53   
54<#else> 
55    <script> 
56        console.log("MainProductBcode missing"); 
57        //location.href = '${url404}'; 
58    </script> 
59</#if> 
60 
61<#assign text_to_apply_source = "vanity url" > 
62<#if qstringmap["sms"]?has_content> 
63    <#assign sms = 1 > 
64    <#assign text_to_apply_source = "sms" > 
65</#if> 
66<#if qstringmap["qrCode"]?has_content> 
67    <#assign text_to_apply_source = "qr code" > 
68</#if> 
69<#assign campaignId = "" > 
70<#assign ecidExt=""> 
71<#if qstringmap["ecid"]?has_content> 
72    <#assign campaignId = qstringmap["ecid"]?first > 
73    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
74</#if> 
75<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
76    <#assign ameriprise = true> 
77<#else> 
78    <#assign ameriprise = false> 
79</#if> 
80<#if mappedLC?has_content && !ameriprise> 
81<#assign lc = mappedLC > 
82</#if> 
83 
84<#if lc?has_content> 
85 
86    <#assign firstNameLength = fName?length > 
87    <#assign lastNameLength = lName?length > 
88    <#if firstNameLength + lastNameLength &gt; 19 > 
89        <#if lastNameLength &gt; 18 > 
90            <#assign bLName = lName?substring(0,18)> 
91        <#else> 
92            <#assign bLName = lName> 
93        </#if> 
94        <#assign maxFirstName = 19 - bLName?length > 
95        <#if firstNameLength &gt; maxFirstName > 
96            <#assign bFName = fName?substring(0,maxFirstName)> 
97        <#else> 
98            <#assign bFName = fName> 
99        </#if> 
100    <#else> 
101        <#assign bFName = fName > 
102        <#assign bLName = lName > 
103    </#if> 
104       
105 
106    <#assign prefix = "00000" > 
107    <#assign lcWithPrefix = prefix + lc > 
108    <#assign withPrefixLength = lcWithPrefix?length > 
109    <#assign startHere = withPrefixLength - 5> 
110    <#assign lc = lcWithPrefix?substring(startHere)> 
111 
112    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
113    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)>     
114 
115    <#if clientProfileList?first?has_content> 
116        <#assign clientProfile = clientProfileList?first> 
117        <#assign partnerName = clientProfile.getMarketingNameLong()> 
118        <#assign pbu = clientProfile.getPbu()> 
119        <#assign subbu = clientProfile.getSUBBRANDBUNBR()> 
120         
121        <#assign optoutData = utilServ.makeCall('crc_DDCSAAOptOut',pbu+'&'+subbu)> 
122        <#if (optoutData?size == 0)>                 
123            <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! /> 
124            <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
125            <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
126            <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*")>             
127                <#assign partnerUrl = 'https://' + partnerUrl> 
128            </#if>            
129            <#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
130            <#if (clientdata?size > 0)> 
131                <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
132                <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')> 
133                <#list clientdata as data> 
134                    <#assign billingCycle=data.BillingCycles> 
135                </#list> 
136                <#if pbu == "0864054"> 
137                    <#assign override = "berkshire"> 
138                <#else> 
139                    <#assign override = " "> 
140                </#if> 
141              
142                <#--  this one should be delete for prod  --> 
143                     
144                        <#assign cdnLogoUrl = "https://4f61efb10f32ceb57895-3733e103896f37259213d6ad72acbe68.ssl.cf2.rackcdn.com">   
145                        <#assign logoFileName = pbu + "-" + subbu + ".png"> 
146                     
147                <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')> 
148                <#assign pageClass = secondaryBackgroundImage.cardType.getData()> 
149                 
150                <#if (subbu_special?has_content)> 
151                    <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
152                <#else> 
153                    <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
154                </#if> 
155 
156 
157                <#assign temp = []> 
158                <#assign offerTypeList = []>      
159                <#assign index = 0> 
160                <#list fiCardsData as fib> 
161				    <#assign useprcaValue = fib.useprca!"">  
162                    <#if !(offerTypeList?seq_contains(fib.offerType))>  
163                        <#assign offerTypeList = offerTypeList + [fib.offerType]>                   
164                        <#assign temp = temp + fiCardsData[index..index]>  
165                    </#if>  
166                    <#assign index = index + 1>                
167                </#list>  
168                <#assign fiCardsData = temp> 
169                <#if (fiCardsData?size > 0)>   
170                    <#if (subbu_special?has_content)> 
171                        <#assign lc_used = fiCardsData?first.WebLocationCode>   
172                    <#else> 
173                        <#if ameriprise> 
174                            <#assign lc_used = lc_url>  
175                        <#else> 
176                            <#assign lc_used = mappedLC> 
177                        </#if> 
178                    </#if> 
179 
180                    <#list fiCardsData as fib> 
181                        <#if ameriprise> 
182                            <#if (fib.offerType=="101")> 
183                                <#assign productURL="premier-visa-signature"> 
184                                <#assign productName="Premier Visa Signature"> 
185                                <#assign productClass="ameriprise-premier-visa-signature"> 
186                            <#elseif (fib.offerType=="103")>      
187                                <#assign productURL = "visa-signature"> 
188                                <#assign productName = "Visa Signature">   
189                                <#assign productClass="ameriprise-visa-signature">                            
190                            </#if> 
191                        <#else>                     
192                            <#if (fib.offerType=="108") || (fib.offerType=="109")> 
193                                <#assign productURL="consumer-platinum"> 
194                                <#assign productName="Platinum"> 
195                            <#elseif (fib.offerType=="104")>    
196                                <#assign productURL = "max-cash"> 
197                                <#assign productName="Max Cash Preferred">                              
198                            <#elseif (fib.offerType=="101") || (fib.offerType=="103")> 
199                                <#assign productURL = "real-rewards"> 
200                                <#assign productName="Real Rewards"> 
201                            <#elseif fib.offerType == "115"> 
202                                <#assign productURL = "secured"> 
203                                <#assign productName="Secured"> 
204                            <#elseif fib.offerType == "144"> 
205                                <#assign productURL = "smart-business-rewards"> 
206                                <#assign productName="Smart Business Rewards">                                 
207                            <#elseif fib.offerType == "128"> 
208                                <#assign productURL = "business-cashback"> 
209                                <#assign productName="Business Cash"> 
210                            <#elseif fib.offerType == "143"> 
211                                <#assign productURL = "business-real-rewards"> 
212                                <#assign productName="Business Real Rewards"> 
213                            <#elseif fib.offerType == "121"> 
214                                <#assign productURL = "business-platinum2103"> 
215                                <#assign productName="Business"> 
216                            </#if>  
217                        </#if>                    
218                        <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png"> 
219                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg">   
220                        <#assign newSourceCode = fib.sourceCode>  
221                        <#assign newOfferId = fib.offerId>  
222                        <#if url?matches(".*/${productURL}.*")> 
223                            <#assign sdata = utilServ.makeCall('crcDDCGetSchumerBox', newOfferId + '&' + newSourceCode)> 
224                            <#if (sdata?size > 0)>   
225                                <#if (productURL=="platinum" && !ameriprise)> 
226                                    <#assign apr = "">                         
227                                    <#list sdata as d> 
228                                        <#if (d.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases") && (d.scrapedValue?has_content))> 
229                                            <#assign apr = d.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
230                                            <script> 
231                                                console.log("scraped data exists"); 
232                                                console.log("APR", '${apr}') 
233                                            </script> 
234                                            <#break> 
235                                        </#if> 
236                                    </#list> 
237                                    <script> 
238                                            $(document).ready(function () { 
239                                                var aprText = "${apr}"; 
240                                                if (aprText) { 
241                                                    var matches= aprText.match(/\d+(\.\d+)?%?/g); 
242                                                    var billing_cycle = ""; 
243                                                    var apr_min = ""; 
244                                                    var apr_max = ""; 
245                                                    if (aprText.indexOf("Platinum:") != -1) { 
246                                                        billing_cycle = matches[1]; 
247                                                        apr_min = matches[2]; 
248                                                        apr_max = matches[3]; 
249
250                                                    if (billing_cycle) { 
251                                                        $(".scraped-billing-cycle").html(billing_cycle); 
252
253                                                    if (apr_min) { 
254                                                        $(".scraped-apr-min").html(apr_min); 
255
256                                                    if (apr_max) { 
257                                                        $('.scraped-apr-max').html(apr_max); 
258
259
260                                            }); 
261                                    </script> 
262                                     
263                                </#if>                                 
264                            <#else>     
265                                <script> 
266                                    console.log("scraped data missing"); 
267                                </script> 
268                            </#if>   
269                            <#if ameriprise> 
270                                <#assign card_art_alt =  partnerName + " " + productName + " " + " Card"> 
271                                <#assign rollover_text =  partnerName + " " + productName + " " + "Card"> 
272                            <#else> 
273                                <#assign card_art_alt = partnerName> 
274                                <#assign rollover_text =  partnerName + " " + productName + " " + " Credit Card"> 
275                                <#assign card_text = productName + " Card"> 
276                            </#if> 
277                            <div class="hero-container ${pageClass} ${productClass!''}" title="${rollover_text!''}"> 
278							<#if ameriprise && url?contains("premier-visa-signature")> 
279                                    <span role="img" aria-label="Couple planning financials together" style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);"></span> 
280                                </#if> 
281                                <div class="hero-main"> 
282                                    <div class="hero-main-logo" title="${partnerName!''}"> 
283                                        <#if partnerUrl?has_content> 
284                                            <a href="${partnerUrl!''}" title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
285                                        <#else> 
286                                            <a title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
287                                        </#if> 
288                                        <div class="hero-main-logo-homelink">  
289                                            <#if ameriprise> 
290                                                <a href="${environment}/11t1m/index?bankercode=${bCode}&ecdma-lc=${lc_used}${ecidExt}">Back to Overview</a> 
291                                            <#else> 
292                                                <a href="${environment}/11t1/index?bankercode=${bCode}&ecdma-lc=${lc}${ecidExt}">Back to Overview</a> 
293                                            </#if> 
294                                        </div>  
295                                    </div> 
296                                    <div class="hero-main-container"> 
297                                        <div class="hero-main-offer bg-color-white"> 
298                                            <div class="offer-header bg-color-black text-color-white text-bold">${primaryHeadlineText.getData()}</div> 
299                                            <div class="offer-detail"> 
300                                                <div class="offer-detail-head">${primaryHeadlineFeature.getData()}</div> 
301                                                <div class="offer-detail-text text-color-default"> 
302                                                    ${primaryHeadlineFeatureTop.getData()} 
303                                                    ${primaryHeadlineFeatureBottom.getData()} 
304                                                </div> 
305                                                <div class="offer-detail-cardArt"> 
306                                                        <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
307                                                        <p>${card_text!''}</p> 
308                                                </div> 
309                                                <#if (fiCardsData?size > 0)>  
310                                                    <#if (useprcaValue == "1")> 
311                                                    <form class="form1" action='${prcaURL}?locationCode=${lc_used}&amp;offerId=${newOfferId}&amp;preparerType=customer&amp;sourceCode=${newSourceCode}&amp;referral=empstore&amp;applicationType=saa' method="post" id="BAAForm"> 
312                                                        <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
313                                                        <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea> 
314                                                        <input type="submit" data-button-name="cta-button-top" title="Apply Now for ${rollover_text!'Credit Card'}" class="jn-button apply-button text-bold button-bg-color-custom text-color-white" value="${ctaText.getData()}" disabled /> 
315                                                    </form> 
316													<#else> 
317													<form class="form1" action='${oadURL}?locationCode=${lc_used}&amp;offerId=${newOfferId}&amp;preparerType=customer&amp;sourceCode=${newSourceCode}&amp;referral=empstore&amp;applicationType=saa' method="post" id="BAAForm"> 
318                                                        <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
319                                                        <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea> 
320                                                        <input type="submit" data-button-name="cta-button-top" title="Apply Now for ${rollover_text!'Credit Card'}" class="jn-button apply-button text-bold button-bg-color-custom text-color-white" value="${ctaText.getData()}" disabled /> 
321                                                    </form> 
322													</#if> 
323                                                <#else> 
324													<#if (useprcaValue == "1")> 
325                                                    <form class="form2" action='${prcaURL}?locationCode=${lc_used}&amp;offerId=${offerId}&amp;preparerType=customer&amp;sourceCode=${sourceCode}&amp;applicationType=${applicationType}' method="post" id="BAAForm"> 
326                                                        <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
327                                                        <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea> 
328                                                        <input type="submit" data-button-name="cta-button-top" title="Apply Now for ${rollover_text!'Credit Card'}" class="jn-button apply-button text-bold button-bg-color-custom text-color-white" value="${ctaText.getData()}" disabled /> 
329                                                    </form> 
330													<#else> 
331													<form class="form2" action='${oadURL}?locationCode=${lc_used}&amp;offerId=${offerId}&amp;preparerType=customer&amp;sourceCode=${sourceCode}' method="post" id="BAAForm"> 
332                                                        <label for="appDataBAA" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
333                                                        <textarea rows="20" cols="100" name="applicationData" id="appDataBAA" style="display:none;"></textarea> 
334                                                        <input type="submit" data-button-name="cta-button-top" title="Apply Now for ${rollover_text!'Credit Card'}" class="jn-button apply-button text-bold button-bg-color-custom text-color-white" value="${ctaText.getData()}" disabled /> 
335                                                    </form> 
336													</#if> 
337                                                </#if> 
338                                            </div> 
339                                        </div> 
340                                    </div> 
341                                </div> 
342                                <div class="hero-primary-benefits bg-color-black-half-transparent text-color-white"> 
343                                    <#if secondaryFeatureText.getData() != ""> 
344                                        <#foreach item in secondaryFeatureText.getSiblings()> 
345                                            <div class="primary-benefit"> 
346												<#assign newDataPB = item.getData() > 
347												<#if (newDataPB?contains("https://apply.elancreditcard.com/oad/terms.controller?"))> 
348													<#assign tcLink = prcaURL_TC?replace("XXXXXXXXXX", fib.offerId)?replace("XXXXX", mappedLC) > 
349													<#assign startPhrase = "href=" > 
350													<#assign posHrefStart = newDataPB?index_of(startPhrase) + startPhrase?length> 
351													<#assign endPhrase = "target=" > 
352													<#assign posHrefEnd = newDataPB?index_of(endPhrase) + startPhrase?length - endPhrase?length> 
353													<#assign posHrefLen = newDataPB?length - 1> 
354													<#assign currentHrefVal = newDataPB[posHrefStart..posHrefEnd]> 
355													<#assign newDataPB = newDataPB?replace(currentHrefVal, tcLink)> 
356												</#if> 
357                                                <div class="primary-benefit-wrapper text-color-white"> 
358													${newDataPB}                                     
359                                                </div> 
360                                            </div> 
361                                        </#foreach> 
362                                    </#if> 
363                                </div> 
364                            </div> 
365                            <div class="standard-content-container" title="${rollover_text!''}"> 
366                                <h2 class="learnmore text-color-custom text-bold" onclick="learnmore(event)"> 
367                                    LEARN MORE 
368                                    <svg viewBox="0 0 150 100" width="45" height="30"> 
369                                        <polyline points="40 40 80 80 120 38" stroke-width="20" 
370                                            stroke-linecap="butt" fill="none" stroke-linejoin="miter"/> 
371                                    </svg> 
372                                </h2> 
373                                <h2 class="text-bold" id="more">${secondaryHeadlineText.getData()}</h2> 
374                                <div class="secondary-benefits"> 
375                                    <div class="option"> 
376										<#assign newData = additionalInfoGroupA.getData() > 
377										<#if (newData?contains("https://apply.elancreditcard.com/oad/terms.controller?"))> 
378											<#assign tcLink = prcaURL_TC?replace("XXXXXXXXXX", fib.offerId)?replace("XXXXX", mappedLC) > 
379											<#assign startPhrase = "href=" > 
380											<#assign posHrefStart = newData?index_of(startPhrase) + startPhrase?length> 
381											<#assign endPhrase = "target=" > 
382											<#assign posHrefEnd = newData?index_of(endPhrase) + startPhrase?length - endPhrase?length> 
383											<#assign posHrefLen = newData?length - 1> 
384											<#assign currentHrefVal = newData[posHrefStart..posHrefEnd]> 
385											<#assign newData = newData?replace(currentHrefVal, tcLink)> 
386										</#if> 
387										${newData}                                     
388                                        <#if pbu != "0892445"> 
389                                            <#if (sdata?size > 0)> 
390                                                <div> 
391 
392                                                    <#if (fib.offerType == "104") > 
393                                                         
394                                                        <#list sdata as d> 
395                                                            <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
396                                                                             
397                                                                <h3 class="text-color-custom"><strong>APR<sup>*</sup> for Purchases:</strong></h3> 
398                                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}"  class="text-color-default" target="_blank">Terms & Conditions</a> 
399                                                                        </p> 
400                                                                    <#break> 
401                                                            </#if> 
402                                                        </#list> 
403                                                        <#list sdata as d> 
404                                                            <#if (d.scrapedLabel?contains("APR for Balance Transfers") && (d.scrapedValue?has_content))>  
405                                                                             
406                                                                <h3 class="text-color-custom"><strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers</strong></h3> 
407                                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}"  class="text-color-default" target="_blank">Terms & Conditions</a> 
408                                                                        </p> 
409                                                                     
410                                                                    <#break> 
411                                                            </#if> 
412                                                        </#list> 
413                                                    <#else> 
414 
415                                                        <#if (fib.offerType == "115" || fib.offerType == "123")> 
416                                                            <h3 class="text-color-custom"><strong>APR for Purchases and Balance Transfers</strong></h3> 
417                                                        <#elseif (fib.offerType=="128" || fib.offerType=="143")> 
418                                                            <h3 class="text-color-custom"><strong>Annual Fee</strong></h3> 
419                                                        <#else> 
420                                                            <h3 class="text-color-custom"><strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers</strong></h3> 
421                                                        </#if> 
422                                                        <#list sdata as d> 
423                                                            <#if (fib.offerType=="128" || fib.offerType=="143") > 
424                                                                <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
425                                                                    <#if (fiCardsData?size > 0)>  
426                                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
427                                                                                class="text-color-default" target="_blank">Terms & Conditions</a> 
428                                                                        </p> 
429                                                                                 
430                                                                    <#else> 
431                                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
432                                                                                    class="text-color-default" target="_blank">Terms & Conditions</a> 
433                                                                        </p> 
434                                                                    </#if> 
435                                                                    <#break> 
436                                                                </#if> 
437 
438                                                            <#else> 
439                                                                <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
440                                                                             
441                                                                    <#if (fiCardsData?size > 0)>      
442                                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
443                                                                        </p> 
444                                                                    <#else> 
445                                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}"  class="text-color-default" target="_blank">Terms & Conditions</a> 
446                                                                        </p> 
447                                                                    </#if> 
448                                                                    <#break> 
449                                                                </#if> 
450                                                            </#if> 
451                                                        </#list> 
452 
453                                                    </#if> 
454                                                </div> 
455                                            </#if> 
456                                        </#if> 
457                                    </div> 
458                                    <div class="option"> 
459										<#assign newData = additionalInfoGroupB.getData() > 
460										<#if (newData?contains("https://apply.elancreditcard.com/oad/terms.controller?"))> 
461											<#assign tcLink = prcaURL_TC?replace("XXXXXXXXXX", fib.offerId)?replace("XXXXX", mappedLC) > 
462											<#assign startPhrase = "href=" > 
463											<#assign posHrefStart = newData?index_of(startPhrase) + startPhrase?length> 
464											<#assign endPhrase = "target=" > 
465											<#assign posHrefEnd = newData?index_of(endPhrase) + startPhrase?length - endPhrase?length> 
466											<#assign posHrefLen = newData?length - 1> 
467											<#assign currentHrefVal = newData[posHrefStart..posHrefEnd]> 
468											<#assign newData = newData?replace(currentHrefVal, tcLink)> 
469										</#if> 
470										${newData}  
471                                        <#if pbu != "0892445"> 
472                                            <div> 
473                                                <#if (fiCardsData?size > 0)> 
474                                                    <#if (sdata?size > 0)> 
475                                                        <#if (fib.offerType=="128" || fib.offerType=="143")> 
476                                                            <h3 class="text-color-custom"><strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers</strong></h3> 
477                                                        <#else> 
478                                                            <h3 class="text-color-custom"><strong>Annual Fee</strong></h3> 
479                                                        </#if> 
480                                                        <#list sdata as d> 
481                                                            <#if (fib.offerType=="128" || fib.offerType=="143")> 
482                                                                <#if (d.scrapedLabel?contains("Annual Percentage Rate") && (d.scrapedValue?has_content))>  
483                                                                     
484                                                                    <#if (fiCardsData?size > 0)>   
485                                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
486                                                                            class="text-color-default" target="_blank">Terms & Conditions</a> 
487                                                                        </p> 
488                                                                    <#else> 
489                                                                        <p>${d.scrapedValue} <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" 
490                                                                            class="text-color-default" target="_blank">Terms & Conditions</a> 
491                                                                        </p> 
492                                                                    </#if> 
493                                                                    <#break> 
494                                                                </#if> 
495                                                            <#else> 
496                                                                <#if (d.scrapedLabel?contains("Annual Membership Fee") && (d.scrapedValue?has_content))> 
497                                                                     
498                                                                    <#if (fiCardsData?size > 0)>  
499                                                                    <p> 
500                                                                        <#if (fib.offerType == "123")> 
501                                                                        Annual Fee: ${d.scrapedValue} 
502                                                                        <#else> 
503                                                                        ${d.scrapedValue}  
504                                                                        </#if> 
505                                                                        <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
506                                                                    </p> 
507                                                                    <#else> 
508                                                                    <p> 
509                                                                        <#if (fib.offerType == "123")> 
510                                                                        Annual Fee: ${d.scrapedValue} 
511                                                                        <#else> 
512                                                                        ${d.scrapedValue}  
513                                                                        </#if> 
514                                                                        <a href="${oadURL_TC}?step=display&amp;offerId=${newOfferId}&amp;locationCode=${lc_used}" class="text-color-default" target="_blank">Terms & Conditions</a> 
515                                                                    </p> 
516                                                                    </#if> 
517                                                                    <#break> 
518                                                                </#if> 
519                                                            </#if> 
520                                                        </#list> 
521                                                    </#if> 
522                                                </#if> 
523                                            </div> 
524                                        </#if> 
525                                    </div> 
526                                </div> 
527                            </div> 
528                            <div class="banner-wrapper" title="${rollover_text!''}"> 
529                                <div class="banner bg-color-custom ${override}"> 
530                                    <div class="banner-cardArt"> 
531                                            <img src="${cardArtImage!''}" alt="${card_art_alt!''}" title="${card_art_alt!''}" srcset="" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
532                                    </div> 
533                                    <div class="banner-cta"> 
534                                        <div class="banner-cta-text text-color-white text-bold"> 
535                                            ${optionalCtaFeatureText.getData()} 
536                                        </div> 
537                                        <a id="oadSecButton" data-button-name="cta-button-bottom" title="Apply Now for ${rollover_text!'Credit Card'}" class="jn-button banner-cta-apply-button text-bold button-bg-color-white text-color-custom">${optionalCtaText.getData()}</a> 
538                                    </div> 
539                                </div> 
540                            </div>     
541                 
542 
543                        </#if> 
544                    </#list>                         
545 
546                    <script> 
547                            var reportingData = window.reportingData || {}; 
548                        document.addEventListener('DOMContentLoaded', function() { 
549                            console.log('inside ready'); 
550                            var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
551                            var hostName = location.hostname; 
552                         
553                            function getDomainFromHostname(hostname) { 
554                                var parts = hostname.split('.'); 
555                                return parts.length === 3 ? parts[1] : parts[0]; 
556
557                            var domain = getDomainFromHostname(hostName); 
558                            var partnerName = "${partnerName!''}"; 
559 
560                            var ameriprise = '${ameriprise?string("yes", "no")}'; 
561                            var locationCode = "${rlc!lc}"; 
562                            var eidAmp = ""; 
563                            if (ameriprise == "yes") { 
564                                var bankercode_amp = '${bCode}'; 
565                                eidAmp = bankercode_amp.substring(3); 
566                                locationCode =""; 
567                            }                             
568 
569                            $('.jn-button').removeAttr('disabled'); 
570                            $('.jn-button').removeClass('jn-disabled'); 
571                            jQuery('#oadSecButton').on('click', function(e) { 
572                                jQuery('#BAAForm').submit(); 
573                            }); 
574                             
575                            jQuery('#BAAForm').on('submit', function(e){ 
576                                e.preventDefault(); 
577                                console.log('in custom submit'); 
578                                var xmlData; 
579                                if(ameriprise == "yes") { 
580										var applicationJsonData = { 
581										  "prefillData": { 
582											"versionNumber": "1.0", 
583											"applicationData": { 
584											  "referral": { 
585												"employeeId": eidAmp, 
586												"partnerLocationId": "${mappedLC!'0'}" 
587											  }, 
588											  "partnerParams": { 
589												"pudf1": "${bName!'0'}",    
590												"pudf3": "${boeid!0}",        
591												"pudf2": "${bFName!'0'} ${bLName!'0'}",    
592												"pudf4": areaCode + exchangeCode + num  
593
594
595
596
597									xmlData = JSON.stringify(applicationJsonData); 
598                                } else { 
599                                    xmlData = '<?xml version="1.0"?>'+ 
600                                        "<prefillData>"+  
601                                        "<versionNumber>1.0</versionNumber>"+  
602                                        "<applicationData>"+  
603                                        "<bankerInformation>"+  
604                                        "<locationCode>" + locationCode + "</locationCode>"+ 
605                                        "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
606                                        "<employeeID>${boeid!0}</employeeID>"+ 
607                                        "<name>" + 
608                                        "<first>${bFName!'0'}</first>" + 
609                                        "<last>${bLName!'0'}</last>" + 
610                                        "</name>"+ 
611                                        "<phone>"+ 
612                                        "<areaCode>"+areaCode+"</areaCode>"+  
613                                        "<exchange>"+exchangeCode+"</exchange>"+ 
614                                        "<number>"+num+"</number>"+  
615                                        "</phone>"+  
616                                        "</bankerInformation>"+  
617                                        "</applicationData>"+  
618                                        "</prefillData>" 
619                                }                                 
620                                 console.log("useprcaValue---->"+${useprcaValue}) 
621						if('${useprcaValue}' =='1'){ 
622								 
623								var employeeFullName = "${fName!'0'}" + ' ' + "${lName!'0'}"; 
624								var firstName = "${fName!'0'}".trim(); 
625								var lastName = "${lName!'0'}".trim(); 
626								var fullName = employeeFullName.trim();  
627									 
628								if (fullName.length <= 19) { 
629									employeeFullName = fullName;  
630								} else if (firstName.charAt(0) + ' ' + lastName.length <= 19) { 
631									employeeFullName = firstName.charAt(0) + ' ' + lastName;  
632								} else { 
633									employeeFullName = firstName.charAt(0) + ' ' + lastName.substring(0, 17); 
634
635								 var applicationJsonData = { 
636												  "prefillData": { 
637													"versionNumber": "1.0", 
638													"applicationData": { 
639													  "bankerInformation": { 
640														"locationCode": locationCode, 
641														"originatingBranchId": "${bName!'0'}", 
642														"employeeId": "${boeid!0}", 
643														"employeeFullName": employeeFullName, 
644														"employeePhoneNumber": phoneNum 
645
646
647
648												};							 
649							 
650							var jsonData = JSON.stringify(applicationJsonData); 
651							 
652							jQuery('#appDataBAA').val(jsonData); 
653						}else{ 
654						  jQuery('#appDataBAA').val(xmlData); 
655
656								 
657                                var buttonName = jQuery('.jn-button').data('button-name'); 
658                                /* SiteCatalyst  onClick tracking */ 
659                                reportingData.apply_button = buttonName; 
660                                AUI().ready(function() { 
661                                    if (window.publisherFW) { 
662                                        window.publisherFW.publishEvent("onClick", reportingData); 
663
664                                }); 
665 
666                                this.submit(); 
667                            }); 
668                            var regex = /\d+/g; 
669                            var bdNumber = "${bPhone!''}"; 
670                            var phoneNum = bdNumber.match(regex); 
671                            var areaCode = ""; 
672                            var exchangeCode = ""; 
673                            var num = ""; 
674                            if(phoneNum != null) { 
675                                phoneNum = phoneNum.join(""); 
676                                areaCode = phoneNum.substring(0,3); 
677                                exchangeCode = phoneNum.substring(3,6); 
678                                num = phoneNum.substring(6,10); 
679
680                            var product = ""; 
681                            switch(page) { 
682                                case "consumer-platinum2103": 
683                                    product="Platinum Card" 
684                                    break; 
685                                case "real-rewards": 
686                                    product="Real Rewards Card" 
687                                    break; 
688                                case "secured": 
689                                    product="Secured Card" 
690                                    break; 
691                                case "business-cashback": 
692                                    product="Business Cash Card" 
693                                    break; 
694                                case "business-real-rewards": 
695                                    product="Business Real Rewards Card" 
696                                    break; 
697                                case "business-rewards-plus": 
698                                    product="Business Rewards PLUS Card" 
699                                    break; 
700                                case "premier-visa-signature": 
701                                    product="Premier Visa Signature Card" 
702                                    break; 
703                                case "business-platinum2103": 
704                                    product="Business" 
705                                    break; 
706                                case "visa-signature": 
707                                    product="Visa Signature Card" 
708                                    break;                                     
709                                default:   
710                                    product = "All Cards";                           
711                            }                                  
712                                 
713                            /* update SiteCatalyst data object */ 
714                            reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
715                            reportingData.location_code = '${rlc!0}'; 
716                            reportingData.product = product; 
717                            reportingData.site_section = 'credit cards'; 
718                            reportingData.platform = 'microsite'; 
719                            reportingData.partner_name = "${partnerName}"; 
720                            reportingData.Banker_id = '${boeid}'; 
721                            reportingData.Banker_code = '${bCode}'; 
722                            reportingData.visitor_type = 'prospect'; 
723                            reportingData.text_to_apply_source = '${text_to_apply_source}'; 
724                            reportingData.page_type = 'product';  
725                            reportingData.campaign_id = '${campaignId}';  
726 
727                                 
728                            }); 
729                    </script> 
730                    <script async> 
731                        function learnmore(e) { 
732                            e.preventDefault(); 
733                            var element = document.getElementById("more"); 
734                            element.scrollIntoView({behavior: 'smooth'}); 
735
736                    </script>                     
737                <#else> 
738                    <script> 
739                        console.log("FI Cards Data empty"); 
740                        //location.href = '${url404}'; 
741                    </script> 
742                </#if>   
743            <#else> 
744                <script> 
745                    console.log("not Tier1 Fi"); 
746                    //location.href = '${url404}'; 
747                </script> 
748            </#if>                   
749        <#else> 
750            <script> 
751                console.log("Fi opt-out"); 
752                //location.href = '${url404}'; 
753            </script> 
754        </#if>        
755    <#else> 
756        <script> 
757            console.log("client profile empty"); 
758            //location.href = '${url404}'; 
759        </script> 
760    </#if>   
761</#if> 
حصل خطأ عند معالجة القالب.
The following has evaluated to null or missing:
==> qstringmap["bankercode"]  [in template "10153#10191#7973976" at line 5, column 17]

----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign bCode = qstringmap["bankercod...  [in template "10153#10191#7973976" at line 5, column 1]
----
1<#assign url = themeDisplay.getURLCurrent() > 
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
3<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
4 
5<#assign bCode= qstringmap["bankercode"]?first> 
6<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetailSql','0&'+bCode)> 
7<#list bData as b>      
8    <#assign lc = b.locationcode > 
9    <#assign rLC = b.reallocationcode > 
10    <#assign mappedLC = b.mappedLocationCode > 
11</#list>  
12<#if mappedLC?has_content && !(url?contains("11t1m"))> 
13    <#assign lc = mappedLC > 
14</#if> 
15<#if lc?has_content> 
16    <#assign prefix = "00000" > 
17    <#assign lcWithPrefix = prefix + lc > 
18    <#assign withPrefixLength = lcWithPrefix?length > 
19    <#assign startHere = withPrefixLength - 5> 
20    <#assign lc = lcWithPrefix?substring(startHere)> 
21    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
22    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
23 
24    <#assign clientProfile = clientProfileList?first>  
25    <#assign partnerName=clientProfile.getMarketingNameLong()> 
26</#if> 
27 
28<div class="content-container" title="${partnerName!''} - Disclaimer"> 
29    <div class="jn-disclaimer tier3-disclaimer-${class.getData()}"> 
30        ${content.getData()} 
31    </div> 
32</div> 
حصل خطأ عند معالجة القالب.
The following has evaluated to null or missing:
==> qstringmap["bankercode"]  [in template "10153#10191#6590291" at line 6, column 17]

----
Tip: It's the final [] step that caused this error, not those before it.
----
Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)??
----

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign bCode = qstringmap["bankercod...  [in template "10153#10191#6590291" at line 6, column 1]
----
1<#assign url = themeDisplay.getURLCurrent() > 
2<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
3<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
4<#assign url404 = '/error/404.html'> 
5 
6<#assign bCode= qstringmap["bankercode"]?first> 
7<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)> 
8<#list bData as b>      
9    <#assign lc = b.locationcode > 
10    <#assign rLC = b.reallocationcode > 
11    <#assign mappedLC = b.mappedLocationCode > 
12</#list>  
13 
14<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
15    <#assign ameriprise = true> 
16<#else> 
17    <#assign ameriprise = false> 
18</#if> 
19<#if mappedLC?has_content && !ameriprise> 
20    <#assign lc = mappedLC > 
21</#if> 
22 
23<#if lc?has_content> 
24 
25    <#assign prefix = "00000" > 
26    <#assign lcWithPrefix = prefix + lc > 
27    <#assign withPrefixLength = lcWithPrefix?length > 
28    <#assign startHere = withPrefixLength - 5> 
29    <#assign lc = lcWithPrefix?substring(startHere)> 
30   <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
31    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
32 
33    <#assign clientProfile = clientProfileList?first> 
34    <#assign pbu = clientProfile.getPbu()> 
35    <#assign subbu = clientProfile.getSUBBRANDBUNBR()>   
36    <#assign partnerName=clientProfile.getMarketingNameLong()> 
37   <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! /> 
38    <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
39    <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
40    <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*") && !partnerUrl?matches(r"(?i)^https?\:&#x2F;&#x2F;.*")> 
41        <#-- add protocal if missing  --> 
42        <#assign partnerUrl = 'https://' + partnerUrl> 
43    </#if> 
44	 
45	<#assign footerHtml = footerContent.getData()?replace("©&nbsp;2025 Elan Financial Services", "")> 
46	<footer class="footer bg-color-black text-color-white"> 
47        ${footerHtml} 
48    </footer> 
49 
50    <!-- BEGIN CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP --> 
51        <script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script> 
52        <style> 
53            #opt-out-button, 
54            .modal__btn.learn-more { 
55                background: #0C2074; 
56                border: 1px solid #0C2074; 
57                color: white; 
58                text-transform: uppercase; 
59                text-decoration: none; 
60                font-size: 16px; 
61                padding: 0.5rem 2rem; 
62                display: inline-block; 
63                border-radius: 0; 
64
65            #opt-out-button:hover, 
66            .modal__btn.learn-more:hover { 
67                color: white; 
68                border-color: #2C76AF !important; 
69                background-color: #2C76AF !important; 
70
71            .modal__btn.learn-more { 
72                background: white; 
73                border: 1px solid #0C2074; 
74                color: #0C2074; 
75
76            #opt-out-button[disabled="true"] { 
77                background-color: rgba(0,0,0,.15); 
78                color: rgba(0,0,0,.45); 
79                border-color: rgba(0,0,0,.25); 
80
81            #opt-out-button:hover[disabled="true"] { 
82                background-color: rgba(0,0,0,.15) !important; 
83                color: rgba(0,0,0,.45) !important; 
84                border-color: rgba(0,0,0,.25) !important; 
85
86            #opt-out-button:focus { 
87                outline-style: solid; 
88                outline-color: white; 
89                outline-offset: -3px; 
90                outline-width: 1px; 
91
92            .opt-out-link svg { 
93                width: 30px; 
94                height: 14px; 
95                width: auto; 
96                vertical-align: middle; 
97
98            .modal__overlay { 
99                position: fixed; 
100                top: 0; 
101                left: 0; 
102                right: 0; 
103                bottom: 0; 
104                background: rgba(0,0,0,0.6); 
105                display: flex; 
106                justify-content: center; 
107                align-items: center; 
108
109 
110            .modal__container { 
111                background-color: #fff; 
112                padding: 30px; 
113                max-width: 500px; 
114                max-height: 100vh; 
115                border-radius: 4px; 
116                overflow-y: auto; 
117                box-sizing: border-box; 
118
119 
120            .modal__header { 
121                display: flex; 
122                justify-content: space-between; 
123                align-items: center; 
124
125 
126            .modal__title { 
127                margin-top: 0; 
128                margin-bottom: 0; 
129                font-weight: 600; 
130                font-size: 20px; 
131                line-height: 1.25; 
132                color: #00449e; 
133                box-sizing: border-box; 
134
135 
136            .modal__close { 
137                background: transparent; 
138                border: 1px solid white; 
139                padding: 4px 8px; 
140
141            .modal__close:hover { 
142                border: 1px solid black; 
143
144 
145            .modal__header .modal__close:before { content: "\2715"; } 
146 
147            .modal__content { 
148                margin-top: 2rem; 
149                margin-bottom: 2rem; 
150                line-height: 1.5; 
151
152 
153            @keyframes mmfadeIn { 
154                from { opacity: 0; } 
155                to { opacity: 1; } 
156
157 
158            @keyframes mmfadeOut { 
159                from { opacity: 1; } 
160                to { opacity: 0; } 
161
162 
163            @keyframes mmslideIn { 
164                from { transform: translateY(15%); } 
165                to { transform: translateY(0); } 
166
167 
168            @keyframes mmslideOut { 
169                from { transform: translateY(0); } 
170                to { transform: translateY(-10%); } 
171
172 
173            .micromodal-slide { 
174                display: none; 
175
176 
177            .micromodal-slide.is-open { 
178                display: block; 
179
180 
181            .micromodal-slide[aria-hidden="false"] .modal__overlay { 
182                animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
183
184 
185            .micromodal-slide[aria-hidden="false"] .modal__container { 
186                animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); 
187
188 
189            .micromodal-slide[aria-hidden="true"] .modal__overlay { 
190                animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
191
192 
193            .micromodal-slide[aria-hidden="true"] .modal__container { 
194                animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); 
195
196 
197            .micromodal-slide .modal__container, 
198            .micromodal-slide .modal__overlay { 
199                will-change: transform; 
200
201        </style> 
202 
203        <div class="modal micromodal-slide" id="modal-1" aria-hidden="true"> 
204        <div class="modal__overlay" tabindex="-1" data-micromodal-close> 
205            <div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title"> 
206            <header class="modal__header"> 
207                <h2 class="modal__title" id="modal-1-title"> 
208                Your California privacy choices 
209                </h2> 
210                <button class="modal__close" aria-label="Close modal" data-micromodal-close></button> 
211            </header> 
212            <div class="modal__content" id="modal-1-content"> 
213                <div id="message-no-cookie"> 
214                    <p> 
215                    We use technologies, such as cookies, that gather information on our website. That information is used for a variety of purposes, such as to understand how visitors interact with our websites, or to serve advertisements on our websites or on other websites. The use of technologies, such as cookies, constitutes a ‘share’ or ‘sale’ of personal information under the California Privacy Rights Act. You can stop the use of certain third-party tracking technologies that are not considered our service providers by clicking on “Opt-Out” below or by broadcasting the global privacy control signal.</p> 
216                     
217        <p>&nbsp;</p> 
218 
219        <p>Note that due to technological limitations, if you visit our website from a different computer or device, or clear cookies on your browser that store your preferences, you will need to return to this screen to opt-out and/or rebroadcast the signal. You can find a description of the types of tracking technologies, and your options with respect to those technologies, by clicking “Learn more” below.</p> 
220            </div> 
221            <div id="message-with-cookie"> 
222                <p>You have successfully opted-out.</p> 
223            </div> 
224            </div> 
225            <div class="modal__footer"> 
226                <a href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?phase=privacyPolicy" target="_blank" class="modal__btn learn-more" aria-label="Learn more">Learn More</a> 
227                <button id="opt-out-button" class="modal__btn modal__btn-primary" aria-label="Opt Out and Close modal" onclick="window.californiaOptOut()">Opt Out</button> 
228            </div> 
229            </div> 
230        </div> 
231        </div> 
232    <!-- END CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP --> 
233    <script> 
234        const fdicNode = document.querySelector('.footer .fdic') 
235    </script> 
236    <#if url?contains("11t1m")> 
237        <script>                 
238            document.querySelector('.footer .copyright').classList.add("ecdma-footer-client-name-copyright"); 
239            fdicNode.innerHTML='<a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?loc=${lc!0}" target="_blank">Privacy and Security</a>'; 
240        </script> 
241    <#else> 
242        <script>                 
243            document.querySelector('.footer .copyright').classList.add("ecdma-footer-client-name-copyright"); 
244            document.querySelector('.footer .fdic').innerHTML='<a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?loc=${lc!0}" target="_blank">Privacy and Security</a>'; 
245            var newNode = document.createElement("div");  
246             newNode.classList.add("member-agreement"); 
247            newNode.innerHTML='<a class="text-color-white" href="https://online1.elancard.com/oad/cmas.controller?locationCode=${lc!0}&preparerType=customer&isNewRequest=false" target="_blank">Cardmember Agreements</a>'; 
248            var parent = fdicNode.parentNode; 
249            parent.insertBefore(newNode, fdicNode); 
250        </script> 
251    </#if> 
252 
253    <#if partnerUrl?has_content> 
254        <script> 
255            document.querySelector('.copyright .homelink').innerHTML="<a class='text-color-white' href='${partnerUrl!''}' title='${partnerName!''}' target='_blank'>Home</a>"; 
256        </script> 
257    </#if> 
258    <script> 
259    /* BEGIN CALIFORNIA OPT-OUT MODAL TRIGGER */ 
260    fdicNode.insertAdjacentHTML('afterend', '<div style="display: inline-block; margin-left: 100px;"><a href="javascript:void(0);" class="opt-out-link text-color-white" data-micromodal-trigger="modal-1">Your California privacy choices <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 14" xml:space="preserve"><path d="M7.4 12.8h6.8l3.1-11.6H7.4C4.2 1.2 1.6 3.8 1.6 7s2.6 5.8 5.8 5.8z" fill-rule="evenodd" clip-rule="evenodd" fill="#fff"/><path d="M22.6 0H7.4c-3.9 0-7 3.1-7 7s3.1 7 7 7h15.2c3.9 0 7-3.1 7-7s-3.2-7-7-7zm-21 7c0-3.2 2.6-5.8 5.8-5.8h9.9l-3.1 11.6H7.4c-3.2 0-5.8-2.6-5.8-5.8z" fill-rule="evenodd" clip-rule="evenodd" fill="#06f"/><path d="M24.6 4c.2.2.2.6 0 .8L22.5 7l2.2 2.2c.2.2.2.6 0 .8-.2.2-.6.2-.8 0l-2.2-2.2-2.2 2.2c-.2.2-.6.2-.8 0-.2-.2-.2-.6 0-.8L20.8 7l-2.2-2.2c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0l2.2 2.2L23.8 4c.2-.2.6-.2.8 0z" fill="#fff"/><path d="M12.7 4.1c.2.2.3.6.1.8L8.6 9.8c-.1.1-.2.2-.3.2-.2.1-.5.1-.7-.1L5.4 7.7c-.2-.2-.2-.6 0-.8.2-.2.6-.2.8 0L8 8.6l3.8-4.5c.2-.2.6-.2.9 0z" fill="#06f"/></svg></a></div>'); 
261    /* END CALIFORNIA OPT-OUT MODAL TRIGGER */ 
262    </script> 
263    <!-- BEGIN CALIFORNIA OPT-OUT MODAL LOGIC --> 
264    <script> 
265        window.getCookieDomain = function() { 
266            var hostname = window.location.hostname.split("."); 
267            return hostname && hostname.slice(hostname.length - 2).join("."); 
268
269        window.setToOptOut = function() { 
270            if (window.getCookie('privacy_optout')) { 
271                    document.getElementById('message-no-cookie').style.display = 'none'; 
272                    document.getElementById('message-with-cookie').style.display = 'block'; 
273                    document.getElementById('opt-out-button').setAttribute('disabled', true) 
274                } else { 
275                    document.getElementById('message-no-cookie').style.display = 'block'; 
276                    document.getElementById('message-with-cookie').style.display = 'none'; 
277
278
279        window.getCookie = function(name) { 
280            var value = '; ' + document.cookie; 
281            var parts = value.split('; ' + name + '='); 
282            if (parts.length === 2) return parts.pop().split(';').shift(); 
283
284        window.californiaOptOut = function() { 
285            if (!window.getCookie('privacy_optout')) { 
286                document.cookie = 'privacy_optout=1; path=/; domain=' + window.getCookieDomain() + '; expires=Thu, 31 Dec 2099 00:00:00 GMT;'; 
287                try { 
288                if (window.CustomEvent) { 
289                    window.dispatchEvent(new CustomEvent('privacy_optout')); 
290                } else { 
291                    var privacyOptoutEvent = document.createEvent('Event'); 
292                    privacyOptoutEvent.initEvent('privacy_optout', true, true); 
293                    window.dispatchEvent(privacyOptoutEvent); 
294
295                window.setToOptOut(); 
296                } catch (err) { 
297                console.error(err); 
298
299
300
301        MicroModal.init({ 
302            onShow: window.setToOptOut 
303        }); 
304        AUI().ready(function() { 
305            // user browser setting for Global Privacy Control to opt out of sharing information with third parties 
306            const isBrowserGpcOptOut = navigator.globalPrivacyControl; 
307            if(isBrowserGpcOptOut === true) { 
308            window.californiaOptOut(); 
309
310        }); 
311    </script> 
312    <!-- END CALIFORNIA OPT-OUT MODAL LOGIC --> 
313</#if>