STRATO-apps/wordpress_03/app/wp-content/plugins/fluentformpro/public/js/chatFieldScript.js

SHA-256: e4ea16f289e73ff4927a5e9093c5177eaa8826e8cf933eb05c1c839338c74feb
(()=>{var n,e,t;n=jQuery,e=window.fluentform_chat.message,t='\n        <div class="ff-chat-gpt-loader-svg" style="text-align: center">\n            <p class="ff-chat-gpt-loading-msg">'.concat(e,'</p>\n            <div>\n                <svg version="1.1"\n                     id="L4"\n                     xmlns="http://www.w3.org/2000/svg"\n                     xmlns:xlink="http://www.w3.org/1999/xlink"\n                     x="0px"\n                     y="0px"\n                     viewBox="0 0 100 100"\n                     enable-background="new 0 0 0 0"\n                     xml:space="preserve"\n                     width="50px"\n                     height="50px"\n                     style="margin: 0px auto;"\n                >\n                    <circle fill="#000" stroke="none" cx="6" cy="50" r="6">\n                        <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.1"/>\n                    </circle>\n                    <circle fill="#000" stroke="none" cx="26" cy="50" r="6">\n                        <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.2"/>\n                    </circle>\n                    <circle fill="#000" stroke="none" cx="46" cy="50" r="6">\n                        <animate attributeName="opacity" dur="1s" values="0;1;0" repeatCount="indefinite" begin="0.3"/>\n                    </circle>\n                </svg>\n            </div>\n        </div>\n    '),n(document.body).on("fluentform_init",function(i,a){a.hasClass("ff-has-chat-gpt")&&""!==e&&(a.find("button[type=submit]").on("click",function(n){n.preventDefault(),a.toggle(),a.parents(".fluentform").append(t),a.trigger("submit")}),a.on("fluentform_submission_success",function(e,t){t.form.toggle(),n(".ff-chat-gpt-loader-svg").hide()}),a.on("fluentform_submission_failed",function(n,e){var t=e.form;t.hide(),t.siblings(".ff-chat-gpt-loader-svg").hide()}))})})();