1(function ($) { 2 var smrc_main_message_timeout; 3 4 window.smrc_bar_animate = function () { 5 $('#smrc-bar').css('width', '1%'); 6 $('#smrc-bar').animate({ 7 'width': '100%', 8 }, 6000); 9 } 10 11 window.smrc_get_main_message = function (smrc_main_message_new_content) { 12 smrc_bar_animate(); 13 clearTimeout(smrc_main_message_timeout); 14 smrc_main_message = $('#smrc-main-message'); 15 smrc_main_message.find('#smrc-main-message-span').html(smrc_main_message_new_content); 16 smrc_main_message.css('left', '-500px'); 17 smrc_main_message.css('display', 'block'); 18 19 $(smrc_main_message).animate({ 20 'left': 0, 21 }, 1000); 22 23 smrc_main_message_timeout = setTimeout(function () { 24 if (smrc_main_message.is(":visible")) { 25 smrc_main_message.fadeOut('slow'); 26 } 27 }, 5000); 28 } 29 30 window.smrc_get_main_message_centered = function (smrc_main_message_new_content) { 31 clearTimeout(smrc_main_message_timeout); 32 $.fancybox.close(); 33 $('#smrc-main-message-centered').html(smrc_main_message_new_content); 34 35 $.fancybox.open($('#smrc-main-message-centered'), { touch: false }); 36 37 smrc_main_message_timeout = setTimeout(function () { 38 $.fancybox.close(); 39 }, 10000); 40 } 41 42 window.pad = function (str, max) { 43 str = str.toString(); 44 return str.length < max ? pad('0' + str, max) : str; 45 } 46 47 window.inArray = function (needle, haystack) { 48 var length = haystack.length; 49 for (var i = 0; i < length; i++) { 50 if (haystack[i] == needle) return true; 51 } 52 53 return false; 54 } 55 56 $(document).ready(function () { 57 $.fancybox.defaults.touch = false; 58 59 function smrc_license_programs(smrc_select_target) { 60 $('.smrc-license-program').each(function (index) { 61 $(this).removeClass('display-none'); 62 63 var class_list = $(this).attr('class').split(/\s+/); 64 var class_target = ''; 65 $.each(class_list, function (index, item) { 66 if (item != 'smrc-bordered' && item != 'smrc-license-program') { 67 class_target = item; 68 } 69 }); 70 71 if (!inArray(class_target, smrc_select_target.val())) { 72 $(this).addClass('display-none'); 73 } 74 }); 75 } 76 77 if ($('.smrc-organization-review-organization').length) { 78 $(document).on('click', '.smrc-organization-review-organization', function (e) { 79 $(this).closest('#smrc-organization-edit-wrap').siblings('.smrc-report-checkmark').find('.smrc-color-yellow').addClass('display-none'); 80 $(this).closest('#smrc-organization-edit-wrap').siblings('.smrc-report-checkmark').find('.smrc-color-green').removeClass('display-none'); 81 }); 82 } 83 84 if ($('a[href="https://selfmanagementresource.com/wp-content/uploads/SMRC_Implementation_and_Fidelity_Manual_2022.pdf"]').length) { 85 $('a[href="https://selfmanagementresource.com/wp-content/uploads/SMRC_Implementation_and_Fidelity_Manual_2022.pdf"]').addClass('wph-analytics-button').attr('data-wph-analytics-trigger', 'smrc-download-fidelity-manual').attr('id', 'smrc-download-fidelity-manual'); 86 } 87 88 if ($('#smrc_user_state').length) { 89 var smrc_select_state = $('#smrc_user_state'); 90 var smrc_select_country = $('#smrc_user_country'); 91 var smrc_select_state_clone = smrc_select_state.clone(); 92 93 smrc_select_country.on('select2:close', function (e) { 94 alert('select2:close') 95 smrc_select_state.find('option').remove(); 96 97 if (smrc_select_country.val() != '') { 98 var smrc_select_state_options = smrc_select_state_clone.find('option[value*="' + smrc_select_country.val() + ' - "]').clone(); 99 smrc_select_state.append(smrc_select_state_options); 100 } else { 101 smrc_select_state.find('option').remove(); 102 } 103 104 smrc_select_state.trigger('change'); 105 }); 106 107 $(document).on('change', '#smrc_user_country', function (e) { 108 if ($(this).val() == 'US') { 109 smrc_select_state.prop('required', true); 110 smrc_select_state.siblings('label').append(' (required) *') 111 } else { 112 smrc_select_state.prop('required', false); 113 smrc_select_state.siblings('label').text(smrc_select_state.siblings('label').text().replace(' (required) *', '')); 114 } 115 116 smrc_select_state.trigger('change'); 117 }); 118 } 119 120 if ($('#smrc_org_proposal_state').length) { 121 var smrc_select_state = $('#smrc_org_proposal_state'); 122 var smrc_select_country = $('#smrc_org_proposal_country'); 123 var smrc_select_state_clone = smrc_select_state.clone(); 124 125 smrc_select_country.on('select2:close', function (e) { 126 smrc_select_state.find('option').remove(); 127 128 if (smrc_select_country.val() != '') { 129 var smrc_select_state_options = smrc_select_state_clone.find('option[value*="' + smrc_select_country.val() + ' - "]').clone(); 130 smrc_select_state.append(smrc_select_state_options); 131 } else { 132 smrc_select_state.find('option').remove(); 133 } 134 135 smrc_select_state.trigger('change'); 136 }); 137 138 $(document).on('change', '#smrc_org_proposal_country', function (e) { 139 if ($(this).val() == 'US') { 140 smrc_select_state.prop('required', true); 141 smrc_select_state.siblings('label').append(' (required) *') 142 } else { 143 smrc_select_state.prop('required', false); 144 smrc_select_state.siblings('label').text(smrc_select_state.siblings('label').text().replace(' (required) *', '')); 145 } 146 147 smrc_select_state.trigger('change'); 148 }); 149 } 150 151 if ($('#smrc_questionnaire_organization_state').length) { 152 var smrc_select_state = $('#smrc_questionnaire_organization_state'); 153 var smrc_select_country = $('#smrc_questionnaire_organization_country'); 154 var smrc_select_state_clone = smrc_select_state.clone(); 155 156 smrc_select_country.on('select2:close', function (e) { 157 smrc_select_state.find('option').remove(); 158 159 if (smrc_select_country.val() != '') { 160 var smrc_select_state_options = smrc_select_state_clone.find('option[value*="' + smrc_select_country.val() + ' - "]').clone(); 161 smrc_select_state.append(smrc_select_state_options); 162 } else { 163 smrc_select_state.find('option').remove(); 164 } 165 166 smrc_select_state.trigger('change'); 167 }); 168 } 169 170 if ($('#smrc_locator_license_organization_state').length) { 171 var smrc_select_state = $('#smrc_locator_license_organization_state'); 172 var smrc_select_country = $('#smrc_locator_license_organization_country'); 173 var smrc_select_state_clone = smrc_select_state.clone(); 174 175 smrc_select_country.on('select2:close', function (e) { 176 smrc_select_state.find('option').remove(); 177 178 if (smrc_select_country.val() != '') { 179 var smrc_select_state_options = smrc_select_state_clone.find('option[value*="' + smrc_select_country.val() + ' - "]').clone(); 180 smrc_select_state.append(smrc_select_state_options); 181 } else { 182 smrc_select_state.find('option').remove(); 183 } 184 185 smrc_select_state.trigger('change'); 186 }); 187 } 188 189 if ($('#smrc_license_apply_organization_state').length) { 190 var smrc_select_state = $('#smrc_license_apply_organization_state'); 191 var smrc_select_country = $('#smrc_license_apply_organization_country'); 192 var smrc_select_state_clone = smrc_select_state.clone(); 193 194 smrc_select_country.on('select2:close', function (e) { 195 smrc_select_state.find('option').remove(); 196 197 if (smrc_select_country.val() != '') { 198 var smrc_select_state_options = smrc_select_state_clone.find('option[value*="' + smrc_select_country.val() + ' - "]').clone(); 199 smrc_select_state.append(smrc_select_state_options); 200 } else { 201 smrc_select_state.find('option').remove(); 202 } 203 204 smrc_select_state.trigger('change'); 205 }); 206 } 207 208 if ($('.smrc-modal-login-btn').length) { 209 $(document).on('click', '.smrc-modal-login-btn', function (e) { 210 e.preventDefault(); 211 $('#smrc-modal-login-btn').click(); 212 }); 213 } 214 215 if ($('.smrc-report-table').length) { 216 $('.smrc-report-table').on('focus', 'input[type=number]', function (e) { 217 $(this).on('wheel.disableScroll', function (e) { 218 e.preventDefault() 219 }) 220 }) 221 222 $('.smrc-report-table').on('blur', 'input[type=number]', function (e) { 223 $(this).off('wheel.disableScroll') 224 }) 225 } 226 227 $(document).on('click', '.smrc-table-close-icon, .smrc-close-modal', function (e) { 228 e.preventDefault(); 229 $.fancybox.close(); 230 }); 231 232 if ($('#smrc_report_licensee_programs').length) { 233 smrc_license_programs($('#smrc_report_licensee_programs')); 234 } 235 236 if ($('.smrc-delayed').length) { 237 $('.smrc-delayed').fadeOut('fast'); 238 239 var count = 30; 240 var counter = setInterval(timer, 1000); 241 242 function timer() { 243 count = count - 1; 244 if (count <= 0) { 245 clearInterval(counter); 246 $('.smrc-delayed').fadeIn('slow'); 247 $('.smrc-counter-wrapper').fadeOut('slow'); 248 return; 249 } 250 $('.smrc-counter').html(count); 251 } 252 } 253 254 if ($('.smrc-sticky').length) { 255 if ($('.smrc-table-1000').length) { 256 if ($(window).width() > 1200) { 257 $('.smrc-sticky').sticky({ topSpacing: ($(window).width() > 960) ? 64 : 0 }); 258 } 259 } else { 260 $('.smrc-sticky').sticky({ topSpacing: ($(window).width() > 960) ? 64 : 0 }); 261 262 $('.smrc-sticky').on('sticky-start', function () { 263 $(this).addClass('z-index-999'); 264 $(this).find('.smrc-sticky-close-icon').removeClass('display-none-soft'); 265 }); 266 267 $('.smrc-sticky').on('sticky-end', function () { 268 $(this).removeClass('z-index-999'); 269 $(this).find('.smrc-sticky-close-icon').addClass('display-none-soft'); 270 }); 271 } 272 } 273 274 if ($('.smrc-input-number').length) { 275 $('.smrc-input-number').InputSpinner(); 276 }; 277 278 if ($('.mailpoet_recaptcha').length) { 279 $('.mailpoet_recaptcha').addClass('display-none-soft'); 280 $('input.mailpoet_text[type="email"]').focusin(function () { 281 $(this).closest('.mailpoet_paragraph').siblings('.mailpoet_recaptcha').removeClass('display-none-soft'); 282 }); 283 }; 284 285 if ($('.az-tab-panel').length) { 286 $('.az-tab-button').click(function (e) { 287 e.preventDefault(); 288 $(this).closest('.az-tab-panel').find('.az-tab-button').removeClass('active'); 289 $(this).addClass('active'); 290 $(this).closest('.az-tab-panel').find('.az-tab-content').addClass('display-none-soft').removeClass('display-block'); 291 $('#' + $(this).attr('data-tab-container')).removeClass('display-none-soft').addClass('display-block'); 292 }); 293 } 294 295 if ($('.smrc-btn-transcription').length) { 296 $(document).on('click', '.smrc-btn-transcription', function (e) { 297 $(this).fadeOut(); 298 $(this).closest('.smrc-transcription').find('.smrc-transcription-content').fadeIn('slow'); 299 }); 300 } 301 302 if ($('.smrc-select').length) { 303 $('.smrc-select').each(function (index) { 304 if ($(this).attr('multiple')) { 305 $(this).select2({ 306 allowClear: true 307 });
308 309 if ($(this).val() == '') { 310 $(this).val(''); 311 } 312 } else { 313 if ($(this).children('option').length < 7) { 314 $(this).select2({ minimumResultsForSearch: -1, allowClear: true }); 315 } else { 316 $(this).select2({ allowClear: true }); 317 } 318 } 319 }); 320 } 321 322 if ($('.vc_tta-panel.smrc-colored-tab').length) { 323 setTimeout(function () { 324 smrc_classes_array = $('.vc_tta-panel.vc_active').attr('class').split(' '); 325 smrc_classes_array_id = $('.vc_tta-panel.vc_active').attr('id'); 326 var smrc_value = '#ff6e6e'; 327 328 $.each(smrc_classes_array, function (index, value) { 329 if (value.indexOf('#') > -1) { 330 smrc_value = value; 331 } 332 }); 333 334 $('.vc_tta-tab.vc_active,.vc_tta-panel.vc_active .vc_tta-panel-heading').css('border-bottom', 'solid 3px ' + smrc_value); 335 }, 100); 336 337 $(document).on('click', '.vc_tta-tab a,.vc_tta-panel-title a', function (e) { 338 if ($('.vc_tta-panel.vc_active').attr('class').indexOf('#') > -1) { 339 setTimeout(function () { 340 smrc_classes_array = $('.vc_tta-panel.vc_active').attr('class').split(' '); 341 smrc_classes_array_id = $('.vc_tta-panel.vc_active').attr('id'); 342 var smrc_value = '#ff6e6e'; 343 344 $.each(smrc_classes_array, function (index, value) { 345 if (value.indexOf('#') > -1) { 346 smrc_value = value; 347 } 348 }); 349 350 $('.vc_tta-tab,.vc_tta-panel .vc_tta-panel-heading').css('border-bottom', 'solid 3px transparent'); 351 $('.vc_tta-tab.vc_active,.vc_tta-panel.vc_active .vc_tta-panel-heading').css('border-bottom', 'solid 3px ' + smrc_value); 352 }, 100); 353 } 354 }); 355 356 $('.vc_tta-panel').each(function (index) { 357 }); 358 } 359 360 if ($('.smrc-page-test').length) { 361 if (document.URL.indexOf('comunicacion') > -1) { 362 $('a[href="#smrc-quiz-familia-tab-4"]').click(); 363 } else if (document.URL.indexOf('inteligencia-emocional') > -1) { 364 $('a[href="#smrc-quiz-familia-tab-5"]').click(); 365 } else if (document.URL.indexOf('normatividad') > -1) { 366 $('a[href="#smrc-quiz-familia-tab-6"]').click(); 367 } else if (document.URL.indexOf('modelado') > -1) { 368 $('a[href="#smrc-quiz-familia-tab-7"]').click(); 369 } else if (document.URL.indexOf('disponibilidad') > -1) { 370 $('a[href="#smrc-quiz-familia-tab-8"]').click(); 371 } 372 } 373 374 if ($('.smrc_quiz_personalidad_animal .vc_tta-tab').length) { 375 setTimeout(function () { 376 if (!window.location.href.indexOf('?') > -1) { 377 smrc_child_id_url = $('.smrc_quiz_personalidad_animal .vc_tta-tab.vc_active a').attr('href').replace('#smrc-behaviour-tab-', ''); 378 window.history.pushState(location.protocol + '//' + location.host + location.pathname, 'Title', location.protocol + '//' + location.host + location.pathname + '?smrc_wp_pro_quiz_get_child_id=' + smrc_child_id_url + '#smrc-behaviour-tab-' + smrc_child_id_url); 379 } 380 }, 3000); 381 382 $(document).on('click', '.smrc_quiz_personalidad_animal .vc_tta-tab:not(.vc_active) a', function (e) { 383 if (!$('.smrc_quiz_personalidad_animal .vc_tta-panel' + $(this).attr('href')).hasClass('smrc-completed-quiz')) { 384 smrc_child_id = $(this).attr('href').replace('#smrc-behaviour-tab-', ''); 385 e.preventDefault(); 386 window.location.href = location.protocol + '//' + location.host + location.pathname + '?smrc_wp_pro_quiz_get_child_id=' + smrc_child_id + '#smrc-behaviour-tab-' + smrc_child_id; 387 } 388 }); 389 } 390 391 if ($('input.smrc-switch').length) { 392 $('input.smrc-switch').each(function (index) { 393 if ($(this).val() == 'true') { 394 value = true; 395 } else { 396 value = false; 397 } 398 399 $(this).switchButton({ checked: value, on_label: 'SÃ', off_label: 'NO', width: 40, height: 16, button_width: 20 }); 400 }); 401 } 402 403 $(document).on('click', '.smrc-reload-page', function (e) { 404 e.preventDefault(); 405 location.reload(); 406 }); 407 408 if ($('.w-modal').length) { 409 $('.w-modal .modal-title').after('<a href="#" class="smrc-modal-close"><i class="material-icons-outlined vertical-align-bottom cursor-pointer">close</i></a>'); $(document).on('click', '.smrc-modal-close', function (e) { 410 e.preventDefault(); $.fancybox.close(); 411 }); 412 } 413 414 if ($('.smrc-accordion-plug').length) { 415 $(document).on('click', '.smrc-accordion-plug', function (e) { 416 e.preventDefault(); 417 if ($(this).next('ul').is(":visible")) { 418 $(this).next('ul').fadeOut(); 419 $(this).find('i').text('keyboard_arrow_right'); 420 } else { 421 $(this).next('ul').fadeIn(); 422 $(this).find('i').text('keyboard_arrow_down'); 423 } 424 }); 425 } 426 427 if ($('.smrc-tooltip').length) { 428 $('.smrc-tooltip').tooltipster({ maxWidth: 300, delayTouch: [0, 4000] }); 429 } 430 431 if ($('.smrc-toggle').length) { 432 $(document).on('click', '.smrc-toggle', function (e) { 433 e.preventDefault(); 434 435 if ($(this).find('i').length) { 436 if ($(this).siblings('.smrc-toggle-content').is(':visible')) { 437 $(this).find('i').text('keyboard_arrow_down'); 438 } else { 439 $(this).find('i').text('keyboard_arrow_up'); 440 } 441 } 442 443 $(this).siblings('.smrc-toggle-content').fadeToggle(); 444 }); 445 } 446 447 if ($('.smrc-link-disabled-closed-inscription').length) { 448 $('.smrc-link-disabled-closed-inscription').click(function (e) { 449 e.preventDefault(); 450 return false; 451 }); 452 } 453 454 /* AVISO LEGAL */ 455 if ($('.smrc-plugged-section').length) { 456 /*$('.smrc-plugged-section p,.smrc-plugged-section h3,.smrc-plugged-section ul').fadeOut();*/ 457 $('.smrc-plugged-section h2').click(function (e) { 458 e.preventDefault(); 459 $(this).closest('.smrc-plugged-section').find('p,h3,ul,div').fadeToggle('slow'); 460 if ($(this).find('i').text() == 'keyboard_arrow_down') { 461 $(this).find('i').text('keyboard_arrow_right'); 462 } else { 463 $(this).find('i').text('keyboard_arrow_down'); 464 } 465 }); 466 467 if (document.URL.indexOf('#compras-y-devoluciones') > -1) { 468 setTimeout(function () { 469 $('html, body').animate({ 470 scrollTop: $('#compras-y-devoluciones').offset().top - 250 471 }, 1000); 472 }, 1000); 473 474 setTimeout(function () { 475 $('#compras-y-devoluciones h2').click(); 476 }, 2000); 477 }; 478 } 479 480 if ($('.smrc-scroll-to').length) { 481 $(document).on('click', '.smrc-scroll-to', function (e) { 482 e.preventDefault(); 483 smrc_btn = $(this); 484 $('html, body').animate({ 485 scrollTop: $(smrc_btn.attr('href')).offset().top - 250 486 }, 2000); 487 }); 488 } 489 490 if ($('.smrc-link-to').length) { 491 $(document).on('click', '.smrc-link-to', function (e) { 492 e.preventDefault(); 493 smrc_btn = $(this); 494 console.log($(smrc_btn.attr('href'))); 495 $($(smrc_btn.attr('href'))).click(); 496 }); 497 } 498 499 $(document).on('blur', '.smrc-required-empty', function (e) { 500 if ($(this).val() != '') { 501 $(this).removeClass('smrc-required-empty'); 502 } 503 }); 504 505 506 if ($('#llms_start_quiz').length) { 507 $('#llms_start_quiz').click(function (e) { e.preventDefault(); $('html, body').animate({ scrollTop: $('#llms-quiz-question-wrapper').offset().top }, 2000); }); 508 } 509 510 if ($('.countdown-label p').length) { $('.countdown-label p').html($('.countdown-label p').html().replace('Time Remaining', 'Tiempo Restante')); } if ($('.smrc-scroll-anchor').length) { $(document).on('click', '.smrc-scroll-anchor', function (e) { e.preventDefault(); $('html, body').animate({ scrollTop: $($(this).attr('href')).offset().top }, 2000); }); } if ($('.modern-rating').length) { $('.modern-rating').html($('.modern-rating').html().replace('Reviews', 'valoraciones')); } 511 if ($('.llms-achievement-date').length) { $('.llms-achievement-date').html($('.llms-achievement-date').html().replace('January', 'Enero').replace('February', 'Febrero').replace('March', 'Marzo').replace('April', 'Abril').replace('May', 'Mayo').replace('June', 'Junio').replace('July', 'Julio').replace('August', 'Agosto').replace('September', 'Septiembre').replace('October', 'Octubre').replace('November', 'Noviembre').replace('December', 'Diciembre')); } if ($('.llms-lesson-button-wrapper').length) { $('.llms-lesson-button-wrapper').html($('.llms-lesson-button-wrapper').html().replace('Lesson Complete', 'Lección completada')); } if ($('.search-side.live-search').length) { $('.search-side.live-search').val(""); } if ($('.woocommerce-ordering select.orderby').length) { $('.select.orderby').select2(); } if ($('.add_to_cart_button').length) { $('.add_to_cart_button').html($('.add_to_cart_button').html().replace('Añadir al carrito', 'Comprar')); } if ($('.single_add_to_cart_button').length) { $('.single_add_to_cart_button').html($('.single_add_to_cart_button').html().replace('Añadir al carrito', 'Comprar')); } if ($('.smrc-close-icon').length) { $(document).on('click', '.smrc-close-icon', function (e) { e.preventDefault(); $(this).closest('div').fadeOut('slow'); }); } if ($('.smrc-collapse').length) { $('.smrc-collapse').click(function (e) { e.preventDefault(); if ($(this).closest('.llms-sd-section').find('.smrc-collapse-div').is(':visible')) { $(this).find('.fa-chevron-down').removeClass('fa-chevron-down').addClass('fa-chevron-right'); $(this).closest('.llms-sd-section').find('.smrc-collapse-div').fadeOut('slow'); } else { $(this).find('.fa-chevron-right').removeClass('fa-chevron-right').addClass('fa-chevron-down'); $(this).closest('.llms-sd-section').find('.smrc-collapse-div').fadeIn('slow'); }; }); };
511 if ($('.modal-contact .wpcf7-submit').length) { $(document).on('click', '.modal-contact .wpcf7-submit', function (e) { setTimeout(function () { if ($('.wpcf7-mail-sent-ok').length) { $('.modal-contact p').fadeOut('slow'); }; }, 3000); }); } if ($('.smrc-collapsing').length) { $('.smrc-collapsing').click(function (e) { e.preventDefault(); if ($(this).siblings('.smrc-collapsing-div').is(':visible')) { $(this).find('.fa-chevron-down').removeClass('fa-chevron-down').addClass('fa-chevron-right'); $(this).siblings('.smrc-collapsing-div').fadeOut('slow'); } else { $(this).find('.fa-chevron-right').removeClass('fa-chevron-right').addClass('fa-chevron-down'); $(this).siblings('.smrc-collapsing-div').fadeIn('slow'); }; }); }; 512 513 if ($('.scrollup').length) { 514 $('.scrollup').attr('href', '#'); 515 } 516 }) 517 518 519})(jQuery);
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.