1/* ========================================================================== */ 2// Rondomark Common JS 3/* ========================================================================== */ 4 5var Common = { 6 //ã¹ã ã¼ã¹ã¹ã¯ãã¼ã« 7 //jump(æ°å¤ãhash, {duration:éã, onComplete:ã³ã¼ã«ããã¯, easing:ã¤ã¼ã¸ã³ã°é¢æ°ã®æå®}); 8 jump:function(value, options) { 9 //ã¹ã¯ãã¼ã«ç¦æ¢ 10 var wheelHandler = function(e){ 11 e.preventDefault(); 12 e.returnValue = false; 13 }; 14 document.documentElement.addEventListener('mousewheel', wheelHandler, {passive:false}); 15 document.documentElement.addClass('scrollingFlg'); 16 17 var target; 18 switch(typeof value) { 19 case 'number': 20 value = value; 21 break; 22 case 'string': 23 target = document.querySelector(value); 24 if(!target) { 25 console.error('è¦ç´ ã®æå®ãã¹1'); 26 } 27 value = window.pageYOffset+(target.getBoundingClientRect()).top; 28 break; 29 case 'object': 30 target = value; 31 console.error('è¦ç´ ã®æå®ãã¹2'); 32 value = window.pageYOffset+(target.getBoundingClientRect()).top; 33 break; 34 } 35 36 //ã¹ã¯ãã¼ã«ä½ç½®ã®å¾®èª¿æ´ 37 if(target) { 38 /*switch(target.id){ 39 case 'Wedding': 40 if(720 < document.documentElement.clientWidth) value += 142; 41 else value += 110; 42 break; 43 case 'Plan': 44 if(720 < document.documentElement.clientWidth) value += 30; 45 else value += 0; 46 break; 47 }*/ 48 } 49 /* 50 if(720 < document.documentElement.clientWidth) value += 90; 51 */ 52 53 var duration = (options&&options.duration)?options.duration:1000; 54 var onComplete = (options&&options.onComplete)?options.onComplete:null; 55 var start = window.pageYOffset; 56 var mokushou = value - start; 57 var timeStart,timeElapsed; 58 //http://robertpenner.com/easing/ 59 var easing = (options&&options.ease)?options.ease:function(t, b, c, d) { 60 if ((t/=d/2) < 1) return c/2*t*t + b; 61 return -c/2 * ((--t)*(t-2) - 1) + b; 62 }; 63 64 var loopID; 65 var loop = function(time) { 66 timeElapsed = time - timeStart; 67 window.scrollTo(0, easing(timeElapsed, start, mokushou, duration)); 68 if (timeElapsed < duration) { 69 loopID = requestAnimationFrame(loop); 70 }else{ 71 window.scrollTo(0, start + mokushou); 72 document.documentElement.removeEventListener('mousewheel', wheelHandler, {passive:false}); 73 document.documentElement.removeClass('scrollingFlg'); 74 if (onComplete) onComplete(); 75 cancelAnimationFrame(loopID); 76 } 77 }; 78 79 loopID = requestAnimationFrame(function(time) { 80 timeStart = time; 81 loop(time); 82 }); 83 } 84 , 85 //URLãã©ã¡ã¼ã¿ãåå¾ãé åã«æ ¼ç´ 86 urlParams:(function(){ 87 var obj = {}; 88 var pair = location.search.substring(1).split('&'); 89 for(var i = 0; pair[i]; i++) { 90 var kv = pair[i].split('='); 91 obj[kv[0]]=kv[1]; 92 } 93 94 //stat.js 95 if('fps' in obj) { 96 var script = document.createElement('script'); 97 script.onload = function() { 98 var stats = new Stats(); 99 document.body.appendChild(stats.dom); 100 requestAnimationFrame(function loop() { 101 stats.update(); 102 requestAnimationFrame(loop) 103 }); 104 }; 105 script.src = '//rawgit.com/mrdoob/stats.js/master/build/stats.min.js'; 106 document.head.appendChild(script); 107 } 108 109 return obj; 110 }()) 111 , 112 //弿°ããpxåä½ã®å¤ã«å¤æ 113 pxcelValueFromObject:function(value){ 114 if(typeof (value) == 'string' || value instanceof String) { 115 if(value.indexOf('%') != -1) { 116 value = document.documentElement.clientHeight * (value.split('%')[0]/100) + 'px'; 117 }else if(value.indexOf('px') != -1) { 118 value = value; 119 }else{ 120 value = value + 'px'; 121 } 122 }else if(!isNaN(value)) { 123 value = value + 'px'; 124 }else{ 125 value = null; 126 } 127 return value; 128 } 129 , 130 //ã¤ã³ãã¥ã¼ 131 inview:('IntersectionObserver' in window)? 132 function(target, enter, leave, rootMargin){ 133 var targets; 134 if(typeof target == 'string') { 135 targets = document.querySelectorAll(target); 136 }else if(target.length){ 137 targets = target; 138 }else{ 139 targets = []; 140 targets.push(target); 141 } 142 for(var i = 0; i < targets.length; i++) { 143 (function(target) { 144 if(leave) { 145 var first = true; 146 var triggered = false; 147 (new IntersectionObserver( 148 function(entries, observer){ 149 var flg = false; 150 for(var h = 0; h < entries.length; h++) { 151 if(entries[h].isIntersecting) {//è¦ãã 152 flg = true; 153 } 154 } 155 if(flg === true && (triggered === false || first)) { 156 triggered = true; 157 enter(entries[0].target); 158 } else if(flg === false && (triggered === true || first)) { 159 triggered = false; 160 leave(entries[0].target); 161 } 162 first = false; 163 } 164 , 165 {threshold: [0.00, 0.25, 0.5, 0.75, 1.00], rootMargin:(rootMargin == '0px' || rootMargin == '0' || rootMargin === null || rootMargin === undefined)?'0px':Common.pxcelValueFromObject(rootMargin)} 166 )).observe(target); 167 } else { 168 (new IntersectionObserver( 169 function(entries, observer){ 170 var flg = false; 171 for(var h = 0; h < entries.length; h++) { 172 if(entries[h].isIntersecting) {//è¦ãã 173 flg = true; 174 } 175 } 176 if(flg === true) { 177 enter(entries[0].target); 178 observer.disconnect(); 179 } 180 } 181 , 182 {threshold: [0.00, 0.25, 0.5, 0.75, 1.00], rootMargin:(rootMargin == '0px' || rootMargin == '0' || rootMargin === null || rootMargin === undefined)?'0px':Common.pxcelValueFromObject(rootMargin)} 183 )).observe(target); 184 } 185 }(targets[i])); 186 } 187 } 188 : 189 function(target, enter, leave){ 190 var targets; 191 if(typeof target == 'string') { 192 targets = document.querySelectorAll(target); 193 }else if(target.length){ 194 targets = target; 195 }else{ 196 targets = []; 197 targets.push(target); 198 } 199 for(var i = 0; i < targets.length; i++) { 200 (function(child) { 201 var fromS,toS; 202 //resize 203 var resize = function(){ 204 fromS = window.pageYOffset + child.getBoundingClientRect().top - document.documentElement.clientHeight; 205 toS = child.clientHeight + fromS + document.documentElement.clientHeight; 206 }; 207 window.addEventListener('resize', resize); 208 resize(); 209 210 //scroll 211 var enterFlg = false; 212 var scroll = function(){ 213 var s = window.pageYOffset; 214 if(fromS < s && s < toS) {//è¦ããã¨ã 215 enter(child); 216 enterFlg = true; 217 if(!leave) {//ä¸åº¦ã ãã®å¦çã®è¨å®ã®ã¨ã 218 window.removeEventListener('resize', resize); 219 window.removeEventListener('scroll', scroll); 220 } 221 }
221else{//è¦ããªãã¨ã 222 if(enterFlg) {//è¦ãã¦ãç¶æ ã ã£ãã¨ã 223 leave(child); 224 enterFlg = false; 225 } 226 } 227 }; 228 window.addEventListener('scroll', scroll); 229 scroll(); 230 }(targets[i])); 231 } 232 } 233 , 234 //èªã¿è¾¼ã¿å®äº 235 addLoad:function(func){ 236 if(document.readyState == 'complete') { 237 func(); 238 }else{ 239 window.addEventListener('load', function onload(){ 240 func(); 241 window.removeEventListener('load', onload); 242 }); 243 } 244 } 245}; 246 247 248//èªåå¹ é«ãèª¿æ´ 249(function() { 250 if(!document.querySelectorAll('[data-autowidth], [data-autoheight], [data-autowidth-pc], [data-autoheight-pc], [data-autowidth-sp], [data-autoheight-sp]').length) return false; 251 252 var i; 253 var sortElementStyle = function(targetVal/* 屿§å */, type/* æããã¹ã¿ã¤ã« */, compareVals, i){//æå®ãããè¦ç´ ã¨ã¹ã¿ã¤ã«ã¨å¤ããããã颿° 254 //æ¯è¼ããè¦ç´ ãcompareValsã«çªã£è¾¼ã 255 compareVals = {}; 256 257 var elements = document.querySelectorAll('['+targetVal+']'); 258 for(i = 0; i < elements.length; i = 0|i+1){ 259 if(!compareVals[elements[i].getAttribute(targetVal)]){ 260 compareVals[elements[i].getAttribute(targetVal)] = []; 261 } 262 compareVals[elements[i].getAttribute(targetVal)].push(elements[i]); 263 } 264 //compareValsãææ»ãã¦ãä¸çªå¤ã大ããå¤ããtargetValè¦ç´ ã«è¨å® 265 for(var key in compareVals){ 266 (function(compareVal, i) { 267 var cmp = []; 268 var style = compareVal[0].currentStyle || window.getComputedStyle(compareVal[0]); 269 if(type == 'width'){ 270 if('MutationObserver' in window) { 271 (new MutationObserver(function (MutationRecords, MutationObserver) { 272 for(i = 0; i < compareVal.length; i = 0|i+1){ 273 cmp.push(compareVal[i].clientWidth); 274 } 275 var maxV = Math.max.apply(null, cmp); 276 if(style.boxSizing != 'border-box') { 277 maxV = maxV - (parseInt(style.paddingLeft) + parseInt(style.paddingRight)); 278 } 279 for(i = 0; i < compareVal.length; i = 0|i+1){ 280 compareVal[i].style.width = maxV + 'px'; 281 compareVal[i].style.WebkitTransition = ''; 282 compareVal[i].style.transition = ''; 283 } 284 MutationObserver.disconnect(); 285 })).observe(compareVal[0], {attributes:true, attributeFilter:["class","style"]}); 286 }else{ 287 setTimeout(function(){ 288 for(i = 0; i < compareVal.length; i = 0|i+1){ 289 cmp.push(compareVal[i].clientWidth); 290 } 291 var maxV = Math.max.apply(null, cmp); 292 if(style.boxSizing != 'border-box') { 293 maxV = maxV - (parseInt(style.paddingLeft) + parseInt(style.paddingRight)); 294 } 295 for(i = 0; i < compareVal.length; i = 0|i+1){ 296 compareVal[i].style.width = maxV + 'px'; 297 compareVal[i].style.WebkitTransition = ''; 298 compareVal[i].style.transition = ''; 299 } 300 }, 400); 301 } 302 303 for(i = 0; i < compareVal.length; i = 0|i+1){ 304 compareVal[i].style.width = 'auto'; 305 compareVal[i].style.WebkitTransition = 'none'; 306 compareVal[i].style.transition = 'none'; 307 } 308 }else if(type == 'height'){ 309 if('MutationObserver' in window) { 310 (new MutationObserver(function (MutationRecords, MutationObserver) { 311 for(i = 0; i < compareVal.length; i = 0|i+1){ 312 cmp.push(compareVal[i].clientHeight); 313 } 314 var maxV = Math.max.apply(null, cmp); 315 if(style.boxSizing != 'border-box') { 316 maxV = maxV - (parseInt(style.paddingTop) + parseInt(style.paddingBottom)); 317 } 318 for(i = 0; i < compareVal.length; i = 0|i+1){ 319 compareVal[i].style.height = maxV + 'px'; 320 } 321 MutationObserver.disconnect(); 322 })).observe(compareVal[0], {attributes:true, attributeFilter:["class","style"]}); 323 }else{ 324 setTimeout(function(){ 325 for(i = 0; i < compareVal.length; i = 0|i+1){ 326 cmp.push(compareVal[i].clientHeight); 327 } 328 var maxV = Math.max.apply(null, cmp); 329 if(style.boxSizing != 'border-box') { 330 maxV = maxV - (parseInt(style.paddingTop) + parseInt(style.paddingBottom)); 331 } 332 for(i = 0; i < compareVal.length; i = 0|i+1){ 333 compareVal[i].style.height = maxV + 'px'; 334 } 335 }, 400); 336 } 337 338 for(i = 0; i < compareVal.length; i = 0|i+1){ 339 compareVal[i].style.height = 'auto';
340 compareVal[i].style.WebkitTransition = 'none'; 341 compareVal[i].style.transition = 'none'; 342 } 343 } 344 }(compareVals[key])); 345 } 346 return false; 347 }; 348 349 //PCã¨SP両æ¹ã®é«ããå¹ ãæãã 350 var resizeHandler = function(){ 351 //ä¸åº¦é«ããå¹ ããªã»ãããã 352 var elements = document.querySelectorAll('[data-autowidth]'); 353 for(i = 0; i < elements.length; i = 0|i+1){ 354 elements[i].style.width = ''; 355 } 356 var elements = document.querySelectorAll('[data-autoheight]'); 357 for(i = 0; i < elements.length; i = 0|i+1){ 358 elements[i].style.height = ''; 359 } 360 //PCã¨SP両æ¹ã常ææããå¦çãè¨å® 361 sortElementStyle('data-autowidth', 'width'); 362 sortElementStyle('data-autoheight', 'height'); 363 364 if(720 < document.documentElement.clientWidth){//pc 365 //SPãä¸åº¦é«ããå¹ ããªã»ãããã 366 var elements = document.querySelectorAll('[data-autowidth-sp]'); 367 for(i = 0; i < elements.length; i = 0|i+1){ 368 elements[i].style.width = ''; 369 } 370 var elements = document.querySelectorAll('[data-autoheight-sp]'); 371 for(i = 0; i < elements.length; i = 0|i+1){ 372 elements[i].style.height = ''; 373 } 374 sortElementStyle('data-autowidth-pc', 'width'); 375 sortElementStyle('data-autoheight-pc', 'height'); 376 }else{//smart 377 //PCãä¸åº¦é«ããå¹ ããªã»ãããã 378 var elements = document.querySelectorAll('[data-autowidth-pc]'); 379 for(i = 0; i < elements.length; i = 0|i+1){ 380 elements[i].style.width = ''; 381 } 382 var elements = document.querySelectorAll('[data-autoheight-pc]'); 383 for(i = 0; i < elements.length; i = 0|i+1){ 384 elements[i].style.height = ''; 385 } 386 sortElementStyle('data-autowidth-sp', 'width'); 387 sortElementStyle('data-autoheight-sp', 'height'); 388 } 389 }; 390 window.addEventListener('resize', resizeHandler); 391 resizeHandler(); 392 Common.addLoad(function(){ 393 resizeHandler(); 394 }); 395 (function() { 396 var handlerID; 397 var count = 0; 398 var handler = function(){ 399 count++; 400 if(1000 < count) { 401 cancelAnimationFrame(handlerID); 402 return false; 403 } 404 if(document.documentElement.hasClass('wf-active')) { 405 resizeHandler(); 406 cancelAnimationFrame(handlerID); 407 } else { 408 handlerID = requestAnimationFrame(handler); 409 } 410 }; 411 handlerID = requestAnimationFrame(handler); 412 }()); 413}()); 414 415 416//ç»é¢ã1ç»é¢åã¹ã¯ãã¼ã«ããã¨state_screenheightscrollãä»ä¸ 417(function() { 418 var inview = document.createElement('div'); 419 inview.style.position = 'absolute'; 420 inview.style.top = '200vh'; 421 inview.style.bottom = '0'; 422 inview.style.pointerEvents = 'none'; 423 inview.style.width = '0'; 424 document.body.appendChild(inview); 425 426 Common.inview(inview, function(){ 427 document.documentElement.addClass('state_screenheightscroll'); 428 }, function(){ 429 document.documentElement.removeClass('state_screenheightscroll'); 430 }); 431}()); 432 433//ç»é¢ãå°ãã ãã¹ã¯ãã¼ã«ããã¨state_screenheightscrollãä»ä¸ 434(function() { 435 var inview = document.createElement('div'); 436 inview.style.position = 'absolute'; 437 inview.style.top = '105vh'; 438 inview.style.bottom = '0'; 439 inview.style.pointerEvents = 'none'; 440 inview.style.width = '0'; 441 document.body.appendChild(inview); 442 443 Common.inview(inview, function(){ 444 document.documentElement.addClass('state_fewscroll'); 445 }, function(){ 446 document.documentElement.removeClass('state_fewscroll'); 447 }); 448}()); 449 450//é»è©± 451(function() { 452 var targets = document.querySelectorAll('[data-tel]:not([data-tel-ok])'); 453 for (var i = 0; i < targets.length; ++i) { 454 targets[i].setAttribute('data-tel-ok', ''); 455 if('ontouchend' in document){//ã¿ããããã¤ã¹ã®ã¨ã 456 targets[i].setAttribute('href', 'tel:' + targets[i].getAttribute('data-tel').replace((new RegExp('-', "g")) ,'')); 457 } 458 //targets[i].innerHTML = targets[i].innerHTML.replace(/-/g, '<span class="hyphen">-</span>'); 459 } 460}()); 461 462//ããªã³ãã¢ã¦ãæè¨ã®åé¤ 463(function(){ 464 if(document.body.querySelector('[data-hidePrintMessageArea]')) { 465 document.body.removeChild(document.body.querySelector('[data-hidePrintMessageArea]')); 466 document.documentElement.addClass('addPrintMessage'); 467 } 468 var target = document.createElement('div'); 469 target.setAttribute('data-hidePrintMessageArea', ''); 470 document.body.appendChild(target); 471 //ä¸çªããã¾ã§ã¹ã¯ãã¼ã«ããã¨åé¤ 472 Common.inview(target, function(){ 473 document.documentElement.removeClass('addPrintMessage'); 474 document.body.removeChild(target); 475 }); 476}()); 477 478//ã¹ã¯ãã¼ã«ã«å¿ãã¦å¤ªããªã 479(function(){ 480 const ease = 'power1.inOut'; 481 const bars = document.querySelectorAll('[data-futokunaru]'); 482 const param = document.documentElement.clientWidth < 720 ? 2 : 15;
483 bars.forEach(bar => { 484 gsap.fromTo(bar, { 485 scaleX: 1, 486 }, { 487 scaleX: param, 488 duration: 0.6, 489 ease: ease, 490 scrollTrigger: { 491 trigger: bar.parentElement,//ã¢ãã¡ã¼ã·ã§ã³ãå§ã¾ãããªã¬ã¼ã¨ãªãè¦ç´ 492 start: 'top bottom', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«éå§ 493 end: 'bottom top', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«çµäº 494 scrub: true, //ã¹ã¯ãã¼ã«éã«åããã¦ã¢ãã¡ã¼ã·ã§ã³ãé²ãï¼æ°åãæå®ã§ããï¼ 495 //markers: true, //ãããã°ç¨ã®ãã¼ã«ã¼ã表示 496 } 497 }); 498 }); 499}()); 500 501//Cookieåæããã¼ 502/* 503(function(){ 504 //GAæå¦ 505 var disble_ga = function() { 506 window.dataLayer = window.dataLayer || []; 507 function gtag(){dataLayer.push(arguments);} 508 gtag('consent', 'default', { 509 'ad_storage': 'denied', 510 'analytics_storage': 'denied' 511 }); 512 }; 513 //GAè¨±å¯ 514 var allow_ga = function() { 515 window.dataLayer = window.dataLayer || []; 516 function gtag(){dataLayer.push(arguments);} 517 gtag('consent', 'update', { 518 'ad_storage': 'granted', 519 'analytics_storage': 'granted' 520 }); 521 }; 522 //æå¦å¦ç 523 var reject_func = function() { 524 var cookies = document.cookie.split(";"); 525 for (var i = 0; i < cookies.length; i++) { 526 var cookie = cookies[i]; 527 var eqPos = cookie.indexOf("="); 528 var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie; 529 document.cookie = name + '=; max-age=0; path=/'; 530 } 531 document.cookie = 'rondomarkcookiestate=reject; path=/'; 532 533 //GAæå¦ 534 disble_ga(); 535 }; 536 if(2 <= document.cookie.split('rondomarkcookiestate=accept').length) { 537 } else if(2 <= document.cookie.split('rondomarkcookiestate=reject').length) { 538 //æå¦å¦ç 539 reject_func(); 540 } else { 541 //GAæå¦ 542 disble_ga(); 543 544 //ãã¼ã¸èªã¿è¾¼ã¿æã«å¦ç 545 window.addEventListener('load', function handler() { 546 var htmlsource = ` 547 <div class="floating_cookie_accept_area floating_cookie_accept_area_color_{$_GET["c"]}"> 548 <div class="floating_cookie_accept_area_in"> 549 <p class="floating_cookie_accept_area_in_p">ãã®ã¦ã§ããµã¤ãã¯ããµã¤ãã®å©ä¾¿æ§åä¸ãç®çã«ãCookieã使ç¨ãã¦ããã¾ãã<br>Cookieã«ã¯ã¦ã§ããµã¤ãã®æ©è½ã«ä¸å¯æ¬ ãªãã®ã¨ãå©ç¨ç¶æ³ã®æ¸¬å®ã®ç®çã§ä½¿ç¨ããã¦ãããã®ãåå¨ãã¾ãã</p> 550 <p class="floating_cookie_accept_area_in_acceptbtn"><span>ã¯ããã¼å©ç¨ã«åæ</span></p> 551 <p class="floating_cookie_accept_area_in_rejectbtn"><span>åæããªã</span></p> 552 </div> 553 </div> 554 `; 555 var htmlsourceConteiner = document.createElement('div'); 556 document.documentElement.querySelector('body').appendChild(htmlsourceConteiner); 557 htmlsourceConteiner.outerHTML = htmlsource; 558 559 var csssource = ` 560 <style> 561 .floating_cookie_accept_area { 562 background-color: #FFF; 563 color: #000; 564 position: fixed; 565 left: 0; 566 bottom: 0; 567 width: 100%; 568 box-sizing: border-box; 569 z-index: 999; 570 letter-spacing: 0; 571 } 572 .floating_cookie_accept_area.floating_cookie_accept_area_color_b { 573 background-color: #000; 574 } 575 @media (min-width: 721px) { 576 .floating_cookie_accept_area { 577 padding: 20px 30px; 578 } 579 } 580 @media (max-width: 720px) { 581 .floating_cookie_accept_area { 582 padding: 20px 15px; 583 } 584 } 585 .floating_cookie_accept_area.floating_cookie_accept_area_remove { 586 transition: 0.6s; 587 opacity: 0; 588 } 589 .floating_cookie_accept_area_in { 590 display: flex; 591 justify-content: space-between; 592 } 593 @media (min-width: 721px) { 594 .floating_cookie_accept_area_in { 595 max-width: 1000px; 596 width: 100%; 597 margin: auto; 598 } 599 } 600 @media (max-width: 720px) { 601 .floating_cookie_accept_area_in { 602 flex-wrap: wrap; 603 } 604 } 605 .floating_cookie_accept_area_in_p { 606 text-align: left; 607 color: #000; 608 } 609 .floating_cookie_accept_area.floating_cookie_accept_area_color_b .floating_cookie_accept_area_in_p { 610 color: #FFF; 611 } 612 @media (min-width: 721px) { 613 .floating_cookie_accept_area_in_p { 614 font-size: 13px; 615 line-height: 1.8; 616 padding-right: 50px; 617 } 618 } 619 @media (max-width: 720px) { 620 .floating_cookie_accept_area_in_p { 621 font-size: 12px; 622 line-height: 1.7; 623 margin-bottom: 10px; 624 } 625 } 626 .floating_cookie_accept_area_in_p a { 627 text-decoration: underline; 628 color: #F546A7; 629 } 630 @media (min-width: 721px) { 631 .floating_cookie_accept_area_in_p a:hover { 632 text-decoration: none; 633 } 634 } 635 .floating_cookie_accept_area_in_acceptbtn { 636 background-color: #000; 637 } 638 .floating_cookie_accept_area_in_rejectbtn { 639 } 640 .floating_cookie_accept_area_in_acceptbtn , 641 .floating_cookie_accept_area_in_rejectbtn { 642 display: flex;
643 align-items: center; 644 justify-content: center; 645 box-sizing: border-box; 646 } 647 .floating_cookie_accept_area_in_rejectbtn { 648 } 649 .floating_cookie_accept_area.floating_cookie_accept_area_color_b .floating_cookie_accept_area_in_acceptbtn { 650 background-color: #FFF; 651 } 652 @media (min-width: 721px) { 653 .floating_cookie_accept_area_in_acceptbtn , 654 .floating_cookie_accept_area_in_rejectbtn { 655 height: 50px; 656 transition: 0.2s; 657 cursor: pointer; 658 } 659 .floating_cookie_accept_area_in_acceptbtn { 660 width: 200px; 661 } 662 .floating_cookie_accept_area_in_rejectbtn { 663 width: 100px; 664 } 665 } 666 @media (max-width: 720px) { 667 .floating_cookie_accept_area_in_rejectbtn { 668 width: 48%; 669 } 670 .floating_cookie_accept_area_in_acceptbtn { 671 width: 48%; 672 } 673 .floating_cookie_accept_area_in_acceptbtn , 674 .floating_cookie_accept_area_in_rejectbtn { 675 height: 44px; 676 margin-left: auto; 677 margin-right: auto; 678 } 679 } 680 @media (min-width: 721px) { 681 .floating_cookie_accept_area_in_acceptbtn:hover , 682 .floating_cookie_accept_area_in_rejectbtn:hover { 683 opacity: 0.7; 684 } 685 } 686 .floating_cookie_accept_area_in_acceptbtn span , 687 .floating_cookie_accept_area_in_rejectbtn span { 688 line-height: 1; 689 } 690 .floating_cookie_accept_area_in_acceptbtn span { 691 color: #FFF; 692 } 693 .floating_cookie_accept_area.floating_cookie_accept_area_color_b .floating_cookie_accept_area_in_rejectbtn span { 694 color: #FFF; 695 } 696 .floating_cookie_accept_area.floating_cookie_accept_area_color_b .floating_cookie_accept_area_in_acceptbtn span { 697 color: #000; 698 } 699 @media (min-width: 721px) { 700 .floating_cookie_accept_area_in_acceptbtn span , 701 .floating_cookie_accept_area_in_rejectbtn span { 702 font-size: 14px; 703 letter-spacing: 2px; 704 } 705 } 706 @media (max-width: 720px) { 707 .floating_cookie_accept_area_in_acceptbtn span , 708 .floating_cookie_accept_area_in_rejectbtn span { 709 font-size: 12px; 710 letter-spacing: 2px; 711 } 712 } 713 </style> 714 `; 715 var csssourceConteiner = document.createElement('div'); 716 document.documentElement.querySelector('body').appendChild(csssourceConteiner); 717 csssourceConteiner.outerHTML = csssource; 718 719 window.removeEventListener('load', handler); 720 721 //ãããåé¤ 722 var remove_pop = function() { 723 var area = document.querySelector('.floating_cookie_accept_area'); 724 area.className += ' floating_cookie_accept_area_remove'; 725 setTimeout(function(){ 726 area.parentNode.removeChild(area); 727 }, 600); 728 }; 729 730 document.querySelector('.floating_cookie_accept_area_in_acceptbtn').addEventListener('click', function(){ 731 document.cookie = 'rondomarkcookiestate=accept; path=/'; 732 //GAè¨±å¯ 733 allow_ga(); 734 //ããããåé¤ 735 remove_pop(); 736 }); 737 738 document.querySelector('.floating_cookie_accept_area_in_rejectbtn').addEventListener('click', function(){ 739 //æå¦å¦ç 740 reject_func(); 741 //ããããåé¤ 742 remove_pop(); 743 }); 744 }); 745 } 746}()); 747*/ 748 749//ã¹ã¯ãã¼ã«ã«å¿ãã¦å¤ªããªã 750(function(){ 751 const targets = document.querySelectorAll('.js-header-pc-overwrap-kv .l-h1-A'); 752 targets.forEach(target => { 753 const ja = target.querySelector('.l-h1-A-ja'); 754 const en = target.querySelector('.l-h1-A-en'); 755 gsap.set(ja, {clipPath: 'polygon(0% -1px, 0% -1px, 0% calc(100% + 1px), 0% calc(100% + 1px))'}); 756 gsap.set(en, {clipPath: 'polygon(0% -1px, 0% -1px, 0% calc(100% + 1px), 0% calc(100% + 1px))'}); 757 Common.inview(target, function(){ 758 gsap.to(ja, {clipPath: 'polygon(0% -1px, 100% -1px, 100% calc(100% + 1px), 0% calc(100% + 1px))', ease:'power3.out', duration:1.0, delay:1.0}); 759 gsap.to(en, {clipPath: 'polygon(0% -1px, 100% -1px, 100% calc(100% + 1px), 0% calc(100% + 1px))', ease:'power3.out', duration:1.0, delay:1.1}); 760 }); 761 }); 762}()); 763 764//ä¸ã®è¦ç´ ãã¹ã¯ãã¼ã«ã«å¿ãã¦åã 765(function(){ 766 //GSAPã®scrollTriggerãã©ã°ã¤ã³ãèªã¿è¾¼ã¾ãã¦ãããã©ãã 767 if (!window.ScrollTrigger) { 768 console.error('GSAPã®scrollTriggerãã©ã°ã¤ã³ããªã'); 769 } 770 771 //ã¤ã¼ã¸ã³ã°è¨å® 772 const ease = 'power1.inOut'; 773 774 //対象è¦ç´ ãåå¾ 775 const targets = document.querySelectorAll('[data-wakupararax01]');
776 targets.forEach((target) => { 777 const img = target.querySelector('img'); 778 if(img) {//ä¸ã«imgè¦ç´ ããããã©ãã 779 var newimg = new Image(); 780 newimg.addEventListener('error', function() { 781 console.error('ç»åèªã¿è¾¼ã¿ã¨ã©ã¼'); 782 }); 783 newimg.addEventListener('load', function() { 784 //è¦ç´ ã®positionãstaticã®ã¨ããrelativeã«å¤æ´ 785 if(window.getComputedStyle(target).position === 'static') { 786 target.style.position = 'relative'; 787 } 788 789 //è¦ç´ ã®ã¯ã¿åºãç¦æ¢ 790 target.style.overflow = 'hidden'; 791 792 //ç»åãã³ãã¼ãã¹ã¿ã¤ã«ãè¨å® 793 const cImg = img.cloneNode(true); 794 cImg.style.position = 'absolute'; 795 cImg.style.width = '100%'; 796 cImg.style.height = '100%'; 797 cImg.style.objectFit = 'cover'; 798 cImg.style.top = '0px'; 799 cImg.style.left = '0px'; 800 target.appendChild(cImg); 801 802 if(target.hasAttribute('data-wakupararax01-x')) { 803 let x = target.getAttribute('data-wakupararax01-x'); 804 805 //ãã¤ãã¹ããããã©ãã 806 var minusFlg = false; 807 if(x.includes('-')) minusFlg = true; 808 809 //åããå¤ã®æ°å¤ã®-ãåãé¤ã 810 if(minusFlg) { 811 x = x.replace(/-/g, ''); 812 } 813 814 //ãµã¤ãº 815 cImg.style.width = 'calc(100% + ' + x + ')'; 816 817 //ã¢ãã¡ã¼ã·ã§ã³ã®è¨å® 818 var fromObj = {x: 0}; 819 var toObj = { 820 x: '-' + x, 821 ease: 'linear', 822 scrollTrigger: { 823 trigger: target,//ã¢ãã¡ã¼ã·ã§ã³ãå§ã¾ãããªã¬ã¼ã¨ãªãè¦ç´ 824 start: 'top bottom', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«éå§ 825 end: 'bottom top', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«çµäº 826 scrub: true, //ã¹ã¯ãã¼ã«éã«åããã¦ã¢ãã¡ã¼ã·ã§ã³ãé²ãï¼æ°åãæå®ã§ããï¼ 827 //markers: true, //ãããã°ç¨ã®ãã¼ã«ã¼ã表示 828 } 829 }; 830 831 //ãã¤ãã¹ãããå ´åã¯åããæ¹åãå¤ãã 832 if(minusFlg) { 833 fromObj.x = '-' + x; 834 toObj.x = '0'; 835 } 836 837 (new IntersectionObserver( 838 function(entries, observer){ 839 let flg = false; 840 for(let h = 0; h < entries.length; h++) { 841 if(entries[h].isIntersecting) {//è¦ãã 842 flg = true; 843 } 844 } 845 if(flg === true) { 846 //GSAPã¢ãã¡ã¼ã·ã§ã³ 847 gsap.fromTo(cImg, fromObj, toObj); 848 observer.disconnect(); 849 } 850 } 851 , 852 {threshold: [0.00, 0.25, 0.5, 0.75, 1.00], rootMargin:'0px'} 853 )).observe(target); 854 } 855 856 if(target.hasAttribute('data-wakupararax01-y')) { 857 let y = target.getAttribute('data-wakupararax01-y'); 858 859 //ãã¤ãã¹ããããã©ãã 860 var minusFlg = false; 861 if(y.includes('-')) minusFlg = true; 862 863 //åããå¤ã®æ°å¤ã®-ãåãé¤ã 864 if(minusFlg) { 865 y = y.replace(/-/g, ''); 866 } 867 868 869 //ãµã¤ãº 870 cImg.style.height = 'calc(100% + ' + y + ')'; 871 872 //ã¢ãã¡ã¼ã·ã§ã³ã®è¨å® 873 var fromObj = {y: 0}; 874 var toObj = { 875 y: '-' + y, 876 ease: 'linear', 877 scrollTrigger: { 878 trigger: target,//ã¢ãã¡ã¼ã·ã§ã³ãå§ã¾ãããªã¬ã¼ã¨ãªãè¦ç´ 879 start: 'top bottom', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«éå§ 880 end: 'bottom top', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«çµäº 881 scrub: true, //ã¹ã¯ãã¼ã«éã«åããã¦ã¢ãã¡ã¼ã·ã§ã³ãé²ãï¼æ°åãæå®ã§ããï¼ 882 //markers: true, //ãããã°ç¨ã®ãã¼ã«ã¼ã表示 883 } 884 }; 885 886 //ãã¤ãã¹ãããå ´åã¯åããæ¹åãå¤ãã 887 if(minusFlg) { 888 fromObj.y = '-' + y; 889 toObj.y = '0'; 890 } 891 892 (new IntersectionObserver( 893 function(entries, observer){ 894 let flg = false; 895 for(let h = 0; h < entries.length; h++) { 896 if(entries[h].isIntersecting) {//è¦ãã 897 flg = true; 898 } 899 } 900 if(flg === true) { 901 //GSAPã¢ãã¡ã¼ã·ã§ã³ 902 gsap.fromTo(cImg, fromObj, toObj); 903 observer.disconnect(); 904 } 905 } 906 , 907 {threshold: [0.00, 0.25, 0.5, 0.75, 1.00], rootMargin:'0px'} 908 )).observe(target); 909 } 910 911 if(target.hasAttribute('data-wakupararax01-scale')) { 912 let scale = target.getAttribute('data-wakupararax01-scale'); 913 scale = parseFloat(scale); 914 915 //ã¢ãã¡ã¼ã·ã§ã³ã®è¨å® 916 let fromObj = {scale: 1.0}; 917 let toObj = { 918 scale: scale, 919 ease: 'linear', 920 scrollTrigger: { 921 trigger: target,//ã¢ãã¡ã¼ã·ã§ã³ãå§ã¾ãããªã¬ã¼ã¨ãªãè¦ç´ 922 start: 'top bottom', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«éå§ 923 end: 'bottom top', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«çµäº 924 scrub: true, //ã¹ã¯ãã¼ã«éã«åããã¦ã¢ãã¡ã¼ã·ã§ã³ãé²ãï¼æ°åãæå®ã§ããï¼ 925 //markers: true, //ãããã°ç¨ã®ãã¼ã«ã¼ã表示 926 } 927 }; 928 929 //ãã¤ãã¹ãããå ´åã¯åããæ¹åãå¤ãã 930 if(scale < 1.0) { 931 fromObj.scale = 1.0 + (1.0 - scale); 932 toObj.scale = 1.0; 933 } 934 935 (new IntersectionObserver( 936 function(entries, observer){ 937 let flg = false; 938 for(let h = 0; h < entries.length; h++) { 939 if(entries[h].isIntersecting) {//è¦ãã 940 flg = true; 941 } 942 } 943 if(flg === true) { 944 //GSAPã¢ãã¡ã¼ã·ã§ã³ 945 gsap.fromTo(cImg, fromObj, toObj); 946 observer.disconnect(); 947 } 948 } 949 , 950 {threshold: [0.00, 0.25, 0.5, 0.75, 1.00], rootMargin:'0px'} 951 )).observe(target); 952 } 953 }); 954 newimg.src = img.src; 955 } 956 }); 957}()); 958 959//ãªã¯ã«ã¼ãã¡ã¤ã³ãã¸ã¥ã¢ã« 960(() => { 961 const ease = 'power1.inOut'; 962 const tit = document.querySelector('.l-recruitmv-title'); 963 const overlaybg = document.querySelector('.l-recruitmv-overlay-bg'); 964 const decobg = document.querySelector('.l-recruitmv-deco-bg'); 965 const trigger = document.querySelector('.l-recruitmv-message'); 966 if(!tit || !overlaybg || !decobg || !trigger) return false; 967 968 //èæ¯ã®é 969 gsap.fromTo(overlaybg, { 970 alpha: 0, 971 }, { 972 alpha: 1, 973 ease: ease, 974 scrollTrigger: { 975 trigger: trigger,//ã¢ãã¡ã¼ã·ã§ã³ãå§ã¾ãããªã¬ã¼ã¨ãªãè¦ç´ 976 start: 'top bottom', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«éå§ 977 end: 'bottom-=100% top', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«çµäº 978 scrub: true, //ã¹ã¯ãã¼ã«éã«åããã¦ã¢ãã¡ã¼ã·ã§ã³ãé²ãï¼æ°åãæå®ã§ããï¼ 979 //markers: true, //ãããã°ç¨ã®ãã¼ã«ã¼ã表示 980 } 981 }); 982 gsap.fromTo(decobg, { 983 alpha: 0, 984 }, { 985 alpha: 1, 986 ease: ease, 987 scrollTrigger: { 988 trigger: trigger,//ã¢ãã¡ã¼ã·ã§ã³ãå§ã¾ãããªã¬ã¼ã¨ãªãè¦ç´ 989 start: 'top bottom', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«éå§ 990 end: 'bottom-=100% top', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«çµäº 991 scrub: true, //ã¹ã¯ãã¼ã«éã«åããã¦ã¢ãã¡ã¼ã·ã§ã³ãé²ãï¼æ°åãæå®ã§ããï¼ 992 //markers: true, //ãããã°ç¨ã®ãã¼ã«ã¼ã表示 993 } 994 }); 995 996 gsap.fromTo(tit, { 997 alpha: 1.0, 998 }, { 999 alpha: 0.0, 1000 ease: 'linear', 1001 scrollTrigger: { 1002 trigger: trigger,//ã¢ãã¡ã¼ã·ã§ã³ãå§ã¾ãããªã¬ã¼ã¨ãªãè¦ç´ 1003 start: 'top+=100px bottom', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«éå§ 1004 end: 'top center', //ããªã¬ã¼è¦ç´ ã®ä¸ç«¯ããã¥ã¼ãã¼ãã®ä¸ç«¯ã«æ¥ãã¨ãã«çµäº 1005 scrub: true, //ã¹ã¯ãã¼ã«éã«åããã¦ã¢ãã¡ã¼ã·ã§ã³ãé²ãï¼æ°åãæå®ã§ããï¼ 1006 //markers: true, //ãããã°ç¨ã®ãã¼ã«ã¼ã表示 1007 } 1008 }); 1009 1010})(); 1011 1012// ãã©ã¦ã¶ã«ãã£ã¦å¤ããheightãåºå®-corp 1013(() => { 1014 if(document.documentElement.clientWidth < 640) { 1015 const h = document.documentElement.clientHeight; 1016 if(document.querySelector('.l-lower_page-kv-A .l-h1-A')) { 1017 document.querySelector('.l-lower_page-kv-A .l-h1-A').style.height = h + 'px'; 1018 }
1019 if(document.querySelector('.l-lower_page-kv-A-bg')) { 1020 document.querySelector('.l-lower_page-kv-A-bg').style.height = h + 'px'; 1021 } 1022 } 1023})(); 1024 1025// ãã©ã¦ã¶ã«ãã£ã¦å¤ããheightãåºå®-recruit 1026(() => { 1027 setTimeout(() => { 1028 if(document.documentElement.clientWidth < 640) { 1029 if(document.querySelector('.l-recruitmv-area')) { 1030 document.querySelector('.l-recruitmv-area').style.height = document.querySelector('.l-recruitmv-area').clientHeight + 'px'; 1031 } 1032 } 1033 }, 1000); // 1000ããªç§ = 1ç§ 1034})(); 1035 1036 1037// Aboutã¨ãªã¢ã®æ¼åº-recruit 1038(() => { 1039 const inview = document.querySelector('.about-intro .sec-tit'); 1040 const ph01 = document.querySelector('.about-intro .ph-wrap .ph01 picture'); 1041 const ph02 = document.querySelector('.about-intro .ph-wrap .ph02 picture'); 1042 const bar01 = document.querySelector('.about-intro ._deco-bar._intro01'); 1043 const bar02 = document.querySelector('.about-intro ._deco-bar._intro02'); 1044 const bar03 = document.querySelector('.about-intro ._deco-bar._intro03'); 1045 if(!inview && !ph01 && !ph02 && !bar01 && !bar02 && !bar03) return false; 1046 1047 gsap.set(ph01, {clipPath: 'inset(0% 0% 100% 0%)'}); 1048 gsap.set(ph02, {clipPath: 'inset(0% 0% 100% 0%)'}); 1049 gsap.set(bar01, {clipPath: 'inset(0% 0% 100% 0%)'}); 1050 gsap.set(bar02, {clipPath: 'inset(0% 0% 100% 0%)'}); 1051 gsap.set(bar03, {clipPath: 'inset(0% 0% 100% 0%)'}); 1052 Common.inview(inview, () => { 1053 const ease = "power1.inOut"; 1054 const d = 0.5; 1055 const dur = 0.8; 1056 gsap.to(ph01, {clipPath: 'inset(0% 0% 0% 0%)', duration:dur, ease:ease, delay:d+0.6}); 1057 gsap.to(ph02, {clipPath: 'inset(0% 0% 0% 0%)', duration:dur, ease:ease, delay:d+0.7}); 1058 gsap.to(bar01, {clipPath: 'inset(0% 0% 0% 0%)', duration:dur, ease:ease, delay:d+0.0}); 1059 gsap.to(bar02, {clipPath: 'inset(0% 0% 0% 0%)', duration:dur, ease:ease, delay:d+0.1}); 1060 gsap.to(bar03, {clipPath: 'inset(0% 0% 0% 0%)', duration:dur, ease:ease, delay:d+0.2}); 1061 }); 1062})(); 1063 1064//ã°ã©ãã¢ãã¡ã¼ã·ã§ã³ 1065(function() { 1066 var targets = document.querySelectorAll('[data-graphanimation-area]'); 1067 if (!targets.length) return false; 1068 1069 var circleAnimation = function(el, svg){ 1070 var percent = el.getAttributeNS(null, 'data-graphanimation'); 1071 if(!percent) return false; 1072 var delay = svg.getAttributeNS(null, 'data-graphanimation-area'); 1073 if(!delay) delay = 0.0; 1074 percent = percent.split('%')[0] / 100; 1075 var w = svg.getAttributeNS(null, 'width'); 1076 var circleLength = (w*0.5)*Math.PI; 1077 var targetVal = Math.floor(circleLength * (1 - percent)); 1078 el.setAttributeNS(null, 'cx', w*0.5); 1079 el.setAttributeNS(null, 'cy', w*0.5); 1080 el.setAttributeNS(null, 'r', w*0.25); 1081 el.setAttributeNS(null, 'fill', 'rgba(0,0,0,0)'); 1082 el.setAttributeNS(null, 'stroke-width', w*0.5); 1083 el.setAttributeNS(null, 'transform', 'matrix(0,-1,1,0,0,'+w+')'); 1084 el.setAttributeNS(null, 'stroke-dashoffset', circleLength); 1085 el.setAttributeNS(null, 'stroke-dasharray', circleLength+','+circleLength); 1086 Common.inview(svg, function(){ 1087 if(document.documentElement.hasClass('ie11') || document.documentElement.hasClass('ie10') || document.documentElement.hasClass('ie9')) { 1088 var loop = setInterval(function(){ 1089 var aaa = parseFloat(el.getAttributeNS(null, 'stroke-dashoffset')); 1090 if(~~aaa == targetVal) clearInterval(loop); 1091 el.setAttributeNS(null, 'stroke-dashoffset', aaa + ((targetVal - aaa) * 0.04)); 1092 }, 33); 1093 } else { 1094 setTimeout(function(){ 1095 el.setAttributeNS(null, 'style', 'transition:stroke-dashoffset 1.5s;'); 1096 setTimeout(function(){ 1097 el.setAttributeNS(null, 'stroke-dashoffset', targetVal); 1098 }, 100); 1099 }, delay*1000); 1100 } 1101 }); 1102 }; 1103 for (var i = 0; i < targets.length; i++) { 1104 (function(target) { 1105 var graphs = target.querySelectorAll('[data-graphanimation]'); 1106 for (var i = 0; i < graphs.length; i++) { 1107 (function(graph) { 1108 switch(graph.tagName.toLowerCase()) { 1109 case 'rect': 1110 break; 1111 case 'circle': 1112 circleAnimation(graph, target); 1113 break; 1114 case 'ellipse': 1115 break; 1116 case 'line': 1117 break; 1118 case 'path': 1119 break; 1120 case 'polyline': 1121 break; 1122 case 'polygon': 1123 break; 1124 default: 1125 break; 1126 } 1127 }(graphs[i])); 1128 } 1129 }(targets[i])); 1130 } 1131}()); 1132 1133//ã«ã¦ã³ãã¢ãã 1134(function() { 1135 var targets = document.querySelectorAll('[data-numcounter02]'); 1136 for (var i = 0; i < targets.length; ++i) { 1137 (function(target) { 1138 var inviewElem; 1139 if(target.closest('[data-numcounter02-inview]')) { 1140 inviewElem = target.closest('[data-numcounter02-inview]'); 1141 } else { 1142 inviewElem = target; 1143 } 1144 Common.inview(inviewElem, function(){
1145 var delay = parseFloat(target.getAttribute('data-numcounter02')); 1146 if(!delay) delay = 0.5; 1147 if(document.documentElement.clientWidth < 640) delay += 0.4; 1148 var from = target.getAttribute('data-numcounter02-from'); 1149 if(!from) from = 0; 1150 var to = target.getAttribute('data-numcounter02-to'); 1151 to = to.replace(/[,]/g, ''); 1152 var countup = target.getAttribute('data-numcounter02-countup'); 1153 if(countup) { 1154 countup = parseInt(countup); 1155 } else { 1156 countup = 1; 1157 } 1158 var obj = {val:from}; 1159 var updateHandler; 1160 var c_b = document.createElement('span'); 1161 1162 from = ~~from; 1163 to = parseInt(to); 1164 updateHandler = function(){ 1165 target.innerText = Math.ceil(obj.val); 1166 }; 1167 1168 var c_b_content = ''; 1169 var first = false; 1170 var zeropadding = target.hasAttribute('data-numcounter02-zeropadding'); 1171 if(zeropadding) { 1172 zeropadding = (''+to).length; 1173 } 1174 var comma = target.hasAttribute('data-numcounter02-comma'); 1175 var separate = function(num){ 1176 // æååã«ãã 1177 num = String(num); 1178 1179 var len = num.length; 1180 1181 // å帰çã«å¼ã³åºãã 1182 if(len > 3){ 1183 // ååã弿°ã«å帰å¼ã³åºã + å¾å3æ¡ 1184 return separate(num.substring(0,len-3))+','+num.substring(len-3); 1185 } else { 1186 return num; 1187 } 1188 } 1189 var setNum = function(numnum){ 1190 if(comma) { 1191 c_b_content += separate(numnum); 1192 } else { 1193 if(zeropadding) { 1194 c_b_content += (''+numnum).padStart(zeropadding, '0'); 1195 } else { 1196 c_b_content += numnum; 1197 } 1198 } 1199 }; 1200 for(var h = from; h < to; h+=countup) { 1201 if(first) c_b_content += '<'+'br>'; 1202 setNum(h); 1203 first = true; 1204 } 1205 c_b_content += '<'+'br>'; 1206 setNum(to); 1207 c_b.innerHTML = c_b_content; 1208 var style = window.getComputedStyle(target); 1209 c_b.style.color = style.color; 1210 c_b.style.position = 'absolute'; 1211 c_b.style.top = '0%';//100% 1212 c_b.style.right = '0'; 1213 c_b.style.width = '100%'; 1214 c_b.style.margin = '0'; 1215 c_b.style.whiteSpace = 'pre'; 1216 c_b.style.textAlign = 'right'; 1217 c_b.style.transition = 'top 1.0s cubic-bezier(0.375, 0.010, 0.125, 0.990), transform 1.0s cubic-bezier(0.375, 0.010, 0.125, 0.990)'; 1218 if(document.documentElement.hasClass('ie')) { 1219 c_b.style.marginTop = '13px'; 1220 } 1221 c_b.style.transform = 'translateY(0%)';//translateY(-100%) 1222 1223 target.style.opacity = null; 1224 target.style.overflow = 'hidden'; 1225 target.style.position = 'relative'; 1226 target.style.color = 'transparent'; 1227 target.style.display = 'inline-block'; 1228 target.appendChild(c_b); 1229 target.setAttribute('data-numcounter02-ready', ''); 1230 1231 setTimeout(function(){ 1232 c_b.style.top = '100%'; 1233 c_b.style.transform = 'translateY(-100%)'; 1234 }, delay*1000); 1235 }); 1236 }(targets[i])); 1237 } 1238}()); 1239 1240//ãªã¯ã«ã¼ãããã¼ã®ãã§ã¼ãã¢ãã¡ã¼ã·ã§ã³ï¼ç¹°ãè¿ãï¼ 1241(function() { 1242 gsap.registerPlugin(); 1243 1244 let slideIndex = 0; 1245 const inview = document.querySelector('.g-recruit_banner-A .bg'); 1246 const slides = document.querySelectorAll('.g-recruit_banner-A .bg img'); 1247 if(slides.length == 0) return; 1248 const slideDuration = 5; // ã¹ã©ã¤ããã¨ã®è¡¨ç¤ºæéï¼ç§ï¼ 1249 1250 gsap.set(slides, {opacity:0}); 1251 1252 function showSlides() { 1253 1254 slideIndex++; 1255 if (slideIndex > slides.length) { 1256 slideIndex = 1; 1257 } 1258 1259 gsap.to(slides[slideIndex - 1], { duration: 1, opacity: 1, zIndex:1, onComplete:function(){ 1260 slides.forEach((s, index) => { 1261 s.style.zIndex = null; 1262 if(slideIndex - 1 !== index) { 1263 gsap.set(s, {opacity:0}); 1264 } 1265 }); 1266 } }); // 次ã®ã¹ã©ã¤ãããã§ã¼ãã¤ã³ 1267 setTimeout(showSlides, slideDuration * 1000); // æå®ããæéå¾ã«æ¬¡ã®ã¹ã©ã¤ãã表示 1268 } 1269 1270 // intersection observer 1271 (new IntersectionObserver( 1272 function(entries, observer){ 1273 var flg = false; 1274 for(var h = 0; h < entries.length; h++) { 1275 if(entries[h].isIntersecting) {//è¦ãã 1276 flg = true; 1277 } 1278 } 1279 if(flg === true) { 1280 showSlides(); // ãã¼ã¸ãèªã¿è¾¼ã¾ãããã¹ã©ã¤ãã·ã§ã¼ãéå§ 1281 observer.disconnect(); 1282 } 1283 } 1284 )).observe(inview); 1285}());
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.