1;(function() { 2 'use strict'; 3 4 Global.prototype.lazyLoadInstance = null; 5 6 // Class className 7 function Global() { 8 this.init(); 9 } 10 11 Global.prototype.init = function() { 12 // Just use lazyload to handle image load. @CLHOMM 13 /*$('body').imagesLoaded() 14 .always(function() { 15 $('._frame_main').removeClass('_frame_main--loader'); 16 });*/ 17 18 if ($('._frame_main').hasClass('_frame_main--loader')) $('._frame_main').removeClass('_frame_main--loader'); 19 20 // Fix iOS Safari position absolute native lazyload not working issue. @CLHOM 21 function fixIosSafariAbsoluteImgLazyloadIssue() 22 { 23 $('img[loading="lazy"]').each(function() { 24 var $this = $(this), 25 position = $this.css('position'), 26 src = $this.attr('src'); 27 28 if (position === 'absolute') 29 { 30 $this.attr({ 31 'data-src': src 32 }).removeAttr('loading').addClass('js-lazy'); 33 } 34 }); 35 } 36 fixIosSafariAbsoluteImgLazyloadIssue(); 37 38 // LazyLoad. @CLHOM 39 this.lazyLoadInstance = new LazyLoad({ 40 elements_selector: '.js-lazy', 41 threshold: $(window).height() 42 }); 43 44 this.imgToSvg(); 45 this.animation(); 46 this.parallex(); 47 48 $.notify.addStyle('custom', { 49 html: "<div data-notify-html='content'></div>" 50 }); 51 52 if ($('._form_page').length > 0) { 53 $('._stickyFooter__main').addClass('_stickyFooter__main--bg-1'); 54 } 55 56 if ($('[data-created]').length >0 ) { 57 $('[data-created]').each(function() { 58 $(this).html(moment(_helper.local_time($(this).text())).format('YYYY-MM-DD')); 59 }) 60 } 61 62 if (CURRENCY_CHANGE == 0) { 63 if ($('[data-format-price]').length > 0) { 64 $('[data-format-price]').each(function() { 65 $(this).html(_helper.money_format($(this).text())); 66 }) 67 } 68 } 69 70 $('.js-form').validate({ 71 errorPlacement: function(error, element) { 72 if (element.next('._form_elm__style').length) 73 { 74 error.insertAfter(element.parent()); 75 } 76 else 77 { 78 element.parent().append(error); 79 } 80 } 81 }); 82 }; 83 84 Global.prototype.imgToSvg = function(){ 85 //console.log("svg::",$('img.js-svg').length); 86 $('img.js-svg').each(function(){ 87 var $img = $(this); 88 var imgID = $img.attr('id'); 89 var imgClass = $img.attr('class'); 90 var imgURL = $img.attr('src'); 91 92 $.get(imgURL, function(data) { 93 // Get the SVG tag, ignore the rest 94 var $svg = $(data).find('svg'); 95 // Add replaced image's ID to the new SVG 96 if(typeof imgID !== 'undefined') { 97 $svg = $svg.attr('id', imgID); 98 } 99 // Add replaced image's classes to the new SVG 100 if(typeof imgClass !== 'undefined') { 101 $svg = $svg.attr('class', imgClass+' replaced-svg'); 102 } 103 // Remove any invalid XML tags as per http://validator.w3.org 104 $svg = $svg.removeAttr('xmlns:a'); 105 // Check if the viewport is set, if the viewport is not set the SVG wont't scale. 106 if(!$svg.attr('viewBox') && $svg.attr('height') && $svg.attr('width')) { 107 $svg.attr('viewBox', '0 0 ' + $svg.attr('height') + ' ' + $svg.attr('width')) 108 } 109 // Replace image with new SVG 110 $img.replaceWith($svg); 111 112 }, 'xml'); 113 114 }); 115 } 116 117 Global.prototype.currencyConvert = function(price, to) { 118 if (CURRENCY_CHANGE == 1) 119 { 120 let currencies = JSON.parse(SUPPORT_CURRENCIES); 121 let from = SETTINGS.currency_code.toLowerCase(); 122 let price_convert = (price / currencies[from].rate) * currencies[to].rate; 123 124 return _helper.money_format(price_convert, currencies[to].decimals); 125 } 126 else 127 { 128 return _helper.money_format(price); 129 } 130 }, 131 132 Global.prototype.animation = function(){ 133 $('._animation').each(function(idx){ 134 //gsap.set($(this).find('._animation_item'), {alpha:0}); 135 switch($(this).data('ani-trigger')){ 136 case 'batch': 137 ScrollTrigger.batch($(this).find('._animation_item'),{ 138 start: "top bottom", 139 interval: 0.1, 140 //markers: true, 141 onEnter: batch => gsap.to(batch, .7,{opacity: 1, y: 0, stagger: 0.15}) 142 }); 143 break; 144 case 'simultaneously': 145 // console.log('simultaneously'); 146 ScrollTrigger.create({ 147 trigger: $(this).find('._animation_item'), 148 start: "top bottom", 149 //markers: true, 150 onToggle: self => gsap.to($(this).find('._animation_item'), .7,{opacity: 1, y: 0}), 151 }); 152 break; 153 } 154 }); 155 } 156 157 Global.prototype.parallex = function(){
158 $("._clip_bgContainer[data-parallex]").each(function(idx){ 159 // 160 $(this).closest('._clip_bg').next().css({'posistion':'relative'}); 161 switch($(this).data('parallex')){ 162 case 'slideDown': 163 gsap.to($(this),{ 164 y: Math.abs(33.33)+'%', 165 ease: "none", 166 scrollTrigger: { 167 trigger: $(this).parent(), 168 start: "top bottom", 169 end: "bottom top", 170 scrub: true 171 } 172 }); 173 break; 174 175 case 'fixed': 176 if($(this).find('img').length>0){ 177 $(this).find('img').hide(); 178 let filter=$(this).find('img').data('filter'); 179 $(this).css({ 180 'background-image': `url(${$(this).find('img').attr('src')})`, 181 'filter':`opacity(${filter.opacity}) saturate(${filter.saturate})` 182 }) 183 } 184 break; 185 186 case 'blur': 187 let backDrop="<div class='_clip_backdrop'></div>" 188 $(this).append(backDrop); 189 gsap.to($(this).find('._clip_backdrop'),{ 190 backdropFilter: "blur(30px)", 191 ease: "none", 192 scrollTrigger: { 193 trigger: $(this), 194 start: "center center", 195 end: "bottom top", 196 scrub: true 197 } 198 }); 199 200 break; 201 202 case 'zoom-in': 203 gsap.to($(this),{ 204 scale: 1.4, 205 ease: "none", 206 scrollTrigger: { 207 trigger: $(this), 208 start: "top bottom", 209 end: "bottom top", 210 scrub: true 211 } 212 }); 213 break; 214 215 case 'zoom-out': 216 gsap.to($(this),{ 217 scale: 1, 218 ease: "none", 219 scrollTrigger: { 220 trigger: $(this), 221 start: "top bottom", 222 end: "bottom top", 223 scrub: true 224 } 225 }); 226 break; 227 } 228 }) 229 }, 230 231 // Global.prototype.init = function(price, from, to) { 232 // return (price / SUPPORT_CURRENCIES[from].rate) * SUPPORT_CURRENCIES[to].rate; 233 // } 234 235 236 $(function() { 237 _global = new Global(); 238 }); 239})(); 240;(function() { 241 'use strict'; 242 $(function() {
243 ///////////////////////////////////////////////////////////////// 244 //2021-03-25 plt 1.0 to plt 2.0 245 ///////////////////////////////////////////////////////////////// 246 $('._plt-default').removeClass('_plt-default').addClass('_plt-set'); 247 $('._plt-light-on-dark').removeClass('_plt-light-on-dark').addClass('_plt-set _plt-set2'); 248 $('._plt-light-on-primary').removeClass('_plt-light-on-primary').addClass('_plt-set _plt-set3'); 249 $('._plt-dark-on-secondary').removeClass('_plt-dark-on-secondary').addClass('_plt-set _plt-set4'); 250 251 ///////////////////////////////////////////////////////////////// 252 //2020-06-12 å代 plt title&bg to tpl title&bg 253 ///////////////////////////////////////////////////////////////// 254 $('._plt_bg').removeClass('_plt_bg').addClass('_tpl_bg'); 255 $('._plt_title').removeClass('_plt_title').addClass('_tpl_title'); 256 257 ///////////////////////////////////////////////////////////////// 258 //2021-05-26 font-size upgrade
259 ///////////////////////////////////////////////////////////////// 260 $('._clip_paragraph').each(function(){ 261 if( $(this).data('ver') === 2 ){ 262 let hArr = $(this).find('._clip_title'); 263 for(var i=0; i<hArr.length; i++){ 264 switch( $(hArr[i])[0].localName ){ 265 case 'h4': 266 $(hArr[i])[0].outerHTML = '<h3 class="_clip_title">' + $(hArr[i])[0].innerHTML + '</h3>'; 267 break; 268 269 case 'h5': 270 $(hArr[i])[0].outerHTML = '<h4 class="_clip_title">' + $(hArr[i])[0].innerHTML + '</h4>'; 271 break; 272 273 case 'h6': 274 $(hArr[i])[0].outerHTML = '<h5 class="_clip_title">' + $(hArr[i])[0].innerHTML + '</h5>'; 275 break; 276 } 277 }; 278 279 let pArr = $(this).find('p'); 280 for(var i=0; i<pArr.length; i++){ 281 switch( $(pArr[i]).attr('class') ){ 282 case 'p2': 283 $(pArr[i]).removeClass('p2').addClass('p4'); 284 break; 285 286 case undefined: 287 $(pArr[i]).addClass('p5'); 288 break; 289 290 case 'p4': 291 $(pArr[i]).removeClass('p4').addClass('p5'); 292 break; 293 294 case 'p5': 295 $(pArr[i]).removeClass('p5').addClass('p6'); 296 break; 297 } 298 }; 299 } 300 }); 301 }); 302 })();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.