text: /**
   * Copyright (c) 2014, 2016, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   */
  "use strict";
  define(["ojs/ojcore","jquery","hammerjs","promise","ojs/ojjquery-hammer","ojs/ojcomponentcore"],function(a,f){a.Cc={};o_("PullToRefreshUtils",a.Cc,a);a.Cc.Iqa=function(b,d,c){var e,g,h,k,l,m,n,p,r,s,q,t;e=f(document.createElement("div"));a.Cc.Aka(e,d,c);g=f(document.createElement("div")).addClass("oj-pulltorefresh-panel");e.append(g);h=f(b);h.prepend(e);h.on("touchstart.pulltorefresh",function(b){null==f.data(g[0],"data-pullstart")&&0===h[0].scrollTop&&(a.Cc.JX(b,g,c),n=g.find(".oj-pulltorefresh-icon"),
  0<n.length&&(p=n.parent().outerHeight(!0)),c&&!isNaN(c.threshold)&&(k=parseInt(c.threshold,10)),k=isNaN(k)?g.outerHeight(!0):Math.max(0,Math.min(k,g.outerHeight(!0))),g.css("height",0),g.removeClass("oj-pulltorefresh-transition"),f.data(g[0],"data-pullstart",b.originalEvent.touches[0].clientY))}).on("touchmove.pulltorefresh",function(b){l=f.data(g[0],"data-pullstart");null!=l&&(m=b.originalEvent.touches[0].clientY-parseInt(l,10),0>m||(b.preventDefault(),null!=f.data(g[0],"data-loading")?g.css("height",
  Math.max(m,k)):(g.css("height",m),a.Cc.uB(b,"pull",g,m),null!=n&&0<n.length&&(r=f.data(g[0],"data-lasticonclass"),null!=r&&n.removeClass(r),q=10*Math.round(m/k*10),100<=q?(t="oj-pulltorefresh-icon-full",s=a.ha.A("oj-pullToRefresh.titleIconFull")):(t="oj-pulltorefresh-icon-"+q+"-percent",s=a.ha.A("oj-pullToRefresh.titleIcon"+q+"percent")),n.addClass(t),n.attr("title",s),f.data(g[0],"data-lasticonclass",t),a.Cc.Xla(g,m>p)))))}).on("touchcancel.pulltorefresh",function(){a.Cc.ok(g)}).on("touchend.pulltorefresh",
  function(b){l=f.data(g[0],"data-pullstart");null!=l&&null==f.data(g[0],"data-loading")&&(g.outerHeight()<k?(g.addClass("oj-pulltorefresh-transition").css("height",0),a.Cc.ok(g)):a.Cc.KX(b,g,d))})};o_("PullToRefreshUtils.setupPullToRefresh",a.Cc.Iqa,a);a.Cc.JX=function(b,d,c){var e,g;a.Cc.uB(b,"pull",d,0);0==d.children().length&&(c&&(e=c.primaryText,g=c.secondaryText),a.Cc.Dba(d,e,g));d.prev().text(a.ha.A("oj-pullToRefresh.ariaRefreshingLink"));d.css("height","auto");f.data(d[0],"data-panelheight",
  d.outerHeight())};a.Cc.KX=function(b,d,c){var e,g,h,k;e=f.data(d[0],"data-panelheight");d.addClass("oj-pulltorefresh-transition").css("height",e);a.Cc.uB(b,"release",d,e);f.data(d[0],"data-loading",!0);g=d.find(".oj-pulltorefresh-icon");0<g.length&&(h=f.data(d[0],"data-lasticonclass"),null!=h&&g.removeClass(h),g.addClass("oj-pulltorefresh-icon-full"));c().then(function(){k=function(){a.Cc.uB(b,"complete",d,e);a.Cc.ok(d);d.off("transitionend",k);d.prev().text("")};d.prev().text(a.ha.A("oj-pullToRefresh.ariaRefreshCompleteLink"));
  d.prev().prev().css("position","");d.on("transitionend",k);d.css("height",0)})};a.Cc.Wqa=function(a){f(a).children().first().remove();f(a).off(".pulltorefresh")};o_("PullToRefreshUtils.tearDownPullToRefresh",a.Cc.Wqa,a);a.Cc.uB=function(a,d,c,e){d=f.Event("oj"+d);d.originalEvent=a;c.trigger(d,{content:c,distance:e})};a.Cc.Dba=function(a,d,c){var e,g;a.addClass("oj-pulltorefresh-content").attr("aria-hidden","true");e=f(document.createElement("div"));e.addClass("oj-pulltorefresh-icon oj-pulltorefresh-icon-initial");
  g=f(document.createElement("div"));g.addClass("oj-pulltorefresh-icon-container");g.append(e);f.data(a[0],"data-lasticonclass","oj-pulltorefresh-icon-initial");a.append(g);null!=d&&(d=f(document.createElement("div")).addClass("oj-pulltorefresh-primary-text").text(d),a.append(d),null!=c&&(c=f(document.createElement("div")).addClass("oj-pulltorefresh-secondary-text").text(c),a.append(c)))};a.Cc.Xla=function(a,d){var c,e;c=a.find(".oj-pulltorefresh-primary-text");e=a.find(".oj-pulltorefresh-secondary-text");
  d?(c&&c.show(),e&&e.show()):(c&&c.hide(),e&&e.hide())};a.Cc.Aka=function(b,d,c){var e,g,h;e=f(document.createElement("a"));e.text(a.ha.A("oj-pullToRefresh.ariaRefreshLink"));e.addClass("oj-helper-hidden-accessible").attr("href","#").focus(function(){e.css("position","static")}).blur(function(a){null!=a.relatedTarget&&e.css("position","")}).click(function(e){g=b.children().last();a.Cc.JX(e,g,c);a.Cc.KX(e,g,d);d()});h=f(document.createElement("div"));h.addClass("oj-helper-hidden-accessible").attr("aria-live",
  "polite");b.append(e);b.append(h)};a.Cc.ok=function(a){f.removeData(a[0],"data-pullstart");f.removeData(a[0],"data-loading");0<a.find(".oj-pulltorefresh-icon").length&&a.empty()}});