Ρu      !"#$%&'()*+,-./0123456789 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s tNoneuuuNoneMA session manager for the baseLens to the session snapletOThe heist snaplet (not a lens), if you want splices to be added automatically.     Safe-Inferred vwxyz{|}~w}~ vwxyz{|}~None(A list of splices offered in this module4Gets the value of a request parameter. Example use: rqparamname="username"/7Assume text area contains the name of a splice as Text.This is helpful when you pass a default value to digestive-functors by putting the name of a splice as the value of a textarea tag. ,heistLocal runTextAreas $ render "joo/index"8Splice helper for when you're rendering a select elementSearches a directory on disk and all its subdirectories for all files with names that don't begin with an underscore and end with a .js extension. It then returns script tags for each of these files.-You can use this function to create a splice: 0("staticscripts", scriptsSplice "static/js" "/")Then when you use the <staticscripts/>V tag in your templates, it will automatically include all the javascript code in the  static/js directory.Check to see if the boolean flag named by the "ref" attribute is present and set to true in snaplet user config file. If so, run what's inside this splice, if not, simply omit that part.Example: 4<flag ref="beta-functions-enabled"> stuff... </flag>2This will look for an entry inside your .cfg file: beta-functions-enabled = trueA name for the select elementAn id for the select elementvalue, shown text pairs Default value;Path to the directory on disk holding the javascript files.8A prefix to add to the src attribute of each script tag.None4Gets the value of a request parameter. Example use: rqparamname="username"/Searches a directory on disk and all its subdirectories for all files with names that don't begin with an underscore and end with a .js extension. It then returns script tags for each of these files.-You can use this function to create a splice: 0("staticscripts", scriptsSplice "static/js" "/")Then when you use the <staticscripts/>V tag in your templates, it will automatically include all the javascript code in the  static/js directory.Sometimes in a loop you don't always want the same behavior for every item. If you have a comma separated list, you usually don't want a comma after the last item. If you have a list surrounded by parentheses, you might not want the parentheses to show up if the list is empty. Dealing with these situations can be a pain with the stock looping splices, so we've provided this helper that solves all of these problems.This function is similar to manyWithSplices, but it binds three additional splices: "prelude", "interlude", and "postlude". The children of the prelude and postlude splices only show up before the beginning of the list and after the end of the list if the list is non-empty. The children of the interlude splice are used as a separator between each list element. If the list has only one element, then the separator does not appear. These splices have this behavior regardless of where they appear in the parent tag.<Path to the directory on disk holding the javascript files.8A prefix to add to the src attribute of each script tag. Safe-Inferred    None ! A tab is a 0 generator upon receiving a current URL context."(How do we decide "active" for tab state?$)A sub-set of the current url has to match%*Only the prefix needs to match current url& Current url has to match exactly(Compiled splice for tabs.tCan't use tabSpliceWorker because we have to explicitly run the attributes in order to get ${} splice substitution.*(Make tabs from tab definitions. Use the +* combinator to define individual options.+%Tab item constructor to be used with *=. Just supply the given arguments here and it will create a ! ready to be used in *.IIf the tab is currently active, the li tag will get a class of 'active'.Make sure to provide a trailing / when indicating URLs as snap context paths contain it and active tab checks will be confused without it.!"#$%&'()*(A class to be given to the parent ul tagList of tabs in order+Target URL for tabA text/label for tabA list of attributes as key=valA " for this tab !"#$%&'()*+ ')("&%$#!*+ !"&%$#'()*+None,`Wrap a handler with method override support. This means that if (and only if) the request is a POST, _method param is passed, and it is a parsable method name, it will change the request method to the supplied one. This works around some browser limitations with forms. If you use a different parameter name than _method, use handleMethodOverride',Internal handler to call-parameter name for methodInternal handler to call,-,-,-None.-Transform to Nothing if field is empty string/Maybe read into target value0Read into target value1VConstructs a generalized edit form splice that looks up an ID param specified by the by2 attribute. You might use this splice as follows: <editFormSplice by="id">If you don't specify the by attribute, the default is by="id"../01WFunction for generating a splice from an optional default value calculated at runtime./Function for retrieving the form default by ID../01./01./01None2xInitialize the flash notice system. All you have to do now is to add some flash tags in your application template. See 7 for examples.3.Display an info message on next load of a page41Display an warning message on next load of a page50Display a success message on next load of a page6/Display an error message on next load of a page75A splice for rendering a given flash notice dirctive.Ex:  flashtype='warning'/ Ex: flashtype='success'/8>A compiled splice for rendering a given flash notice dirctive.Ex:  flashtype='warning'/ Ex: flashtype='success'/2345678234567823456782345678 None9UDiscard anything after this and return given status code to HTTP client immediately.: Finish early with error code 400; Finish early with error code 404< Finish early with error code 500=Mark response as  'text/plain'>Mark response as 'application/json'?Mark response as 'application/javascript'@}Easier debug logging into error log. First argument is a category/namespace and the second argument is anything that has a  instance.AAAlternate version of getParam that considers empty string NothingB7Require that a parameter is present or terminate early.CgRead a parameter from request. Be sure it is readable if it's there, or else this will raise an error.DxTry to read a parameter from request. Computation may fail because the param is not there, or because it can't be read.EYRedirects back to the refering page. If there is no Referer header, then redirect to /.FYRedirects back to the refering page. If there is no Referer header, then redirect to /.GhIf the current rqURI does not have a trailing slash, then redirect to the same page with a slash added.HbIf the current rqURI has a trailing slash, then redirect to the same page with no trailing slash.J-Evaluates an action that returns a Maybe and K%Concatenates two URL segments with a  between them. To prevent double slashes, all trailing slashes are removed from the first path and all leading slashes are removed from the second path.9:;<=>?@ABCDEFGHIJK9:;<=>?@ABCDEFGHIJK9:;<=>?@ABCDEFGHIJK9:;<=>?@ABCDEFGHIJK NoneLTDemand the presence of JSON in the body assuming it is not larger than 50000 bytes.MDemand the presence of JSON in the body with a size up to N bytes. If parsing fails for any reson, request is terminated early and a server error is returned.NDTry to parse request body as JSON with a default max size of 50000.O7Parse request body into JSON or return an error string.P(Get JSON data from the given Param fieldQ,Force the JSON value from field. Similar to PR Set MIME to 'application/json' and write given object into  body.LMMaximum size in bytesNOMaximum size in bytesPQRLMNOPQRONMLPQRLMNOPQR NoneSA splice that makes the CSRF token available to templates. Typically we use it by binding a splice and using the CSRF token provided by the session snaplet as follows: -("csrfToken", csrfTokenSplice $ with session )Where session is a lens to the session snaplet. Then you can make it available to javascript code by putting a meta tag at the top of every page like this: /<meta name="csrf-token" content="${csrfToken}">TBAdds a hidden _csrf input field as the first child of the bound tag. For full site protection against CSRF, you should bind this splice to the form tag, and then make sure your app checks all POST requests for the presence of this CSRF token and that the token is randomly generated and secure on a per session basis.UUse this function to wrap your whole site with CSRF protection. Due to security considerations, the way Snap parses file uploads means that the CSRF token cannot be checked before the file uploads have been handled. This function protects your whole site except for handlers of multipart/form-data forms (forms with file uploads). To protect those handlers, you have to call handleCSRF explicitly after the file has been processed.VIf a request is a POST, check the CSRF token and fail with the specified handler if the check fails. If if the token is correct or if it's not a POST request, then control passes through as a no-op.W A version of Vd that works as an imperative filter. It's a NOOP when successful, redirs to oblivion under failure.SHA computation in the runtime monad that gets the CSRF protection token.THA computation in the runtime monad that gets the CSRF protection token.ULens to the session snaplet&Handler to run if the CSRF check fails'Handler to let through when successful.VLens to the session snapletHandler to run on failure'Handler to let through when successful.W On failureSTUVWSTUVWSTUVW  Soostone IncBSD3 Ozgun Ataman experimentalNoneXlPossible reponse types we support at the moment. Can be expanded for more use cases like JSON, CSV and XML.[8Replace innerHTML of given selector with given conntent.FProduce JS statement to replace a target's inner with given contents.\eReplace the inner HTML element of a given selector with the contents of the rendered Heist template.OCurrently expect you to have jQuery loaded. TODO: Make this jQuery independent]/The multi-mime dispatcher. It will inspect the Acceptg header and determine what type of a request this is. If AJAX, make sure to set the Accept header to 'application/javascript'.^Dispatch on all response types_OClassic pattern of responding to a static HTML or an alternative AJAX request. XYZ[jquery selector content blob\Heist template name*jQuery selector for target element on page]^_If call is HTMLIf call is AJAXXYZ[\]^_[\XZY]^_XZY[\]^_ NoneEM `The complete status of a job.h*Enumeration of the states a job can be in.m>Top-level handler that handles the job polling infrastructure.njFunction to generate a status splice. This splice makes the following splices available to its children:lConditional splices: ifPending, ifRunning, ifNotFinished, ifFinished, ifFinishedSuccess, ifFinishedFailurevData splices: elapsedSeconds, startTime, endTime, jobState, messages, percentCompleted, amountCompleted, amountTotal<JS code to do an AJAX request to updateStatus after a delay.o6Returns a bool indicating whether the job is finished.p6Returns a bool indicating whether the job is finished.q+Calculates the percent completed as an Int.rThe status splices`abcdefghijklm:Name of the template to use for the updateStatus endpoint.aA CSS selector string used to substitute the contents of the AJAX template into the status page.n0Splices defined for your job status type status.Handler to get the URL that should be used for requesting AJAX status updates. This must be a handler because it will usually contain some form of job ID that is only obtainable at runtime.Handler that knows how to get the status of the job in question. This typically will require it to know how to get some sort of job ID from the request.1A function to tell whether the status is finished&The url for incremental status updatesEThe amount of time to wait before requesting the page in millisecondsopqrs`abcdefghijklmnopqrsmnhlkjiop`abcdefgqsr `abcdefghlkjimnopqrsNonetInitialize all the b functionality in your Snap app. Currently, we don't need to keep any state and simply return ().tE !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_ttt !"#$%&'(")$'*+,-./0123456789:;<=>?@ABCDEFG H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o o p q r s t u v w x y z { | } ~   snap-extras-0.11Snap.Extras.NavTrails#Snap.Extras.SpliceUtils.Interpreted Snap.Extras.SpliceUtils.CompiledSnap.Extras.TextUtilsSnap.Extras.TabsSnap.Extras.MethodOverrideSnap.Extras.FormUtilsSnap.Extras.FlashNoticeSnap.Extras.CoreUtilsSnap.Extras.JSONSnap.Extras.CSRFSnap.Extras.AjaxSnap.Extras.PollStatus Snap.ExtrasSnap.Extras.SpliceUtils.CommonPaths_snap_extrasSnapExtrasNavTrailntSes initNavTrailsetFocus setFocus' setFocusToRefgetFocus getFocusDef redirBack redirFocus backSplice backCSplice focusSplice focusCSpliceaddNavTrailSplices utilSplices refererSplice paramSplice runTextAreas selectSplice scriptsSplice ifFlagSplicerefererCSplicefancyLoopSpliceshowTshowBSreadTreadBS titleCaseTab TabActiveMode TAMDontMatch TAMInfixMatchTAMPrefixMatch TAMExactMatchinitTabs tabsCSplice tabsSplicemkTabstabhandleMethodOverridehandleMethodOverride' maybeTrans readMayTrans readTranseditFormSpliceinitFlashNotice flashInfo flashWarning flashSuccess flashError flashSplice flashCSplice finishEarlybadReqnotFound serverError plainResponse jsonResponse jsResponseeasyLog getParam'reqParam readParam readMayParamredirectRefererredirectRefererFuncdirifyundirify maybeBadReq fromMaybeM-/-reqJSONreqBoundedJSONgetJSONgetBoundedJSON getJSONField reqJSONField writeJSONcsrfTokenSplice secureForm blanketCSRF handleCSRF handleCSRF' ResponseTypeAjaxHtml replaceWithreplaceWithTemplaterespondresponds htmlOrAjaxStatusstatusStartTimestatusTimestampstatusJobStatestatusMessagesstatusAmountCompletedstatusAmountTotalJobStateFinishedFailureFinishedSuccessRunningPendingjobStatusHandler statusSplice jobFinishedstatusFinishedstatusPercentCompleted statusSplices statusElapsed initExtras getScriptscatchIOversionbindirlibdirdatadir libexecdir sysconfdir getBinDir getLibDir getDataDir getLibexecDir getSysconfDirgetDataFileNamefindNamedChildxmlhtml-0.2.3.4Text.XmlHtml.CommonNode tabCSplicetabSpliceWorker tabSplicetlinkmethodOverridebaseGHC.ShowShowGHC.Real/snap-core-0.9.7.0Snap.Internal.Http.TypesResponse snap-0.14.0.2Snap.Snaplet.Session csrfToken replaceWithJsupdateJStshow