PageSourceSearch

https://www.lmcchicago.org/assets/freight_train-810769049d9d21ca6b…3e880114b457b65d4f6bec58222b06a4ad8d1331.js

js lmcchicago.org collected 2026-10-09 21:19:12 UTC 13,408 bytes, 1 lines download raw bytes

1var FT,Observer=function(){function e(e,n){for(var t,r=[],o=0,i=e.length;o<i;o++)n(t=e[o])&&r.push(t);return r}var n=function(e,n){this.name=e,this.func=n},t=function(){this.observations=[]};return t.prototype={observe:function(t,r){!(e(this.observations,function(e){return e.name==t&&e.func==r}).length>0)&&this.observations.push(new n(t,r))},unobserve:function(e,n){for(var t,r=0,o=this.observations.length;r<o;)(t=this.observations[r]).name==e&&t.func==n?this.observations.splice(r,1):r+=1},fire:function(n,t,r){!(t instanceof Array)&&(t=[t]);for(var o=e(this.observations,function(e){return e.name==n}),i=0,a=o.length;i<a;i++)o[i].func.apply(r,t)}},t}();(FT=FT||{}).Adapters=FT.Adapters||{},FT.Adapters.jQuery={loaded:function(e){jQuery(e)},attr:function(e,n,t){if(void 0===t)return jQuery(e).attr(n);jQuery(e).attr(n,t)},css:function(e,n){for(property in n)jQuery(e).css(property,n[property])},addClass:function(e,n){jQuery(e).addClass(n)},hasClass:function(e,n){return jQuery(e).hasClass(n)},removeClass:function(e,n){jQuery(e).removeClass(n)},text:function(e){return jQuery(e).text()},find_by_id:function(e){return jQuery("#"+e)[0]},find:function(e,n){return n?jQuery(e).find(n):jQuery(e)},match:function(e,n){return jQuery(e).is(n)},next:function(e,n){return jQuery(e).next(n)[0]},previous:function(e,n){return jQuery(e).prev(n)[0]},up:function(e,n){return jQuery(e).parents(n)[0]},hide:function(e){jQuery(e).hide()},show:function(e){jQuery(e).show()},visible:function(e){return jQuery(e).is(":visible")},clone:function(e){return jQuery(e).clone()[0]},insert_after:function(e,n){return jQuery(n).insertAfter(e)[0]},prependTo:function(e,n){return jQuery(n).prependTo(e)[0]},replace:function(e,n){return jQuery(e).html(n)[0]},serialize:function(e){var n={},t=jQuery(e).serializeArray();return $.each(t,function(){n[this.name]&&"[]"==this.name.substr(-2)?(n[this.name].push||(n[this.name]=[n[this.name]]),n[this.name].push(this.value||"")):n[this.name]=this.value||""}),n},activate:function(e){jQuery(e).focus()},assign:function(e,n){var t=jQuery(e);t.is(":radio")?t.filter('[value="'+n+'"]').prop("checked",!0):t.is(":checkbox")?t.attr("checked","true"==n?"checked":null):t.val(n)},delegate:function(e,n,t,r){jQuery(e).delegate(t,n,r)},fire:function(e,n,t){jQuery(e).trigger(n,t)},on:function(e,n,t){jQuery(e).bind(n,t)},stop:function(e){e.preventDefault(),e.stopPropagation()},target:function(e){return e.target},xhr:function(e,n,t,r){var o=r||{};o.onSuccess&&(o.success=o.onSuccess),o.onComplete&&(o.complete=o.onComplete),o.data=t||{},o.type=n.toUpperCase(),"PUT"!=o.type&&"DELETE"!=o.type||(o.data._method=o.type,o.type="POST"),jQuery.ajax(e,o)}},(FT=window.FT||{}).InlineEditor=function(){var e,n=null,t=null,r=new Observer,o=13,i=27,a=38,u=40,d=function(d,f,s){if(f){var c;if(!(e=e||((c=FT.adapter()).loaded(function(){c.on(document.body,"keydown",function(e){e.keyCode==i&&window.FT.InlineEditor.close()})}),c)))throw new"FT.adapter() is not defined!";f.edit_inline=function(){var i=window.FT;window.FT.InlineEditor.close(),r.fire("before_init",f);var c=s(f);if(c){c.id="edit_row",e.addClass(f,"in-edit"),e.insert_after(f,c),c.save=function(n){var r=e.up(c,"form");if(r){var o=e.serialize(r);i.xhr(d,"put",o,{onSuccess:function(){t==c&&window.FT.InlineEditor.close()},onComplete:function(e){400!=e.status&&n&&n()}})}};for(var l=e.find(c,'button[name="submit"]'),v=0,p=l.length;v<p;v++)e.on(l[v],"click",function(n){e.stop(n),c.save()});e.on(c,"keydown",function(n){var t=e.target(n);t&&e.is_in(t,".chosen-with-drop")||(n.keyCode==o&&(e.stop(n),c.save()),n.keyCode==a&&r.fire("up",[n,f,c]),n.keyCode==u&&r.fire("down",[n,f,c]))}),r.fire("after_init",[f,c]),i.selectFirstFieldIn(c),n=f,t=c}},e.on(f,"click",function(n){var t=e.target(n);t&&!e.is_in(t,"input, button, a")&&f.edit_inline()})}};return d.close=function(){(n||t)&&(r.fire("close",[n,t]),n&&e.removeClass(n,"in-edit"),t&&t.parentNode&&t.parentNode.removeChild(t),n=null,t=null)},d.observe=function(e,n){r.observe(e,n)},d.unobserve=function(e,n){r.unobserve(e,n)},d}(),function(){function e(e){n(e),f(),oe&&_(),fe.fire("load")}function n(e){de||(t(e),ae&&r(),o(),a(),d(),fe.fire("initialized"),de=!0)}function t(e){if("jquery"===(e=e||{}).adapter)ce=FT.Adapters.jQuery;else ce=FT.Adapters.Prototype;ce.is_in=function(e,n){return ce.match(e,n)||!!ce.up(e,n)},FT.$=ce,e.token,ie=e.save_when_navigating,ae=e.enable_keyboard_navigation,ue=e.enable_ghost_rows}function r(){FT.InlineEditor.observe("up",function(e,n,t){var r=ce.previous(n,".editable");r&&(ce.stop(e),ie&&t.save(),r.edit_inline())}),FT.InlineEditor.observe("down",function(e,n,t){var r=ce.next(t,".editable");r&&(ce.stop(e),ie&&t.save(),r.edit_inline())})}function o(){FT.InlineEditor.observe("after_init",function(e,n){i(e,n),oe&&F(n)})}function i(e,n){var t=ce.up(e,"form.freight_train"),r=t&&m(t);r&&r.initializeEditor(e,n)}function a(){u()}function u(){ce.delegate(document.body,"click",".delete-command",function(e){var n=ce.target(e),t=n&&ce.attr(n,"data-id"),r=n&&ce.up(n,"form.freight_train"),o=r&&m(r);o&&t&&(ce.stop(e),o&&o.destroy(t))})}function d(){ce.on(document.body,"ft:destroy",function(e){FT.InlineEditor.close();var n=ce.target(e);n&&n.parentNode&&n.parentNode.removeChild(n),FT.Helpers.restripeRows()})}function f(){for(var e=s(),n=0,t=e.length;n<t;n++)c(e[n])}function s(){return ce.find("form.freight_train")}function c(e){l(e)?v(e):p(e)}function l(e){for(var n=0,t=se.length;n<t;n++)if(se[n]==e)return!0;return!1}function v(){}function p(e){h(e),w(e),b(e)}function h(e){ce.on(e,"submit",function(n){ce.stop(n),FT.InlineEditor.close(),y(e)})}function y(e){FT.xhr(e.action,"post",ce.serialize(e))}function w(e){var n=m(e);if(n&&!n.extended){n.init(),n.extended=!0;var t=n.hookupRow,r=n.collection();n.addRow=function(e){var t=ce.find_by_id(r),o=ce.prependTo(t,e);n.hookupRow(o),ce.hide("#flash_error"),ce.fire(o,"ft:create"),FT.Helpers.restripeRows()},n.updateRow=function(e,t){var r=ce.find_by_id(e);r&&(ce.replace(r,t),n.hookupRow(r),ce.hide("#flash_error"),ce.fire(r,"ft:update"))},n.deleteRow=function(e){var n=ce.find_by_id(e);n&&ce.fire(n,"ft:destroy")},n.updateRows=function(e){var t=ce.find_by_id(r);t&&(ce.replace(t,e),n.hookupRows())},n.hookupRow=function(e){ce.hasClass(e,"interactive")&&FT.Helpers.hoverRow(e),ce.hasClass(e,"editable")&&n.activateEditing&&n.activateEditing(e),t&&t(e)},n.hookupRows=function(t){for(var r=0,o=(t=t||g(e)).length;r<o;r++)n.hookupRow(t[r])}}}function m(e){var n=ce.attr(e,"data-model"),t=FT[n];return t||FT.debug("[ft] FT."+n+" was not found."),t}function g(e){return ce.find(e,".row")}function b(e){var n=m(e);n&&n.hookupRows&&n.hookupRows()}function _(){F(document.body)}function F(e){ne(C(e),j)}function T(){k(document.body)}function k(e){ne(C(e),L)}function C(e){return ce.find(e,".nested.editor")}function j(e){ce.delegate(e,"click",".add-nested-link",Q(S)),ce.delegate(e,"click",".delete-nested-link",Q(H)),ue&&ce.delegate(e,"change, keyup","input, select",R),ce.delegate(e,"focus","*",x),ce.delegate(e,"blur","*",N),L(e);for(var n,t,r=ce.find(e,'[data-attr="_destroy"][value="1"]'),o=0,i=r.length;o<i;o++)t=r[o],(n=ce.up(t,".nested-row"))&&ce.hide(n);I(e)}function Q(e){return function(n){ce.stop(n);var t=E(n);t&&e(t)}}function E(e){var n=ce.target(e),t=n&&ce.up(n,".nested-row");return t||FT.debug("[getParentNestedRow] .nested-row not found"),t}function R(e){var n=E(e);
1n&&n.parentNode&&I(ce.up(n,".nested.editor"))}function x(e){var n=E(e);n&&ce.addClass(n,"focused-row")}function N(e){var n=E(e);n&&ce.removeClass(n,"focused-row")}function I(e){if(ue&&0!=ce.find(e,".nested-row input:visible").length){var n=A,t=ce.attr(e,"data-is-empty-row");if(t){for(var r=t.split("."),o=window,i=0;i<r.length;i++)o=o&&o[r[i]];o&&(n=o)}for(var a,u=ce.find(e,".nested-row"),d=[],f=(i=0,u.length);i<f;i++)n(a=u[i])?(i>0&&ce.addClass(a,"empty-row"),d.push(a)):ce.removeClass(a,"empty-row");u.length>0&&0==d.length&&S(u[0],{noSelect:!0});for(i=1;i<d.length;i++)H(d[i],{noSelect:!0})}}function A(e){var n=0;return ne(ce.find(e,"input:visible"),function(e){"hidden"!=e.type&&"checkbox"!=e.type&&"radio"!=e.type&&(""==e.value||n++)}),0==n}function S(e,n){if(e.parentNode){var t=ce.up(e,".nested.editor");n=n||{};var r=ce.clone(e),o=ce.attr(r,"name").replace(/\[(\d+)\]/,function(e,n){return"["+(Number(n)+1)+"]"});r.id=e.id.replace(/(\d+)$/,function(e,n){return Number(n)+1}),ce.attr(r,"name",o),ce.attr(r,"attr",o),ce.removeClass(r,"focused-row"),ce.addClass(r,"empty-row"),e.parentNode.appendChild(r),O(r,"_destroy",0),O(r,"id",""),Z(r),n.noSelect||ee(r),fe.fire("after_add_nested",[t,r]),L(t)}}function H(e,n){if(e.parentNode){var t=ce.up(e,".nested.editor");n=n||{};var r=0;ne(e.parentNode.childNodes,function(e){"1"!=z(e,"_destroy")&&r++}),r<=1&&S(e);var o=ce.previous(e)||ce.next(e);n.noSelect||ee(o),z(e,"id")?(O(e,"_destroy",1),ce.hide(e)):e.parentNode.removeChild(e),fe.fire("after_delete_nested",[t,e]),L(t)}}function z(e,n){var t=P(e,n);return t&&t.value}function O(e,n,t){var r=P(e,n);r&&(r.value=t)}function P(e,n){return ce.find(e,'[data-attr="'+n+'"]')[0]}function L(e){ce.attr(e,"name");for(var n,t=ce.find(e,".nested-row"),r=[],o=0,i=t.length;o<i;o++)$(n=t[o],o),"1"!=z(n,"_destroy")&&r.push(n);for(i=r.length-1,o=0;o<i;o++)D(r[o],"hidden");i>=0&&D(r[i],"visible"),fe.fire("after_reset_nested",e)}function $(e,n){ne(ce.find(e,"input, textarea, select"),function(e){var t=ce.attr(e,"name");t&&ce.attr(e,"name",t.replace(/\[(\d+)\]/,function(){return"["+n+"]"}))})}function D(e,n){var t=ce.find(e,".add-link")[0];t&&ce.css(t,{visibility:n})}function M(e){for(var n=ce.find(e,".nested-row"),t=1,r=n.length;t<r;t++){var o=n[t];o.parentNode.removeChild(o)}L(e)}function U(e,n,t){return!(e&&!confirm(e))&&(V(n),FT.xhr(t,"delete"),!0)}function V(e){var n=ce.find(e)[0];n&&(ce.addClass(n,"deleted"),ce.removeClass(n,"editable"),ce.find(n,"input").each(function(e){e.disabled=!0}))}function q(e,n,t,r){(t=t||{}).freight_train="true";var o=B("csrf-param");return o&&(t[o]=B("csrf-token")),ce.xhr(e,n,t,r)}function B(e){var n=ce.find('meta[name="'+e+'"]')[0];return n&&ce.attr(n,"content")}function G(e,n,t){var r=K(e,t),o=Y(n,t);o&&r&&ce.assign(o,r)}function J(e,n){return ce.attr(e,"name")+"["+n+"]"}function K(e,n){var t=X(e,n);return t&&(ce.attr(t,"value")||ce.text(t))}function W(e,n){var t=X(e,n);return t&&(ce.attr(t,"value")||t.innerHTML)}function X(e,n){var t='*[attr="'+n+'"]',r=ce.find(e,t)[0];return r||FT.debug(t+" not found")&&null}function Y(e,n){var t='*[attr="'+n+'"]';return ce.find(e,t)}function Z(e,n){function t(){return!(n.only&&!te(n.only,d.id)||n.except&&te(n.except,d.id
1))}var r=ce.find(e,'input[type="text"], input[type="tel"], input[type="email"], textarea'),o=ce.find(e,"select"),i=ce.find(e,".nested.editor");n=n||{};for(var a=0,u=r.length;a<u;a++){var d=r[a];t(d.id)&&(d.value="")}for(a=0,u=o.length;a<u;a++){var f=o[a];t(f.id)&&(f.selectedIndex=0)}for(a=0,u=i.length;a<u;a++)M(i[a])}function ee(e){for(var n=ce.find(e,"input, select, textarea"),t=0,r=n.length;t<r;t++){var o=n[t];if(ce.visible(o)&&"hidden"!=o.type)return void ce.activate(o)}}function ne(e,n){for(var t=0,r=e.length;t<r;t++)n(e[t])}function te(e,n){for(var t=0,r=e.length;t<r;t++)if(e[t]==n)return!0;return!1}function re(e,n){for(method in n)e[method]=n[method]}var oe=!0,ie=!1,ae=!1,ue=!1,de=!1,fe=new Observer,se=[],ce=null,le={restripeRows:function(){for(var e=ce.find(".row"),n=0,t=e.length,r=!1;n<t;n++,r=!r)(r?ce.addClass:ce.removeClass)(e[n],"alt")},hoverRow:function(e){if(!e)throw new Error("row must not be null");ce.on(e,"mouseover",function(){fe.fire("hover",[e]),ce.addClass(e,"hovered")}),ce.on(e,"mouseout",function(){ce.removeClass(e,"hovered")})},editRowInline:function(e,n,t,r,o){var i=n+"/"+ce.attr(e,"id").match(/\d+/);new FT.InlineEditor(i,e,t,r,o)},editRow:function(e,n){var t;t="function"==typeof n?n:function(e){var t=ce.attr(e,"id").match(/\d+/),r=n+"/"+t;window.location=r},ce.on(e,"click",function(){t(e)})},createOptions:function(e,n){for(var t="",r=0,o=e.length;r<o;r++){var i=e[r],a=i instanceof Array,u=a?i[0]:i,d=a?i[1]:i;t+='<option value="'+d+'"'+(d==n?'selected="selected"':"")+">"+u+"</option>"}return t},forEachRow:function(e,n,t,r){for(var o=ce.find(e,t),i=ce.find(n,t),a=0,u=o.length;a<u;a++){var d=o[a],f=i[a];r(d,f,ce.attr(f,"name"))}},forEachNestedRow:function(e,n,t){for(var r=ce.find(e,n),o=0,i=r.length;o<i;o++)t(r[o],o)},createEditor:function(e,n,t){var r=document.createElement(e);return r.className="row editor "+t,r.innerHTML=n,r},resetOnCreate:function(e,n){"none"!=(n=n||"all")&&ce.on(document.body,"ft:create",function(){ne(ce.find('form[data-model="'+e+'"] #add_row'),function(e){Z(e,n),ee(e)})})}};re(FT,{Helpers:le,init:e,adapter:function(){return ce},observe:function(e,n){fe.observe(e,n)},unobserve:function(e,n){fe.unobserve(e,n)},destroy:U,xhr:q,copyValue:G,getAttrName:J,getAttrValue:K,getAttrHtml:W,getField:X,resetFormFieldsIn:Z,selectFirstFieldIn:ee,enableNestedEditors:_,enableNestedEditorsIn:F,updateNestedEditors:T,updateNestedEditorsIn:k,addNestedRow:S,deleteNestedRow:H,getNestedRowFromEvent:E,check_selected_values:function(e,n,t){var r=e.down('*[attr="'+t+'"]');if(r)for(var o=r.readAttribute("value").split("|"),i=0;i<o.length;i++)(r=n.down('*[value="'+o[i]+'"]'))?r.writeAttribute("checked","checked"):FT.debug('"'+o[i]+'" not found');else FT.debug(t+" not found")},debug:function(e){window.console&&window.console.log&&window.console.log(e)}})}();

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.