// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See http://@sbaseurl@/jsapi/jsapi/esri/copyright.txt and http://www.arcgis.com/apps/webappbuilder/copyright.txt for details.

//>>built
define("dojo/_base/declare dijit/_WidgetBase dojo/on dojo/_base/lang dojo/_base/html dojo/query dojo/Evented dijit/Tooltip".split(" "),function(l,m,n,e,d,p,q,k){var f=null,h=l([m,q],{baseClass:"jimu-editor-preview-link-messager",declaredClass:"jimu.dijit.EditorPreviewLinkMessager",time:3E3,postMixInProperties:function(){this.nls=window.jimuNls.richTextEditor;this.tooltipPrefix=this.nls.previewLinkToolTipsPrefix;this.tooltipSuffix=this.nls.previewLinkToolTipsSuffix},isInBuilder:function(){return window&&
window.parent&&window.parent.isBuilder},isHasContent:function(a,b){return a&&!b},filter:function(a){if(a.nodeType&&1===a.nodeType){a=p("a",a);for(var b=0,r=a.length;b<r;b++){var c=a[b];if("_self"===d.attr(c,"target")){d.removeAttr(c,"target");var t=d.attr(c,"href");d.attr(c,"onclick",e.hitch(this,function(g){this._interceptLink(g);return!1}));this.own(n(c,"focus",e.hitch(this,function(g){this._interceptLink(g)})));d.setAttr(c,"aria-label",t)}}}},_interceptLink:function(a,b){a&&a.preventDefault();
b=a.target.href;k.show(this.tooltipPrefix+b+"\x3cbr/\x3e"+this.tooltipSuffix,a.target);setTimeout(e.hitch(this,function(){k.hide(a.target)}),this.time);return!1}});h.getInstance=function(){null===f&&(f=new h);return f};return h});