حصل خطأ عند معالجة القالب.
The following has evaluated to null or missing:
==> qstringmap["bankercode"]  [in template "10154#10192#154098156" at line 8, 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 "10154#10192#154098156" at line 8, 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 utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
5<#assign url404 = '/error/404.html'> 
6 
7 
8<#assign bCode= qstringmap["bankercode"]?first> 
9<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)> 
10<#list bData as b>      
11    <#assign lc = b.locationcode > 
12    <#assign rLC = b.reallocationcode > 
13    <#assign mappedLC = b.mappedLocationCode > 
14</#list>  
15<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
16    <#assign ameriprise = true> 
17<#else> 
18    <#assign ameriprise = false> 
19</#if> 
20 
21<#if mappedLC?has_content && !ameriprise> 
22    <#assign lc = mappedLC > 
23</#if> 
24 
25<#assign fiData= utilServ.makeCall('crcDDCBankerAssistedApp','0&'+bCode)> 
26<#if fiData?first?has_content> 
27    <#assign fi = fiData?first> 
28    <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))> 
29        <#assign subbu_special = fi.offerId> 
30    </#if> 
31</#if> 
32 
33 
34<#if lc?has_content> 
35    <#assign prefix = "00000" > 
36    <#assign lcWithPrefix = prefix + lc> 
37    <#assign withPrefixLength = lcWithPrefix?length > 
38    <#assign startHere = withPrefixLength - 5> 
39    <#assign lc = lcWithPrefix?substring(startHere)>   
40    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
41    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
42 
43    <#assign clientProfile = clientProfileList?first> 
44    <#assign partnerName = clientProfile.getMarketingNameLong()> 
45    <#assign pbu = clientProfile.getPbu()> 
46    <#assign subbu = clientProfile.getSUBBRANDBUNBR()>  
47    <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! /> 
48    <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
49    <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
50    <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*") && !partnerUrl?matches(r"(?i)^https?\:&#x2F;&#x2F;.*")>             
51        <#assign partnerUrl = 'https://' + partnerUrl> 
52    </#if> 
53 
54    <#assign clientdata = utilServ.makeCall('crcDDCTier1Customizations','0&'+pbu+'&'+subbu+'&11')> 
55    <#assign logoFileName = clientProfile.getLogoBFormat1()?replace(".", "-")?replace("-([^-]*)$", ".$1", "r")?lower_case> 
56    <#assign cdnLogoUrl = propsUtil.get('rackspace.cdn.web.url')> 
57        <script> 
58        console.log('logo url', '${cdnLogoUrl}${logoFileName}'); 
59    </script> 
60    <#if pbu == "0864054"> 
61        <#assign override = "berkshire"> 
62    <#else> 
63        <#assign override = " "> 
64    </#if> 
65    <#--  this one should be delete for prod  --> 
66                 
67    <#assign cdnLogoUrl = "https://4f61efb10f32ceb57895-3733e103896f37259213d6ad72acbe68.ssl.cf2.rackcdn.com">   
68    <#assign logoFileName = pbu + "-" + subbu + ".png"> 
69 
70    <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')> 
71    <#if (subbu_special?has_content)> 
72        <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
73        <script> 
74            console.log('new subbu', '${subbu_special!''}'); 
75        </script>  
76    <#else> 
77        <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
78    </#if> 
79    <#assign temp = []> 
80    <#assign consumerCards = []> 
81    <#assign businessCards = []>  
82    <#assign offerTypeList = []>       
83    <#assign index = 0> 
84    <#assign ameriprise_cards= []> 
85    <#assign consumerOfferTypes =['104', '101', '103', '108', '109', '115']> 
86    <#assign businessOfferTypes =['144', '128', '143', '121', '123']> 
87    <#list fiCardsData as fib> 
88        <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
89            <#assign offerTypeList = offerTypeList + [fib.offerType]> 
90            <#assign temp = temp + fiCardsData[index..index]>    
91            <#if ameriprise> 
92                <#if (fib.offerType == "101" || fib.offerType == "103")> 
93                    <#assign ameriprise_cards= ameriprise_cards + fiCardsData[index..index]> 
94                </#if>                      
95            <#else> 
96                <#if consumerOfferTypes?seq_contains(fib.offerType)> 
97                    <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
98                <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
99                    <#assign businessCards = businessCards + fiCardsData[index..index]> 
100                </#if>             
101            </#if>                 
102        </#if>  
103        <#assign index = index + 1>   
104                     
105    </#list>        
106    <#assign fiCardsData = temp> 
107    <#if ameriprise> 
108        <#assign consumerCards = ameriprise_cards?sort_by("offerType")> 
109    </#if> 
110 
111    <#if (fiCardsData?size > 0)>   
112        <#if (subbu_special?has_content)> 
113            <#assign lc_used = fiCardsData?first.WebLocationCode>   
114        <#else> 
115            <#if ameriprise> 
116                <#assign lc_used = mappedLC>  
117            <#else> 
118                <#assign lc_used = lc>  
119            </#if> 
120        </#if>               
121        <#assign offerId = ""> 
122        <#assign sourceCode = ""> 
123        <#assign cardArtImage = ""> 
124        <#assign productUrl = ""> 
125        <#assign product = ""> 
126        <#assign preparerType = "customer"> 
127        <#assign apr = ""> 
128        <#assign cardIndex = 0>   
129        <#if (class.getData() == "landing-consumer" && consumerCards?size > 0)> 
130            <#if (offerTypeList?seq_contains("108")) || (offerTypeList?seq_contains("109")) > 
131                <#list consumerCards as card> 
132                    <#if (card.offerType=="108") || (card.offerType=="109") > 
133                        <#assign offerId = card.offerId> 
134                        <#assign sourceCode = card.sourceCode> 
135                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
136                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
137                        <#assign productUrl="consumer-platinum"> 
138                        <#assign product="Platinum"> 
139                        <#assign cardIndex = 2> 
140                        <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
141                        <#if (scrapedData?size > 0)> 
142                            <#list scrapedData as sItem> 
143                                <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
144                                    <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
145                                    <#break> 
146                                </#if> 
147                            </#list> 
148                            <script> 
149                                $(document).ready(function () { 
150                                    var aprText = "${apr}"; 
151                                    if (aprText) { 
152                                        try { 
153                                            var matches= aprText.match(/\d+(\.\d+)?%?/g); 
154                                            var billing_cycle = matches[1]; 
155                                            var apr_min = apr_min = matches[2]; 
156                                            var apr_max = apr_max = matches[3]; 
157                                            if (billing_cycle) { 
158                                                $(".scraped-billing-cycle").html(billing_cycle); 
159
160                                            if (apr_min) { 
161                                                $(".scraped-apr-min").html(apr_min); 
162
163                                            if (apr_max) { 
164                                                $('.scraped-apr-max').html(apr_max); 
165
166 
167                                        } catch (e) { 
168                                            console.log(e); 
169
170
171                                }); 
172                            </script> 
173                        </#if>  
174                    </#if> 
175                </#list> 
176            <#else> 
177                <#assign displayedCard = consumerCards[0]> 
178                <script> 
179                    console.log('dispalyed card:','${displayedCard.offerType}'); 
180                </script> 
181                <#assign offerId = displayedCard.offerId> 
182                <#assign sourceCode = displayedCard.sourceCode> 
183                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
184                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
185                <#if ameriprise> 
186                    <#if (displayedCard.offerType == "101")> 
187                        <#assign productUrl="ameriprise-premier-visa-signature"> 
188                        <#assign product="Premier Visa Signature"> 
189                        <#assign cardIndex = 0> 
190                    <#elseif (displayedCard.offerType == "103")> 
191                        <#assign productUrl = "ameriprise-visa-signature"> 
192                        <#assign product="Visa Signature"> 
193                        <#assign cardIndex = 1> 
194                    </#if> 
195                <#else> 
196                        <#if (displayedCard.offerType == "101" || displayedCard.offerType == "103")> 
197                            <#assign productUrl="real-rewards"> 
198                            <#assign product="Real Rewards"> 
199                            <#assign cardIndex = 1>                           
200                        <#elseif (displayedCard.offerType == "108" || displayedCard.offerType == "109")> 
201                            <#assign productUrl = "consumer-platinum2103"> 
202                            <#assign product="Platinum">    
203                            <#assign cardIndex = 2>    
204                            <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
205                            <#if (scrapedData?size > 0)> 
206                                <#list scrapedData as sItem> 
207                                    <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
208                                        <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
209                                        <#break> 
210                                    </#if> 
211                                </#list> 
212                                <script> 
213                                    $(document).ready(function () { 
214                                        var aprText = "${apr}"; 
215                                        if (aprText) { 
216                                            try { 
217                                                var matches= aprText.match(/\d+(\.\d+)?%?/g); 
218                                                var billing_cycle = matches[1]; 
219                                                var apr_min = apr_min = matches[2]; 
220                                                var apr_max = apr_max = matches[3]; 
221                                                if (billing_cycle) { 
222                                                    $(".scraped-billing-cycle").html(billing_cycle); 
223
224                                                if (apr_min) { 
225                                                    $(".scraped-apr-min").html(apr_min); 
226
227                                                if (apr_max) { 
228                                                    $('.scraped-apr-max').html(apr_max); 
229
230 
231                                            } catch (e) { 
232                                                console.log(e); 
233
234
235                                    }); 
236                                </script> 
237                            </#if>                                                     
238                        <#elseif (displayedCard.offerType == "115")> 
239                            <#assign productUrl = "secured"> 
240                            <#assign product="Secured"> 
241                            <#assign cardIndex = 3> 
242                        </#if> 
243                </#if> 
244            </#if> 
245        </#if> 
246        <#if (class.getData() == "landing-business" && businessCards?size > 0)> 
247            <#if (offerTypeList?seq_contains("144")) > 
248                <#list businessCards as card> 
249                    <#if (card.offerType=="144")> 
250                        <#assign offerId = card.offerId> 
251                        <#assign sourceCode = card.sourceCode> 
252                        <#assign cardArtImage = cdnCardArtUrl + "/"+card.filename+".png"> 
253                        <#assign cardArtImageAlt = cdnCardArtUrl + "/"+card.filename+".jpg"> 
254                        <#assign productUrl="smart-business-rewards"> 
255                        <#assign product="Smart Business Rewards"> 
256                        <#assign cardIndex = 0> 
257                    </#if> 
258                </#list> 
259            <#else> 
260                <#assign displayedCard = businessCards[0]> 
261                <#assign offerId = displayedCard.offerId> 
262                <#assign sourceCode = displayedCard.sourceCode> 
263                <#assign cardArtImage = cdnCardArtUrl + "/"+ displayedCard.filename + ".png"> 
264                <#assign cardArtImageAlt = cdnCardArtUrl + "/"+ displayedCard.filename + ".jpg"> 
265 
266                <#if (displayedCard.offerType=="143")> 
267                    <#assign productUrl="business-real-rewards"> 
268                    <#assign product="Business Real Rewards"> 
269                    <#assign cardIndex = 0>    
270                <#elseif (displayedCard.offerType=="128")> 
271                    <#assign productUrl = "business-cashback"> 
272                    <#assign product="Business Cash"> 
273                    <#assign cardIndex = 1>                     
274                <#elseif (displayedCard.offerType=="121")> 
275                    <#assign productUrl = "visa-business"> 
276                    <#assign product="Visa Business"> 
277                    <#assign cardIndex = 3> 
278                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', offerId + '&'+ sourceCode)> 
279                    <#if (scrapedData?size > 0)> 
280                        <#list scrapedData as sItem> 
281                            <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
282                                <#assign apr = sItem.scrapedValue?replace("(\n|\r\n|\r)+", " ","r")> 
283                                <#break> 
284                            </#if> 
285                        </#list> 
286                        <script> 
287                            $(document).ready(function () { 
288                                var aprText = "${apr}"; 
289                                if (aprText) { 
290                                    try { 
291                                        var matches= aprText.match(/\d+(\.\d+)?%?/g); 
292                                        var billing_cycle = matches[1]; 
293                                        var apr_min = apr_min = matches[2]; 
294                                        var apr_max = apr_max = matches[3]; 
295                                        if (billing_cycle) { 
296                                            $(".scraped-billing-cycle").html(billing_cycle); 
297
298                                        if (apr_min) { 
299                                            $(".scraped-apr-min").html(apr_min); 
300
301                                        if (apr_max) { 
302                                            $('.scraped-apr-max').html(apr_max); 
303
304 
305                                    } catch (e) { 
306                                        console.log(e); 
307
308
309                            }); 
310                        </script> 
311                    </#if>                       
312                </#if> 
313            </#if> 
314        </#if>    
315        <#if product != ""> 
316            <#if ameriprise> 
317                <#assign card_art_alt =  partnerName + " " + product + " Card"> 
318                <#assign rollover_text =  partnerName + " " + product + " Card"> 
319            <#else> 
320                <#assign card_art_alt = partnerName> 
321                <#assign rollover_text =  partnerName + " " + product + " Credit Card"> 
322                <#assign card_text = product + " Card"> 
323            </#if>  
324        </#if>  
325        <div class="jn-hero-container product-${productUrl} tier1-hero-${class.getData()}" title="${rollover_text!''}"> 
326            <div class="hero-main"> 
327                <div class="hero-main-logo"> 
328                    <#if partnerUrl?has_content> 
329                        <a href="${partnerUrl!''}" title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
330                    <#else> 
331                        <a title="${partnerName!''}"><img src="${cdnLogoUrl!''}/${logoFileName!''}" alt="${partnerName!''}"></a> 
332                    </#if> 
333                </div> 
334                <div class="hero-main-container"> 
335                    <div class="hero-main-offer bg-color-white"> 
336                        <div class="offer-header bg-color-black text-color-white text-bold">${productTitle.getSiblings()[cardIndex].primaryHeadlineText.getData()}</div> 
337                        <div class="offer-detail"> 
338                            <div class="offer-detail-head">${productTitle.getSiblings()[cardIndex].primaryHeadlineFeature.getData()}</div> 
339                            <div class="offer-detail-text text-color-default"> 
340                                ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureTop.getData()} 
341                                ${productTitle.getSiblings()[cardIndex].primaryHeadlineFeatureBottom.getData()} 
342                            </div> 
343                            <div class="offer-detail-cardArt">                                                  
344                                <img src="${cardArtImage!''}" alt="${card_art_alt!''}" srcset="" title="${card_art_alt!''}" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
345                                <p>${card_text!''}</p> 
346                            </div> 
347                            <#if ameriprise> 
348                                <a data-button-name="cta-button-top" title="Learn More about ${partnerName!''} credit cards" class="jn-button apply-button text-bold button-bg-color-custom text-color-white" href="javascript:void(0);" onclick="goToByScroll('product-display')">${productTitle.getSiblings()[cardIndex].ctaText.getData()}</a>                                 
349                            <#else>  
350                                <form action="${oadURL}?locationCode=${lc_used}&offerId=${offerId}&preparerType=${preparerType}&sourceCode=${sourceCode}" method="post" class="BAAForm"> 
351                                    <label for="appDataBAA-${sourceCode}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
352                                    <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${sourceCode}" class="appDataBAA" style="display:none;" title="application data"></textarea> 
353                                    <input type="submit" data-button-name="cta-button-top"  data-product-name="${productUrl!''}" title="Apply Now for ${partnerName!''} ${product!''} Credit Card" 
354                                        class="jn-button apply-button apply-now-button text-bold button-bg-color-custom text-color-white" value="${productTitle.getSiblings()[cardIndex].ctaText.getData()}" disabled /> 
355                                </form> 
356                            </#if> 
357                        </div> 
358                    </div> 
359                </div> 
360            </div> 
361        </div>   
362 
363    </#if> 
364</#if> 
حصل خطأ عند معالجة القالب.
The following has evaluated to null or missing:
==> qstringmap["bankercode"]  [in template "10154#10192#154098159" at line 38, 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 "10154#10192#154098159" at line 38, column 1]
----
1<style> 
2    .actions { 
3        padding-top: 12px !important; 
4		padding-bottom: 12px !important; 
5
6</style> 
7 
8 
9 
10<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
11<#assign oadURL = propsUtil.get('elan.oad.url') > 
12<#assign url = themeDisplay.getURLCurrent() > 
13<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
14<#assign url404 = '/error/404.html'> 
15<#assign oadURL_TC = 'https://online1.elancard.com/oad/terms.controller' > 
16<#assign environment = url?replace('/index.*','','r')> 
17 
18 
19 
20<#assign text_to_apply_source = "vanity url" > 
21<#if qstringmap["sms"]?has_content> 
22    <#assign sms = 1 > 
23    <#assign text_to_apply_source = "sms" > 
24</#if> 
25<#if qstringmap["qrCode"]?has_content> 
26    <#assign text_to_apply_source = "qr code" > 
27</#if> 
28 
29<#if qstringmap["ecid"]?has_content> 
30    <#assign ecidExt="&ecid="+qstringmap["ecid"]?first> 
31    <#assign campaignId = qstringmap["ecid"]?first > 
32<#else> 
33    <#assign ecidExt=""> 
34    <#assign campaignId = "" > 
35</#if> 
36<#--  check bankercode validity  --> 
37 
38<#assign bCode= qstringmap["bankercode"]?first> 
39 
40<#assign fiData= utilServ.makeCall('crcDDCBankerAssistedApp','0&'+bCode)> 
41<#if fiData?first?has_content> 
42    <#assign fi = fiData?first> 
43    <#if ((fi.projectId == "12") || (fi.projectId == "13") || (fi.projectId == "14"))> 
44        <#assign subbu_special = fi.offerId> 
45    </#if> 
46</#if> 
47 
48<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)> 
49<#list bData as b>      
50    <#assign lc = b.locationcode > 
51    <#assign bName = b.branch > 
52    <#assign bPhone = b.businessphone > 
53    <#assign boeid = b.oeid > 
54    <#assign fName = b.firstname?trim > 
55    <#assign lName = b.lastname?trim > 
56    <#assign rLC = b.reallocationcode > 
57    <#assign mappedLC = b.mappedLocationCode > 
58</#list>  
59 
60<#if qstringmap["ecdma-lc"]?has_content> 
61    <#assign lc_url= qstringmap["ecdma-lc"]?first> 
62</#if> 
63 
64<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
65    <#assign ameriprise = true> 
66<#else> 
67    <#assign ameriprise = false> 
68</#if> 
69<#if mappedLC?has_content && !ameriprise> 
70    <#assign lc = mappedLC > 
71</#if> 
72 
73           
74<#if lc?has_content> 
75    <#assign firstNameLength = fName?length > 
76    <#assign lastNameLength = lName?length > 
77    <#if firstNameLength + lastNameLength &gt; 19 > 
78        <#if lastNameLength &gt; 18 > 
79            <#assign bLName = lName?substring(0,18)> 
80        <#else> 
81            <#assign bLName = lName> 
82        </#if> 
83        <#assign maxFirstName = 19 - bLName?length > 
84        <#if firstNameLength &gt; maxFirstName > 
85            <#assign bFName = fName?substring(0,maxFirstName)> 
86        <#else> 
87            <#assign bFName = fName> 
88        </#if> 
89    <#else> 
90        <#assign bFName = fName> 
91        <#assign bLName = lName> 
92    </#if>  
93 
94    <#assign prefix = "00000" > 
95    <#assign lcWithPrefix = prefix + lc > 
96    <#assign withPrefixLength = lcWithPrefix?length > 
97    <#assign startHere = withPrefixLength - 5> 
98    <#assign lc = lcWithPrefix?substring(startHere)>   
99    <#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! /> 
100    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
101    <#if (clientProfileList?first?has_content)> 
102        <#assign clientProfile = clientProfileList?first> 
103        <#assign partnerName = clientProfile.getMarketingNameLong()> 
104        <#assign pbu = clientProfile.getPbu()> 
105        <#assign subbu = clientProfile.getSUBBRANDBUNBR()>          
106        <#assign cdnCardArtUrl = propsUtil.get('rackspace.cdn.cardart.url')>  
107        <#if (subbu_special?has_content)> 
108        <script> 
109            console.log("special subbu:", '${subbu_special}'); 
110        </script> 
111            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu_special)>  
112        <#else> 
113            <#assign fiCardsData = utilServ.makeCall('crcTier3GetPbuData','0&' + pbu + '&' + subbu)>  
114                    <script> 
115            console.log("subbu:", '${subbu}'); 
116        </script> 
117        </#if> 
118 
119        <#-- Begin: filter cards by sourceCode and offerId and remove duplicated cards--> 
120        <#assign temp = []> 
121        <#assign consumerCards = []> 
122        <#assign businessCards = []>  
123        <#assign offerTypeList = []>  
124        <#assign consumerOfferTypes =['104', '101', '103', '108', '109', '115']> 
125        <#assign businessOfferTypes =['144', '128', '143', '121', '123']>     
126        <#assign index = 0> 
127        <#list fiCardsData as fib> 
128            <#if (fib.offerType?has_content && !(offerTypeList?seq_contains(fib.offerType)))>   
129                <#assign offerTypeList = offerTypeList + [fib.offerType]> 
130                <#assign temp = temp + fiCardsData[index..index]>   
131                <#if consumerOfferTypes?seq_contains(fib.offerType)> 
132                    <#assign consumerCards = consumerCards + fiCardsData[index..index]> 
133                <#elseif (businessOfferTypes?seq_contains(fib.offerType))> 
134                    <#assign businessCards = businessCards + fiCardsData[index..index]> 
135                </#if>                 
136            </#if>  
137            <#assign index = index + 1>                
138        </#list>  
139 
140 
141        <#assign fiCardsData = temp> 
142 
143        <#if (fiCardsData?size > 0)>   
144            <#if (subbu_special?has_content)> 
145                <#assign lc_used = fiCardsData?first.WebLocationCode>   
146            <#else> 
147                <#if ameriprise> 
148                    <#assign lc_used = lc_url>  
149                <#else> 
150                    <#assign lc_used = mappedLC>  
151                </#if> 
152            </#if>  
153        </#if>  
154 
155        <#if (consumerCards?size > 0 || businessCards?size > 0)>  
156         
157            <div class="content-container content-container-main jn-consumer-content" id="product-display"> 
158                <#if ((consumerCards?size > 0) && (businessCards?size > 0))> 
159                    <nav class="jn-primary-nav two-tabs"> 
160                        <ul> 
161                            <li title="${partnerName!''} - Personal products"> 
162                                <a href="#" class="tab-nav active" id="consumerTab"><span>Personal</span></a> 
163                            </li> 
164                            <li title="${partnerName!''} - Business products"> 
165                                <a href="#" class="tab-nav" id="businessTab"><span>Business</span></a> 
166                            </li> 
167                        </ul> 
168                    </nav> 
169                <#else> 
170                    <#if (consumerCards?size > 0)> 
171                        <nav class="jn-primary-nav" title="${partnerName!''} - Personal products"> 
172                            <ul> 
173                                <li> 
174                                    <p class="tab-nav" id="consumerTab"><span>Personal</span></p> 
175                                </li> 
176                            </ul> 
177                        </nav> 
178                    </#if> 
179                    <#if (businessCards?size > 0)> 
180                        <nav class="jn-primary-nav" title="${partnerName!''} - Business products"> 
181                            <ul> 
182                                <li> 
183                                    <p class="tab-nav" id="businessTab"><span>Business</span></p> 
184                                </li> 
185                            </ul> 
186                        </nav> 
187                    </#if> 
188                </#if> 
189                <#if (consumerCards?size > 0)> 
190                <div class="tab-more-wrapper"> 
191                    <div class="jn-consumer-content-wrapper jn-tab-content active transition-start" data-id="consumerTab" title="${partnerName!''} - Personal products"> 
192                        <#list consumerCards as fib> 
193                            <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png" > 
194                            <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg">                         
195                            <#if ameriprise>                                
196                                <#if (fib.offerType == "101")> 
197                                        <#assign productName = "premier-visa-signature"> 
198                                        <#assign product="Premier Visa Signature"> 
199                                        <#assign cardIndex = 0> 
200                                <#elseif (fib.offerType == "103")> 
201                                        <#assign productName = "visa-signature"> 
202                                        <#assign product="Visa Signature"> 
203                                        <#assign cardIndex = 1> 
204                                </#if> 
205                                <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()> 
206                                <#assign titleText = titleText?replace('<[^>]+>','','r')> 
207                            <#else> 
208                                <#switch fib.offerType> 
209                                    <#case "101"> 
210                                        <#assign productName = "real-rewards"> 
211                                        <#assign product="Real Rewards"> 
212                                        <#assign cardIndex = 1> 
213                                        <#break>                                          
214                                    <#case "108"> 
215                                        <#assign productName = "consumer-platinum2103"> 
216                                        <#assign product="Platinum"> 
217                                        <#assign cardIndex = 2> 
218                                         
219                                        <#break> 
220                                    <#case "109"> 
221                                        <#assign productName = "consumer-platinum2103"> 
222                                        <#assign product="Platinum"> 
223                                        <#assign cardIndex = 2> 
224                                        <#break>                                            
225                                    <#case "115"> 
226                                        <#assign productName = "secured"> 
227                                        <#assign product="Secured"> 
228                                        <#assign cardIndex = 3> 
229                                        <#break> 
230                                    <#case "104"> 
231                                        <#assign productName = "max-cash"> 
232                                        <#assign product="Max Cash"> 
233                                        <#assign cardIndex = 0> 
234                                        <#break> 
235                                    <#default> 
236                                </#switch> 
237                                 
238                                <#assign titleText = consumerTitle.getSiblings()[cardIndex].Title.getData()> 
239                                <#assign titleText = titleText?replace('<[^>]+>','','r')> 
240                                 
241 
242                                <#assign APR=""> 
243                                <#assign AMF=""> 
244                                <#assign BAL=""> 
245                                <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
246                                <#if (scrapedData?size > 0)> 
247                                    <#list scrapedData as sItem> 
248                                        <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
249                                            <#assign APR = sItem.scrapedValue> 
250                                        <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
251                                            <#assign AMF = sItem.scrapedValue> 
252                                        <#elseif ((sItem.scrapedLabel?contains("APR for Balance Transfers")) && (sItem.scrapedValue?has_content)) > 
253                                            <#assign BAL = sItem.scrapedValue> 
254                                        </#if> 
255                                        <#if (APR?has_content && AMF?has_content && BAL?has_content)> 
256                                            <#break> 
257                                        </#if> 
258                                    </#list> 
259                                </#if> 
260                            </#if> 
261                            <#if ameriprise> 
262                                <#assign rollover_text =  partnerName + " " + product + " " + " Card"> 
263                            <#else> 
264                                <#assign rollover_text =  partnerName + " " + product + " " + " Credit Card"> 
265                            </#if>                             
266                            <div class="jn-consumer-item item-${fib.offerType}" title="${rollover_text!''}"> 
267                                    <img src="${cardArtImage!''}" alt="${rollover_text!''}"  
268                                        class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
269                                    <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
270                                    <p>${consumerTitle.getSiblings()[cardIndex].headlineText.getData()}</p> 
271                                    <ul class="actions"> 
272                                        <li> 
273                                            <form action="${oadURL}?locationCode=${lc_used}&amp;offerId=${fib.offerId}&amp;preparerType=customer&amp;sourceCode=${fib.sourceCode}" method="post" class="BAAForm"> 
274                                                <label for="appDataBAA-${fib.offerId}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
275                                                <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${fib.offerId}" class="appDataBAA" style="display:none;" title="application data"></textarea> 
276                                                <a class="applyNowLink apply-now-button" href="${oadURL}?locationCode=${lc_used}&amp;offerId=${fib.offerId}&amp;preparerType=customer&amp;sourceCode=${fib.sourceCode}"  
277                                                    data-button-name="apply-now-link" data-product-name="${productName}" 
278                                                    title="Apply Now for ${rollover_text!''}">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a> 
279                                            </form> 
280                                        </li> 
281                                        <li> 
282                                        <#if ameriprise> 
283                                            <a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc_used}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a> 
284                                        <#else> 
285                                            <a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a> 
286                                        </#if> 
287                                        </li> 
288                                    </ul> 
289                                    <div class="jn-additional"> 
290                                        <ul class="${fib.offerType}"> 
291                                            <#if !ameriprise> 
292                                                <#if (fib.offerType == "104")> 
293                                                    <li class="${fib.offerType}"> 
294                                                        <p> 
295                                                            <strong>APR<sup>*</sup> for Purchases: </strong> 
296                                                            ${APR!''} 
297                                                        </p> 
298                                                         
299                                                    </li> 
300                                                    <li class="${fib.offerType}"> 
301                                                        <p> 
302                                                            <strong>Intro APR<sup>*</sup> for Balance Transfers: </strong> 
303                                                            ${BAL!''} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
304                                                        </p> 
305                                                    </li> 
306                                                <#elseif (fib.offerType== "115")> 
307                                                    <li class="${fib.offerType}"> 
308                                                        <p> 
309                                                            <strong>APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
310                                                            ${APR!''} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
311                                                        </p> 
312                                                    </li> 
313                                                <#else> 
314                                                    <li class="${fib.offerType}"> 
315                                                        <p> 
316                                                                <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
317                                                            ${APR!''} <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
318                                                        </p> 
319                                                    </li> 
320                                                </#if> 
321                                            </#if> 
322                                            <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
323                                                <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
324                                                    <li>${marketingInfo.getData()}</li> 
325                                                </#list> 
326                                            </#if> 
327                                            <#if !ameriprise> 
328                                                <li> 
329                                                    <p>Annual Fee: ${AMF!''} <a  href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}"  target="_blank">Terms & Conditions</a></p> 
330                                                </li> 
331                                            </#if> 
332                                        </ul> 
333                                    </div> 
334                            </div> 
335 
336                               
337                        </#list> 
338                    </div> 
339                     
340                </div> 
341                 
342                </#if> 
343                <#if (businessCards?size > 0)>  
344                    <div class="tab-more-wrapper">    
345                        <div class="jn-consumer-content-wrapper jn-tab-content transition-start" data-id="businessTab" title="${partnerName!''} - Business products"> 
346                             
347                            <#list businessCards as fib> 
348                                    <#assign cardArtImage = cdnCardArtUrl + "/" + fib.filename + ".png"> 
349                                    <#assign cardArtImageAlt = cdnCardArtUrl + "/"+fib.filename+".jpg"> 
350                                    <#switch fib.offerType> 
351                                        <#case "144"> 
352                                            <#assign productName = "smart-business-rewards"> 
353                                            <#assign product="Smart Business Rewards"> 
354                                            <#assign cardIndex = 4> 
355                                            <#break> 
356                                        <#case "128"> 
357                                            <#assign productName = "business-cashback"> 
358                                            <#assign product="Business Cash"> 
359                                            <#assign cardIndex = 5> 
360                                            <#break> 
361                                        <#case "143"> 
362                                            <#assign productName = "business-real-rewards"> 
363                                            <#assign product="Business Real Rewards"> 
364                                            <#assign cardIndex = 6> 
365                                            <#break> 
366                                        <#case "121"> 
367                                            <#assign productName = "visa-business"> 
368                                            <#assign product="Business Card"> 
369                                            <#assign cardIndex = 7> 
370                                            <#break> 
371                                        <#default> 
372                                    </#switch> 
373                                    <#assign APR=""> 
374                                    <#assign AMF=""> 
375                                    <#assign scrapedData = utilServ.makeCall('crcDDCGetSchumerBox', fib.offerId + '&'+ fib.sourceCode)> 
376                                    <#if (scrapedData?size > 0)> 
377                                        <#list scrapedData as sItem> 
378                                            <#if ((sItem.scrapedLabel?contains("Annual Percentage Rate (APR) for Purchases")) && (sItem.scrapedValue?has_content)) > 
379                                                <#assign APR = sItem.scrapedValue> 
380                                            <#elseif ((sItem.scrapedLabel?contains("Annual Membership Fee")) && (sItem.scrapedValue?has_content)) > 
381                                                <#assign AMF = sItem.scrapedValue> 
382                                            </#if> 
383                                            <#if (APR?has_content && AMF?has_content)> 
384                                                <#break> 
385                                            </#if> 
386                                        </#list> 
387                                    </#if> 
388                                     
389                                <div class="jn-consumer-item item-${fib.offerType}" title="${partnerName!''} ${product!''} Credit Card"> 
390                                    <img src="${cardArtImage!''}"  alt="${partnerName!''}" class="jn-img-responsive" onerror="this.onerror=null;this.src='${cardArtImageAlt!''}'"> 
391                                    <h4>${consumerTitle.getSiblings()[cardIndex].Title.getData()}</h4> 
392                                    <p>${consumerTitle.getSiblings()[cardIndex].headlineText.getData()}</p> 
393                                    <ul class="actions">                                     
394                                        <li> 
395                                            <form action="${oadURL}?locationCode=${lc_used}&amp;offerId=${fib.offerId}&amp;preparerType=customer&amp;sourceCode=${fib.sourceCode}" method="post" class="BAAForm"> 
396                                                <label for="appDataBAA-${fib.offerId}" style="position:absolute; clip:rect(0 0 0 0);">Application Data</label> 
397                                                <textarea rows="20" cols="100" name="applicationData" id="appDataBAA-${fib.offerId}" class="appDataBAA" style="display:none;" title="application data"></textarea>                                         
398                                                <a class="applyNowLink apply-now-button"  
399                                                href="${oadURL}?locationCode=${lc_used}&amp;offerId=${fib.offerId}&amp;preparerType=customer&amp;sourceCode=${fib.sourceCode}"  
400                                                data-button-name="apply-now-link" data-product-name="${productName}" 
401                                                title="Apply Now for ${partnerName!''} ${product!''} Credit Card">${consumerTitle.getSiblings()[cardIndex].applyNow.getData()}</a> 
402                                            </form> 
403                                        </li> 
404                                        <li><a href="${environment}/${productName}?bankercode=${bCode}&ecdma-lc=${lc}${ecidExt}">${consumerTitle.getSiblings()[cardIndex].LearnMore.getData()}</a></li> 
405                                    </ul> 
406                                    <div class="jn-additional"> 
407                                        <ul> 
408                                            <#if (fib.offerType == "144")> 
409                                                <li> 
410                                                    <p> 
411                                                        <strong>APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
412                                                        ${APR!''} 
413                                                        <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
414                                                    </p> 
415                                                </li> 
416                                            <#else> 
417                                                <li> 
418                                                    <p> 
419                                                        <strong>Intro APR<sup>*</sup> for Purchases and Balance Transfers: </strong> 
420                                                        ${APR!''} 
421                                                        <a href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a> 
422                                                    </p> 
423                                                </li> 
424                                            </#if> 
425                                            <#if consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings()?has_content> 
426                                                <#list consumerTitle.getSiblings()[cardIndex].additionalInfo.getSiblings() as marketingInfo> 
427                                                    <li>${marketingInfo.getData()}</li> 
428                                                </#list> 
429                                            </#if> 
430                                            <li><p>Annual Fee: ${AMF!''} <a 
431                                                href="${oadURL_TC}?step=display&amp;offerId=${fib.offerId}&amp;locationCode=${lc_used}" target="_blank">Terms & Conditions</a></p> 
432                                            </li> 
433                                        </ul> 
434                                    </div> 
435                                </div> 
436                                 
437                            </#list> 
438                             
439                        </div> 
440                    </div> 
441                </#if>  
442                    <div class="more-link" ><a href="#" role="button" aria-label="More Cards"><div class="more-text">MORE <br> CARDS </div><div class="more-caret"></div></a></div> 
443                    <div class="less-link"><a href="#" role="button" aria-label="Less Cards"><div class="less-caret"></div> <div class="less-text">BACK</div></a></div> 
444            </div> 
445            <script> 
446                var consumerSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="consumerTab"]'; 
447                var businessSelector = '.jn-consumer-content-wrapper.jn-tab-content[data-id="businessTab"]'; 
448                $(document).ready(function () { 
449                    var banker_code = "${bCode!''}"; 
450                    var tabs=$('.tab-nav'); 
451                    var slideDiv = $('.jn-tab-content.active');                    
452                    var screenWidthMobile = 768; 
453                    var screenWidth = window.innerWidth; 
454 
455                    if (tabs.length == 1) { 
456                        if ($(consumerSelector).length > 0) { 
457                            if(banker_code && (banker_code.indexOf("amp") == 0) && (banker_code.length > 6)) { 
458                                $("nav.jn-primary-nav").hide(); 
459                                changeCardLayout(consumerSelector); 
460                                createMetaTag("consumer"); 
461                            } else { 
462                                hideHeroAndDisclaimer('business'); 
463                                showHeroAndDisclaimer('consumer'); 
464                                changeCardLayout(consumerSelector); 
465                                renumberFootnote("consumer"); 
466                                createMetaTag("consumer");  
467
468                        }  
469                        if ($(businessSelector).length > 0) { 
470                            $(businessSelector).addClass('active'); 
471                            hideHeroAndDisclaimer('consumer'); 
472                            showHeroAndDisclaimer('business'); 
473                            changeCardLayout(businessSelector); 
474                            renumberFootnote("business"); 
475                            createMetaTag("business");  
476
477                        if(screenWidth > screenWidthMobile) { 
478                            if ($("#consumerTab").length > 0) { 
479                                if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
480                                    $('.more-link').show(); 
481                                } else { 
482                                    $('.more-link').hide(); 
483                                    $('.less-link').hide(); 
484
485                            } else if ($("#businessTab").length > 0) { 
486                                if ($(businessSelector + ' .jn-consumer-item').length > 3) { 
487                                    $('.more-link').show(); 
488                                } else { 
489                                    $('.more-link').hide(); 
490                                    $('.less-link').hide(); 
491
492
493 
494                        }  
495
496                    if (tabs.length == 2) { 
497                        renumberFootnote("consumer"); 
498                        renumberFootnote("business"); 
499                        createMetaTag("consumer"); 
500                        if ($(consumerSelector + ' .jn-consumer-item').length < 3) { 
501                            changeCardLayout(consumerSelector); 
502
503                        if ($(businessSelector + ' .jn-consumer-item').length < 3) { 
504                            changeCardLayout(businessSelector); 
505
506                        if(screenWidth > screenWidthMobile) { 
507                            if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
508                                $('.more-link').show(); 
509                            } else { 
510                                $('.more-link').hide(); 
511                                $('.less-link').hide(); 
512
513                            /* 
514                            if ($(businessSelector + ' .jn-consumer-item').length > 3) { 
515                                $('.more-link').show(); 
516                            } else { 
517                                $('.more-link').hide(); 
518                                $('.less-link').hide(); 
519
520                            */ 
521                          
522                            $(tabs).click(function(){ 
523                                if ($(this).attr('id') === "consumerTab") { 
524                                    if ($(consumerSelector + ' .jn-consumer-item').length > 3) { 
525                                        slideDiv = $('.jn-tab-content.active'); 
526                                        $(slideDiv).removeClass('transition-left'); 
527                                        $('.less-link').hide(); 
528                                        $('.more-link').show(); 
529                                    } else { 
530                                        $('.less-link').hide(); 
531                                        $('.more-link').hide(); 
532
533
534 
535                                if ($(this).attr('id') === "businessTab") { 
536                                    if ($(businessSelector + ' .jn-consumer-item').length > 3) { 
537                                        slideDiv = $('.jn-tab-content.active'); 
538                                        $(slideDiv).removeClass('transition-left'); 
539                                        $('.less-link').hide(); 
540                                        $('.more-link').show(); 
541                                    } else { 
542                                        $('.less-link').hide(); 
543                                        $('.more-link').hide(); 
544
545
546                            }); 
547                                
548
549                        var tabsNav = document.querySelectorAll('.tab-nav'); 
550                        togglePrimaryNav(tabsNav); 
551 
552
553                    $('.more-link, .less-link').click(function(e){ 
554                        e.preventDefault(); 
555                    }); 
556                    $('.more-link').click(function(){ 
557                        slideDiv = $('.jn-tab-content.active'); 
558                        $(slideDiv).addClass('transition-left'); 
559                        $('.less-link').show(); 
560                        $(this).hide(); 
561                    }); 
562                    $('.less-link').click(function(){ 
563                        slideDiv = $('.jn-tab-content.active'); 
564                        $(slideDiv).removeClass('transition-left'); 
565                        $(this).hide(); 
566                        $('.more-link').show(); 
567                    }); 
568 
569                }); 
570 
571                // Primary Nav function 
572                 
573                function togglePrimaryNav(elem) { 
574                    for (var i = 0; i < elem.length; i++) { 
575                        elem[i].addEventListener("click", function(e) { 
576 
577                            var current = this, 
578                                allSections = document.querySelectorAll('[data-id]'), 
579                                section = document.querySelector("[data-id='"+ current.id +"']"); 
580 
581                            for (var a = 0; a < allSections.length; a++) { 
582                                allSections[a].classList.remove('active'); 
583
584                            for (var c = 0; c < elem.length; c++) { 
585                                if (current != elem[c]) { 
586                                    elem[c].classList.remove('active'); 
587                                } else { 
588                                    current.classList.add('active'); 
589                                    section.classList.add('active'); 
590                                    hideHeroAndDisclaimer('consumer'); 
591                                    hideHeroAndDisclaimer('business'); 
592                                    if(current.getAttribute('id') === "consumerTab"){ 
593                                        showHeroAndDisclaimer('consumer'); 
594                                    } else if(current.getAttribute('id') === "businessTab"){ 
595                                        showHeroAndDisclaimer('business'); 
596
597
598
599                            e.preventDefault(); 
600                        }); 
601
602
603 
604                function renumberFootnote(type) { 
605                    var discriptionSelector = '.jn-consumer-content-wrapper.jn-tab-content' + '[data-id="' + type + 'Tab"]'; 
606                    var disclaimerSelector = '.tier1-disclaimer-landing-' + type; 
607                    var heroSelector = '.tier1-hero-landing-' + type; 
608                    var numOfFootnote = $(disclaimerSelector + ' sup').length; 
609                    var showList = []; 
610                    var hideList=[]; 
611                    for (var i = 1; i <= numOfFootnote; i++) { 
612                    var cssClass="tag-" + i; 
613                    if ($(discriptionSelector + ' sup').hasClass(cssClass) || $(heroSelector + ' sup').hasClass(cssClass)) { 
614                        showList.push(i);      
615                    } else { 
616                        hideList.push(i); 
617
618                    }  
619                    for (var i = 1; i < showList.length + 1; i++) { 
620                        if(showList[i-1] != i) { 
621                            var className="tag-" + showList[i-1]; 
622                            $(heroSelector).find("." +  className).html(i); 
623                            $(discriptionSelector).find("." +  className).html(i); 
624                            $(disclaimerSelector).find("." +  className).html(i); 
625
626
627                    for (var i = 0; i <hideList.length; i++) { 
628                        var cname="tag-" + hideList[i]; 
629                        $(disclaimerSelector).find("." + cname).parent().hide(); 
630                    }    
631
632 
633                function changeCardLayout(cssSelector) { 
634                    var numOfCards = $(cssSelector + ' .jn-consumer-item').length; 
635                    if(numOfCards == 1) { 
636                        $(cssSelector).addClass('one-card'); 
637                    } else if (numOfCards == 2) { 
638                        $(cssSelector).addClass('two-card'); 
639                    }   
640
641                function hideHeroAndDisclaimer(type) { 
642                    try { 
643                        document.querySelector('.tier1-hero-landing-'+ type).classList.remove('show'); 
644                        document.querySelector('.tier1-hero-landing-'+ type).classList.add('hide'); 
645                    } catch (e) { 
646                        console.log(e); 
647
648 
649                    try { 
650                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.remove('show'); 
651                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.add('hide');  
652                    } catch (e) { 
653                        console.log(e); 
654
655 
656
657                function showHeroAndDisclaimer(type) { 
658                    try { 
659                        document.querySelector('.tier1-hero-landing-'+ type).classList.add('show'); 
660                        document.querySelector('.tier1-hero-landing-'+ type).classList.remove('hide'); 
661                    } catch (e) { 
662                        console.log(e); 
663
664                     
665                    try { 
666                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.add('show'); 
667                        document.querySelector('.tier1-disclaimer-landing-'+ type).classList.remove('hide');  
668                    } catch (e) { 
669                        console.log(e); 
670
671 
672
673                function createMetaTag(type) { 
674                    var partnerName = "${partnerName!0}"; 
675                    var product_name = $('.jn-hero-container .jn-button').data('product-name'); 
676                    var metaDesc = ""; 
677                    if (type == "consumer") {     
678                        if(location.pathname.indexOf("11t1m") != -1) { 
679                            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." 
680                        } else {                                    
681                            if(product_name ==  "consumer-platinum2103") { 
682                                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."; 
683                            } else if(product_name ==  "real-rewards") { 
684                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Take home 2,500 bonus points after your first purchase."; 
685                            } else if(product_name ==  "secured") { 
686                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Use this card as a solid foundation to build your credit."; 
687                            } else if(product_name ==  "max-cash") { 
688                                metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn a $150 Bonus and 5% cash back on the two categories you select."; 
689
690
691 
692                    } else if (type == "business") { 
693                        if(product_name ==  "business-cashback") {               
694                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Earn Cash back on common business expenses."; 
695                        } else if(product_name ==  "business-real-rewards") { 
696                            metaDesc = "Apply Today for a "+partnerName+" Credit Card. Get more rewards in the categories you spend the most on."; 
697                        } else if(product_name ==  "business-visa") { 
698                            metaDesc = "Apply Today for a "+partnerName+" Business Card. 0% Intro APR on Purchases and Balance Transfers for 15 Billing Cycles"; 
699                        } else if(product_name ==  "smart-business-rewards") { 
700                            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."; 
701
702
703                    var m = document.createElement('meta');  
704                    m.name = 'description';  
705                    m.content = metaDesc;  
706                    document.head.appendChild(m); 
707
708                function goToByScroll(id) { 
709                    var element = document.getElementById(id); 
710                    element.scrollIntoView(true); 
711
712                function slideAmount(length) { 
713 
714
715                 
716            </script> 
717            <script> 
718                    var reportingData = window.reportingData || {}; 
719                document.addEventListener('DOMContentLoaded', function() { 
720                    console.log('inside ready'); 
721                    var page = location.pathname.split('/')[location.pathname.split('/').length-1]; 
722                    var hostName = location.hostname;                                     
723                    function getDomainFromHostname(hostname) { 
724                        var parts = hostname.split('.'); 
725                        return parts.length === 3 ? parts[1] : parts[0]; 
726
727                    var domain = getDomainFromHostname(hostName); 
728                    var partnerName = "${partnerName!0}"; 
729                    var ameriprise = '${ameriprise?string("yes", "no")}'; 
730                    var locationCode = "${rLC!lc}"; 
731                    var eidAmp = ""; 
732                    if (ameriprise == "yes") { 
733                        var bankercode_amp = '${bCode}'; 
734                        eidAmp = bankercode_amp.substring(3); 
735                        locationCode =""; 
736                        document.title = "Ameriprise Financial Credit Card Overview Page"; 
737                    } else { 
738                        document.title = partnerName + " Credit Card Index Page"; 
739
740                     
741                    var lc = '${lc!0}'; 
742 
743                    var regex = /\d+/g; 
744                    var bdNumber = "${bPhone!''}"; 
745                    var phoneNum = bdNumber.match(regex); 
746                    var areaCode = ""; 
747                    var exchangeCode = ""; 
748                    var num = ""; 
749                    if(phoneNum != null) { 
750                        phoneNum = phoneNum.join(""); 
751                        areaCode = phoneNum.substring(0,3); 
752                        exchangeCode = phoneNum.substring(3,6); 
753                        num = phoneNum.substring(6,10); 
754
755 
756                        /* update SiteCatalyst data object */ 
757                    reportingData.current_page = "microsite:${partnerName}:" + domain + ':' + page.replace('-',' '); 
758                    reportingData.page_type = 'product';  
759                    reportingData.site_section = 'credit cards'; 
760                    reportingData.platform = 'microsite'; 
761                    reportingData.campaign_id = '${campaignId}'; 
762                    reportingData.location_code = '${rLC!0}'; 
763                    reportingData.partner_name = "${partnerName}"; 
764                    reportingData.product = 'All Cards'; 
765                    reportingData.text_to_apply_source = '${text_to_apply_source}'; 
766                    reportingData.visitor_type = 'prospect';         
767                    reportingData.Banker_id = '${boeid}'; 
768                    reportingData.Banker_code = '${bCode}'; 
769 
770                                                     
771                    /* SiteCatalyst  pageView tracking */ 
772                    AUI().ready(function() { 
773                        if (window.publisherFW) { 
774                            //console.log('reportingData', reportingData); 
775                            window.publisherFW.publishEvent("pageView", reportingData); 
776
777                    });  
778 
779                                     
780                    $('.jn-button').removeAttr('disabled'); 
781                    $('.jn-button').removeClass('jn-disabled'); 
782 
783                    jQuery('.applyNowLink').on('click', function(e){ 
784                        $(this).closest('.BAAForm').submit(); 
785                        ga("send", { 
786                            hitType: "event", 
787                            eventAction: "ApplyNow", 
788                            eventCategory: "click", 
789                            eventLabel: "BottomButton" 
790                        }); 
791                        return false; 
792                    }); 
793                    jQuery(".BAAForm").on("submit", function(e){ 
794                        e.preventDefault(); 
795                        console.log("in custom submit"); 
796                        var xmlData; 
797                        if(ameriprise == "yes") { 
798                            xmlData = '<?xml version="1.0"?>'+ 
799                                "<prefillData>"+  
800                                "<versionNumber>1.0</versionNumber>"+  
801                                "<applicationData>"+  
802                                "<referral>" +  
803                                "<employeeId>" + eidAmp + "</employeeId>" + 
804                                "<storeNumber>"+"${bName!'0'}"+"</storeNumber>"+ 
805                                "<divisionNumber></divisionNumber>"+ 
806                                "</referral>" +  
807                                "<bankerInformation>"+  
808                                "<locationCode>" + locationCode + "</locationCode>"+ 
809                                "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
810                                "<employeeID>${boeid!0}</employeeID>"+ 
811                                "<name>" + 
812                                "<first>${bFName!'0'}</first>" + 
813                                "<last>${bLName!'0'}</last>" + 
814                                "</name>"+ 
815                                "<phone>"+ 
816                                "<areaCode>"+areaCode+"</areaCode>"+  
817                                "<exchange>"+exchangeCode+"</exchange>"+ 
818                                "<number>"+num+"</number>"+  
819                                "</phone>"+  
820                                "</bankerInformation>"+  
821                                "</applicationData>"+  
822                                "</prefillData>" 
823                        } else { 
824                            xmlData = '<?xml version="1.0"?>'+ 
825                                "<prefillData>"+  
826                                "<versionNumber>1.0</versionNumber>"+  
827                                "<applicationData>"+  
828                                "<bankerInformation>"+  
829                                "<locationCode>" + locationCode + "</locationCode>"+ 
830                                "<originatingBranchNumber>"+"${bName!'0'}"+"</originatingBranchNumber>"+ 
831                                "<employeeID>${boeid!0}</employeeID>"+ 
832                                "<name>" + 
833                                "<first>${bFName!'0'}</first>" + 
834                                "<last>${bLName!'0'}</last>" + 
835                                "</name>"+ 
836                                "<phone>"+ 
837                                "<areaCode>"+areaCode+"</areaCode>"+  
838                                "<exchange>"+exchangeCode+"</exchange>"+ 
839                                "<number>"+num+"</number>"+  
840                                "</phone>"+  
841                                "</bankerInformation>"+  
842                                "</applicationData>"+  
843                                "</prefillData>" 
844
845                        $(this).children(".appDataBAA").val(xmlData); 
846                        var buttonName = $(this).find(".apply-now-button").data("button-name"); 
847                        var productName = $(this).find(".apply-now-button").data("product-name"); 
848                        /* SiteCatalyst  onClick tracking */ 
849                        reportingData.apply_button = buttonName; 
850                        reportingData.product = productName; 
851 
852                        if (window.publisherFW) { 
853                            console.log('clicked', reportingData); 
854                            window.publisherFW.publishEvent("onClick", reportingData); 
855
856 
857                        this.submit(); 
858                    });                                                                
859                     
860 
861                }); 
862            </script>                    
863                 
864        </#if>  
865    </#if> 
866</#if> 
حصل خطأ عند معالجة القالب.
The following has evaluated to null or missing:
==> qstringmap["bankercode"]  [in template "10154#10192#157469119" 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 "10154#10192#157469119" 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<div class="content-container" title="${partnerName} - Disclaimer"> 
28    <div class="jn-disclaimer tier1-disclaimer-${class.getData()}"> 
29        ${content.getData()} 
30    </div> 
31</div> 
حصل خطأ عند معالجة القالب.
The following has evaluated to null or missing:
==> qstringmap["bankercode"]  [in template "10154#10192#153411747" at line 8, 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 "10154#10192#153411747" at line 8, column 1]
----
1<#assign aDateTime = .now> 
2<#assign currentYear = aDateTime?string.yyyy> 
3<#assign url = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent()/> 
4<#assign qstringmap = httpUtil.getParameterMap(httpUtil.getQueryString(url))> 
5<#assign utilServ = (serviceLocator.findService("com.elan.crc.utilites.service.CRCRemoteServiceService"))! /> 
6<#assign url404 = '/error/404.html'> 
7 
8<#assign bCode= qstringmap["bankercode"]?first> 
9<#assign bCode = htmlUtil.escape(bCode)> 
10<#assign bCode = htmlUtil.escapeJS(bCode)> 
11 
12<#assign bData = utilServ.makeCall('crcDDCBankerAssistedAppDetail','0&'+bCode)> 
13<#list bData as b>      
14    <#assign lc = b.locationcode > 
15    <#assign rLC = b.reallocationcode > 
16    <#assign mappedLC = b.mappedLocationCode > 
17</#list>  
18 
19<#if bCode?starts_with("amp") && (url?contains("11t1m"))> 
20    <#assign ameriprise = true> 
21<#else> 
22    <#assign ameriprise = false> 
23</#if> 
24<#if mappedLC?has_content && !ameriprise> 
25    <#assign lc = mappedLC > 
26</#if> 
27 
28<#if lc?has_content> 
29 
30    <#assign prefix = "00000" > 
31    <#assign lcWithPrefix = prefix + lc > 
32    <#assign withPrefixLength = lcWithPrefix?length > 
33    <#assign startHere = withPrefixLength - 5> 
34    <#assign lc = lcWithPrefix?substring(startHere)> 
35<#assign clientProfileService = (serviceLocator.findService("com.elan.crc.user.service.CrcClientProfileLocalService"))! > 
36    <#assign clientProfileList = clientProfileService.findByLocationCode(lc)> 
37 
38    <#assign clientProfile = clientProfileList?first> 
39    <#assign pbu = clientProfile.getPbu()> 
40    <#assign subbu = clientProfile.getSUBBRANDBUNBR()>   
41    <#assign partnerName=clientProfile.getMarketingNameLong()> 
42    <#assign clientDataService = (serviceLocator.findService("com.elan.crc.user.service.CrcPbuLocalService"))! /> 
43    <#assign clientProfileDataList = clientDataService.getByPbuAndSubBu(pbu,subbu)> 
44    <#assign partnerUrl = clientProfileDataList.getPartnerMainUrl()> 
45    <#if partnerUrl?has_content && !partnerUrl?matches(r"(?i)^https?\:\/\/.*") && !partnerUrl?matches(r"(?i)^https?\:&#x2F;&#x2F;.*")> 
46        <#-- add protocal if missing  --> 
47        <#assign partnerUrl = 'https://' + partnerUrl> 
48    </#if> 
49    <footer class="footer bg-color-black text-color-white"> 
50        ${footerContent.getData()} 
51    </footer> 
52 
53    <!-- BEGIN CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP --> 
54        <script src="https://unpkg.com/micromodal/dist/micromodal.min.js"></script> 
55        <style> 
56            #opt-out-button, 
57            .modal__btn.learn-more { 
58                background: #0C2074; 
59                border: 1px solid #0C2074; 
60                color: white; 
61                text-transform: uppercase; 
62                text-decoration: none; 
63                font-size: 16px; 
64                padding: 0.5rem 2rem; 
65                display: inline-block; 
66                border-radius: 0; 
67
68            #opt-out-button:hover, 
69            .modal__btn.learn-more:hover { 
70                color: white; 
71                border-color: #2C76AF !important; 
72                background-color: #2C76AF !important; 
73
74            .modal__btn.learn-more { 
75                background: white; 
76                border: 1px solid #0C2074; 
77                color: #0C2074; 
78
79            #opt-out-button[disabled="true"] { 
80                background-color: rgba(0,0,0,.15); 
81                color: rgba(0,0,0,.45); 
82                border-color: rgba(0,0,0,.25); 
83
84            #opt-out-button:hover[disabled="true"] { 
85                background-color: rgba(0,0,0,.15) !important; 
86                color: rgba(0,0,0,.45) !important; 
87                border-color: rgba(0,0,0,.25) !important; 
88
89            #opt-out-button:focus { 
90                outline-style: solid; 
91                outline-color: white; 
92                outline-offset: -3px; 
93                outline-width: 1px; 
94
95            .opt-out-link svg { 
96                width: 30px; 
97                height: 14px; 
98                width: auto; 
99                vertical-align: middle; 
100
101            .modal__overlay { 
102                position: fixed; 
103                top: 0; 
104                left: 0; 
105                right: 0; 
106                bottom: 0; 
107                background: rgba(0,0,0,0.6); 
108                display: flex; 
109                justify-content: center; 
110                align-items: center; 
111
112 
113            .modal__container { 
114                background-color: #fff; 
115                padding: 30px; 
116                max-width: 500px; 
117                max-height: 100vh; 
118                border-radius: 4px; 
119                overflow-y: auto; 
120                box-sizing: border-box; 
121
122 
123            .modal__header { 
124                display: flex; 
125                justify-content: space-between; 
126                align-items: center; 
127
128 
129            .modal__title { 
130                margin-top: 0; 
131                margin-bottom: 0; 
132                font-weight: 600; 
133                font-size: 20px; 
134                line-height: 1.25; 
135                color: #00449e; 
136                box-sizing: border-box; 
137
138 
139            .modal__close { 
140                background: transparent; 
141                border: 1px solid white; 
142                padding: 4px 8px; 
143
144            .modal__close:hover { 
145                border: 1px solid black; 
146
147 
148            .modal__header .modal__close:before { content: "\2715"; } 
149 
150            .modal__content { 
151                margin-top: 2rem; 
152                margin-bottom: 2rem; 
153                line-height: 1.5; 
154
155 
156            @keyframes mmfadeIn { 
157                from { opacity: 0; } 
158                to { opacity: 1; } 
159
160 
161            @keyframes mmfadeOut { 
162                from { opacity: 1; } 
163                to { opacity: 0; } 
164
165 
166            @keyframes mmslideIn { 
167                from { transform: translateY(15%); } 
168                to { transform: translateY(0); } 
169
170 
171            @keyframes mmslideOut { 
172                from { transform: translateY(0); } 
173                to { transform: translateY(-10%); } 
174
175 
176            .micromodal-slide { 
177                display: none; 
178
179 
180            .micromodal-slide.is-open { 
181                display: block; 
182
183 
184            .micromodal-slide[aria-hidden="false"] .modal__overlay { 
185                animation: mmfadeIn .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
186
187 
188            .micromodal-slide[aria-hidden="false"] .modal__container { 
189                animation: mmslideIn .3s cubic-bezier(0, 0, .2, 1); 
190
191 
192            .micromodal-slide[aria-hidden="true"] .modal__overlay { 
193                animation: mmfadeOut .3s cubic-bezier(0.0, 0.0, 0.2, 1); 
194
195 
196            .micromodal-slide[aria-hidden="true"] .modal__container { 
197                animation: mmslideOut .3s cubic-bezier(0, 0, .2, 1); 
198
199 
200            .micromodal-slide .modal__container, 
201            .micromodal-slide .modal__overlay { 
202                will-change: transform; 
203
204        </style> 
205 
206        <div class="modal micromodal-slide" id="modal-1" aria-hidden="true"> 
207        <div class="modal__overlay" tabindex="-1" data-micromodal-close> 
208            <div class="modal__container" role="dialog" aria-modal="true" aria-labelledby="modal-1-title"> 
209            <header class="modal__header"> 
210                <h2 class="modal__title" id="modal-1-title"> 
211                Your California privacy choices 
212                </h2> 
213                <button class="modal__close" aria-label="Close modal" data-micromodal-close></button> 
214            </header> 
215            <div class="modal__content" id="modal-1-content"> 
216                <div id="message-no-cookie"> 
217                    <p> 
218                    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> 
219                     
220        <p>&nbsp;</p> 
221 
222        <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> 
223            </div> 
224            <div id="message-with-cookie"> 
225                <p>You have successfully opted-out.</p> 
226            </div> 
227            </div> 
228            <div class="modal__footer"> 
229                <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> 
230                <button id="opt-out-button" class="modal__btn modal__btn-primary" aria-label="Opt Out and Close modal" onclick="window.californiaOptOut()">Opt Out</button> 
231            </div> 
232            </div> 
233        </div> 
234        </div> 
235    <!-- END CALIFORNIA OPT-OUT MODAL STYLE AND MARKUP --> 
236    <script> 
237    const fdicNode = document.querySelector('.footer .fdic');    
238	</script> 
239 
240	 
241	<script> 
242		const copyrightNode = document.querySelector('.footer .copyright'); 
243		const copyrightPara = document.querySelector('.footer .copyright p'); 
244		 
245		if (copyrightPara) { 
246			copyrightPara.style.display = 'none'; 
247
248	</script> 
249	 
250 
251    <#if url?contains("11t1m")> 
252        <script>        
253            copyrightNode.classList.add("ecdma-footer-client-name-copyright"); 
254            fdicNode.innerHTML='<a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?loc=${lc!0}" target="_blank">Privacy and Security</a>'; 
255        </script> 
256    <#else> 
257        <script> 
258            copyrightNode.classList.add("ecdma-footer-client-name-copyright"); 
259            fdicNode.innerHTML='<a class="text-color-white" href="https://login.elancreditcard.com/onlineCard/publicPrivacyPolicy.do?loc=${lc!0}" target="_blank">Privacy and Security</a>'; 
260            var newNode = document.createElement("div");  
261            newNode.classList.add("member-agreement"); 
262            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>'; 
263            var parent = fdicNode.parentNode; 
264            parent.insertBefore(newNode, fdicNode); 
265        </script> 
266    </#if> 
267 
268    <#if partnerUrl?has_content> 
269        <script> 
270            document.querySelector('.copyright .homelink').innerHTML="<a class='text-color-white' href='${partnerUrl!''}' title='${partnerName!''}' target='_blank'>Home</a>"; 
271        </script> 
272    </#if> 
273 
274    <script> 
275        /* BEGIN CALIFORNIA OPT-OUT MODAL TRIGGER */ 
276        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>'); 
277        /* END CALIFORNIA OPT-OUT MODAL TRIGGER */ 
278    </script> 
279    <!-- BEGIN CALIFORNIA OPT-OUT MODAL LOGIC --> 
280 
281    <script> 
282        window.getCookieDomain = function() { 
283            var hostname = window.location.hostname.split("."); 
284            return hostname && hostname.slice(hostname.length - 2).join("."); 
285
286        window.setToOptOut = function() { 
287            if (window.getCookie('privacy_optout')) { 
288                    document.getElementById('message-no-cookie').style.display = 'none'; 
289                    document.getElementById('message-with-cookie').style.display = 'block'; 
290                    document.getElementById('opt-out-button').setAttribute('disabled', true) 
291                } else { 
292                    document.getElementById('message-no-cookie').style.display = 'block'; 
293                    document.getElementById('message-with-cookie').style.display = 'none'; 
294
295
296        window.getCookie = function(name) { 
297            var value = '; ' + document.cookie; 
298            var parts = value.split('; ' + name + '='); 
299            if (parts.length === 2) return parts.pop().split(';').shift(); 
300
301        window.californiaOptOut = function() { 
302            if (!window.getCookie('privacy_optout')) { 
303                document.cookie = 'privacy_optout=1; path=/; domain=' + window.getCookieDomain() + '; expires=Thu, 31 Dec 2099 00:00:00 GMT;'; 
304                try { 
305                if (window.CustomEvent) { 
306                    window.dispatchEvent(new CustomEvent('privacy_optout')); 
307                } else { 
308                    var privacyOptoutEvent = document.createEvent('Event'); 
309                    privacyOptoutEvent.initEvent('privacy_optout', true, true); 
310                    window.dispatchEvent(privacyOptoutEvent); 
311
312                window.setToOptOut(); 
313                } catch (err) { 
314                console.error(err); 
315
316
317
318        MicroModal.init({ 
319            onShow: window.setToOptOut 
320        }); 
321        AUI().ready(function() { 
322            // user browser setting for Global Privacy Control to opt out of sharing information with third parties 
323            const isBrowserGpcOptOut = navigator.globalPrivacyControl; 
324            if(isBrowserGpcOptOut === true) { 
325            window.californiaOptOut(); 
326
327        }); 
328    </script> 
329    <!-- END CALIFORNIA OPT-OUT MODAL LOGIC --> 
330 
331</#if>